46. dxf

Classes defined in module dxf

class dxf.DxfExporter(filename, terminator='n')

Export geometry in DXF format.

While we certainly do not want to promote proprietary software, some of our users occasionally needed to export some model in DXF format. This class provides a minimum of functionality.

Methods

write(s)

Write a string to the dxf file.

The string does not include the line terminator.

out(code, data)

Output a string data item to the dxf file.

code is the group code, data holds the data

close()

Finalize and close the DXF file

section(name)

Start a new section

endSection()

End the current section

entities()

Start the ENTITIES section

layer(layer)

Export the layer

line(x, layer=0)

Export a line.

x is a (2,3) shaped array

Functions defined in module dxf

dxf.exportDXF(filename, F)

Export a Formex to a DXF file

Currently, only plex-2 Formices can be exported to DXF.

Documentation

Previous topic

45. turtle — Turtle graphics for pyFormex

Next topic

47. export — Classes and functions for exporting geometry in various formats.

This Page