Skip to content
Shapemetry

@huukhanhnguyen/types / evaluate/layer

evaluate/layer

Layer

Layer = { color?: Color; lineStyle?: LineStyle; lineWidth?: number; name: string; }

Resolved linework-appearance record. Layer is pure CLASSIFICATION, never a rendering fallback: color, lineWidth and lineStyle live on the Entity directly and take NO Layer-level default (layer/material resolve exactly two tiers, Entity override → Instance default). Materials stay the SURFACE record — a face's fill is its material's baseColor. Renderers honor what they can and ignore the rest (three ignores all three today). The three fields are the portable trio every linework format states its own way — SVG as stroke/stroke-width/stroke-dasharray, DXF as layer color/lineweight/linetype.

color?

optional color?: Color

Linework color, RGB 0–1.

lineStyle?

optional lineStyle?: LineStyle

lineWidth?

optional lineWidth?: number

Linework width in WORLD units (mm) — not pixels.

name

name: string


LineStyle

LineStyle = "solid" | "dashed" | "dotted"

Dash pattern for linework — DXF/SketchUp-tag semantics. The one spelling: Layer.lineStyle and ViewFilterOverride.lineStyle (evaluate/view.ts) both carry this type rather than restating the three literals.

Last updated: 📖 1 min readEdit on GitHub