Decimate mesh using target triangles in python #2719
Answered
by
Fedr
dhanraj-khatal
asked this question in
Q&A
-
how can we decimate the using target triangles in Python as in mesh inspector? |
Beta Was this translation helpful? Give feedback.
Answered by
Fedr
May 15, 2024
Replies: 1 comment
-
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) |
Beta Was this translation helpful? Give feedback.
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
In Python one can use the code as follows: