Skip to main content

Module dxf

Module dxf 

Source
Expand description

DXF: 2D drawings, the interchange the field expects.

Reading takes a drawing’s curves as written (read_dxf_entities: lines, arcs, circles, ellipses, splines and bulged polylines, with the units and which layers are dashed), or as polylines (read_dxf).

R12 ASCII, the most widely readable dialect: a TABLES section declaring the two linetypes and two layers a technical drawing needs, then one POLYLINE per curve. Visible curves go on the VISIBLE layer with continuous lines; hidden curves on HIDDEN, dashed. The writer takes bare polylines rather than a drawing type, so anything that produces 2D curves (the hidden-line projector, a section outline, a sketch) writes without this crate knowing where they came from.

Structs§

DxfDrawing
The polylines a DXF carries, by the layer they were drawn on.
DxfEntities
A DXF’s drawing entities, typed, with the drawing’s units.
DxfEntity
One entity: the curve, and where it was drawn.

Enums§

DxfCurve
A DXF curve in the drawing’s plane.

Functions§

read_dxf
Read the polylines out of an ASCII DXF.
read_dxf_entities
Read the typed entities, the units and the layers’ linetypes out of an ASCII DXF.
write_dxf
Write polylines as an R12 DXF document.