Ir al contenido principal

raygeo.formats.dxf.writer

Writing DXF documents.

Emits R12-compatible ASCII DXF with millimetres declared, the variant every CAD tool and laser cutter controller accepts.

Functions​

write()​

write(geometry: geo.Geometry) -> str

Write geometry as a DXF document.

Consecutive lines become one LWPOLYLINE per contour, arcs remain ARC entities, and beziers are written as splines with control points and knots, so a geometry round-trips through write() and reader.read() without loss.

ParameterTypeDescription
geometrygeo.GeometryThe geometry to write, in millimetres.
ReturnsstrThe DXF document as text.
ComplexityO(n) where n = number of commands