# Split brep and show 2 seperate bodies

I am trying to use the sphere to cut the intersection of the pipes and want to have the intersection as one body (yellow outline)and the rest of the shape as the other body (blue). But I can’t get two bodies out of the split command.

Thankyou (15.6 KB)

Like this? It’s a quick solution but i’m sure someone has a more efficient script.

Sphere-Cutting problem.3dm (351.7 KB) Sphere Cutting Problem.gh (9.7 KB)

Yes thats it thankyou!

I have nearly got what I am after, however, now when trying to make the two intersections (in blue) one body and the rods another body (in yellow) I cant seem to get the diagonal rod to be cut out at both intersection. When highlighting that part of the script in the image the two (in pink) parts of the rod are still attached and showing through the intersection body. How do I make the diagonals cut at both ends of the intersection? Thanks

metaachiral.gh (26.5 KB)

Here is my try. You should organize your data in a hierarchy. Points>>Curves>>Srf/Brep. This helps a lot when you need to do sequential steps or operations and if you want to reuse data from a specific order. Also it helps when you’re seeking help because other scripters sometimes ignore a question if they see a disorganized script.

metaachiral V2.gh (16.8 KB)

Thank you for showing me how to reorganize my script I didn’t realize the extent to which it could be simplified. I have been trying to add the two circles at the top and bottom to the bodies, so that the intersection has three pipes connecting (the circular one through it) and the rods also includes the rest of the circular pipes, but why when it starts with the circular pipes and rods does the circular parts not end up being included in the two final bodies? Im not sure how to include them as I don’t understand where they are being dropped off

I am sorry but i do not follow what you are trying to achieve. Can you label your diagram and draw the outcome you want to achieve.

I really lost in your definition , i use the definition of @jobrielgauuan ;maybe this what you want?

metaachiral V3.gh (18.7 KB)

1 Like

Yes thankyou so much, that is correct. Thanks both of you, for your help