Skip to main content

Crate cadkit_dxf

Crate cadkit_dxf 

Source
Expand description

DXF reader and writer (ASCII and binary) for the cadkit model.

Contract used by the cadkit facade: sniff(), read(), write().

  • read accepts ASCII and binary DXF from R12 (AC1009) to 2018 (AC1032) and maps it to a cadkit_core::Document. Geometry of planar entities is converted to world coordinates; see docs/dxf/NOTES.md for every mapping decision.
  • write() produces ASCII DXF in one of the DxfVersions.
  • native exposes the group-code tokenizer for scanners and oracles.

Modules§

native
Low-level DXF group-code tokenizer (ASCII and binary).

Structs§

WriteOptions
Options for DXF output.

Enums§

DxfVersion
DXF output version.

Functions§

inspect
Inspects the DXF HEADER section without decoding tables, blocks, or entities.
read
Reads a DXF file into the format-neutral model.
sniff
Returns true when bytes look like DXF (ASCII or binary).
write
Writes doc as ASCII/UTF-8 DXF text.
write_bytes
Writes doc as DXF bytes using options (honoring legacy 8-bit codepage on pre-R2007 versions).
write_bytes_with_report
Like write_bytes(), returning both the encoded DXF bytes and conversion warnings.
write_with_report
Like write(), but also returns the warnings for everything that could not be represented (skipped unknown entities, undefined block references, …).