I have a problem with rs.SplitBrep in the file attached and the example code. Can anyone try this. Use the surface on the Brep layer as the “brep”.
import rhinoscriptsyntax as rs
filter = rs.filter.surface + rs.filter.polysurface
brep = rs.GetObject("Select brep to split", filter)
cutter = rs.GetObject("Select cutting brep", filter)
rs.SplitBrep ( brep, cutter )
Splitting works if I use Rhino Split command. Any idea why it doesn’t split with rs.SplitBrep?SplitBrepIssue.3dm (230.2 KB)
Yes, I can see that. Just curious - why such a tight model absolute tolerance (0.0001?
I was just fiddling with the tolerance setting, thinking maybe it’s related to why the rs.SplitBrep fails.
Any idea how to make rs.SplitBrep work as Rhino Split command?
I just want to add that rs.TrimBrep suffers from the same issue as rs.SplitBrep. Again Rhino Trim command works.
I’m not quite sure what’s going on. So I’ve logged an issue to look into this further.
I managed to get around it by doing the opposite of Rhino command ShrinkTrimmedSrf:
These are the steps:
- rs.DuplicateSurfaceBorder(brep) - Create an outline
- rs.RebuildSurface(brep) - Untrim the surface
- rs.ExtendSurface() - Extend all edges of the untrimmed surface
- Split the extended surface with the outline from the step 1
I basically recreated the surface with extended untrimmed basic surface. rs.SplitBrep works fine from that point on.