rhinoscriptsyntax.SplitBrep problem in Rhino6

Hi,
I am trying to make a script written in Rhino5 to work in Rhino6. I have encountered a problem with the SplitBrep function. I am trying to split a polysurface (Superquadric sphere) using another surface (plane). The two objects clearly intersect, however the function returns None.

Here is the script:

import rhinoscriptsyntax as rs

HalfSQ=rs.GetObject('Select Superquadratic') 
print rs.IsBrep(HalfSQ)
CutPlane1=rs.GetObject('Select cutting plane')
print rs.IsBrep(CutPlane1)
result = rs.SplitBrep(HalfSQ,CutPlane1)

Both print lines return true and the variable result is None at the end of the script. This code worked in Rhino 5. If anyone had a same problem or might have an idea why this does not work please let me know.

If any clarifications are needed please ask, I’m new to the forum.

Thank you for your help

Can you please supply a Rhino file with the s.q. sphere and the plane surface you are trying to split it with?

SplitBrepBug.3dm (655.6 KB)

Here is the test file.

Well, if you run just the normal Rhino Intersect command between your surface and the hemisphere (which is actually a polysurface in two halves), you will see that the intersection curve has a gap near the pole of the hemisphere… Rhino does not seem to like that object too much…

I redid your hemisphere as a RailRevolve from its edge curves - it’s not exactly the same, but I didn’t spend much time on it - and the split seems to work on that…

@chuck - is this an intersector problem, does the original hemisphere surface have a problem or…?

SplitBrepMSH.3dm (1.1 MB)

I tried the Intersect command in Rhino5 and I do not observe the problem you have found in Rhino6. There is definitely something wrong around the pole of the hemisphere in Rhino6 that does not occur in Rhino5.

Thank you for pointing that out.

The sphere isn’t ideal, but the intersector should work on it as it does in V5. I’ll put it on the list.

If you zoom in on the control points in the Front view, you can see that the point at the pole is a little above the points in the next row out so there is not a unique tangent plane at the pole. However, even if you fix that, the intersector has the same problem.

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

Thank you for your response.

Please let me know when the problem is fixed. We are trying to convert all our scripts to Rhino 6 and this is blocking us right now.

Thanks again

Thank you for the link.
Could you please make it public so I can track the issue?

Done…

-Pascal