How to use re-position with varying density in python #3499
Unanswered
dhanraj-khatal
asked this question in
Q&A
Replies: 1 comment
-
Hello! One can use it like this: from meshlib import mrmeshpy as mm
# load mesh
mesh = mm.loadMesh("path/to/mesh.stl")
# setup selection
selection = mm.VertBitSet()
selection.resize( mesh.topology.getValidVerts().size() )
selection.set( mm.VertId(0), True )
# expand selection
mm.expand(mesh.topology, selection, 5 )
# reposition
# optionally preposition in case of possible degenerated input, to get better results
#mm.positionVertsSmoothlySharpBd( mesh, selection )
mm.positionVertsSmoothly( mesh, selection, mm.LaplacianEdgeWeightsParam.CotanWithAreaEqWeight )
# save mesh
mm.saveMesh( mesh, "path/to/repositioned_mesh.stl" ) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions