Expand description
ASCII DXF import and export.
Import supports LINE, LWPOLYLINE (bulges), 2D POLYLINE/VERTEX (bulges),
CIRCLE, ARC, TEXT, MTEXT (formatting stripped), POINT and the LAYER
table, for AC1009 (R12) through AC1032 (2018). Units come from $INSUNITS
(unitless files are read as millimetres and reported). Entities with an
extrusion of (0, 0, -1) are mirrored correctly; other OCS orientations are
reported. INSERT, HATCH, SPLINE, ELLIPSE, DIMENSION and every other
entity are counted in the report — never dropped silently. Binary DXF is
rejected. Text decoding: UTF-8 (AC1021+), otherwise $DWGCODEPAGE
ANSI_1252/ANSI_1254 plus \U+XXXX escapes.
Export writes R12 (AC1009) ASCII — the most widely readable variant — with
LINE, POLYLINE/VERTEX (bulges), CIRCLE, ARC, TEXT and POINT, layers
and $INSUNITS = 4 (mm). Béziers are flattened and reported.
Structs§
- DxfImport
- Imported layers and entities.
Enums§
- DxfError
- DXF errors.
Constants§
- MAX_
DXF_ BYTES - Maximum DXF input size.
Functions§
- export_
dxf - Export the engine’s committed document as R12 ASCII DXF (mm).
- import_
dxf - Import ASCII DXF bytes.