What can cause cutMesh to fail without throwing an error? #5045
ParvGuptaSpCT
started this conversation in
General
Replies: 2 comments
-
Hello! It seems like a bug on our side, thanks for reporting, we will investigate and fix it, and get back to you |
Beta Was this translation helpful? Give feedback.
0 replies
-
The bug will be fixed with #5049. It will be available in next release, for now you can use such code: def cutMeshSimple(mesh:mm.Mesh,circlePoints):
points = mm.Contour3f()
points.resize(int(len(circlePoints)/2)+1) # +1 to make it closed
for i in range(int(len(circlePoints)/2)):
points[i] = mm.Vector3f(circlePoints[i*2][0],circlePoints[i*2][1],circlePoints[i*2][2]) # take each second point to avoid the bug
points[len(points)-1] = points[0] # last equals first to indicate first
return mm.cutMeshByContour(mesh,points)
components = list()
components.append(cutMeshSimple(inMesh, inPoints))
components.append(inMesh.topology.getValidFaces() - components[0])
|
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.
-
Hello Devs!!
I'm trying to solve a problem where I need to cut a mesh using a specific contour, but the
cutMesh
method I'm using seems to be failing silently. I'm not getting any error messages or exceptions.Goal:
OneMeshContour
usingconvertMeshTriPointsToClosedContour
cutMesh
Problem:
when i run the
cutMesh
method the code fails silently without any error message or exception making things difficult to debug.I have tried repairing the mesh, which works in some scenarios but not in other scenarios. for reference I am adding the code snippet below with the required mesh and points.
In what scenarios could a
cutMesh
method fail silently without providing an error message? and how to tackle this situation.Find mesh here
Scenario 1:
After mesh healing the code works fine (the issue is away from the actual cut area)
points:
Scenario 2:
Healing mesh is not working
Points:
Code snippet:
code reference: 3992
Thanks
Beta Was this translation helpful? Give feedback.
All reactions