[Dynamo] How to find Keys from List.SetIntersections

Hi Dynamo Masters,

(Sorry if i have a Bad English)

I hope you will help me out. Im new in using Dynamo.

In my script, after I gathered the elements (beams) and group them by their coordinates, i want to know if my beam is discontinued or continuous. the way I see it is that if my starting point and endpoint of the beams, have the same coordinates, then its a continuous beam. if the my startpoint coordinate didnt reflect in my end point, then i have a discontinued beam (i use “X” only as my startpoint and end point)

Please see the picture for reference

I already made it to getting the “non Repeatable coordinate” but didnt know how to get the respective elements and reflect it.

I hope I explain it Clear… Please help me

Thank you

You don’t need a node for discovering intersections. Extract X, Y, and Z values and just compare them. You could use this formula in a code block:

X1;
Y1;
Z1;
X2;
Y2;
Z2;
Z1!=Z2?
false:
Y1!=Y2?
false:
X1!=X2?
false:
true;

You will need to set lacing of the code block to “cross product”, and then extract the index of paired points. All points that are not paired should have some fake index such as -1. Then, use get item at index node, and group elements of discovered index with the elements in the original list. Elements with assumed idex of -1 will rerurn null value, thus nothing will be paired… Try it.

Hello Andej,

I appreciate your fast respond.

Im sorry, but i didnt get your point :frowning: im still a potato with dynamo, and all its features. But, i have a small background in programming.

Can you send me a sample script with a screenshot or file? maybe in that way, I can learn from it?

Thanks a lot

Once I started working, | realized its not that simple. The ends of tree beams could intersect at one spot. Therefore, I recommend a different approach.

I determined all axis of beams by using Planes. It is the only infinite geometry in Dynamo that I know of. Z values of points in conjunction with the Planes determined the axis. I grouped all the beams per each axis. Then, I used “group curves” node to group the beams by joinable curves.

Continous Beams.dyn (68.1 KB)