Holes in Surface


#1

Is there a way to tell whether or not a surface, or more particularly a polysurface has holes in it?


#2

Hi,
Are you looking to tell if an object is closed (no open edges anywhere) or if there are interior holes in, say an open surface/polysurface?

–Mitch


#3

Looking to see if there are any interior holes in a surface


#4

OK, below is a quickie python script that will tell you if your Brep (surface or polysurface) has any interior holes, and if so how many…

—Mitch

TestDetectInteriorLoops.py (808 Bytes)


#5

Awesome that works and shows me how you did it. Thanks. I am surprised that the rhinoscriptsyntax doesn’t have anything for detecting edges of a surface. Also can you use the same brep.loops to detect outer trims?


#6

Well, with rhinoscriptsyntax, you could use rs.DuplicateSurfaceBorder(id,type) where type can be used to return inner, outer, or both inner and outer borders. You can then see what’s returned. The main disadvantage with rs is these edges are added to the document automatically, so if you don’t want them, you need to delete them afterwards. RhinoCommon simply allows you to do this without adding any geometry to the document.

Yes. As a matter of fact the script tests for NOT outer.

HTH, --Mitch


(Nico de Meester) #7

Hi Mitch,

Is it also possible to delete these holes with your python script.

–Nico


(Dale Fugier) #8

Hi Nico,

The functionality behind Rhino’s “Untrim” commands has not been make available yet. It’s on the list.

https://mcneel.myjetbrains.com/youtrack/issue/RH-12326

– Dale


(Brian Gillespie) #9

RH-12326 is fixed in the latest WIP