# Overlapping Curves

Ok, so this follows on from a Twitter conversation which included @solamour & @Zach_Kron

Something which I presumed would be quite simple… Split curves by other curves and remove overlaps is failing…

It works fine on a simple test case…

But fails on a (not very) complex test case…

I’ve tried as many splitting nodes as i can but can’t get this to work… Any suggestions greatly welcomed!

Cheers,

Mark

Edit: Perhaps it’s a Recursion issue…

Unique Curves.dyn (53.5 KB)

test.rvt (1.6 MB)

How do you mean exactly?

P.S.: you have some custom nodes in your dyn, so it’s not working properly.

So the thick curve should be split at the arrow, but instead it runs past…

You can see that it has been split at the 2nd intersection…

Sorry about that, I’ve used a node from Chynamo, there’s also a node from BiMorph

Thanks for looking!

Mark

Okey, so the function of split is by itself clear and easy to execute the only thing that should be done is to write down logic to apply the action. I’d say it’s way easier to do in python. As I know you have extensive knowledge of the language so you can do it easily! First would be to define a function to cut one line with another and the rest is just bunch of for loops to do it the correct order. Correct me if I’m wrong.

1 Like

Hah, thanks, TBH, it was only writing all this out that clarified it…

I guess it would be nice if the OOTB split nodes did this for us.

I think the Python will be a bit tricksy because it’s cross lacing… I’ll need a for loop inside a while loop…

Oh well, I’ll see when I next have spare time

Cheers,

Mark

1 Like

Is this the result you’re looking for?

Yes thank you

Some more searching of the forum brought up this post…

Which has the Ampersand Split node containing some very awesome Python

assert type(piece) is not list

Genius! Thanks @colin.mccrone

Working graph…

Unique Curves-to Walls.dyn (133.1 KB)

Thanks All,

Mark

4 Likes