Geometry.Intersect - list result not matching input

I’m trying to filter lines based on interesting geometry of start and end points. When I run the script there should be a matching point in the second list, but it for some reason is showing up in the first list of the results. I’m confused as to why it is showing up where it is.

1 Like

@crapai ,

so you want filter the lines involved in the intersection? for now i got the points(intersecting)

regarding the matching you can match the values x.X , y.Y , z.Z

I only want lines that have either the same end point or start point.

1 Like

@crapai ,

that it should work this way…

I’m basically doing the same thing already, except I have to compare the start point too because the lines are drawn in a random direction as far as I can tell.

The thing I’m confused by is that from the image in my original post I would assume based on the position of the matching points as inputs the matching result should be at [1][0] but instead it is saying that [0][1] matches. This is causing the wrong lines to be filtered out.

The geometry inputs get compared against the other inputs, in that order. So the first point in your first list is being compared against all the points in the second list and that’s shown in the first list @L4 in the output. You’ll notice each sublist in the output contains 4 more sublists matching the structure of your second list. Everything is working as expected.

If you want to change the structure/order of your output you either need to change the inputs or force the structure with list levels. In your case, either switch the inputs or use @L1 for the other input to force that list to run “first”.

1 Like