Import
Example
Notes
- Profile points are
[x, z]in metres.areais in square metres. - Holes are subtracted from the area.
perimetermeasures 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. show3Dshows 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.
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
move
delta (world-space, meters).
rotate
angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).
setOPGeometry
getExportRoots
toDrawing
setOPMaterial
getOPConfig
setOPConfig
beginEdit
beginEdit before endEdit keeps the first start.