Skip to main content
Grid 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 grid while you model. To save a grid, add a grid line to BmBuilding.grids: an id, a label such as B, a start and an end in world [x, z] metres, an optional arc: { through } that makes the line the circular arc from start through that point to end, and bubbles (start, end or both, the default). Edit the list with the add-building-element, replace-building-element and remove-building-element commands. Each command is one undo step and builds no storey again. drawProjectView draws the saved grids:
  • A storey plan draws each grid line dash-dot, with a circle bubble 8 mm across on the paper at each bubble end. A grid line with an arc draws as one arc, with each bubble along the arc’s tangent at its end. The label is upright. On a sheet at any scale the bubble keeps its paper size.
  • A plan view always draws all the grids of its building, also when it lists elementIds. A grid id in elementIds is accepted and changes nothing.
  • A section or an elevation draws each grid whose line, extended past its ends, crosses the view plane inside the crop: a vertical line with its bubble at the top of the crop, inside it. The bubble keeps its paper size at any sheet scale, and the line meets it. A grid along the view plane draws nothing.
Grid labels are unique in a building: a second grid with the same label is refused with the error code duplicate-label. A grid line shorter than 1 mm is refused with zero-length-grid. An arc is checked as a wall arc is: a malformed one is refused with bad-arc, and a through point on the line from start to end with arc-collinear. columnGridLocation(building, columnId) gives the grid location of a saved column, such as B-2: a lettered grid and a numbered grid that cross within 10 mm of the column centre, the lettered one first. The crossing must be on both grid lines, or at most 10 mm past an end; on a curved grid line it is on the arc, and the 10 mm are measured along it. snapToGrids snaps to the arc of a curved grid line, not to its chord. Two lettered or two numbered grids give no location. It gives undefined when no crossing is that close or the column has no centre.

Import

Example

Notes

  • The editors have no grid tool yet. Add grids with the commands above.
  • The IFC export does not write grids yet.
  • A section or an elevation still cuts a curved grid line along its chord, from start to end.
  • A live datum lives only in the 3D scene. Save what a drawing must show in the building model or on a sheet.
Inheritance: extends OPElement implements IShape, IPlaceable

Constructor

DatumType.GRID
GridKind
GridAxis[]
GridAxis[]
GridHead
string[]
Characters omitted from auto-generated alpha labels.
number
Elevation (world Y) at which the grid is drawn.
boolean
Render axis lines as dashed. Default false (solid).
string
string
number
Line / symbol colour. Defaulted per subtype when omitted.
number
Line weight for the datum’s 2D representation.
DatumVisibility
Whether this datum is shown in plan / model views.

Properties

string
string
Map<string, THREE.Object3D>
Map<string, THREE.Object3D>
boolean
boolean
boolean
Event<null>
GridOptions
string
DatumType
Read-only.
boolean
boolean

Methods

editableSchema

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

rectangular

Build a rectangular grid from spacing arrays and return the resulting options so callers can pass them straight into the constructor.

generateLabels

Sequence of axis labels following ISO 5457 / US NCS conventions: A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, ... (I and O skipped).

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).

setOPConfig

getOPConfig

getEditAnchors

Two handles (start/end) per LINE axis, free on the grid’s elevation plane.

applyEditAnchor

setOPMaterial

setOPGeometry

getAxesSnapshot

columnGridLocation

The grid location of a saved column, such as B-2: a lettered and a numbered grid line that cross within 10 mm of the column centre, the lettered one first.

snapToGrids

snapToGridsDetailed

Types

GridOptions

GridHead

number
required
Diameter of the bubble on the XZ plane in world units.
number
required
Text size for the bubble label.

GridLabelMode

GridAxis

string
required
GridAxisCurve
required
{ start?: boolean; end?: boolean; }
Which endpoint(s) carry a bubble.

GridSnapOptions

GridSnapResult

GridKind

GridAxisCurve

Last modified on November 27, 2026