-
Beta Was this translation helpful? Give feedback.
Answered by
Grantim
Oct 21, 2024
Replies: 1 comment 1 reply
-
Hello! In older versions of meshlib python you could not call from meshlib import mrmeshpy
# Load mesh
mesh = mrmeshpy.loadMesh("untitled.stl")
# Find single edge for each hole in mesh
hole_edges = mesh.topology.findHoleRepresentiveEdges()
for e in hole_edges:
# Setup filling parameters
params = mrmeshpy.FillHoleParams()
params.metric = mrmeshpy.getUniversalMetric(mesh)
# Fill hole represented by `e`
centroidV = mrmeshpy.fillHoleTrivially(mesh, e)
mesh.points.vec[centroidV.get()].z -= 5
mesh.invalidateCaches() # need to invalidate caches after manually changing coordinates
# Save result
mrmeshpy.saveMesh(mesh, "fixedMesh.stl") This script should work for you:
Also adding link to original issue #3429 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Fedr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
In older versions of meshlib python you could not call
fillHoleTrivially
manually, but after our latest release it is possible: