Connecting points from different lists

Hi,

I’m trying to connect two associated points with lines. The points are located on two surfaces and defined in different lists. When I use “Line.ByStartPointEndPoint” for the first indices of each list, it seems like the rows are shifted with respect to each other (see picture 1).

When I try to connect all the points by simply plugging the two lists respectively into startPoint and endPoint, it get’s messy (see picture 2). I’m thankful for any suggestion you might offer!

Best regards,
Tore Ask

Reverse the one of the lists using List.Reverse (If you have a 2D data structure you’ll have to use List.Map)

Hi Tore,

Can you show values before connecting to “Line.ByStartPoint.EndPoint”.

Hi Kulkul and thanks for your reply,

Here are the values in the lists shown:

Hi,

Thnks for the suggestion, but when I reverse the one list, the line just pops from the one corner to the other, as shown in the picture. If I could “flip” the coordinates, or inverse them somehow, I think it could work.

Please upload your dyn file here. So that we can have closer look at it.

You need to use List.Map with the List.Reverse. The likelihood is you have a 2D list.

I’m sorry, but unfortunately I’m a new user, so I’m not allowed to upload files, only pictures, don’t know why but I get an error message when I try to upload the dynamo file. But the whole picture looks like this:

The two double curved faces is selected in Revit.

Thomas it is a 3D list.

Modify as shown below. See if it helps.

Thanks for the script edit, it certainly made it less messy and it now seems that each associated point connects in the same plane/height, but there’s still some problems as you can see in the picture. I think the “index pairs” of each list is now correct, but the problem is that the points in surface 1 starts at the bottom left corner (looking from the outside-in) while the points in surface 2 starts at the bottom left corner (looking form outside-in), which means overall surface 1 starts counting points from the opposite side with respect to surface 2.

Sorry for the bad explaination btw!

This should resolve it:

That’s it!! Thank you ever so much!

You could also try 1…0…#x (replacing 0…1…#x) for bottom set of PointAtParameter
Might be able to avoid reversing, if you do so.