Polygon Mesh Segmentation Editing
Often, polygon mesh models, being the result of 3D scanning, have a complex internal structure with the presence of “noise” – random outliers of points outside the dimensions of a face. The transformation of such meshes implies a denser interaction with the user, since automatic recognition is difficult. Several tools are provided for correcting segmentation results.
The method
MbResultType SegmentMesh( bool createSurfaces = true );
performs segmentation of the given polygon mesh. The input parameter of the method is:
createSurfaces – flag used for creating surfaces on segments.
If the algorithm works successfully, the method returns rt_Success, otherwise the method returns an error code from the MbResultType enumeration.
The method
void UniteSegments( size_t firstSegmentIdx,
size_t secondSegmentIdx );
merges two segments in the current polygon mesh segmentation. Method input parameters are:
firstSegmentIdx – index of the first segment to merge;
secondSegmentIdx – index of the second segment to merge.
The result of the union is available through the collection returned by the GetSegmentedMesh() method.
The method
MbResultType SegmentMeshBySeparators( const std::vector<std::vector<uint>> & separators );
performs segmentation of the polygonal mesh by segment delimiters. The input parameter of the method is:
separators – an array of separators, each of which contains a path along the vertices of the mesh whose edges separate the segments.
If the algorithm works successfully, the method returns rt_Success, otherwise the method returns an error code from the MbResultType enumeration.