Search
AutoBRIDGE — 3D String · Model Line Group → Topography (Legacy)
AutoBRIDGE · 3D Alignment String

3D String from
Model Line Group + Topography

For Revit 2023 and earlier projects using the legacy TopographySurface element. Select a grouped Model Line path and a TopographySurface, set the station interval, and AutoBRIDGE builds a 3D spline draped on the terrain mesh using triangle-by-triangle ray intersection.

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

What Does This Tool Do?

The Model Line → Topography tool (AlignmentTopography) is the legacy terrain version of the Model Line 3D string workflow. It is identical in form and behaviour to the Toposolid tool, with one key difference: instead of intersecting vertical rays with a Toposolid's solid faces, it intersects them with the triangle mesh of a TopographySurface (TopographySurface.GetPoints() + mesh triangulation).

Use this tool if: your project is on Revit 2023 or earlier, or if your terrain data exists as a legacy TopographySurface element. If you are on Revit 2024+ and your terrain is a Toposolid, use the Model Line → Toposolid tool instead for more reliable face intersection.

Topography vs Toposolid — What Changes

Every step in this guide is identical to the Toposolid guide except for the terrain intersection method. The table below summarises exactly what differs:

AspectTopography (this guide)Toposolid
Revit versionRevit 2023 and earlierRevit 2024+
Element typeTopographySurfaceToposolid
Z intersection methodTriangle mesh — iterates all triangles of the mesh, tests each with a Möller-Trumbore style ray-triangle algorithmSolid faces — calls face.Intersect(verticalLine) on each face of the solid geometry
Fallback when no hitReturns original XY point (flat Z)Returns original XY point (flat Z)
comboBox2 label"Topography""Toposolid"
Output family nameAutoBRIDGE_3DString_IDxxxxx — identical in both tools

Triangle Mesh Intersection — How It Works

The GetIntersectedPointsFromTopography() method retrieves the triangulated mesh of the TopographySurface by calling element.get_Geometry(new Options()) and collecting all Mesh geometry objects. For each input XY station, it defines a vertical ray from Z=+999999 downward (direction: 0,0,−1) and tests it against every triangle of every mesh using the Möller-Trumbore algorithm — checking the intersection point using barycentric coordinates to confirm it lies within the triangle. The closest valid intersection is used as the output Z.

TopographySurface mesh triangles Barycentric test: point inside triangle ✓ Vertical ray Intersection hit 3D output string
Triangle mesh intersection — vertical ray tested against every mesh triangle; barycentric coordinates confirm hit is inside the triangle

Prerequisites

Two elements must exist in the Revit project:
  1. A Revit Group containing one or more Model Line elements that define the plan alignment path.
  2. A TopographySurface element (legacy terrain, available in Revit 2023 and earlier; also exists in Revit 2024 for backwards compatibility) whose mesh covers the plan area of the model lines.

Creating the Model Line Group

In Revit, draw the route using Architecture → Model Line in a plan view. Select all alignment model lines, then Modify → Group → Create Group with a clear name. The group name appears in comboBox1 at form load.

Identifying the TopographySurface

The legacy TopographySurface is typically created from imported survey point files (TXT, CSV) or from Civil 3D surface exports. In Revit 2023, it appears in the Massing & Site tab as "Toposolid" or "Topography" depending on the version. The tool identifies it internally as a TopographySurface class element and displays it by name and element ID.

Select the Model Line Group

01

Pick the Alignment Group

comboBox1 (left dropdown, placeholder: "Alignment Model Line Group") lists every Revit Group in the project. Select the group containing the model lines that define your alignment route. The tool calls GetElementsFromGroup() to extract all member curve elements.

After selection, the Plan canvas draws the model line route auto-fitted to the canvas, with station dots at the current interval spacing. Any change to the group or interval clears the geometry cache and redraws.

Select the TopographySurface

02

Pick the Terrain Surface

comboBox2 (right dropdown, placeholder: "Topography") lists all TopographySurface elements, identified by name and element ID in the format Name (ID: xxxxxxx). Select the surface that covers your alignment route.

Once selected, the Plan canvas overlays the topography footprint as a semi-transparent green polygon and the Elevation canvas shows the terrain profile with STA/EL tags. Both canvases update in real time as you change the selection.

Multiple topography surfaces: If the project has several TopographySurface elements (e.g., different site zones), each appears separately in the list. Select the one whose footprint covers the full alignment length as shown in the Plan canvas.

Set Interval, Verify Plan & Elevation

03

Set Interval Spacing

numericUpDown1 (labelled Interval spacing:) controls the station sampling distance in metres. Range: 1–200 m, default: 10 m. Every change clears the cache and redraws both canvases. The same recommendations from the Toposolid guide apply: 10 m for most alignments, 5 m or less for tight curves, 1–2 m for rough terrain.

04

Verify Both Canvases Before Running

Plan canvas [PLAN]: Confirm the cyan model line route lies inside the green topography footprint polygon. Stations outside the footprint will fall back to flat Z.

Elevation canvas [ELEVATION]: The red profile line should show realistic terrain undulations. A completely flat line at Z=0 means the ray-triangle intersection failed everywhere — check that the topography mesh is valid and covers the route.

CanvasInteraction
Plan (top)Left-drag to pan · Scroll to zoom · Double-click to reset
Elevation (bottom)Left-drag to pan · Scroll to zoom · Double-click to reset

Run and Validate

05

Click RUN — Identical Pipeline, Different Intersection

The cyan RUN button executes the same 7-stage pipeline as the Toposolid tool, with stage 6 using GetIntersectedPointsFromTopography() (triangle mesh) instead of GetIntersectedPointsFromToposolid() (solid face):

  1. Input validation — model line group and topography must both be selected. Progress: 0%.
  2. Curve retrievalGetElementsFromGroup(). Progress: 1%.
  3. Length calculation. Progress: 5%.
  4. Station listCreateRange(0, totalLength, interval). Progress: 10%.
  5. XY point extractionGetPointsAtStationsFromCurves(). Progress: 10–21%.
  6. Triangle mesh Z intersectionGetIntersectedPointsFromTopography(): retrieves all Mesh objects from the TopographySurface geometry, tests each input station against every triangle using the Möller-Trumbore algorithm, selects the closest valid hit. Duplicate points within 0.01 m removed. Progress: 25–66%.
  7. Family creation & placement — same as all other tools: create .rfa from template, build CurveByPoints spline, load into Revit, place at first station point. Family name: AutoBRIDGE_3DString_IDxxxxx. Progress: 68–100%.

Troubleshooting

SymptomCauseFix
comboBox2 (Topography) is emptyNo TopographySurface in the projectImport survey data to create a TopographySurface, or use the Toposolid tool if on Revit 2024+
Elevation canvas flat at Z=0Ray-triangle intersection found no hitsEnsure the TopographySurface has a valid mesh; verify in 3D view that it renders a surface shape
Profile shows some flat segmentsSome stations fall outside the triangulated mesh boundaryExtend the TopographySurface boundary or trim the model line group to the covered area
RUN error: "No valid intersection points"All triangle tests returned null (mesh is degenerate or too coarse)Re-import the topography with a finer mesh density; check the source survey file
Mesh is very coarse on large terrainTopographySurface was simplified/decimatedRe-create with a higher point density, or use smaller interval spacing to snap between mesh triangles more accurately
Template not found during RUNNo template set in AutoBRIDGE settingsOpen AutoBRIDGE settings and select a valid .rft family template
AutoBRIDGE — 3D Alignment String · Model Line Group → Topography (Legacy) — Workflow Guide
© 2026 AutoBRIDGE Documentation  ·  auto-bridge.net
Scroll to Top