MeshLib C Docs
Loading...
Searching...
No Matches
MRSegmentMesh.h File Reference
#include <MRCMisc/exports.h>

Go to the source code of this file.

Functions

MRC_API MR_expected_std_vector_MR_FaceFace_std_stringMR_segmentMesh (const MR_Mesh *mesh, const MR_std_function_float_from_MR_EdgeId *curvMetric, const MR_std_function_bool_from_float *progress)
MRC_API MR_UndirectedEdgeBitSetMR_findSegmentBoundaries (const MR_MeshTopology *topology, const MR_std_vector_MR_FaceFace *groupOrder, int numSegments, MR_FaceColors *outFaceColors)

Function Documentation

◆ MR_findSegmentBoundaries()

MRC_API MR_UndirectedEdgeBitSet * MR_findSegmentBoundaries ( const MR_MeshTopology * topology,
const MR_std_vector_MR_FaceFace * groupOrder,
int numSegments,
MR_FaceColors * outFaceColors )

executes grouping of segments till desired number of segments is reached, then returns the boundary edges in between the segments Generated from function MR::findSegmentBoundaries. Parameter topology can not be null. It is a single object. Parameter groupOrder can not be null. It is a single object. Parameter outFaceColors defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_UndirectedEdgeBitSet_Destroy() to free it when you're done using it.

◆ MR_segmentMesh()

starting from individual faces, merge them in progressively larger segments until every connected component contains only 1 segment; merge order is guided by the preferences: 1) prefer merging smaller by area segments, 2) prefer merging two segment with long common boundary, 3) prefer merging two segments with low average value of the given curvMetric on the common boundary; take e.g. edgeDihedralAngleMetric() as curvMetric Generated from function MR::segmentMesh. Parameter mesh can not be null. It is a single object. Parameter curvMetric can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_vector_MR_FaceFace_std_string_Destroy() to free it when you're done using it.