Trying to fool proof an automated 3D Model to 2D curves to RhinoCAM operations process, it works fairly well so far, but bugs out on bad geometry. I need to filter that out, but so far as a Member Index search goes, these “Closed Non-Manifold Polysurfaces” are “Referenced Breps” just like the healthy geometry.
You can’t bake these back out once you input them in Grasshopper, you don’t even get an invalid error, just nothing happens. I’d like to make a pile of rejects for the CAD/CAM operator to deal with manually but first I need to detect them.
Attached is a 3DM with a sample of geometry, the bad brep is highlighted in red. Bringing it in through either a Layer Pipeline or Brep bucket results in “Referenced Breps” only. It only turns Invalid if internalized.
bad brep bad.gh (86.0 KB)
bad brep bad.3dm (5.0 MB)
The rest of the geometry parses properly, but it only takes the inclusion of one bad brep to break it.
EDIT: If I Deconstruct Brep and Join Brep the faces, it does read as Invalid, but testing thousands of parts like that racks up a lot of computation time and my script is already heavy.