Brep.Split() with curves - why is the first element in the return list always None?

As an example, let’s say you have a single surface and two closed curves that lie on it.
Selecting the surface and the curves, coerce them to a brep and a list of curve objects, then run:

splits=brep.Split.Overloads[IEnumerable[Rhino.Geometry.Curve],System.Double](crvs, tol)

The return always looks like this:

Why is the first element None? I would have thought it might return True if the split was successful…

Is it because one of the 5 overloads on this method has an out parameter so they all have to have a reserved first index even if there’s nothing to return on the other 4 overloads?

Or something else?

Hi @Helvetosaur,

Can you post your geometry and a script sample?

– Dale

Hi @dale

Sure - basically the example above with a surface and two closed curves lying on it for splitting…

1Srf2Crvs.3dm (54.3 KB)

Here’s the code:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino, System
from System.Collections.Generic import IEnumerable

srf_id=rs.GetObject("Select the surface",8)
crv_ids=rs.GetObjects("Select the curves",4)

if srf_id and crv_ids:
    crvs=[rs.coercecurve(crv_id) for crv_id in crv_ids]
    #splits=brep.Split([crv],tol) - 'multiple targets could match' - need to use overloads
    splits=brep.Split.Overloads[IEnumerable[Rhino.Geometry.Curve],System.Double](crvs, tol)
    for split in splits: print type(split)


<type 'NoneType'>
<type 'Brep'>
<type 'Brep'>
<type 'Brep'>