JSON MP Engine V2

Reads a buildings JSON payload (from an adapter) and computes slabs per level, roof tops and setback roofs, railings on exposed roof edges, exterior facade edges per floor and gross areas per program and building, output as JSON for the Masses, Slab, Roof, Facade and Railing parsers and the Masterplan Dashboard.

JSON Masterplan (Beta) Nickname: MP ENGINE

Overview

A high-performance topological coordinator. Evaluates spatial intersections, identifies setbacks/roofs, and broadcasts lightweight JSON architectures.

Inputs (2)

  • JSON_Payload (Text): JSON payload with buildings
  • ColorPalette (Text): JSON color palette

Outputs (7)

  • Masses_JSON (Text): Masses JSON
  • Slab_JSON (Text): Slab JSON
  • Roof_JSON (Text): Roof JSON
  • Facade_JSON (Text): Facade JSON
  • Railings_JSON (Text): Railings JSON
  • Dashboard_JSON (Text): Dashboard JSON
  • Info (Text): Method, assumptions, simplifications and references.

Method, assumptions and simplifications

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

Method

  1. Reads the buildings payload: each block has tower_id, program, floor_height (default 4.0), floors (default 1), base_z and a boundary; the boundary is rebuilt from Line, Arc and Polyline segments and moved down to Z = 0.
  2. Floor indices: within each tower, all floor levels (base_z + j × floor_height, rounded to 0.001) are sorted and numbered from 0.
  3. Slabs: for each level of each tower, the outlines of the blocks below that end there and of the floors inside blocks are unioned (tolerance 0.01). A block's own base level is only used at ground level or in towers whose id contains podium. Slab area comes from planar Breps.
  4. Roofs: the slab is intersected with the union of all blocks of the building that continue above that level. If that overlap is under 0.1 m² the slab is a Roof Top; if slab area minus overlap exceeds 1.0 m² it is a Setback Roof (Podium Roof in podium towers). roof_area = slab area - overlap.
  5. Railings: the exposed roof outline (slab minus overlap) is split into segments and a segment is kept when its midpoint is more than 0.05 from the outlines above.
  6. Facades: for each floor of a block, a segment of the block outline is exterior when its midpoint lies within 0.05 of the slab outline at that level; these are output as BoundsExt with the closed outline as BoundsClosed.
  7. Masses and Dashboard: gross area = block outline area × floors, summed per program and per building. Colours come from ColorPalette, else a pseudo-random colour (70 to 199 per channel) seeded with a stable FNV-1a hash of the program name, so it is the same in every session. Blocks whose boundary is not a closed planar curve count 0 m² and raise a warning.

Assumptions

  • Model units are metres: the fixed tolerances 0.001, 0.01 and 0.05 and the thresholds 0.1 m² and 1.0 m² are absolute.
  • Block outlines are flat, closed and non-self-intersecting; true Z = true_base_elevation + relative level.
  • Gross area is the full outline area of every floor (no deductions for cores, voids or double-height spaces).

Simplifications and limits

  • If a curve boolean fails at 0.001 it is retried at 0.05; if the difference still fails the whole slab is treated as exposed, so railings run round the full outline.
  • Only the first joined curve of a boundary is kept, so multi-loop boundaries lose their extra loops.
  • Exterior and railing tests use segment midpoints only, so partly shared segments are all-or-nothing.
  • In non-podium towers a block's own base level is not in the slab outlines, so facade edges of setbacks (or one-floor blocks) at that level can be missing from BoundsExt.
  • Palette or payload errors are caught: an invalid palette is ignored silently; an invalid payload gives one error message and empty outputs.

Workflow

  • AD_ARCHICAD or AD_SCULPT -> JSON_Payload. Master JSON Config Builder JSON_Palette -> ColorPalette.
  • Masses, Slab, Roof, Facade and Railings JSON -> the matching Masses, Slab, Roof, Facade and Railing JSON Parsers. Dashboard_JSON -> Masterplan Dashboard.