How can I get the distance from one alignment perpendicular to another alignment?

Good days!
Dear friends!
How can I get the distance from one alignment perpendicular to another alignment using Dynamo for Civil 3D?Alignment.dwg (921.2 KB)

It seems like there should be a simple way to get a polycurve from alignment geometry, but I couldn’t figure it out. So I had to go the long route. This graph may not be the cleanest way to do it, but give it a try.

ClosestPointTo.dyn (64.5 KB)


Hello, try to create perpendicular planes to one alignment, this plane will intersect the other one. Then extract the line between this two points.
Maybe you should define a vector tangent and afterwards define an xz plane perpendicular to this vector.
Best regards

For this particular case as there are no transition curves it is simple to retrieve the sub entity geometries and use Dynamo to compute the closest points.

Alignment Geometry.dyn (50.5 KB)


Hey @Paolo_Emilio_Serra1, I was just going back and looking through your script. Just out of curiosity, I’m wondering why you regularly use Function.Apply instead of just plugging the output of one node into the input of another? Like this example:

Is there a benefit to this method?


@mzjensen this hides the warning for the large coordinates when you are using the Medium scaling factor. I always keep the scaling to Medium because it is the only one that can be used safely to process objects far away from the Origin in Dynamo such as surface triangles or corridor feature lines.


OK that makes sense. So it’s mainly for housekeeping :slight_smile:

1 Like