Road Network
Solves the road network topology (junctions, arms, priority, corner radii, mouths) from centrelines and draws the 2D road plan with kerb returns. Reads road_template / road_hierarchy / road_name User Text from the referenced Rhino curves.
Overview
Solves the road network topology (junctions, arms, priority, corner radii, mouths) from centrelines and draws the 2D road plan with kerb returns. Reads road_template / road_hierarchy / road_name User Text from the referenced Rhino curves.
Inputs (11)
- Centrelines (Curve): Road centrelines. Reference them from Rhino to use their User Text (road_template, road_hierarchy, road_name).
- Snap Tolerance (Number): Ends closer than this (m) to another centreline or end are joined.
- Default Template (Text): Template for centrelines without one (preset name or JSON).
- Default Hierarchy (Text): Hierarchy for centrelines without one: main, secondary or local.
- Corner Radii (Number): Kerb return radius (m) by the lower hierarchy of the two roads at a corner: local, secondary, main.
- Custom Templates (Text): Your own templates as JSON, each with a "name" that road_template can refer to.
- Templates (Text): Optional override per centreline (same order), for centrelines made in Grasshopper that cannot carry User Text. Empty items fall through.
- Hierarchies (Text): Optional override per centreline (same order).
- Names (Text): Optional override per centreline (same order).
- Junction Points (Point): Optional points referenced from Rhino, placed on junctions, with User Text: junction_type (auto, priority, signals, roundabout, mini-roundabout, cul-de-sac), junction_radius (kerb radius, or outer radius of a roundabout / cul-de-sac), junction_priority (road_name that runs through), junction_name.
- Run (Boolean): False = keep showing the last results (cached).
Outputs (18)
- Nodes (Point): Junctions, dead ends and joins.
- Edges (Curve): Centrelines split at every junction (original 3D curves).
- Corridor Edges (Curve): Edges trimmed between the junction mouths: feed Auto-Grade Road / Road Corridor so corridors stop where the junction starts.
- Corridor Templates (Text): Template JSON of each Corridor Edge (same order): wire into Road Corridor's Template so the 3D uses the same street type as the plan.
- Kerb Lines (Curve): 2D kerb face and kerb back lines, with kerb returns at the corners.
- Edge Lines (Curve): 2D edges of the other parts (cycle tracks, footways, verges, shoulders) and the road boundary, with returns at the corners where they match.
- Mouth Lines (Curve): 2D lines across each road where its junction ends.
- Junction Areas (Curve): 2D carriageway outline of each junction (closed); roundabout islands too.
- Road Areas (Curve): 2D closed strips per edge for hatching: carriageway and each part between the mouths.
- Area Types (Text): Part type of each Road Area (carriageway, kerb, cycle, footway, verge ...).
- Label Points (Point): Where to place labels (edge middles, nodes).
- Labels (Text): Label text for each label point.
- Node JSON (Text): Per node: type, arms (heading, widths, priority, mouth), corners (angle, radii, tangent points).
- Edge JSON (Text): Per edge: name, template, hierarchy, where they came from, nodes, length, corridor start / end stations.
- Network JSON (Text): The whole graph in one JSON.
- Attributes Used (Text): Per edge: template | hierarchy | name | source (user text, list or default). Check for untagged roads.
- Info (Text): Method, assumptions, simplifications and references.
- Dashboard Data (Text): JSON metrics for Analysis Dashboard / Report Metrics.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Centrelines are projected to the XY plane and split at every crossing (curve-curve intersection at document tolerance) and wherever an end comes within Snap Tolerance of another centreline; pieces shorter than the tolerance are dropped.
- Ends within the tolerance merge into one node; arms are sorted by heading. Node type by number of arms: dead end, continuation, T, Y (no pair of arms within 35 degrees of straight), crossroads, multi-arm.
- Priority (through) arms: the pair with the highest hierarchy, then the straightest; a junction_priority tag overrides.
- Kerb returns: the kerb-face lines are offset lines of the arms; with corner angle θ and kerb-face offsets w_a and w_b, they meet at x = (w_b + w_a cos θ) / sin θ along the arm, and the return of radius r touches the arm at x + r / tan(θ / 2). Lines further out use concentric returns (radius reduced by their extra offset). Corners of 170 degrees or more run straight.
- Corner radius by the lower hierarchy of the two roads (Corner Radii: local, secondary, main), or junction_radius.
- Mouth = farthest kerb-face tangent point + 1 m; corridors start and end at the mouths. Edges too short for both junctions get shorter mouths (warning).
- Roundabouts and cul-de-sacs: an outer kerb circle of radius R round the node; each arm's kerb face joins it with an entry fillet of radius r (at least 10 m on roundabouts) touching the arm at x = √((R + r)² − (w + r)²); circle arcs between arms; boundary lines concentric; central island R - 5.5 m (mini: 2 m).
- Plan lines are the template's part edges offset from each edge and sampled every 1 m; attributes come from User Text (road_template, road_hierarchy, road_name), override lists, then the defaults.
Assumptions
- Hierarchy is main, secondary or local; other values count as local (warning).
- Arms are straight near the junction (their direction at the node).
- Centrelines do not run on top of each other; overlapping stretches are ignored (warning).
- A junction point applies to the nearest node within max(5 m, 3 × Snap Tolerance).
- Default radii (6 / 9 / 12 m) and roundabout sizes (R 15 m, mini R 8 m, cul-de-sac R 9 m) are typical values: check them against local guidance and the design vehicle.
Simplifications and limits
- 2D only: levels are ignored here (Auto-Grade Road and Road Corridor add them).
- Arms that curve tightly at a junction can leave small kinks where returns meet the offset lines.
- When the two templates at a corner differ, only the kerb face, kerb back and boundary wrap round it; other lines stop at the mouth.
- Footway and verge hatches stop at the mouths; only the carriageway is filled inside junctions.
- Single-lane roundabouts without splitter islands; turning heads are drawn as bulbs; radii are not checked against vehicle swept paths.
- Junction density uses the bounding-box area of the network.
Workflow
- Tag centrelines in Rhino (UserText DB): road_template, road_hierarchy, road_name; reference them into Centrelines. Optional junction points with junction_type, junction_radius, junction_priority, junction_name.
- 2D plan: Kerb Lines, Edge Lines, Mouth Lines, Junction Areas, Road Areas with Area Types for hatching, Labels.
- 3D: Corridor Edges -> Auto-Grade Road -> Road Corridor with Corridor Templates; Node JSON for the junctions.
References
- Kerb return geometry: offset-line intersection and tangent fillet (plane geometry).
- Roundabout sizes in the range of single-lane guidance, for example CROW 126 (NL) and DMRB CD 116 (UK).