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)
dale
(Dale Fugier)
2
Hi @spineribjoint1,
Yes, I can see that. Just curious - why such a tight model absolute tolerance (0.0001?
– Dale
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.
dale
(Dale Fugier)
5
Hi @spineribjoint1,
I’m not quite sure what’s going on. So I’ve logged an issue to look into this further.
https://mcneel.myjetbrains.com/youtrack/issue/RH-54220
– Dale
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.