Blog Published: 15/09/2020

Blogger - Enrique Barriuso

Adding railway sleepers in Civil 3D

Corridors can be used in Civil 3D to design linear elements like roads, railway lines or retaining walls.

The-Civil-Side.png

The assembly will be extruded along the baseline of the corridor to generate the object, which is what is required in most situations. However, sometimes we can have discrete elements in the assembly that need to be inserted at a certain interval along the baseline, rather than added as a constant extrusion. This is what happens with railway sleepers, also known as railroad ties or crossties.

A possible approach can be to use a conditional subassembly and apply a different assembly to the corridor based on the presence or absence of a polyline along the baseline of the corridor. In this example, we will be using Dynamo to automate the creation of those polylines, that will then be applied to the corridor as a target of the conditional subassembly.

To create the assembly, we start by inserting the ‘ConditionalHorizontalTarget’ subassembly directly in the baseline of the assembly. It needs to be inserted twice, once with the ‘Type’ parameter set to ‘Target Not Found’ and again with ‘Target Found’.
Sleeper-1.png Sleeper-2.png
To illustrate this workflow, we will use the ‘Internal_Multi_Track’ subassembly. Omit the tie when the target is not found and include it when it is found.
Sleeper-3.png Sleeper-4.png
The resulting assembly is shown below. Note how the railroad tie only displays when the target is found.
Sleeper-5.png
Our next task is to draw some polylines along the baseline of the corridor where the sleepers should go. The following steps will guide you through the creation of a Dynamo script to achieve this goal.

Select the corresponding baseline from the corridor.
Sleeper-6.png
Using this baseline, the following group will generate a list with the start and end chainages for all the polylines. The width and spacing of the tie are provided as an input and the resulting chainages will be centred around the baseline ensuring that no ties go beyond the start or the end chainages of the baseline.
Sleeper-7.png
Sleeper-8.png
Extract the start and end points of the polylines from the baseline using the list of chainages that we calculated previously. Those points will then be used to insert the polylines in the drawing in a layer of our choosing.
Sleeper-9.png
To finish the script, we check the ‘Is Input’ property for all the input nodes to enable the script to be executed from Dynamo Player.
Sleeper-10.png
Execute the Dynamo script adjusting the inputs accordingly.
Sleeper-11.png Sleeper-12.png
After executing the script, you will see some polylines along the specified baseline with a length equal to the ‘Tie Width’ and a distance between them based on the ‘Tie Spacing’ provided. These polylines indicate where the sleepers should be placed.
Sleeper-13.png
There just remains to apply those polylines as targets of the conditional subassemblies in the corridor. Since all of those polylines have been created in the same layer, all of them can be easily selected at once.
Sleeper-14.png
Sleeper-15.png
The resulting corridor can be seen below, with the sleepers shown in red. The ballast reaches the top level of the sleeper in the gaps between them.
Sleeper-16.png
If you would like to improve your Civil 3D and Dynamo skills, you can have a look at our courses HERE.

Alternatively, our Civil Engineering consultancy services can be found HERE.

 

About the author

  • Enrique Barriuso

Enrique Barriuso

Application Specialist

A qualified CEng MSpICE Civil Engineer with over 7 years post graduate experience, Enrique graduated with a Masters in Civil Engineering, which covered a wide variety of subjects in the fields of transport, structural analysis, geotechnical design, coastal, water and environmental engineering. Enrique joined Excitech in 2015 and is an Autodesk Certified Professional in AutoCAD Civil 3D, subsequently helped many clients resolve their Civil 3D problems. He provides training in Civil 3D, AutoCAD and SketchUp.

Other Insight Authors
Add events to your calendar

Add this Internet calendar to outlook / iCal and subscribe to updates

Blog email subscription

To receive an email when a new blog is published, please enter your details below.

Live chat