Skip to content

Decimate mesh using target triangles in python #2719

Answered by Fedr
dhanraj-khatal asked this question in Q&A
Discussion options

You must be logged in to vote

In Python one can use the code as follows:

mesh = ...
settings = mrmesh.DecimateSettings()
settings.maxError  = 1000 # some big number not to stop because of this limit
settings.packMesh = True # unless you need original IDs of faces and vertices
settings.maxDeletedFaces = mesh.topology.getValidFaces().count() - target_triangles
result = mrmesh.decimateMesh(mesh, settings)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dhanraj-khatal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants