How to broke line by square and get zhe segments outside the square?

unhandled

(C18957181678) #1

After the line is interrupted by a square block, I want to obtain the segments outside the square.
I am poor at C#, Crashing…

test.gh (14.9 KB)
test1.3dm (89.1 KB)


(Pfotiad0) #2

Get the general case. In fact there’s 2 ways to skin the cat on that (Split and CurveCurve ccx events).

Used here the most naive way (recursion on Split): as a challenge try to do it with the orthodox (ccx) way.

Intersect_test_56A.gh (119.5 KB)


(Pfotiad0) #3

And this is the proper and 100 times faster way (ccx events) to skin the cat. But some Methods used are internal.

Just a hint:


(C18957181678) #4

thank you very much!