Create a perpendicular line from point to alignment

Hello!

I have an alignment, and I have multiple points (XY) which are around 5-20meters spread out along the alignment but with different offsets. I want to create lines from the points to the closest perpendicular point on the alignment. I do not have any stations in relation to the points, only the alignment and a list of points.
I’ve been trying to figure this out in Dynamo but haven’t been able to find a solution, can anyone please point me in the right direction to which nodes/packages with nodes that can do this?

I am using Civil 3D 2023.

BR

Curve.PullOntoSurface is the only core node (that I can think of) that pulls or projects one geometry onto a second geometry in the normal direction of the second geometry. All the other options pull in the direction of the first geometry’s normal or in a specified direction.

This just means that we need to convert your geometry to curves and surfaces to benefit from this particular node. Extrude your alignment curve vertically to create a surface and create a line by extending your points vertically as well. Then you can pull the lines onto the curved surface (based on the surface’s normal directions) and then get the start point of each line to convert back to your point geometry.

Hi @t.nilsson,

Here you go:

1 Like

I’ve not tested if this is improved in newer Dynamo versions but the Alignment.StationOffsetByPoint can be tricky if the Alignment exists of straight lines. I wrote a blog about that a while ago:

In Dutch, but there is a translation button on top.

1 Like