MeshLib JavaScript Docs
Loading...
Searching...
No Matches
DecimateSettings Class Reference

Parameters structure for MR::decimateMesh. More...

Public Member Functions

 DecimateSettings ()

Public Attributes

DecimateStrategy strategy
number maxError
number maxEdgeLen
 Maximal possible edge length created during decimation.
number maxBdShift
 Maximal shift of a boundary during one edge collapse.
number maxTriangleAspectRatio
 Maximal possible aspect ratio of a triangle introduced during decimation.
number criticalTriAspectRatio
number tinyEdgeLength
 edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio
number stabilizer
boolean angleWeightedDistToPlane
boolean optimizeVertexPos
number maxDeletedVertices
 Limit on the number of deleted vertices.
number maxDeletedFaces
 Limit on the number of deleted faces.
boolean collapseNearNotFlippable
boolean touchNearBdEdges
 Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary.
boolean touchBdVerts
number maxAngleChange
boolean packMesh
 whether to pack mesh at the end
number subdivideParts
boolean decimateBetweenParts
number minFacesInPart
 minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode

Detailed Description

Parameters structure for MR::decimateMesh.

See also
decimateMesh

Constructor & Destructor Documentation

◆ DecimateSettings()

DecimateSettings::DecimateSettings ( )

Member Data Documentation

◆ angleWeightedDistToPlane

boolean DecimateSettings::angleWeightedDistToPlane

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)

◆ collapseNearNotFlippable

boolean DecimateSettings::collapseNearNotFlippable

Whether to allow collapse of edges incident to notFlippable edges, which can move vertices of notFlippable edges unless they are fixed

◆ criticalTriAspectRatio

number DecimateSettings::criticalTriAspectRatio

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

◆ decimateBetweenParts

boolean DecimateSettings::decimateBetweenParts

After parallel decimation of all mesh parts is done, whether to perform final decimation of whole mesh region to eliminate small edges near the border of individual parts

◆ maxAngleChange

number DecimateSettings::maxAngleChange

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)

◆ maxBdShift

number DecimateSettings::maxBdShift

Maximal shift of a boundary during one edge collapse.

◆ maxDeletedFaces

number DecimateSettings::maxDeletedFaces

Limit on the number of deleted faces.

◆ maxDeletedVertices

number DecimateSettings::maxDeletedVertices

Limit on the number of deleted vertices.

◆ maxEdgeLen

number DecimateSettings::maxEdgeLen

Maximal possible edge length created during decimation.

◆ maxError

number DecimateSettings::maxError

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

◆ maxTriangleAspectRatio

number DecimateSettings::maxTriangleAspectRatio

Maximal possible aspect ratio of a triangle introduced during decimation.

◆ minFacesInPart

number DecimateSettings::minFacesInPart

minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode

◆ optimizeVertexPos

boolean DecimateSettings::optimizeVertexPos

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

◆ packMesh

boolean DecimateSettings::packMesh

whether to pack mesh at the end

◆ stabilizer

number DecimateSettings::stabilizer

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

◆ strategy

DecimateStrategy DecimateSettings::strategy

◆ subdivideParts

number DecimateSettings::subdivideParts

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: please call mesh.packOptimally() before calling decimating with subdivideParts > 1, otherwise performance will be bad

◆ tinyEdgeLength

number DecimateSettings::tinyEdgeLength

edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio

◆ touchBdVerts

boolean DecimateSettings::touchBdVerts

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

◆ touchNearBdEdges

boolean DecimateSettings::touchNearBdEdges

Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary.


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