Filter Point List by Point Value

Hey Eveyone, Im trying to filter the “Curve.startPoint” and only return the coordinate with the max X value. Please see the attached image. I have tried to use the list.contains but cant get it to work. Any ideas?

A little bit more background. Im trying to get the perpendicular distance between a selected rack of pipes. I need the outside to outside distance.

right now im trying to take the curve of the pipe and filter by x and y vaules to find the outsides. but PLEASE let me know if anyone knows a way that will work.

See if this helps …

1 Like

that works! but what i was going to do after that doesn’t work. Do you know another way i could filter the data so i could get the distance from outside to outside pipe?

Have you tried using the Geometry.DistanceTo Node?


Another way…

1 Like

So i got the outside pipes and when i do geometry distance to node it give me 4.5’ which i want it to return 4’ in this case. Any ideas?

Instead of using Curve.StartPoint use CurvePointAtParameter with parameter as 0.5 to get the midpoint and then do the do the Geometry.DistanceTo.

since all the pipes are staggered wouldnt the midpoint be the same angle as the ends? not perpendicular?

See if this helps …

distances.dyn (19.3 KB)

1 Like

I have this coming directly from the curve. image

That is because you haven’t changed the lacing to Cross Product
Note the indication at the bottom right of the node in the graph I’ve posted
Right click on the node to do so

works perfect now!

1 Like

last question is how do i keep my family elements in the model after i rerun dynamo player. It deletes the elements i placed.
MUILTIPLE PIPE HANGER - Trapeze Hanger.rfa (1.0 MB) Racked PipeAndConduit Trapeze Hangers.dyn (193.3 KB)

You need to restart your script/ / use the Dynamo Player, because Dynamo will always replace “old” geometry

Also you could use a plane to intersect with on the 0.5 parameter, this way the distance is always perpendicular