Terrain Mesher
Builds a terrain mesh from survey points and 3D breaklines (roads, platforms, decks, plateaus). Optional site boundary trims the mesh; optional plot boundary (flat 2D curve) is draped onto the terrain and its part of the mesh extracted. Tree locations are dropped onto the ground. Optional colours shade the mesh by elevation.
Overview
Builds a terrain mesh from survey points and 3D breaklines (roads, platforms, decks, plateaus). Optional site boundary trims the mesh; optional plot boundary (flat 2D curve) is draped onto the terrain and its part of the mesh extracted. Tree locations are dropped onto the ground. Optional colours shade the mesh by elevation.
Inputs (9)
- Points (Point): Survey points (clean them first with Survey Outlier Cleaner if needed).
- Breaklines (Curve): 3D curves the terrain must follow: road edges, platform and deck outlines, plateau edges. Closed curves replace the survey points inside them (flat platforms); open curves clear survey points within Clear Radius.
- Spacing (Number): Distance between points sampled along breaklines and boundaries (model units). Smaller = tighter fit, heavier mesh.
- Clear Radius (Number): Survey points closer than this (in plan) to an open breakline are ignored, so the road/deck edge is not pulled out of shape.
- Boundary (Curve): Optional closed curve: the mesh is trimmed to it (tested in plan).
- Plot Boundary (Curve): Optional closed curve inside the site, normally flat 2D. It is draped onto the terrain and the mesh inside it is output separately.
- Trees (Point): Optional tree locations (any Z); they are dropped onto the terrain.
- Colors (Colour): Optional elevation gradient (low to high). Leave empty for an uncoloured mesh.
- Max Edge (Number): Remove triangles with a plan edge longer than this (bridges across gaps or the convex hull). 0 = off.
Outputs (5)
- Mesh (Mesh): Terrain mesh (trimmed to Boundary if given).
- Plot Boundary (Curve): Plot boundary draped onto the terrain.
- Plot Mesh (Mesh): Part of the terrain mesh inside the plot boundary.
- Trees (Point): Tree locations on the terrain (same order as input; trees outside the mesh are snapped to its nearest point).
- Info (Text): How the component works and how to tune it.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Breaklines are sampled at about Spacing along each segment, keeping corners. Survey points inside closed breaklines (platforms) are dropped, and so are points within Clear Radius in plan of an open breakline.
- Breakline samples come first, then the kept survey points; points closer than max(tolerance, 0.02 × Spacing) in plan are merged, the first one winning.
- If Boundary or Plot Boundary is given, a first Delaunay mesh is built to give their sampled outline points a height (vertical drop; points outside snap to the nearest mesh point). Points outside Boundary are removed, points within 0.25 × Spacing of the plot edge are removed, and the outline points are added.
- The final points are triangulated with 2D Delaunay in plan around a local origin and lifted to their Z in double precision. Triangles with a plan edge longer than Max Edge, or with their centroid outside Boundary, are removed. Faces are wound counter-clockwise so normals point up.
- Plot Mesh is the set of triangles whose centroid is inside the plot outline; the plot outline and Trees are dropped onto the final mesh. Colors, when given, shade vertices by Z between the mesh minimum and maximum.
Assumptions
- Survey points and breaklines describe a single-valued ground surface (no overhangs).
- Closed breaklines carry the platform level along their edge; inside them the surface is triangulated from the edge points only.
- Boundaries are tested in plan; Z of Boundary and Plot Boundary is ignored.
Simplifications and limits
- Linear interpolation on triangles (TIN); no smoothing or contour-based interpolation.
- Breaklines are enforced by dense sampling, not as hard constrained edges, so a triangle can still cut across a breakline between samples.
- Points outside the preliminary mesh snap to the nearest mesh point, which also moves them in plan.
Workflow
- Survey Outlier Cleaner -> Points; road edges and platform outlines -> Breaklines.
- Mesh -> slope, flood, sun or visibility analyses; Plot Mesh -> plot-level quantities.
References
- Grasshopper Delaunay solver (Grasshopper.Kernel.Geometry.Delaunay).