Level is a live datum in the 3D scene. It is not saved in the project file, and it does not draw on a sheet or in drawProjectView. Use it to show a level while you model.
The storeys are the levels of the floors. To save an extra datum level, add a level to BmBuilding.levels: an id, a name and an elevation in metres above the world origin. Edit the list with the add-building-element, replace-building-element and remove-building-element commands, as you edit grids.
drawProjectView draws the levels:
- A section or an elevation draws a level head for each storey and each saved level inside its vertical crop: a dash-dot line from the right edge of the drawn buildings (not the ground line or the site boundary) to 5 paper mm past it, never across a building, and, there, a filled triangle with the elevation (
+3.000) and the name at its right. The head keeps its paper size at any sheet scale and never crosses the model; it can lie right of the crop, and the drawing bounds grow to hold it, so a viewport centred on the drawing shows it. Storeys and levels at the same elevation share one head. Names equal but for case print once; different names join with/. A storey with no name adds no name; a head with no name prints its elevation only. On a sheet, a viewport with noviewCentercentres the drawing with its level heads at the viewport scale, andfitViewportScaletakes a scale only when the heads fit too. Withsettings.levelLabels, the elevation is measured from itsdatumand given in itsunit, such as+3.200 m. - A section or an elevation also draws the
levelHeadsandheightDimensionsthe view saves. Each one follows a height of the model: a storey floor or top, a roof’seaves(the wall plate: where the underside of the roof meets the outer face of the walls it bears on, above the soffit of an overhang; on a flat roof the underside at the wall line),ridgeorflat-top(its highest point), a wall base or top, a room floor or ceiling, a saved level, or the ground. The values are read from the model at each draw, so they change when the model changes. A level head prints the elevation and itslabel, or the name of what it follows, such asEaves. It sits on theleftof the crop by default, clear of the storey level lines, or on therightof the drawn model. Heads at similar heights on one side overlap: give one of them the otherside. A height dimension is a vertical line atatmetres across the view, with a tick at each end and the length in mm toprecisiondecimals, or itslabel. A reference that names nothing draws nothing, and the drawing’swarningsname it.
- A storey plan draws a level mark of its storey only when the building has grids: the same head, with the storey elevation and name (the elevation only for a storey with no name), up and left of the grid ends, outside the drawing. A building with no grids gets no level mark on its plans.
duplicate-label.
Import
Example
Notes
- In
drawProjectViewand in a vector viewport on a sheet, a section’ssettings.levelLabelssets the datum and unit of the level heads. It draws no separate storey label, since every storey has a head. Only the raster overlay of a physical view (anddrawPhysicalLevelLabelscalled directly) still draws the storey labels at the left of the crop. - A live datum lives only in the 3D scene. Save what a drawing must show in the building model or on a sheet.
extends OPElement implements IShape, IPlaceable
Constructor
Override for label text. Falls back to
${labelName} ${formatElevation(elevation)}.The storey this datum displays, when it is bound to one (
Building segment storey / BmStorey
id). Data only — the level stays a visual datum.Properties
Methods
editableSchema
move
delta (world-space, meters).
rotate
angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).
setOPConfig
getOPConfig
getEditAnchors
origin (free on the floor plane), the far end (slides along the level’s own direction → length), and an elevation grip at the midpoint (vertical).