Merged
Conversation
Fedr
reviewed
Oct 24, 2022
source/mrmeshpy/MRPythonVoxels.cpp
Outdated
| 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)" ); |
Fedr
reviewed
Oct 24, 2022
source/MRMesh/MRVDBConversions.h
Outdated
| // 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) |
Fedr
reviewed
Oct 24, 2022
source/MRMesh/MRVDBConversions.cpp
Outdated
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 |
Contributor
There was a problem hiding this comment.
Probably make a function to avoid copy-paste?
Fedr
approved these changes
Oct 24, 2022
ABSitf
approved these changes
Oct 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.