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

Public Member Functions

 __init__ (self, *args, **kwargs)
Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float adjustCollapse (self)
bool angleWeightedDistToPlane (self)
VertBitSet bdVerts (self)
bool collapseNearNotFlippable (self)
float criticalTriAspectRatio (self)
bool decimateBetweenParts (self)
UndirectedEdgeBitSet edgesToCollapse (self)
float maxAngleChange (self)
float maxBdShift (self)
int maxDeletedFaces (self)
int maxDeletedVertices (self)
float maxEdgeLen (self)
float maxError (self)
float maxTriangleAspectRatio (self)
int minFacesInPart (self)
UndirectedEdgeBitSet notFlippable (self)
Const_func_void_from_Id_EdgeTag_Id_EdgeTag onEdgeDel (self)
bool optimizeVertexPos (self)
bool packMesh (self)
std_vector_TypedBitSet_Id_FaceTag partFaces (self)
DecimatePartsMode partsMode (self)
Const_func_bool_from_Id_EdgeTag_Vector3_float preCollapse (self)
bool preventNormalFlips (self)
Const_func_bool_from_float progressCallback (self)
FaceBitSet region (self)
UndirectedEdgeBitSet regionEdges (self)
float stabilizer (self)
DecimateStrategy strategy (self)
int subdivideParts (self)
float tinyEdgeLength (self)
bool touchBdVerts (self)
bool touchNearBdEdges (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 twinMap (self)
Vector_QuadraticForm3f_VertId vertForms (self)

Static Protected Attributes

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__()

mrmeshpy.ConstDecimateSettings.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstDecimateSettings) -> None

2. __init__(self: meshlib.mrmeshpy.ConstDecimateSettings, arg0: meshlib.mrmeshpy.ConstDecimateSettings) -> None

Implicit copy constructor.

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

Implicit aggregate constructor.

4. __init__(self: meshlib.mrmeshpy.ConstDecimateSettings, : meshlib.mrmeshpy.ConstDecimateSettings) -> None

Member Function Documentation

◆ adjustCollapse()

Const_func_void_from_Id_UndirectedEdgeTag_float_Vector3_float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ angleWeightedDistToPlane()

bool mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ bdVerts()

VertBitSet mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ collapseNearNotFlippable()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ criticalTriAspectRatio()

float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ decimateBetweenParts()

bool mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ edgesToCollapse()

UndirectedEdgeBitSet mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxAngleChange()

float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxBdShift()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxDeletedFaces()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxDeletedVertices()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxEdgeLen()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxError()

float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ maxTriangleAspectRatio()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ minFacesInPart()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ notFlippable()

UndirectedEdgeBitSet mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ onEdgeDel()

Const_func_void_from_Id_EdgeTag_Id_EdgeTag mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ optimizeVertexPos()

bool mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ packMesh()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ partFaces()

std_vector_TypedBitSet_Id_FaceTag mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ partsMode()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ preCollapse()

Const_func_bool_from_Id_EdgeTag_Vector3_float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ preventNormalFlips()

bool mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ progressCallback()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ region()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ regionEdges()

UndirectedEdgeBitSet mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ stabilizer()

float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ strategy()

DecimateStrategy mrmeshpy.ConstDecimateSettings.strategy ( self)

◆ subdivideParts()

int mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ tinyEdgeLength()

float mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ touchBdVerts()

bool mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ touchNearBdEdges()

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

Reimplemented in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ twinMap()

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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

◆ vertForms()

Vector_QuadraticForm3f_VertId mrmeshpy.ConstDecimateSettings.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 in mrmeshpy.DecimateSettings, and mrmeshpy.DecimateSettings.

Member Data Documentation

◆ _offsetof_adjustCollapse

typing mrmeshpy.ConstDecimateSettings._offsetof_adjustCollapse = 152
staticprotected

◆ _offsetof_angleWeightedDistToPlane

typing mrmeshpy.ConstDecimateSettings._offsetof_angleWeightedDistToPlane = 36
staticprotected

◆ _offsetof_bdVerts

typing mrmeshpy.ConstDecimateSettings._offsetof_bdVerts = 96
staticprotected

◆ _offsetof_collapseNearNotFlippable

typing mrmeshpy.ConstDecimateSettings._offsetof_collapseNearNotFlippable = 64
staticprotected

◆ _offsetof_criticalTriAspectRatio

typing mrmeshpy.ConstDecimateSettings._offsetof_criticalTriAspectRatio = 20
staticprotected

◆ _offsetof_decimateBetweenParts

typing mrmeshpy.ConstDecimateSettings._offsetof_decimateBetweenParts = 272
staticprotected

◆ _offsetof_edgesToCollapse

typing mrmeshpy.ConstDecimateSettings._offsetof_edgesToCollapse = 72
staticprotected

◆ _offsetof_maxAngleChange

typing mrmeshpy.ConstDecimateSettings._offsetof_maxAngleChange = 112
staticprotected

◆ _offsetof_maxBdShift

typing mrmeshpy.ConstDecimateSettings._offsetof_maxBdShift = 12
staticprotected

◆ _offsetof_maxDeletedFaces

typing mrmeshpy.ConstDecimateSettings._offsetof_maxDeletedFaces = 44
staticprotected

◆ _offsetof_maxDeletedVertices

typing mrmeshpy.ConstDecimateSettings._offsetof_maxDeletedVertices = 40
staticprotected

◆ _offsetof_maxEdgeLen

typing mrmeshpy.ConstDecimateSettings._offsetof_maxEdgeLen = 8
staticprotected

◆ _offsetof_maxError

typing mrmeshpy.ConstDecimateSettings._offsetof_maxError = 4
staticprotected

◆ _offsetof_maxTriangleAspectRatio

typing mrmeshpy.ConstDecimateSettings._offsetof_maxTriangleAspectRatio = 16
staticprotected

◆ _offsetof_minFacesInPart

typing mrmeshpy.ConstDecimateSettings._offsetof_minFacesInPart = 288
staticprotected

◆ _offsetof_notFlippable

typing mrmeshpy.ConstDecimateSettings._offsetof_notFlippable = 56
staticprotected

◆ _offsetof_onEdgeDel

typing mrmeshpy.ConstDecimateSettings._offsetof_onEdgeDel = 184
staticprotected

◆ _offsetof_optimizeVertexPos

typing mrmeshpy.ConstDecimateSettings._offsetof_optimizeVertexPos = 37
staticprotected

◆ _offsetof_packMesh

typing mrmeshpy.ConstDecimateSettings._offsetof_packMesh = 224
staticprotected

◆ _offsetof_partFaces

typing mrmeshpy.ConstDecimateSettings._offsetof_partFaces = 280
staticprotected

◆ _offsetof_partsMode

typing mrmeshpy.ConstDecimateSettings._offsetof_partsMode = 268
staticprotected

◆ _offsetof_preCollapse

typing mrmeshpy.ConstDecimateSettings._offsetof_preCollapse = 120
staticprotected

◆ _offsetof_preventNormalFlips

typing mrmeshpy.ConstDecimateSettings._offsetof_preventNormalFlips = 24
staticprotected

◆ _offsetof_progressCallback

typing mrmeshpy.ConstDecimateSettings._offsetof_progressCallback = 232
staticprotected

◆ _offsetof_region

typing mrmeshpy.ConstDecimateSettings._offsetof_region = 48
staticprotected

◆ _offsetof_regionEdges

typing mrmeshpy.ConstDecimateSettings._offsetof_regionEdges = 104
staticprotected

◆ _offsetof_stabilizer

typing mrmeshpy.ConstDecimateSettings._offsetof_stabilizer = 32
staticprotected

◆ _offsetof_strategy

typing mrmeshpy.ConstDecimateSettings._offsetof_strategy = 0
staticprotected

◆ _offsetof_subdivideParts

typing mrmeshpy.ConstDecimateSettings._offsetof_subdivideParts = 264
staticprotected

◆ _offsetof_tinyEdgeLength

typing mrmeshpy.ConstDecimateSettings._offsetof_tinyEdgeLength = 28
staticprotected

◆ _offsetof_touchBdVerts

typing mrmeshpy.ConstDecimateSettings._offsetof_touchBdVerts = 89
staticprotected

◆ _offsetof_touchNearBdEdges

typing mrmeshpy.ConstDecimateSettings._offsetof_touchNearBdEdges = 88
staticprotected

◆ _offsetof_twinMap

typing mrmeshpy.ConstDecimateSettings._offsetof_twinMap = 80
staticprotected

◆ _offsetof_vertForms

typing mrmeshpy.ConstDecimateSettings._offsetof_vertForms = 216
staticprotected

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