Invalid brep after split

Dear Eveerybody,

I have a complex brep (a piece of terrain), which i would like to split with a simple surface. The goal is to measure the volume of the leftover part above and belove the surface. The problem is that in certain heights the surface doesn’t split the brep properly. I internalised one of the problematic situation. As you can see the result seems quite random, and one of them comes back as an invalid brep.

This problem happens with different terrains and different surface positions too in this exact script. Have anybody an idea what could be the problem?

Thank you in advance!

brep_split_review.gh (160.7 KB)

The part you want to split is thin so I used a little trick I learned recently - scale it up in Z, do the split / cap and scale the pieces back down again. This is a bottom view where the fragments can be seen.


brep_split_review_2023Aug29a.gh (171.1 KB)

1 Like

If the center points of your geometry have different Z-positions, you will also need to scale the cutter.

Here’s a simple example illustrating the difference (note the differences in volume at the output):

example.gh (22.3 KB)

You could also use the Scale component or move geometry to the origin and back.

Here’s the original file demonstrating the 3 different methods.

brep_split_review_re.gh (631.5 KB)
Note: it takes several seconds for this definition to get a solution (volume component is rather slow).

-Kevin

1 Like

Good point! Another way that looks more correct is to add Srf CP (cyan group) to get a point on the cutter as the Scale NU ‘P’ input. Inverse Transform is slick, thanks for that too.


brep_split_review_2023Aug29b.gh (172.7 KB)

Thank you everybody for the solutions! It looks like the scaling is solving the problem! Note: Bringing back the geometry to the origo is also filtering a lot of problem!