Find the z value on a line at a xy intersection with another line

Hi, i am trying to get the elevation of a line at a xy intersection with another line. Its that possible in dynamo?

Yes.

Geometrically, it sounds like you want the Z-coordinate of the point where a plane intersects with a line?

You can do this with out of the box nodes, but the setup can vary depending on what you are sourcing the plane and the line from.

Do you have a sample file started?

This is part of a more complex script Zachri have been helping in to make. My main goal is to create a concrete encasement on a sanitary pipe at a intersection location. The script so far provides a x and y value but not a z value. only the separation between the two pipes. Since i already have the x and y value of the intersection i am trying to use it to get the elevation of the line (pipe). I just don’t see how i can accomplish it.

@csanchez you can intersect a plane with the pipe lines to get the elevation.

Intersect.dyn (29.3 KB)

4 Likes

Thank you Zachri, this looks good but i dont have a length value to use as parameter. I only have the x & y point location as input.PipeCrossings.txt (210.7 KB)

Correct - so you can create a point by the XY coordinates and then use Curve.ParameterAtPoint.

Thanks, Zachri, the node did help me to find out the elevation at the intersection. But now the cube solid i created at that point is not following the pipe flow direction. Not sure how to correct it.

image PipeCrossings.txt (200.7 KB)

It looks like you are creating the cuboid in the XY plane and then translating it vertically by the calculated Z value, which doesn’t take into account the slope of the pipe. So you could try to figure out the rotation of the pipe and rotate the cuboid to match, but I would just use the Curve.CoordinateSystemAtParameter node and save yourself some work. Quick example attached.

CuboidByCoordinateSystem.dyn (29.1 KB)

2 Likes

You Are the Men!