Skip to content
Shapemetry

@huukhanhnguyen/types / evaluate/annotationStyle

evaluate/annotationStyle

AnnotationStyle

AnnotationStyle = { arrowSize?: number; baselineSpacing?: number; centerMarkSize?: number; decimals?: number; extensionOffset?: number; extensionOvershoot?: number; lineOvershoot?: number; name: string; rounding?: number; scale?: number; textStyle: string; textSuffix?: string; tickSize?: number; }

Produced by collectAnnotationStyleNodes() from an authored annotationStyle node's expression args; consumed BY NAME.

arrowSize?

optional arrowSize?: number

Arrowhead length, model units (DXF DIMASZ).

baselineSpacing?

optional baselineSpacing?: number

Distance between stacked baseline dimensions (DXF DIMDLI).

centerMarkSize?

optional centerMarkSize?: number

Size of the cross drawn at a circle's centre. A centre mark MEASURES NOTHING, so it is this NUMBER and not a dimension type — DXF DIMCEN.

decimals?

optional decimals?: number

Decimal places in the measurement string (DXF DIMDEC).

extensionOffset?

optional extensionOffset?: number

Gap between the measured point and where its extension line starts (DXF DIMEXO).

extensionOvershoot?

optional extensionOvershoot?: number

How far an extension line runs PAST the dimension line (DXF DIMEXE).

lineOvershoot?

optional lineOvershoot?: number

How far the dimension line runs past the extension lines (DXF DIMDLE).

name

name: string

rounding?

optional rounding?: number

Round the measurement to this increment before formatting (DIMRND).

scale?

optional scale?: number

Multiplier applied to every length above, so one style set draws at a second paper scale (DXF DIMSCALE).

textStyle

textStyle: string

Name of the textStyles record the measurement string is drawn with.

textSuffix?

optional textSuffix?: string

Appended to the measurement string — a unit, "mm" (DIMPOST).

tickSize?

optional tickSize?: number

Size of the oblique tick drawn instead of an arrowhead when the architectural tick is used (DXF DIMTSZ; 0/absent = arrowheads).


AnnotationStyles

AnnotationStyles = { annotation: AnnotationStyle; text: TextStyle; }

The two style records a drafting mark needs at once: how the MEASUREMENT is drawn and how its TEXT is drawn. They travel together because a mark's drawn form needs both in one pass, and resolving them separately at each call site is where a mark ends up drawn with one style's arrows and another's text.

annotation

annotation: AnnotationStyle

text

text: TextStyle

Last updated: 📖 2 min readEdit on GitHub