Skip to content

reworked ObjectVoxels for adding to python#609

Merged
ABSitf merged 5 commits intomasterfrom
i1242_python_load_voxels
Oct 18, 2022
Merged

reworked ObjectVoxels for adding to python#609
ABSitf merged 5 commits intomasterfrom
i1242_python_load_voxels

Conversation

@ABSitf
Copy link
Contributor

@ABSitf ABSitf commented Oct 17, 2022

No description provided.

@ABSitf
Copy link
Contributor Author

ABSitf commented Oct 18, 2022

MeshInspector/MeshInspectorCode/issues/1242

@ABSitf ABSitf marked this pull request as ready for review October 18, 2022 12:37
{
Vector3i dimensions;
Vector3f voxelSize;
bool gridLevelSet{ false };
Copy link
Contributor

Choose a reason for hiding this comment

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

please add comment about this field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added comment

Comment on lines +619 to 625
auto gtEndChar = filename.find( "_", zvEndChar + 1 );
if ( gtEndChar != std::string::npos )
{
auto gtString = filename.substr( zvEndChar + 1, gtEndChar - ( zvEndChar + 1 ) );
outParams.gridLevelSet = gtString == "1"; // convert mm to meters
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

will it work with old files without G prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it will be


VdbVolume res;
res.data = simpleVolumeToDenseGrid( outVolume );
res.data->setGridClass( openvdb::GRID_LEVEL_SET );
Copy link
Contributor

Choose a reason for hiding this comment

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

please use value from params

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@ABSitf ABSitf merged commit b965b6a into master Oct 18, 2022
@ABSitf ABSitf deleted the i1242_python_load_voxels branch October 18, 2022 14:46
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.

2 participants