List combine and order

Hi all,

i’ve got lines by start end point. Some of that lines has an intersection with two curves somewhere in the middle. So i combine the two curves in the middle in a list and write a code block ‘line.DoesIntersect’.

the index 3 to 17 are true, but when i split it up i get 2 lists of the values that i am looking for. In the first list are the index numbers 32 to 46 true and in the second list are the numbers 3 to 17 true.

So i want 1 list where the number 3 to 17 and 32 to 46 are true.

How do i do this?!?!?! :tired_face:

Use the “||” node?

1 Like

haha wooow you’re my hero!
that it can be that simple…

but i still dont really understand why this works… i get only the true values now, right? but what if i wanted the false values?

|| means or. One or the the other must be true. (at least one of the two). If you are looking for the opposite, you can use the not node. (not true = false)

Similar in python:

>>> print True or False
True
>>> print True and False
False
>>> print not True
False
>>>
1 Like

ah i get it! thanks