Overview
TheBuildingNode represents a building structure within a site. It defines the building’s position and rotation in the site coordinate system and contains references to level nodes.
Key features:
- Positioned and rotated within the site
- Contains multiple levels (floors)
- Each level contains walls, slabs, zones, and other elements
Type Signature
/home/daytona/workspace/source/packages/core/src/schema/nodes/building.ts
Fields
Inherited from BaseNode
Unique building identifier.Format:
building_{randomString}Example: "building_x9y8z7w6v5u4t3s2"Always set to
"building".Default: "building"Optional name for the building.Example:
"North Tower", "Main Building"Reference to the parent site’s ID.Example:
"site_abc123"Default: nullControls building visibility.Default:
trueOptional camera viewpoint for the building.
Custom metadata for the building.Default:
{}Building-Specific Fields
Position of the building in the site coordinate system.Format:
[x, y, z] in metersDefault: [0, 0, 0]Example: [10.5, 0, -5.2]The position is typically set with y=0 (ground level), with x and z defining the horizontal placement within the site.Rotation of the building in the site coordinate system.Format:
[x, y, z] in radians (Euler angles)Default: [0, 0, 0]Example: [0, Math.PI / 4, 0] (45-degree rotation around Y axis)Most commonly, only the Y rotation is used to orient the building on the site.Array of level node IDs belonging to this building.Default:
[]Example: ["level_aaa111", "level_bbb222", "level_ccc333"]Each level ID references a LevelNode that contains the walls, slabs, and zones for that floor.Example
Usage
Creating a Building
Positioning a Building
Adding Levels
Coordinate System
The building defines its own local coordinate system:- Origin is at the building’s position
- Axes are rotated according to the rotation field
- Child levels use this coordinate system for their elements