What is the best way to close hole in mesh?

Hi,

I’m looking for the best way to close a complex plain hole in a mesh. From time to time as the solution works this approach - first create the contour of a hole second make the boundary surface from it then polygonise it.

But from time to time boundary surface simplifies the contour by deleting colinear segments, for example. It happens not all the time mostly when there is not one brunch in the input.

Using Delaunay with further deleting of the spare faces will not always lead to the good result. On the picture, you can see the difference between the initial curve and the resulted mesh.

I’ll be very appreciated for the advice

It’s a bit hard to tell from the screenshot (providing a file always helps), but this method might help:

Thank you I’ll check your solution although coding isn’t my strength.

As for my defenition, I had a hope it is kind of general question and there is a pluging with such a functionality. Anyway here is the excerpt of my definitions, both approach I have tried.

hole example 1.gh (38.1 KB)

P.S. By the way I don’t have a php version of yours.
P.P.S What is funny i’ve opend your script in Rhino6 it works, but mine works different, the curve side component calculation should be reversed.

If I’m clearly understand the key in your script is “TriangulateClosedPolyline()” What is this? It is a part of the Rhino API there is no such component fo Grasshopper?

Hi again, looks like the advice of AndresDeleuran is exactly what I’m looking for.

But I use Rhino 5 still and there is no Phyton component in the Grasshopper version I have. Could anyone help please with rewriting this to VB or C#? Looks like this is not a problem, a few strings but C# syntax is totally new to me.

As an example the string from here https://developer.rhino3d.com/5/api/RhinoCommonWin/html/M_Rhino_Geometry_Polyline_TriangulateClosedPolyline.htm - public MeshFace[] TriangulateClosedPolyline()

Where to put the parameters? What does it mean array and just after the function, doesn’t look right…

Any advices will be very appreciated

GHPython was/is not a fully standard component in Rhino 5 yet. You can download it from here:

https://www.food4rhino.com/app/ghpython