I’m trying to split this singular brep with multiple surfaces which have been constructed on a series of planes. From my limited understanding the split brep multiple component should resolve this. However, it doesn’t seem to be working in this particular scenario unless I convert the surfaces into breps by adding a thickness. The problem with that is it isn’t what I want to do as it adds small surfaces between the larger ones.
and cobbled together this Python from it, which appears to work:
import Rhino.Geometry as rg
import scriptcontext as sc
tol=sc.doc.ModelAbsoluteTolerance
cutter = rg.Brep()
for b in cutters:
cutter.Append(b)
pieces = brep.Split(cutter, tol)
Thank you all for taking the time to look at this issue. It’s been insightful to always looking at all your solutions as I’m still learning Grasshopper!
I just adjusted the cutters so that some DO intersect each other and the Python ‘Rhino.Geometry / Brep / Split’ method works fine. That post I referenced was from 2017, maybe they fixed it since then?
The algorithm used in the SplitBrepMultiple component is at fault. RH-77129 Grasshopper Component SplitBrepMultiple doesn’t work in a case that works in Rhino Split command. This component needs to be rewritten to follow the logic that the RhinoCommand uses to perform split.
This works for this case. My original comment was based on the fact that I found notes in several of my scripts from a couple of years ago that this method could also fail. It is possible that this has been worked on since then. Unfortunately, I did not keep any of my failure examples to test now.
MergeBreps, of course! Why didn’t I think of that? Thanks, it works well.
Description:
Combines two or more breps into one. A merge is like a boolean union that keeps the inside pieces. This function creates non-manifold Breps which in general are unusual in Rhino. You may want to consider using JoinBreps or CreateBooleanUnion functions instead.