dxfscan
A parser for the AutoCAD binary DXF format.
Parses a binary DXF file from a &[u8] slice in a single pass, producing typed entity data with indices for layers, styles, blocks, and entity handles.
All string data borrows directly from the input for zero-copy operation.
no_std + alloc.
The input must be in binary DXF format (starts with the 22-byte AutoCAD Binary DXF sentinel) in a R13 or later format.
To convert a text DXF file to binary format (including at runtime), try dxfbin.
Usage
let data = read.unwrap;
let drawing = scan.unwrap;
for entity in &drawing.entities
if let Some = drawing.layer_by_name
if let Some = drawing.block_by_name
Supported entities
LINE, CIRCLE, ARC, ELLIPSE, LWPOLYLINE, POLYLINE, SPLINE, SOLID, TRACE, 3DFACE, POINT, TEXT, MTEXT, INSERT, DIMENSION, LEADER, HATCH, WIPEOUT, ATTRIB, ATTDEF.
Unrecognized entity types are preserved as Entity::Unknown.
no_std
[]
= { = "0.1", = false }
License
ISC