BIM Attribute Serializer

Serializes referenced Rhino curves via Attribute User Text.

JSON Masterplan (Beta) Nickname: BIM_JSON

Overview

Serializes referenced Rhino curves via Attribute User Text.

Inputs (4)

  • Guids (Generic): Referenced Rhino geometry IDs.
  • Refresh (Boolean): Wire a Button to force re-read of attributes.
  • Fillet_Config (Text): JSON string defining fillet rules.
  • PushToRhino (Boolean): Wire a Button to push elevations to Rhino.

Outputs (2)

  • JSON_Payload (Text): Serialized JSON.
  • Info (Text): Method, assumptions, simplifications and references.

Method, assumptions and simplifications

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

Method

  1. Each referenced curve is read with its User Text: BuildingID (default Building_01), Program (Default), TowerID (Main_Tower), FloorHeight (3.5), Floors (1), Phase (0). Numbers are read with invariant culture (dot decimal); values that cannot be read fall back to these defaults with a warning. Non-curves and Type = core objects are skipped.
  2. Each curve is projected flat to Z = 0, made anticlockwise if closed, and filleted when a Fillet_Config rule applies. Rules are checked in order (type Tower, Program or Building; match text or *; exact default true, otherwise contains; case-insensitive); the first match gives the radius, else default_radius.
  3. The fillet radius is capped at 0.49 × the shortest segment of the curve so corners do not overlap.
  4. Per building, blocks are sorted by Phase. A block sits on the top of the previous block of the same tower; the first block of a tower sits on the highest top reached by any earlier phase (0 if none). Top = base + FloorHeight × Floors.
  5. The JSON lists buildings (name, true_base_elevation = lowest curve Z of the building) and blocks (name Program_index, tower_id, program, floor_height, floors, base_z relative to the building base, boundary_segments).
  6. Segments are written as Line (start, end), Arc (start, mid, end) or Polyline (points from a 0.01 tolerance conversion), coordinates rounded to 4 decimals. Arc segments that cannot be read as an exact arc are written as a Polyline approximation.
  7. When PushToRhino is True, each source curve is moved vertically so its lowest point sits at building base + base_z.

Assumptions

  • Footprints are curves, one per block, with stacking data in Attribute User Text.
  • Phase order defines construction and stacking order; blocks of one tower are listed in stacking order within a phase.
  • Model units are metres.

Simplifications and limits

  • Heights are uniform per block (FloorHeight × Floors); no slab thickness or transfer levels.
  • Boundary coordinates are flat (Z = 0); elevation is carried only by base_z and true_base_elevation.
  • Free-form segments are approximated by polylines.

Workflow

  • Auto-Phase Assigner by Z first, to write Phase keys.
  • JSON_Payload -> a file writer or the masterplan JSON tools downstream.