Split surfaces only on contact + preserve surface order

Hi everyone,
very basic questions on how to split surfaces using curves, without reshuffling the initial order

  1. Selective split problem
    The problem of the standard split component (SrfSplit) is that the curve projection also splits other nearby surfaces, even though the curve does not touch them.
    I want to avoid splitting those unintended srfs, and only split srfs if the curve actually touches/intersects them.
  2. Preserve surface order
    After splitting, I want to keep the original tree paths order of the input surfaces, as it is in the gh script I shared. The issue with that is with the standard split component (SrfSplit) that is not splitting the surfaces as I want.

Any suggestions?
Thanks!

1 Like

You could use various components that test for intersection events and help you distinguish touching vs not touching.

Post your file?

The script is full of other stuff and difficult to clean up just for sharing. I’ll do it in case no one can give me an easy reply, as it seems like a pretty basic operation for many experts here who are used to working with complex geometries.

Any names of the components you mentioned?

1 Like

Word. I thought we would only need the surfaces and the curves to do a quick test on those objects :man_shrugging:. Like exactly what your second image shows:

Project Point (using curve midpoint), Surface (or brep) | Curve intersection, Collision One|Many, etc., but you might not even need them, some times PullPoint is enough to know if an object (line) is on a surface.

Cheers!

1 Like

random example, 14 surfaces organized in a random tree and a flat list of 4 curves intersecting some of those surfaces:

initial situation:

leveraging on Brep|Curve intersection → final situation:

data trees are respected, meaning if branch {x} was containing 3 different surfaces before splitting, then after splitting you will end up with additional branches like:
{x; 0} (split fragments of that first original surface, or whole surface if no split)
{x; 1} (split fragments of that second original surface, or whole surface if no split)
{x; 2} (split fragments of that third original surface, or whole surface if no split)

2 Likes

Amazing! Exactly what I was looking for. Thanks a lot!