# Problem with spliting breps with planes

I want to split a group of breps with two planes and keep the geometries within only one of the 4 quadrants, as shown below:

However, I’m unable to get the results correctly.

I can get the result of the first step correctly, i.e get the geometries above the horizontal plane:

However, I’m unable to get the geometries to the left of the vertical plane for the breps obtained in the previous step (those geometries circled out are the ones I want to obtain as final result).

I’ve tried two different ways to do this, and neither worked. GH test file attached, too.

Can I ask your suggestions on “splitting a group of breps with two arbitrary planes”?

Thanks.

split_breps_with_planes.gh (54.1 KB)

You could do something like this: problem is that the second plane doesn’t actually split anything: split_breps_with_planes_ME.gh (58.1 KB)

Thanks. However, according to this method, if a surface is intersecting with the vertical plane, it might be deleted if its x is smaller than the x of the point where the vertical plane is located.

What I want is a “precise” cut, i.e. for a surface intersecting with the vertical plane, the part in from of the plane will be kept and the part behind will be ignored. This means, the surface must be split first literally.

I started over and split the BReps with a plane. The process should be to first divide the group of BReps into those which cross the plane and those which don’t. For those that dont, divide them into those above the plane and those below. Then for those that do cross the plane, do a surface split on them to split them into two. You can then assign these to the groups above and below the plane.

In this instance here though none of your BReps cross the vertical plane, they just have one face which sits on the plane, so the srf split method doesn’t work as there is nothing to split. If you do have some which cross the plane, then just repeat the first two groups with the output of List B from the second group

split_breps_with_planes MBH.gh (91.7 KB)

1 Like

Added a short section in to give you the BRep splitting functionality. I don’t love it as it gives an error when individual BReps aren’t split by the curve, but it does work (I just don’t like having red components on screen!)

Extra section is this:

split_breps_with_planes MBH.gh (97.7 KB)

1 Like

Hi @Matt_Harwood, thank you very much for the detailed solution.

Following your suggestion, I added another solution, but using a solid boolean approach, which can deal with arbitrary position and direction of the cutting planes and isolate the parts of the input geometries within one of the four quardronbs defined by the two planes.

It still use the “plane coordinate” component as a filter to identify parts below the cutting planes, althought I can’t say that I fully undertand what this component is doing.

Thanks, again, for your illuminating suggestions.

split_breps_with_planes MBH_ZJ.gh (156.0 KB)