overallDimensions gives the full width and the full height. The other functions give a string of dimensions along an edge or a facade.
Import
Example
Notes
- Model points are in metres. Offsets and text sizes are in paper millimetres.
- The dimensions keep the points that the drawing had at the time of the call. Make them again after the model changes.
- Replace the old annotations when you make new ones. This prevents duplicate ids.
overallDimensions
Overall width + height measures from the drawing’s real model extents (its bounds).chainDimensions
An exterior dimension chain along one edge of the drawing — the running string of measurements an issued plan carries outside its façade, breaking at each wall junction and each opening jamb.facadeDimensions
One dimension string per exterior run, offset to the OUTSIDE of the plan.facadeDimensionExtent
The outermost paper offsetfacadeDimensions will use, so a caller can place the overall dimension beyond it.
facadeRuns
The straight runs of exterior wall, each with the stations a dimension string breaks at.Types
MeasureOptions
The package does not export this type by name.MeasureAnnotation
A viewport-linked dimension:from/to are saved points in the viewport’s model space (metres).
ChainOptions
The package does not export this type by name.Depth searched inward from that edge, in metres. Only geometry reaching into this band contributes
a breakpoint, so a chain measures the façade it sits against rather than every wall on the floor.
Default 1.0 — one band comfortably deeper than the thickest wall in the Swiss Dwellings sample
(0.91 m).
A link shorter than this (metres) is dropped, folding into its neighbour: a 2 cm jamb return is a
construction detail, not a dimension. Default 0.05 — deliberately BELOW the kernel’s 0.10 m
minimum wall, so every wall the model can express still earns its own dimension. Raise it past
0.10 and a chain silently swallows every partition, which is how a dimensioned drawing loses its
partitions.
DimensionableStorey
The package does not export this type by name.FacadeDimensionOptions
The package does not export this type by name.Ignore runs shorter than this, in metres. Default 0.6 — a doorway. A 1.5 m floor dropped
s24485-w6, a 1225 mm façade WITH a window in it.Called for every façade left undimensioned, so a caller can report it rather than let it vanish.
FacadeDropped
Why a façade was not dimensioned. The package does not export this type by name.FacadeRun
The package does not export this type by name.Run ends in drawing space —
BmWall points are world XZ and the drawing maps {x, y: z}.The wall’s thickness, so a caller can clear the dimension line off the FACE rather than the
centreline — otherwise clearance shrinks as walls get thicker.
ChainEdge
Which edge of the drawing a dimension chain runs along. The package does not export this type by name.DimensionableWall
The package does not export this type by name.DimensionableSpace
The package does not export this type by name.DimensionableOpening
The subset ofBmStorey this needs.
The package does not export this type by name.
Frame on each side. The structural opening is
width + 2 * frameWidth. ABSENT IS NOT ZERO: the
kernel cuts the void at frameWidth ?? DEFAULT_FRAME_WIDTH (0.05), so treating an absent frame as
0 reproduces exactly the 100 mm error this module was fixed for — just on documents that do not
spell the frame out.