Skip to main content
It has a name, a number, an area and a perimeter. Use it for room labels and area lists.

Import

Example

Notes

  • Profile points are [x, z] in metres. area is in square metres.
  • Holes are subtracted from the area. perimeter measures the outer boundary.
  • You give the boundary. Floorkit does not find rooms from walls.
  • For a text label, call setGlyphScene(scene, camera) before you create the space.
  • show3D shows the room as a translucent volume.
  • Start the geometry kernel before you create this object. See Floorkit.
  • This object is live geometry. To save a building, write it in a building model.
Inheritance: extends OPElement implements IShape, IPlaceable, PlanVectorExportable

Constructor

string
string
ElementType.SPACECONTAINER
string
Room name shown as the first label line (e.g. “Kitchen”).
string
Room number shown on the second label line (e.g. “101”).
PolygonProfile
Room boundary in the world XZ plane. outerRing is auto-closed and normalized to CW (the convention opengeometry.Polygon expects). Holes are auto-closed and normalized to CCW and are excluded from area.
number
World Y of the room’s floor plane.
number
Height of the optional 3D volume (profile × height).
boolean
Show the translucent 3D volume in model view. Default off — a Space is primarily a plan-view element.
boolean
Show the centroid name/number label in plan view.
number
Label text height in world meters.
number
PropertySets

Properties

ElementType
string
Map<string, OPGeometry>
Map<string, OPGeometry>
boolean
boolean
boolean
Event<null>
SpaceOptions
string
string
string
SpaceProfile
number
number
number
Push/pull alias for the GUIEditor — the extrude dimension is the height.
boolean
boolean
number
number
Read-only. Net floor area in m² — outer ring minus holes. Computed, read-only.
number
Read-only. Outer-boundary length in m. Computed, read-only.
boolean
boolean
boolean

Methods

editableSchema

Self-describing editable surface; a host inspector renders this generically.

move

Translate this element by delta (world-space, meters).

rotate

Rotate this element by angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).

setOPGeometry

getExportRoots

Vector-export roots (RFC §7).

toDrawing

Plan footprint region plus the name/number·area texts at the centroid.

setOPMaterial

getOPConfig

setOPConfig

beginEdit

Start one live edit; a second beginEdit before endEdit keeps the first start.

endEdit

End the live edit; its exact undo and redo, or undefined when no option changed.

getEditAnchors

Draggable handles: one grip per boundary vertex (move on the XZ plane) and a height grip at the centroid (raise/lower the 3D volume along +Y).

applyEditAnchor

dispose

Types

SpaceOptions

SpaceProfile

Polygon profile for a Space — alias of PolygonProfile.
Last modified on October 11, 2026