Tunnel Alignments

Each tunnel alignment in a TunnelCAD project represents an independent tunnel with its own 3D geometry path, line definitions, templates, cross-sections, and volume definitions. A project can contain multiple tunnel alignments, and each is fully self-contained.

Adding a tunnel

Select Tunnel > Add Tunnel… to open the new tunnel dialog. Provide:

  • Name – a unique identifier for the tunnel within the project.

  • Description – optional metadata text.

  • Start Chainage – the chainage value at the beginning of the tunnel.

  • End Chainage – the chainage value at the end of the tunnel.

  • Style – the alignment display style to use.

The new tunnel appears in the project tree and becomes the active alignment.

Deleting a tunnel

Select Tunnel > Delete Tunnel to remove the currently selected tunnel alignment from the project. This operation deletes all associated data (sections, templates, volumes) and cannot be undone.

Warning

Deleting a tunnel permanently removes all its cross-sections, templates, and volume definitions. Make sure to save a backup before deleting.

Importing alignment geometry

Select Tunnel > Import Geometry… to import alignment geometry from external sources:

  • ALM files – TunnelCAD’s native alignment format, containing horizontal elements (lines, arcs, spirals) and vertical PVIs.

  • LandXML files – industry-standard exchange format (versions 1.2 and 2.0 are supported).

The imported geometry replaces the current tunnel’s alignment engine data.

Editing alignment geometry

The Alignment tab lists the alignment the same way SurveyTools Alignment Solver does (scr/alignsolver): a category tree (horizontal elements, vertical profile, station equations, superelevation, widenings, offsets, transition offsets, cant, rail) and a read-only grid. The plan drawing stays on the right. The header shows whether 3D mode is on and, when it is, the section azimuth.

Edit Alignment… on the tunnel’s project-tree menu, Edit on the Alignment ribbon, and the alignment-view toolbar open the alignment editor. It is the Alignment Solver editor:

  • Horizontal — PI easting, northing, radius, spiral in/out (clothoid or cubic) and start station. Solve builds the element chain. Apply writes it onto the tunnel.

  • Vertical Profile — VPI station, elevation and curve length.

  • Station Equations — station back and station ahead.

  • Superelevation, widening, offsets, transition offsets and cant — chainage ramps.

3D mode and Section reference azimuth are on the same dialog. 3D mode stations the tunnel along the 3D centreline (a vertical shaft also needs a vertical profile). The section reference azimuth is the horizontal direction of the section axis when that centreline is vertical: 0 is East, counter-clockwise, in the project angle unit (a DMS project edits decimal degrees). Turning 3D mode off keeps the stored azimuth.

Apply recomputes each section’s insertion point, bearing and grade from the new geometry and redraws the alignment.

Tunnel components

Each tunnel alignment contains the following components, visible in the project tree:

Alignment engine

The alignment engine defines the 3D path of the tunnel. It consists of:

  • Horizontal geometry – a sequence of elements: straight lines, circular arcs, and transition spirals (clothoids). Arc/spiral sign convention: positive (+) = right (clockwise), negative (-) = left (counter-clockwise).

  • Vertical geometry – a series of PVIs (Points of Vertical Intersection) defining the vertical profile along the alignment.

The horizontal and vertical geometry together define the station, offset, and elevation reference for all cross-sections.

Line definitions

Measured line definitions describe the lines that are recorded at each cross-section. Each definition has:

Property

Description

Name

Unique identifier for the line

Layer

Drawing layer assignment

Color

Display color

Deviation Line

Reference line for deviation calculations (can reference another measured or template line)

Style

Section line style from the shared style library

Draw

Whether the line is visible on the section canvas

Closed

Whether the line forms a closed polygon

Manage line definitions through the Tunnel Settings dialog (Line Definitions tab). See Settings for details.

Template line definitions

Template line definitions describe the theoretical/design lines. Each definition has a name, layer, color, and draw visibility flag. The closed property is determined by the template geometry itself.

Templates

Templates define the theoretical cross-section shape at specific stations. Each template contains geometry for the template lines defined above, using polylines with optional arc segments (bulge values). Templates are assigned to station ranges via station definitions.

Station definitions

Station definitions map templates to chainage ranges, controlling which theoretical shape applies at each station along the tunnel.

Cross-sections

Cross-sections contain the actual measured data at specific chainages. Each section stores measured points for every line definition, along with computed setout offsets and elevations relative to the alignment axis.

Volume definitions

Volume definitions specify how volumes are calculated between pairs of lines (measured vs. template) across a range of stations.

Forepoling umbrellas

Forepoling umbrellas are fans of pipes drilled from a collar chainage. The alignment stores the design inputs. Stakeout coordinates are calculated from the template and the alignment. See Forepoling Umbrellas.

Start and end chainage

The start and end chainage values define the valid station range for the tunnel. These are set when creating the tunnel and can be modified later through the Tunnel Settings dialog. Chainages are displayed according to the project’s station format setting (e.g., 0+100.000).

Tunnel description

The description field stores free-text metadata about the tunnel. Edit it through the Tunnel Settings dialog (General tab).

Building a DTM from a measured line

The alignment toolbar Build DTM button produces a 3D triangulated surface (TAECC_SURFACE) by sweeping one chosen measured line across a chainage range. This is useful for visualising a continuous as-built feature – for example, the excavation surface, the lining intrados, or any other line you’ve sampled across many sections.

Click Build DTM on the alignment toolbar to open the dialog:

Field

Description

Line

Drop-down listing the active alignment’s line definitions. Pick the one whose sampled polylines should be threaded into the mesh.

From

Start chainage of the range to mesh. Defaults to the alignment’s start chainage.

To

End chainage. Defaults to the alignment’s end chainage.

Click OK to build. TunnelCAD walks the cross-sections in the range, collects the chosen line’s per-section polyline (in world XYZ), and feeds the chainage-ordered list to TAECC_SURFACE.BuildSweptSectionMesh. Each section becomes one cross-rib of the mesh; consecutive ribs are stitched into triangles to form the surface.

Validation

The dialog enforces these checks before producing a mesh:

  • The active alignment must have at least one line definition.

  • From must be less than or equal to To (an inverted range produces an information dialog, not a mesh).

  • At least two cross-sections in the chainage range must have data on the chosen line; otherwise an information dialog explains the gap.

Sections in the range that have no data on the chosen line (or fewer than 2 points) are passed through as explicit gaps: BuildSweptSectionMesh bridges them by interpolating between the nearest non-empty neighbours, so a single missing section does not break the mesh.

Output

The resulting mesh is added to the alignment’s drawing canvas:

  • Name: DTM-<line name>

  • Layer: DTM (created automatically if absent)

  • Color: inherits the line definition’s color (or clByLayer if the definition is not found)

Each Build DTM run replaces any prior DTM surface on the alignment – the design is “one DTM at a time” per alignment. To remove the current DTM without rebuilding, use the Clear DTM toolbar button.

Tip

The DTM is built from the persisted cross-section line data, not from the in-memory section-viewer preview. Any manual edits made in the section viewer must be committed via Sample Current before they show up in the next Build DTM run.

Tunnel Statistics report

Right-click a tunnel in the project tree and pick Tunnel Statistics… to open an HTML report describing the tunnel. The report contains:

  1. Summary – tunnel name, chainage range, total length, cross-section count, line-definition counts, template count.

  2. Template assignments along the tunnel – a horizontal coloured bar showing each consecutive run of cross-sections sharing a template. Hover any band for from/to/section-count details. Below the bar, a table with the same data.

  3. Per-line totals – for each measured line definition: how many cross-sections have data on that line, total point count, average points per section. Template lines are listed below with their colour and layer name.

  4. Per-template stats – for each unique template name: section count, total measured points, average density, station range.

  5. Per-section detail – collapsed by default; click “Show per-section detail” to expand a table with one row per cross-section (sorted by chainage) and one column per measured line.

The report is a static HTML file, so use the browser’s print-to-PDF feature for archiving.

Export Sections to DXF

The Export Sections to DXF… command is reachable from three places:

  • Project tree – right-click a tunnel and pick Export Sections to DXF….

  • Top main menu – File > Export > Export Sections to DXF….

  • Ribbon File menu – click the ribbon’s File button and pick Export > Export Sections to DXF….

All three open the same dialog. While the export runs, a progress bar and a one-line status label at the bottom of the dialog show the current section (or the current phase, in the combined-world mode), and the OK/Cancel buttons are disabled until the export finishes. The dialog has three output modes:

  • One DXF per section (local offset/elevation plane) – writes one DXF per cross-section in the chosen range. Each file is in the section’s local plane (X = offset, Y = elevation). Useful for review or sending individual sections to a reviewer.

  • Single combined DXF (3D world coordinates) – writes one DXF with every cross-section’s polylines transformed to world XYZ via the alignment engine. Useful for BIM / Civil3D / surface-comparison workflows. Bulges and closed-state are dropped because 3D POLYLINE entities do not carry them.

  • Sections Atlas (2D sheet layout) – writes a single DXF where each section is drawn in its own cell of a Columns x auto-rows grid. Each cell may include a frame rectangle and station + name labels. Cell width/height defaults are sized from the largest cross-section in range so geometry never touches the frame; you can override these in the dialog.

What is exported follows the Draw=Yes flag on each line definition in Tunnel Settings: lines hidden in the section editor are not exported. Layer name in the DXF matches the line definition name; layer colour matches the line definition colour.

The Range section selects either the active cross-section only or an inclusive chainage range from From to To.

Templates and DR labels (v2)

In all three modes, template-line polylines are exported when their definition has Draw = Yes. Templates are resolved per section the same way the section editor canvas resolves them – via the alignment’s station-range mapping (Station Definitions, including transition-zone interpolation), with a fallback to the section’s own assigned TemplateName for legacy data without station defs. For every visible template line, the polyline is emitted on a layer named after the template-line definition (colour from the definition).

In per-section and atlas modes, measured lines whose section line style has Show DR = Yes get deviation labels at every point selected by the style’s DR Display Mode – the same setting that drives DR rendering in the section editor canvas. Smart, Threshold, Interval, Extremes, Zone Extremes, All, and None all work as on screen. The label shows the deviation in the unit (mm/cm/m) and decimal places set on the style.

Mode B (combined world coordinates) does not emit DR labels – they would float in 3D space, illegible.

Note

Mode B requires the alignment to have an engine geometry (horizontal + vertical) for any geometry to be exported. Sections in a tunnel without an alignment engine, or with an empty horizontal geometry, are silently skipped in Mode B for both measured and template lines. Use Mode A (per-section local plane) or Mode C (atlas) when the alignment has not yet been imported.