Points from Alignment projected on featurelines/offset alignments or polylines


For roads and rails, taking alignment (Main Line) station and calculation of properties at parallel feature lines/Polyline or offset alignment at that stations are basic operation. I have seen lot questions asked along the same line on this forum too.

This is an attempt to collect different methods to perform this operations. One of the method discussed as solutions is to create station origin points at mainline and create ZY plane at these stations and use the geometry.intersect to find the intersection point with diff. lines/featurelines. Limitation with this method is…

  1. lacing has to be set as longest …it take too long to run the code.
  2. in loops or curves have multiple intersection with single plane.

So to avoid this can we create points at centerline and translate them to featureline\Alignment ? will it be possible as current translate function doesn’t have lines as input to translate to? does any one know any other method apart from intersection node ?

Is there a reason why it wouldn’t work to use List.FirstItem in this case?

Because not always the intersection point you wish will be the first point. there will be multiple lines along the alignment and at that time it will be difficult to select the points.

You could sort the points by their distance from the coordinate system with List.SortByKey so that the unnecessary intersection points are filtered out. It’s just a matter of getting the right levels.

OffsetPoints.dwg (395.4 KB)
OffsetPoints.dyn (21.6 KB)


Apologies @mzjensen , i think it works and yes i didnt thought of sorting as per distance.

Still it will be great if we can find out some alternative to geometry.intersect just to save time of running the code. As with corridor featurelines its taking too much time to generate the intersection points.

This exercise is strikingly similar to what a corridor model already does: computing the perpendicular distance to offset targets. Could you do it that way and then just read the assembly parameters with Dynamo? The performance will probably be better that way.

I have point codes in corridor, creating featurelines from the same code and then using it for further analysis. but for 1km road its taking 10min to find intersection only. thats why thought of finding a method to project this points rather than creating planes and finding intersection.

You can try this to project the points, but I’m not sure that the performance is much better unfortunately :confused:

OffsetPoints_Project.dyn (29.8 KB)

Thanks @mzjensen this worked indeed, but taking more/equal time for corridor featurelines.

thanks alot …wll keep on searching for faster way to get points from centerline on to parallel entity.

@mzjensen i was trying to find a distance between two lines at a particular stations along the alignment. Sort by distance wont work in this case as offset distance is not fix. please correct me if i am wrong.

what will be other way around to sort it at a station location ?

@shahid.shaikh_C3D so you have a situation like this? The white line is the alignment, the red lines are what you want to measure to.

I think the original script still works in this case…

VariableOffset.dwg (396.1 KB)
VariableOffset.dyn (19.6 KB)

1 Like