Replacing a Cut Portion of a Closed Mesh with a Plane #3444
Unanswered
jeahyuklee
asked this question in
Q&A
Replies: 1 comment
-
Hello! Please try code like this (note that in following release some signatures will be changed): from meshllib import mrmeshpy as mm
mesh = mm.loadMesh("path/to/mesh.stl")
plane = mm.Plane3f()
plane.n = mm.Vector3f(0,0,1) # normal
plane.d = 0 # shift along normal
mm.cutMeshWithPlane( mesh, plane )
for e in mesh.topology.findHoleRepresentiveEdges():
fParams = mm.FillHoleParams()
fParams.metric = mm.getPlaneFillMetric( mesh, e )
mm.fillHole( mesh, e, fParams )
mm.saveMesh( mesh, "path/to/export_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
-
Hello!
Your previous suggestion to use the fixUndercuts function was very helpful to me.
This time, I would like to cut a closed mesh with a plane, replace the cut portion with the plane, and generate a new mesh with the remaining part.
Could you please recommend a method or function that can achieve this?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions