Skip to content
Discussion options

You must be logged in to vote

Hello @ParvGuptaSpCT!

I've got your data and managed to achieve desired result with code like this:

from meshlib import mrmeshpy as mm

mesh = mm.loadMesh("input mesh.stl")

params = mm.FillHoleNicelySettings()
params.maxEdgeSplits = 1000000 # just a big number not to stop subdivision by this criteria
params.maxEdgeLen = mesh.averageEdgeLength() # stop subdivision by this criteria

holeEdges = mesh.topology.findHoleRepresentiveEdges()
maxAreaHole = mm.EdgeId()
maxHoleAreaSq = 0

# find max area hole
for e in holeEdges:
    areaSq = mesh.holeDirArea(e).lengthSq()
    if (areaSq > maxHoleAreaSq):
        maxHoleAreaSq = areaSq
        maxAreaHole = e

# fill holes
for e in holeEdges:
    pa…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@ParvGuptaSpCT
Comment options

@Grantim
Comment options

@ParvGuptaSpCT
Comment options

@Grantim
Comment options

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