Skip to content
Discussion options

You must be logged in to vote

Hello!

This case is kind of complex because inconsistently oriented parts are joined together and sometimes forms self-intersections and overlaps.

You can try code like this

 from meshlib import mrmeshpy as mm

mesh = mm.loadMesh(__file__+"/../18.stl")

# find disoriented faces
disorientedFaces = mm.findDisorientedFaces(mesh)

# extract them into separate mesh and flip
separateDisorientedPart = mm.Mesh()
separateDisorientedPart.addMeshPart(mm.MeshPart(mesh,disorientedFaces))
separateDisorientedPart.topology.flipOrientation()

# delete disoriented faces
mesh.deleteFaces(disorientedFaces)

# join with fliped disorieted faces (they will be joined but not connected)
mesh.addMesh(separateDisor…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thomasm404
Comment options

Answer selected by thomasm404
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