Skip to content

Voxels binding to python updates#631

Merged
Grantim merged 2 commits intomasterfrom
Voxels_binding_to_python_updates
Oct 24, 2022
Merged

Voxels binding to python updates#631
Grantim merged 2 commits intomasterfrom
Voxels_binding_to_python_updates

Conversation

@Grantim
Copy link
Contributor

@Grantim Grantim commented Oct 24, 2022

No description provided.

@Grantim Grantim requested review from ABSitf and Fedr October 24, 2022 12:46
def_readwrite( "surfaceOffset", &MR::MeshToVolumeParams::surfaceOffset, "the number of voxels around surface to calculate distance in (should be positive)" ).
def_readwrite( "voxelSize", &MR::MeshToVolumeParams::voxelSize, "Conversion type" ).
def_readwrite( "worldXf", &MR::MeshToVolumeParams::worldXf, "mesh initial transform" ).
def_readwrite( "outXf", &MR::MeshToVolumeParams::worldXf, "optional output: xf to original mesh (respecting worldXf)" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worldXf -> outXf

// convert mesh to volume in (0,0,0)-(dim.x,dim.y,dim.z) grid box
MRMESH_API tl::expected<VdbVolume, std::string> meshToVolume( const Mesh& mesh, const MeshToVolumeParams& params = {} );

// fills VdbVolume data from FlaotGrid (does not fill voxels size, cause we expect it outside)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaot -> Float

Comment on lines +223 to +230
#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 9 && (OPENVDB_LIBRARY_MINOR_VERSION_NUMBER >= 1 || OPENVDB_LIBRARY_PATCH_VERSION_NUMBER >= 1)) || \
(OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 10)
auto minMax = openvdb::tools::minMax( targetGrid->tree() );
res.min = minMax.min();
res.max = minMax.max();
#else
targetGrid->evalMinMax( res.min, res.max );
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably make a function to avoid copy-paste?

@Grantim Grantim merged commit eff394f into master Oct 24, 2022
@Grantim Grantim deleted the Voxels_binding_to_python_updates branch October 24, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants