Python CurveCurveIntersection intersecting a group of curves inside a loop

Hi all,

i want to check for intersect a group of curves which are copied and rotated randomly on a surface in a loop.

Now i want to to check for intersection and add/or not add the curves.

How can i do this with this method?.

I tried using the CurveCurveIntersection method in my script but without success. It seems that there is no intersection happening, cause i get the error ‘NoneType’ object is unsubscriptable.

foroDudaDos.gh (9.3 KB)

Anybody knows what is wronh here?

If the two curves do not intersect, like in your case, “ie” in your definition will be None.
Therefore, you can write if ie, or if ie is not None

foroDudaDos2.gh (13.2 KB)

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Hi Giulio,

thanks for responding and sorry for explaning myself bad!Thanks to the community a already learnt a lot!
What i am trying to archive is packing the curves(objs)(in your picutre the green ones) into the boundaries, but just when they do not intersect themselves.For example in the picture above they intersect.
Thats why i thought looping trough the list of Curves from the Obj input and the lines 40-53 should do this job.

So when you say the two curves do not intersect you meant the the first ones in the loop dont intersect?

When i see the code now i would think it sholud work like i expected.
Could you maybe point me in the direction?

Many thanks!