Help for BooleanSplit c#

hi everyone
HELP FOR BooleanSplit C #
I Need This API BoleanSplit is applied a few cutter simultaneously on an issue, not to act separately for each cutter, in fact, I want to take a result like what is done in Rhino, from friends who dominate C #. help ,me please
https://developer.rhino3d.com/wip/api/RhinoCommon/html/M_Rhino_Geometry_Brep_CreateBooleanSplit_1.htm


boolean split.gh (15.4 KB)

brep = Brep.Split(cutter, intersectionTolerance);
@Mahdiyar
or…

Similarly, Split Brep is the same problem with Muiltcutter and why are these codes have error?


brep.split().gh (29.8 KB)
https://developer.rhino3d.com/wip/api/RhinoCommon/html/M_Rhino_Geometry_Brep_Split_4.htm

brep = Brep.Split(cutter, normal, planView, intersectionTolerance);

You need to change the access of the inputs to List Access :

//CreateBooleanSplit
private void RunScript(List<Brep> firstSet, List<Brep> secondSet, ref object A)
{
  A = Brep.CreateBooleanSplit(firstSet, secondSet, RhinoDocument.ModelAbsoluteTolerance);
}
//Split
private void RunScript(Brep brep, List<Brep> cutters, ref object A)
{
  A = brep.Split(cutters, RhinoDocument.ModelAbsoluteTolerance);
}

Ehsan.gh (13.3 KB)

1 Like

Here is an example of this overload:

private void RunScript(Brep brep, List<GeometryBase> cutters, Vector3d normal, bool planView, ref object A)
{
  A = brep.Split(cutters, normal, planView, RhinoDocument.ModelAbsoluteTolerance);
}

Overload.gh (89.2 KB)

1 Like

thanks very much