Skip to content
Shapemetry

Types - DXF

API reference for ./io/dxf on @huukhanhnguyen/types — the option and result records of @huukhanhnguyen/io's DXF reader/writer.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

DxfEntity

type

type DxfEntity
// = {
    type: string;
    layer: string;
    closed: boolean;
    points: Point[];
    radius?: number;
    text?: string;
    /** HATCH-only: solid fill (gradient out of scope → treated as solid). */
    solidFill?: boolean;
    /** HATCH-only: boundary outer ring (+ holes in later rings). */
    hatchBoundary?: Point[][];
    /** HATCH-only: pattern definition lines. */
    hatchPatternLines?: DxfHatchPatternLine[];
}

DxfExportOptions

type

type DxfExportOptions
// = {
    /** "plan" (default) drops Z; "wireframe"/"solid" keep real Z. solid only
     *  changes meshEntity emission (3DFACE); faces always export as wires. */
    mode?: "plan" | "wireframe" | "solid";
    /** Model layer records — supplies each layer's colour + line style. */
    layers?: Layer[];
    /** Chord tolerance (mm) for curved face edges and higher-degree curves. */
    curveTolerance?: number;
}

DxfHatchPatternLine

type

type DxfHatchPatternLine
// = {
    angleDeg: number;
    base: [number, number];
    offset: Vector2d;
    dashItems: number[];
}

DxfPair

type

type DxfPair
// = {
    code: number;
    value: string;
}
Last updated: 📖 1 min readEdit on GitHub