Search
AutoBRIDGE — 3D String · Model Line Group → Toposolid
AutoBRIDGE · 3D Alignment String

3D String from
Model Line Group + Toposolid

Select a Revit Model Line Group as your horizontal path and a Toposolid as the vertical terrain reference. AutoBRIDGE samples stations along the model lines, casts vertical rays through the Toposolid solid faces to find ground Z, then builds a true 3D spline family in a single transaction.

AutoBRIDGE 3D Alignment String Model Line → Toposolid
Phase 1 — Model Line Group Phase 2 — Toposolid Phase 3 — Interval Spacing Phase 4 — Plan Preview Phase 5 — Elevation Preview Phase 6 — Run

What Does This Tool Do?

The Model Line → Toposolid tool (AlignmentMLine) uses a Revit Group containing model lines as the horizontal alignment path and a Toposolid element (Revit 2024+) as the terrain reference. It samples the model line geometry at a station interval, projects each XY station point vertically through the Toposolid's solid face geometry to obtain the ground surface Z, then creates a 3D spline family that faithfully follows both the plan route and the actual terrain elevation.

🌏 Topography (legacy) tool

  • Uses TopographySurface (Revit 2023 and earlier)
  • Z found via triangle mesh ray-intersection
  • Legacy workflow — same form layout

🏔️ Toposolid tool (this guide)

  • Uses Toposolid (Revit 2024+)
  • Z found via solid face ray-intersection
  • More robust — handles complex terrain geometry
📐

Revit-Native Path

Uses Model Lines grouped together in Revit — no Civil 3D required.

🏔️

Toposolid Z Snap

Vertical ray-cast through Toposolid solid faces finds the precise ground elevation at each station.

📊

Dual Canvas

Plan view shows the route over the topo footprint. Elevation view shows the draped profile with STA/EL tags.

Revit 2024+

Requires Revit 2024 or later for Toposolid support. Use the Topography tool for earlier versions.

Prerequisites

Two elements must exist in the Revit project before opening this form:
  1. A Revit Group containing one or more Model Line elements that define the plan alignment path.
  2. A Toposolid element whose surface covers the plan area of the model lines — used to obtain ground Z values at each station.
If either is missing, comboBox1 or comboBox2 will be empty and the tool cannot proceed.

How to Prepare the Model Line Group

In Revit, draw the route using Architecture → Model Line or Detail → Model Line tools in a plan view. The lines can be any combination of straight segments, arcs, or splines. Once drawn, select all the model lines that form the alignment, then use Modify → Group → Create Group to group them under a descriptive name (e.g., Bridge_Centreline_Route).

Group naming tip: Use a clear, unique name. The tool's comboBox1 lists all groups in the project by name. Avoid generic names like "Group 1" — you want to identify the correct alignment group instantly.

How to Prepare the Toposolid

Toposolid is the terrain surface element in Revit 2024+. If your project was imported from Civil 3D or contains survey data, a Toposolid is likely already present. You can verify by opening a 3D view and checking that a terrain mesh exists. The tool lists all Toposolid elements found in the project by name and ID.

Select the Model Line Group

comboBox1 (left dropdown in the top bar, placeholder text: "Alignment Model Line Group") lists every Revit Group in the project, populated by PopulateLayerComboBox3() which runs a FilteredElementCollector over all Group class elements. Selecting a group immediately redraws both canvases.

01

Pick the Alignment Group

Select the group that contains your model line alignment. The tool calls GetElementsFromGroup(doc, selectedGroupName) which iterates all groups, matches by name, and collects all member elements via group.GetMemberIds(). The geometry of each member element is then walked to extract all Curve objects.

As soon as a group is selected, the Plan canvas redraws showing the model line route at screen-fitted scale. Station dots appear at the current interval spacing.

Bridge_Centreline_Route Toposolid
Top bar — Model Line Group selected (left, cyan border); Toposolid awaits selection (right)
Important — group must contain curves: Only groups whose member elements have extractable Curve geometry can be used. A group containing only Revit families or non-curve elements will result in zero points and a blank canvas. Ensure your group contains actual Model Lines.

Select the Toposolid

comboBox2 (right dropdown in the top bar, placeholder text: "Toposolid") lists all Toposolid elements in the project, labelled as ElementName (ID: xxxxxxx), populated by PopulateTopographyToComboBox2(). Selecting a Toposolid redraws both canvases immediately.

02

Pick the Terrain Surface

Select the Toposolid that covers the area of your model line alignment. The Plan canvas will overlay the Toposolid's point cloud footprint as a semi-transparent green filled polygon (convex hull), letting you visually confirm the model line path falls within the terrain coverage area.

Coverage check is critical: If any model line stations fall outside the Toposolid extent, the vertical ray will find no intersection. In that case the original flat XY elevation is used as a fallback — the string will have flat segments wherever coverage is missing. Always visually confirm in the Plan canvas that the green topo polygon covers the entire blue alignment path.

How the Z Intersection Works

For each XY station point, the tool creates a vertical line from Z=−999999 to Z=+999999 at that XY location. It then iterates through every Face of the Toposolid's solid geometry and calls face.Intersect(verticalLine). The closest intersection to the original point is used as the final Z value. If multiple face hits occur (e.g., overhanging terrain), the closest one wins.

Toposolid surface Model line plan projection (flat) Z found 3D string output Vertical ray Z intersection 3D spline result
Vertical ray from each XY station pierces the Toposolid surface — yellow dots = Z-intersections; red line = resulting 3D string draped on terrain

Set the Interval Spacing

numericUpDown1 (labelled Interval spacing: in the right panel) controls the station sampling distance in metres. Range: 1–200 m, default: 10 m. Every change to this value clears all cached geometry and refreshes both canvases automatically.

03

Choose the Right Interval for Your Alignment

The interval determines both the smoothness of the output spline and the number of reference points in the Revit family. Consider:

  • Straight sections: 20–50 m is usually accurate enough — more points add no visual improvement on a straight line.
  • Gentle curves: 10 m is the recommended default and produces a smooth result for most bridge alignments.
  • Tight curves (radius < 100 m): Use 5 m or less so the spline fits the curve without visible chord error.
  • Very rough terrain: Reduce the interval so more vertical rays are cast — this captures terrain peaks and valleys more accurately.
Performance: A 500 m alignment at 1 m interval = 501 reference points in the family. Family creation is slower for large point counts. Start at 10 m and only reduce if visual accuracy demands it.

Reading the Plan Canvas

The upper canvas (pictureBox2, labelled [PLAN]) shows a 2D top-view of the model line route. It auto-scales to fit all geometry and updates whenever any selection or interval changes.

04

Verify Route and Topo Coverage

The Plan canvas draws the following layers:

  • Grid — fine (10 m) and coarse (50 m) grey lines at the current scale
  • Toposolid footprint — semi-transparent green filled polygon (convex hull of all topo point coordinates projected to XY)
  • Model line route — cyan/blue polyline connecting all extracted curve segments
  • Station dots — white dots at every interval station along the route
  • North arrow (pictureBox4) — small north indicator image pinned inside the canvas area

Verify that the cyan route line lies entirely within the green polygon. Stations outside the green polygon will fall back to their original flat Z elevation.

ActionInput
PanLeft-button drag
ZoomScroll wheel (min 10%, max 3000%)
ResetDouble-click

Reading the Elevation Canvas

The lower canvas (pictureBox1, labelled [ELEVATION]) shows the terrain profile along the route at an exaggerated H1:V10 vertical scale. It renders only after a Toposolid is selected and station points have been cached.

05

Verify the Terrain Profile

The elevation canvas draws a red profile line connecting successive station elevations. At each station a vertical drop line is drawn to a datum baseline, with two annotations:

  • STA= X.X m — station distance from start, text rotated 90°
  • EL= Z.Z m — ground surface elevation at that station, text rotated 90°

A datum line is drawn at a round elevation value slightly below the lowest station elevation, labelled Datum: N.N m on the left. This matches standard civil engineering vertical section sheet conventions.

What to look for: Significant changes in the profile (peaks, dips) confirm that the Toposolid intersection is working correctly. A completely flat profile at Z=0 means no intersection was found — check that the Toposolid covers the model line area.
ActionInput
PanLeft-button drag
ZoomScroll wheel (min 10%, max 2000%)
ResetDouble-click

Run and Validate

06

Click RUN — Seven-Stage Pipeline

The cyan RUN button (bottom-right, 120×40 px) executes the following pipeline. A WaitProcess overlay appears during execution:

  1. Input validation — checks comboBox1 (group) and comboBox2 (Toposolid) are both selected. Fails with a specific error if either is missing. Progress: 0%.
  2. Curve element retrieval — calls GetElementsFromGroup() to collect all model line members from the selected group. Progress: 1%.
  3. Total length calculation — sums the geometry length of all curve elements. Progress: 5%.
  4. Station list generation — builds a list of station distances from 0 to total length at the selected interval. Progress: 10%.
  5. Point extraction — calls GetPointsAtStationsFromCurves() which builds a cumulative distance array for each curve segment and interpolates XYZ positions at each station. Progress: 10–21%.
  6. Toposolid intersection — calls GetIntersectedPointsFromToposolid(): for each XY station, a vertical line (Z: −999999 to +999999) is intersected with every face of the Toposolid's solid geometry. The closest valid intersection becomes the final Z. Duplicate points within 0.01 m tolerance are removed. Progress: 25–66%.
  7. Family creation & placement — creates a family document from the selected template, builds a CurveByPoints spline through adjusted points, saves the .rfa, loads it into Revit, and places an instance at the first 3D station point. Family name: AutoBRIDGE_3DString_IDxxxxx. Progress: 68–100%.

Troubleshooting

SymptomCauseFix
comboBox1 (Group) is emptyNo Revit Groups exist in the projectSelect all model lines, then Group → Create Group in Revit before opening the form
comboBox2 (Toposolid) is emptyNo Toposolid in the project, or using Revit 2023 or earlierAdd a Toposolid; or use the Topography tool if on Revit 2023
Plan canvas shows route but no green polygonNo Toposolid selected yetSelect a Toposolid from comboBox2
Elevation canvas shows flat line at Z=0No Toposolid intersection found — route is outside topo extentConfirm topo covers the model line area in the Plan canvas; select the correct Toposolid
RUN error: "No valid intersection points"All rays missed the Toposolid facesCheck that the Toposolid has a proper solid form; try viewing in 3D to confirm solid geometry exists
3D string has gaps or flat segmentsSome stations fell outside the topo footprintEnsure full alignment length is covered by the Toposolid; extend the topo or trim the model line group to the covered area
Spline is rough / zig-zagTerrain has sharp ridges and interval is too largeReduce interval to 2–5 m to capture terrain details more accurately
Template not found during RUNNo template configured in AutoBRIDGE settingsOpen AutoBRIDGE settings and select a valid family template (.rft)
AutoBRIDGE — 3D Alignment String · Model Line Group → Toposolid — Workflow Guide
© 2026 AutoBRIDGE Documentation  ·  auto-bridge.net
Scroll to Top