MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.DecimateSettings Class Reference
Inheritance diagram for mrmeshpy.DecimateSettings:

Public Member Functions

None __init__ (self)
None __init__ (self, ConstDecimateSettings arg0)
None __init__ (self, DecimateStrategy strategy, float maxError, float maxEdgeLen, float maxBdShift, float maxTriangleAspectRatio, float criticalTriAspectRatio, bool preventNormalFlips, float tinyEdgeLength, float stabilizer, bool angleWeightedDistToPlane, bool optimizeVertexPos, int maxDeletedVertices, int maxDeletedFaces, FaceBitSet region, UndirectedEdgeBitSet notFlippable, bool collapseNearNotFlippable, UndirectedEdgeBitSet edgesToCollapse, phmap_flat_hash_map_Id_UndirectedEdgeTag_Id_UndirectedEdgeTag_phmap_Hash_Id_UndirectedEdgeTag_phmap_EqualTo_Id_UndirectedEdgeTag_Allocator_std_pair_Id_UndirectedEdgeTag_const_Id_UndirectedEdgeTag twinMap, bool touchNearBdEdges, bool touchBdVerts, VertBitSet bdVerts, ConstUndirectedEdgeBitSet regionEdges, float maxAngleChange, Const_func_bool_from_Id_EdgeTag_Vector3_float preCollapse, Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float adjustCollapse, Const_func_void_from_Id_EdgeTag_Id_EdgeTag onEdgeDel, Vector_QuadraticForm3f_VertId vertForms, bool packMesh, Const_func_bool_from_float progressCallback, int subdivideParts, DecimatePartsMode partsMode, bool decimateBetweenParts, std_vector_TypedBitSet_Id_FaceTag partFaces, int minFacesInPart)
DecimateSettings assign (self, ConstDecimateSettings other)
func_void_from_Id_UndirectedEdgeTag_float_Vector3_float adjustCollapse (self)
None adjustCollapse (self, Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float arg1)
bool angleWeightedDistToPlane (self)
None angleWeightedDistToPlane (self, bool arg1)
VertBitSet bdVerts (self)
None bdVerts (self, VertBitSet arg1)
bool collapseNearNotFlippable (self)
None collapseNearNotFlippable (self, bool arg1)
float criticalTriAspectRatio (self)
None criticalTriAspectRatio (self, float arg1)
bool decimateBetweenParts (self)
None decimateBetweenParts (self, bool arg1)
UndirectedEdgeBitSet edgesToCollapse (self)
None edgesToCollapse (self, UndirectedEdgeBitSet arg1)
float maxAngleChange (self)
None maxAngleChange (self, float arg1)
float maxBdShift (self)
None maxBdShift (self, float arg1)
int maxDeletedFaces (self)
None maxDeletedFaces (self, int arg1)
int maxDeletedVertices (self)
None maxDeletedVertices (self, int arg1)
float maxEdgeLen (self)
None maxEdgeLen (self, float arg1)
float maxError (self)
None maxError (self, float arg1)
float maxTriangleAspectRatio (self)
None maxTriangleAspectRatio (self, float arg1)
int minFacesInPart (self)
None minFacesInPart (self, int arg1)
UndirectedEdgeBitSet notFlippable (self)
None notFlippable (self, UndirectedEdgeBitSet arg1)
func_void_from_Id_EdgeTag_Id_EdgeTag onEdgeDel (self)
None onEdgeDel (self, Const_func_void_from_Id_EdgeTag_Id_EdgeTag arg1)
bool optimizeVertexPos (self)
None optimizeVertexPos (self, bool arg1)
bool packMesh (self)
None packMesh (self, bool arg1)
std_vector_TypedBitSet_Id_FaceTag partFaces (self)
None partFaces (self, std_vector_TypedBitSet_Id_FaceTag arg1)
DecimatePartsMode partsMode (self)
None partsMode (self, DecimatePartsMode arg1)
func_bool_from_Id_EdgeTag_Vector3_float preCollapse (self)
None preCollapse (self, Const_func_bool_from_Id_EdgeTag_Vector3_float arg1)
bool preventNormalFlips (self)
None preventNormalFlips (self, bool arg1)
func_bool_from_float progressCallback (self)
None progressCallback (self, Const_func_bool_from_float arg1)
FaceBitSet region (self)
None region (self, FaceBitSet arg1)
UndirectedEdgeBitSet regionEdges (self)
None regionEdges (self, ConstUndirectedEdgeBitSet arg1)
float stabilizer (self)
None stabilizer (self, float arg1)
int subdivideParts (self)
None subdivideParts (self, int arg1)
float tinyEdgeLength (self)
None tinyEdgeLength (self, float arg1)
bool touchBdVerts (self)
None touchBdVerts (self, bool arg1)
bool touchNearBdEdges (self)
None touchNearBdEdges (self, bool arg1)
phmap_flat_hash_map_Id_UndirectedEdgeTag_Id_UndirectedEdgeTag_phmap_Hash_Id_UndirectedEdgeTag_phmap_EqualTo_Id_UndirectedEdgeTag_Allocator_std_pair_Id_UndirectedEdgeTag_const_Id_UndirectedEdgeTag twinMap (self)
None twinMap (self, phmap_flat_hash_map_Id_UndirectedEdgeTag_Id_UndirectedEdgeTag_phmap_Hash_Id_UndirectedEdgeTag_phmap_EqualTo_Id_UndirectedEdgeTag_Allocator_std_pair_Id_UndirectedEdgeTag_const_Id_UndirectedEdgeTag arg1)
Vector_QuadraticForm3f_VertId vertForms (self)
None vertForms (self, Vector_QuadraticForm3f_VertId arg1)
Public Member Functions inherited from mrmeshpy.ConstDecimateSettings
 __init__ (self, *args, **kwargs)
DecimateStrategy strategy (self)

Static Public Member Functions

None __init__ (*args, **kwargs)

Additional Inherited Members

Static Protected Attributes inherited from mrmeshpy.ConstDecimateSettings
typing _offsetof_adjustCollapse = 152
typing _offsetof_angleWeightedDistToPlane = 36
typing _offsetof_bdVerts = 96
typing _offsetof_collapseNearNotFlippable = 64
typing _offsetof_criticalTriAspectRatio = 20
typing _offsetof_decimateBetweenParts = 272
typing _offsetof_edgesToCollapse = 72
typing _offsetof_maxAngleChange = 112
typing _offsetof_maxBdShift = 12
typing _offsetof_maxDeletedFaces = 44
typing _offsetof_maxDeletedVertices = 40
typing _offsetof_maxEdgeLen = 8
typing _offsetof_maxError = 4
typing _offsetof_maxTriangleAspectRatio = 16
typing _offsetof_minFacesInPart = 288
typing _offsetof_notFlippable = 56
typing _offsetof_onEdgeDel = 184
typing _offsetof_optimizeVertexPos = 37
typing _offsetof_packMesh = 224
typing _offsetof_partFaces = 280
typing _offsetof_partsMode = 268
typing _offsetof_preCollapse = 120
typing _offsetof_preventNormalFlips = 24
typing _offsetof_progressCallback = 232
typing _offsetof_region = 48
typing _offsetof_regionEdges = 104
typing _offsetof_stabilizer = 32
typing _offsetof_strategy = 0
typing _offsetof_subdivideParts = 264
typing _offsetof_tinyEdgeLength = 28
typing _offsetof_touchBdVerts = 89
typing _offsetof_touchNearBdEdges = 88
typing _offsetof_twinMap = 80
typing _offsetof_vertForms = 216

Detailed Description

Generated from:  MR::DecimateSettings

\\struct MR::DecimateSettings
\\brief Parameters structure for MR::decimateMesh
\\sa \\ref decimateMesh

Constructor & Destructor Documentation

◆ __init__() [1/4]

None mrmeshpy.DecimateSettings.__init__ ( * args,
** kwargs )
static

◆ __init__() [2/4]

None mrmeshpy.DecimateSettings.__init__ ( self)

◆ __init__() [3/4]

None mrmeshpy.DecimateSettings.__init__ ( self,
ConstDecimateSettings arg0 )
Implicit copy constructor.

◆ __init__() [4/4]

None mrmeshpy.DecimateSettings.__init__ ( self,
DecimateStrategy strategy,
float maxError,
float maxEdgeLen,
float maxBdShift,
float maxTriangleAspectRatio,
float criticalTriAspectRatio,
bool preventNormalFlips,
float tinyEdgeLength,
float stabilizer,
bool angleWeightedDistToPlane,
bool optimizeVertexPos,
int maxDeletedVertices,
int maxDeletedFaces,
FaceBitSet region,
UndirectedEdgeBitSet notFlippable,
bool collapseNearNotFlippable,
UndirectedEdgeBitSet edgesToCollapse,
phmap_flat_hash_map_Id_UndirectedEdgeTag_Id_UndirectedEdgeTag_phmap_Hash_Id_UndirectedEdgeTag_phmap_EqualTo_Id_UndirectedEdgeTag_Allocator_std_pair_Id_UndirectedEdgeTag_const_Id_UndirectedEdgeTag twinMap,
bool touchNearBdEdges,
bool touchBdVerts,
VertBitSet bdVerts,
ConstUndirectedEdgeBitSet regionEdges,
float maxAngleChange,
Const_func_bool_from_Id_EdgeTag_Vector3_float preCollapse,
Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float adjustCollapse,
Const_func_void_from_Id_EdgeTag_Id_EdgeTag onEdgeDel,
Vector_QuadraticForm3f_VertId vertForms,
bool packMesh,
Const_func_bool_from_float progressCallback,
int subdivideParts,
DecimatePartsMode partsMode,
bool decimateBetweenParts,
std_vector_TypedBitSet_Id_FaceTag partFaces,
int minFacesInPart )
Implicit aggregate constructor.

Member Function Documentation

◆ adjustCollapse() [1/2]

func_void_from_Id_UndirectedEdgeTag_float_Vector3_float mrmeshpy.DecimateSettings.adjustCollapse ( self)
\\brief The user can provide this optional callback for adjusting error introduced by this
edge collapse and the collapse position.
\\details On input the callback gets the squared error and position computed by standard means,
and callback can modify any of them. The larger the error, the later this edge will be collapsed.
This callback can be called from many threads in parallel and must be thread-safe.
This callback can be called many times for each edge before real collapsing, and it is important to make the same adjustment.

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ adjustCollapse() [2/2]

None mrmeshpy.DecimateSettings.adjustCollapse ( self,
Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float arg1 )
\\brief The user can provide this optional callback for adjusting error introduced by this
edge collapse and the collapse position.
\\details On input the callback gets the squared error and position computed by standard means,
and callback can modify any of them. The larger the error, the later this edge will be collapsed.
This callback can be called from many threads in parallel and must be thread-safe.
This callback can be called many times for each edge before real collapsing, and it is important to make the same adjustment.

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ angleWeightedDistToPlane() [1/2]

bool mrmeshpy.DecimateSettings.angleWeightedDistToPlane ( self)
if false, then quadratic error metric is equal to the sum of distances to the planes of original mesh triangles;
if true, then the sum is weighted, and the weight is equal to the angle of adjacent triangle at the vertex divided on PI (to get one after summing all 3 vertices of the triangle)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ angleWeightedDistToPlane() [2/2]

None mrmeshpy.DecimateSettings.angleWeightedDistToPlane ( self,
bool arg1 )
if false, then quadratic error metric is equal to the sum of distances to the planes of original mesh triangles;
if true, then the sum is weighted, and the weight is equal to the angle of adjacent triangle at the vertex divided on PI (to get one after summing all 3 vertices of the triangle)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ assign()

DecimateSettings mrmeshpy.DecimateSettings.assign ( self,
ConstDecimateSettings other )

◆ bdVerts() [1/2]

VertBitSet mrmeshpy.DecimateSettings.bdVerts ( self)
if touchNearBdEdges=false or touchBdVerts=false then the algorithm needs to know about all boundary vertices;
if the pointer is not null then boundary vertices detection is replaced with testing values in this bit-set;
the algorithm updates this set if it packs the mesh

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ bdVerts() [2/2]

None mrmeshpy.DecimateSettings.bdVerts ( self,
VertBitSet arg1 )
if touchNearBdEdges=false or touchBdVerts=false then the algorithm needs to know about all boundary vertices;
if the pointer is not null then boundary vertices detection is replaced with testing values in this bit-set;
the algorithm updates this set if it packs the mesh

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ collapseNearNotFlippable() [1/2]

bool mrmeshpy.DecimateSettings.collapseNearNotFlippable ( self)
Whether to allow collapse of edges incident to notFlippable edges,
which can move vertices of notFlippable edges unless they are fixed

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ collapseNearNotFlippable() [2/2]

None mrmeshpy.DecimateSettings.collapseNearNotFlippable ( self,
bool arg1 )
Whether to allow collapse of edges incident to notFlippable edges,
which can move vertices of notFlippable edges unless they are fixed

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ criticalTriAspectRatio() [1/2]

float mrmeshpy.DecimateSettings.criticalTriAspectRatio ( self)
the algorithm will ignore dihedral angle check if one of triangles had aspect ratio equal or more than this value;
and the algorithm will permit temporary increase in aspect ratio after collapse, if before collapse one of the triangles had larger aspect ratio

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ criticalTriAspectRatio() [2/2]

None mrmeshpy.DecimateSettings.criticalTriAspectRatio ( self,
float arg1 )
the algorithm will ignore dihedral angle check if one of triangles had aspect ratio equal or more than this value;
and the algorithm will permit temporary increase in aspect ratio after collapse, if before collapse one of the triangles had larger aspect ratio

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ decimateBetweenParts() [1/2]

bool mrmeshpy.DecimateSettings.decimateBetweenParts ( self)
Whether to decimate near the borders of individual parts to eliminate small edges there:
as soon as two sibling nodes in the binary tree of parts are decimated, their union is decimated in parallel with other nodes,
and only the border between two halves of the mesh remains for the final decimation of whole mesh region

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ decimateBetweenParts() [2/2]

None mrmeshpy.DecimateSettings.decimateBetweenParts ( self,
bool arg1 )
Whether to decimate near the borders of individual parts to eliminate small edges there:
as soon as two sibling nodes in the binary tree of parts are decimated, their union is decimated in parallel with other nodes,
and only the border between two halves of the mesh remains for the final decimation of whole mesh region

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ edgesToCollapse() [1/2]

UndirectedEdgeBitSet mrmeshpy.DecimateSettings.edgesToCollapse ( self)
If pointer is not null, then only edges from here can be collapsed (and some nearby edges can disappear);
the algorithm updates this map during collapses, removing or replacing elements

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ edgesToCollapse() [2/2]

None mrmeshpy.DecimateSettings.edgesToCollapse ( self,
UndirectedEdgeBitSet arg1 )
If pointer is not null, then only edges from here can be collapsed (and some nearby edges can disappear);
the algorithm updates this map during collapses, removing or replacing elements

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxAngleChange() [1/2]

float mrmeshpy.DecimateSettings.maxAngleChange ( self)
Permit edge flips (in addition to collapsing) to improve Delone quality of the mesh
if it does not change dihedral angle more than on this value (negative value prohibits any edge flips)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxAngleChange() [2/2]

None mrmeshpy.DecimateSettings.maxAngleChange ( self,
float arg1 )
Permit edge flips (in addition to collapsing) to improve Delone quality of the mesh
if it does not change dihedral angle more than on this value (negative value prohibits any edge flips)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxBdShift() [1/2]

float mrmeshpy.DecimateSettings.maxBdShift ( self)
Maximal shift of a boundary during one edge collapse

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxBdShift() [2/2]

None mrmeshpy.DecimateSettings.maxBdShift ( self,
float arg1 )
Maximal shift of a boundary during one edge collapse

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxDeletedFaces() [1/2]

int mrmeshpy.DecimateSettings.maxDeletedFaces ( self)
Limit on the number of deleted faces

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxDeletedFaces() [2/2]

None mrmeshpy.DecimateSettings.maxDeletedFaces ( self,
int arg1 )
Limit on the number of deleted faces

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxDeletedVertices() [1/2]

int mrmeshpy.DecimateSettings.maxDeletedVertices ( self)
Limit on the number of deleted vertices

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxDeletedVertices() [2/2]

None mrmeshpy.DecimateSettings.maxDeletedVertices ( self,
int arg1 )
Limit on the number of deleted vertices

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxEdgeLen() [1/2]

float mrmeshpy.DecimateSettings.maxEdgeLen ( self)
Maximal possible edge length created during decimation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxEdgeLen() [2/2]

None mrmeshpy.DecimateSettings.maxEdgeLen ( self,
float arg1 )
Maximal possible edge length created during decimation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxError() [1/2]

float mrmeshpy.DecimateSettings.maxError ( self)
for DecimateStrategy::MinimizeError:
  stop the decimation as soon as the estimated distance deviation from the original mesh is more than this value
for DecimateStrategy::ShortestEdgeFirst only:
  stop the decimation as soon as the shortest edge in the mesh is greater than this value

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxError() [2/2]

None mrmeshpy.DecimateSettings.maxError ( self,
float arg1 )
for DecimateStrategy::MinimizeError:
  stop the decimation as soon as the estimated distance deviation from the original mesh is more than this value
for DecimateStrategy::ShortestEdgeFirst only:
  stop the decimation as soon as the shortest edge in the mesh is greater than this value

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxTriangleAspectRatio() [1/2]

float mrmeshpy.DecimateSettings.maxTriangleAspectRatio ( self)
Maximal possible aspect ratio of a triangle introduced during decimation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ maxTriangleAspectRatio() [2/2]

None mrmeshpy.DecimateSettings.maxTriangleAspectRatio ( self,
float arg1 )
Maximal possible aspect ratio of a triangle introduced during decimation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ minFacesInPart() [1/2]

int mrmeshpy.DecimateSettings.minFacesInPart ( self)
minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ minFacesInPart() [2/2]

None mrmeshpy.DecimateSettings.minFacesInPart ( self,
int arg1 )
minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ notFlippable() [1/2]

UndirectedEdgeBitSet mrmeshpy.DecimateSettings.notFlippable ( self)
Edges specified by this bit-set will never be flipped, but they can be collapsed or replaced during collapse of nearby edges so it is updated during the operation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ notFlippable() [2/2]

None mrmeshpy.DecimateSettings.notFlippable ( self,
UndirectedEdgeBitSet arg1 )
Edges specified by this bit-set will never be flipped, but they can be collapsed or replaced during collapse of nearby edges so it is updated during the operation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ onEdgeDel() [1/2]

func_void_from_Id_EdgeTag_Id_EdgeTag mrmeshpy.DecimateSettings.onEdgeDel ( self)
this function is called each time edge (del) is deleted;
if valid (rem) is given then dest(del) = dest(rem) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ onEdgeDel() [2/2]

None mrmeshpy.DecimateSettings.onEdgeDel ( self,
Const_func_void_from_Id_EdgeTag_Id_EdgeTag arg1 )
this function is called each time edge (del) is deleted;
if valid (rem) is given then dest(del) = dest(rem) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del)

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ optimizeVertexPos() [1/2]

bool mrmeshpy.DecimateSettings.optimizeVertexPos ( self)
if true then after each edge collapse the position of remaining vertex is optimized to
minimize local shape change, if false then the edge is collapsed in one of its vertices, which keeps its position

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ optimizeVertexPos() [2/2]

None mrmeshpy.DecimateSettings.optimizeVertexPos ( self,
bool arg1 )
if true then after each edge collapse the position of remaining vertex is optimized to
minimize local shape change, if false then the edge is collapsed in one of its vertices, which keeps its position

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ packMesh() [1/2]

bool mrmeshpy.DecimateSettings.packMesh ( self)
whether to pack mesh at the end

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ packMesh() [2/2]

None mrmeshpy.DecimateSettings.packMesh ( self,
bool arg1 )
whether to pack mesh at the end

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ partFaces() [1/2]

std_vector_TypedBitSet_Id_FaceTag mrmeshpy.DecimateSettings.partFaces ( self)
if not null, then it contains the faces of each subdivision part on input, which must not overlap,
and after decimation of all parts, the region inside each part is put here;
decimateBetweenParts=true or packMesh=true are not compatible with this option

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ partFaces() [2/2]

None mrmeshpy.DecimateSettings.partFaces ( self,
std_vector_TypedBitSet_Id_FaceTag arg1 )
if not null, then it contains the faces of each subdivision part on input, which must not overlap,
and after decimation of all parts, the region inside each part is put here;
decimateBetweenParts=true or packMesh=true are not compatible with this option

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ partsMode() [1/2]

DecimatePartsMode mrmeshpy.DecimateSettings.partsMode ( self)
how the parts are found for subdivideParts > 1; ignored if partFaces is given

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ partsMode() [2/2]

None mrmeshpy.DecimateSettings.partsMode ( self,
DecimatePartsMode arg1 )
how the parts are found for subdivideParts > 1; ignored if partFaces is given

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ preCollapse() [1/2]

func_bool_from_Id_EdgeTag_Vector3_float mrmeshpy.DecimateSettings.preCollapse ( self)
\\brief The user can provide this optional callback that is invoked immediately before edge collapse;
\\details It receives the edge being collapsed: its destination vertex will disappear,
and its origin vertex will get new position (provided as the second argument) after collapse;
If the callback returns false, then the collapse is prohibited

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ preCollapse() [2/2]

None mrmeshpy.DecimateSettings.preCollapse ( self,
Const_func_bool_from_Id_EdgeTag_Vector3_float arg1 )
\\brief The user can provide this optional callback that is invoked immediately before edge collapse;
\\details It receives the edge being collapsed: its destination vertex will disappear,
and its origin vertex will get new position (provided as the second argument) after collapse;
If the callback returns false, then the collapse is prohibited

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ preventNormalFlips() [1/2]

bool mrmeshpy.DecimateSettings.preventNormalFlips ( self)
whether to prohibit a collapse if it inverts the normal of a remaining triangle, or folds two triangles onto each other;
turning it off (together with maxTriangleAspectRatio = FLT_MAX) makes decimation faster, but some triangles may appear inverted

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ preventNormalFlips() [2/2]

None mrmeshpy.DecimateSettings.preventNormalFlips ( self,
bool arg1 )
whether to prohibit a collapse if it inverts the normal of a remaining triangle, or folds two triangles onto each other;
turning it off (together with maxTriangleAspectRatio = FLT_MAX) makes decimation faster, but some triangles may appear inverted

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ progressCallback() [1/2]

func_bool_from_float mrmeshpy.DecimateSettings.progressCallback ( self)
callback to report algorithm progress and cancel it by user request

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ progressCallback() [2/2]

None mrmeshpy.DecimateSettings.progressCallback ( self,
Const_func_bool_from_float arg1 )
callback to report algorithm progress and cancel it by user request

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ region() [1/2]

FaceBitSet mrmeshpy.DecimateSettings.region ( self)
Region on mesh to be decimated, it is updated during the operation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ region() [2/2]

None mrmeshpy.DecimateSettings.region ( self,
FaceBitSet arg1 )
Region on mesh to be decimated, it is updated during the operation

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ regionEdges() [1/2]

UndirectedEdgeBitSet mrmeshpy.DecimateSettings.regionEdges ( self)
if region is not null and this pointer is not null, then it shall contain all edges incident to region faces
(as returned by getIncidentEdges( topology, *region )), and the algorithm does not compute them itself

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ regionEdges() [2/2]

None mrmeshpy.DecimateSettings.regionEdges ( self,
ConstUndirectedEdgeBitSet arg1 )
if region is not null and this pointer is not null, then it shall contain all edges incident to region faces
(as returned by getIncidentEdges( topology, *region )), and the algorithm does not compute them itself

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ stabilizer() [1/2]

float mrmeshpy.DecimateSettings.stabilizer ( self)
Small stabilizer is important to achieve good results on completely planar mesh parts,
if your mesh is not-planer everywhere, then you can set it to zero

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ stabilizer() [2/2]

None mrmeshpy.DecimateSettings.stabilizer ( self,
float arg1 )
Small stabilizer is important to achieve good results on completely planar mesh parts,
if your mesh is not-planer everywhere, then you can set it to zero

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ subdivideParts() [1/2]

int mrmeshpy.DecimateSettings.subdivideParts ( self)
If this value is more than 1, then virtually subdivides the mesh on given number of parts to process them in parallel (using many threads);
IMPORTANT: with default partsMode, please call mesh.packOptimally() before calling decimating with subdivideParts > 1, otherwise performance will be bad

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ subdivideParts() [2/2]

None mrmeshpy.DecimateSettings.subdivideParts ( self,
int arg1 )
If this value is more than 1, then virtually subdivides the mesh on given number of parts to process them in parallel (using many threads);
IMPORTANT: with default partsMode, please call mesh.packOptimally() before calling decimating with subdivideParts > 1, otherwise performance will be bad

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ tinyEdgeLength() [1/2]

float mrmeshpy.DecimateSettings.tinyEdgeLength ( self)
edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ tinyEdgeLength() [2/2]

None mrmeshpy.DecimateSettings.tinyEdgeLength ( self,
float arg1 )
edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ touchBdVerts() [1/2]

bool mrmeshpy.DecimateSettings.touchBdVerts ( self)
touchBdVerts=true: allow moving and eliminating boundary vertices during edge collapses;
touchBdVerts=false: allow only collapsing an edge having only one boundary vertex in that vertex, so position and count of boundary vertices do not change;
this setting is ignored if touchNearBdEdges=false

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ touchBdVerts() [2/2]

None mrmeshpy.DecimateSettings.touchBdVerts ( self,
bool arg1 )
touchBdVerts=true: allow moving and eliminating boundary vertices during edge collapses;
touchBdVerts=false: allow only collapsing an edge having only one boundary vertex in that vertex, so position and count of boundary vertices do not change;
this setting is ignored if touchNearBdEdges=false

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ touchNearBdEdges() [1/2]

bool mrmeshpy.DecimateSettings.touchNearBdEdges ( self)
Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ touchNearBdEdges() [2/2]

None mrmeshpy.DecimateSettings.touchNearBdEdges ( self,
bool arg1 )
Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ twinMap() [1/2]

if an edge present as a key in this map is flipped or collapsed, then same happens to the value-edge (with same collapse position);
the algorithm updates this map during collapses, removing or replacing elements

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ twinMap() [2/2]

if an edge present as a key in this map is flipped or collapsed, then same happens to the value-edge (with same collapse position);
the algorithm updates this map during collapses, removing or replacing elements

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ vertForms() [1/2]

Vector_QuadraticForm3f_VertId mrmeshpy.DecimateSettings.vertForms ( self)
\\brief  If not null, then vertex quadratic forms are stored there;
if on input the vector is not empty then initialization is skipped in favor of values from there;
on output: quadratic form for each remaining vertex is returned there

Reimplemented from mrmeshpy.ConstDecimateSettings.

◆ vertForms() [2/2]

None mrmeshpy.DecimateSettings.vertForms ( self,
Vector_QuadraticForm3f_VertId arg1 )
\\brief  If not null, then vertex quadratic forms are stored there;
if on input the vector is not empty then initialization is skipped in favor of values from there;
on output: quadratic form for each remaining vertex is returned there

Reimplemented from mrmeshpy.ConstDecimateSettings.


The documentation for this class was generated from the following file: