2.5.6. GRD point import and TIN surface
Import ▸ GRD Points… reads a .grd file of cross-section points
and, in a single pass:
Lists the points on the Results page (per the historical behaviour);
Creates a TAECC_POINT AEC entity for each point on the active alignment’s drawing canvas;
Builds a TAECC_SURFACE TIN from the points and adds it to the canvas;
The surface renders with the default style — Delaunay triangle mesh + contours computed lazily on first draw.
Result: open a .grd, switch to the Drawing tab, see the points
and a TIN with contours overlayed on the alignment.
2.5.6.1. Required input
The .grd format used by Alignment Solver is the existing
cross-section grid file: starred section header lines, followed by
offset elevation rows:
*
217 70000
-14.8742 359.0872
-14.4103 359.5505
-10.2000 359.4452
-7.8999 359.3877
-2 359.2402
0 359.2402
0 358.5373
*
218 70025
-14.8742 359.1997
...
Each * opens a section identified by ID chainage; the
rows that follow are offset elevation cross-section points at
that chainage. The importer converts (chainage, offset) to
world (X, Y) using the active alignment’s geometry, picks up
elevation for Z.
2.5.6.2. Surface build settings
When you pick a .grd the importer first runs the surface
build-settings dialog (ShowSurfaceBuildSettingsDialog) so
you can confirm the TIN parameters before the surface is created:
Max edge length — Delaunay edges longer than this are deleted (so the TIN doesn’t span sections with no real topographic continuity). The default value is computed from the median section spacing in the imported points (
medDelta) — typically2 × medianfor cross-section data — but you can override it for irregular spacing.Crop to convex hull — limit the TIN to the convex hull of the imported points (default on).
Contour intervals — minor + major contour intervals (linear units; defaults 0.5 m / 2.5 m).
Press OK and the importer runs.
2.5.6.3. What gets created
For each parsed point (X, Y, Z):
an AEC point entity:
cc.AddObject(TAECC_POINT.Create(cc, point)). Points appear with the default point style (Tools ▸ Point Style Editor… to edit).
After the point loop:
surf := TAECC_SURFACE.Create(cc),surf.BuildFromPoints(points)— Delaunay triangulation with the max-edge cull,cc.AddObject(surf)— adds the surface to the canvas.
The surface’s contour set is generated lazily by DoDraw ➜
RegenerateContoursIfNeeded on first paint, using the build
settings’ intervals.
After import the canvas runs ZoomExtents so the new
points + surface are visible. The Results page still shows the
GRD point list (per the historical command).
2.5.6.4. Errors
No alignment loaded — Tools ▸ Import GRD Points warns and exits; the GRD geometry depends on an alignment to map (chainage, offset) ➜ (X, Y).
Surface build fails (degenerate points, exception inside
BuildFromPoints) — the AEC points stay (added inside theBeginLoad / EndLoadbracket) but the surface is not added; a non-fatalMessageDlgreports the message.Empty / malformed
.grd(zero valid rows) — the Results page shows the parse errors; no drawing happens; the dialog falls back to the Results tab.
2.5.6.5. Repeating the import
Re-running Import GRD Points appends more points and another
surface to the same canvas — the importer does not clear the
existing drawing. Use the Drawing tab’s Draw button to
re-draw the alignment (RedrawPlan does ClearAll and
re-adds only the alignment). This is by design: the user can
build up multiple sections of topography from several .grd
files in one session.
2.5.6.6. Sample point styles and surface style
Tools menu also includes:
Point Style Editor… — opens the unified ICAD point-style dialog. Customise glyph, colour, label content, label scale.
Surface Style Editor… — TIN style: line colour, fill, contour visibility / colours / labels.
Alignment Style… — colour, line type, label spacing for the drawn alignment.
These styles are session-scoped (per TAlignFrame), as the
drawing itself is.