Railing JSON Parser

Parses railing curves from JSON.

JSON Masterplan (Beta) Nickname: Rail_Parser

Overview

Parses railing curves from JSON.

Inputs (5)

  • Railings_JSON (Text): JSON string
  • Filter_Building (Text): Filter by building
  • Filter_Tower (Text): Filter by tower
  • Filter_Level (Integer): Filter by level
  • ExactMatch (Boolean): Exact match mode

Outputs (2)

  • RailingCurves (Curve): Parsed railing curves
  • Labels (Text): Railing labels

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. Parses Railings_JSON as an object of building name to a list of railings; each railing has floor_index, tower_id, true_z and curves (each a list of Line, Arc or Polyline segments).
  2. Railings are kept when they pass Filter_Building, Filter_Tower and Filter_Level. Text filters are case-insensitive: ExactMatch requires equality; otherwise * and ? wildcards are used if present, else a substring match.
  3. Each curve's segments are rebuilt, joined (0.01 tolerance), closed if the gap is within 0.01, and moved up by true_z. Output branches are building index; railing index, with a label Building | Tower - Lvl n Railing.

Assumptions

  • Segment coordinates in the JSON are relative to true_z (the component adds true_z to Z).

Simplifications and limits

  • When the segments of one curve do not join into one piece, every joined piece is output in the railing's branch.
  • Branch numbers are not stable when filters change: building indices count matched buildings only.

Workflow

  • Masterplan Engine railings JSON -> Railings_JSON; RailingCurves -> sweep or Archicad railing export.