- IMPORTANT: Python 2 support will be dropped in ezdxf v0.9.0, because Python 2 support get more and more annoying.
- CHANGE: refactoring of internal tag representation for a smaller memory footprint, but with some speed penalty
- NEW: packed data for LWPOLYLINE, SPLINE, MESH
- NEW: data queries over all layouts and blocks
- NEW: change entity redraw order in layouts
ezdxf.algebra.Archelper class for arcs
- CHANGE: Safe deleting of block definitions
- NEW: rename paper space layouts by
BlockLayout.is_layout_block, True if block is a model space or paper space block definition
- NEW: Basic support for embedded objects (new in AutoCAD 2018)
- BUGFIX: invalid CLASS definition for DXF version R2000 (AC1015) fixed, bug was only triggered at upgrading from R13/R14 to R2000
- Basic read support for many missing DXF entities/objects
Python 2 support will be dropped in ezdxf v0.9.0, for more information look at this posting .
Some entities (LWPOLYLINE, SPLINE, MESH, ...) using now
array.array() for repeating tags like vertices, edge and face
indices (packed data), this reduces the memory usage, but also adds some runtime penalty.
LWPOLYLINE has now packed data, (x, y) coordinates, start- and end width and bulge are stored as 8-byte double values in
array.array(). Faster point access by
With the new data structure, getting vertices is now faster and has full support for slicing operations:
line = layout.add_lwpolyline([(1, 1), (2, 2), (3, 3)]) # modify existing vertex line = (4, 4) assert (4, 4, 0, 0, 0) == line # slicing vertices assert len(line[:-1]) == 2 # len support # assert len(line) == 3
User defined point format for append(), insert(), append_points(), points(), get_points() and set_points(). The user defined format allows reordering of point components: coordinates 'x, y' , start width 's', end width 'e' and bulge value 'b' , default format is 'xyseb'.
If you just need x, y and bulge value:
points = line.get_points(format="xyb")
get_rstrip_points() and context manager
rstrip_points(), which can be replaced by using an user defined point format.
For more see the documentation for LWPolyline: https://ezdxf.mozman.at/docs/dxfentities/lwpolyline.html
SPLINE has packed data:
- knots and weights are stored as 4-byte float arrays
- fit- and control points are stored as 8-byte double arrays
get_fit_points() are deprecated, direct access to this attributes by
Spline.fit_points, all with a list-like interface.
Knot, fit- and control point counter updated automatically, therefore counters are read only now.
Editing a mesh by
Spline.edit_data() context manager still works the same way as in previous versions.
For more see the documentation for Spline: https://ezdxf.mozman.at/docs/dxfentities/spline.html
MESH has packed data.
- vertices are stored as 8-byte double arrays
- edges are stored as 8-byte double arrays
- faces ands creases are stored as list of arrays(), array type depends from data: byte, integer or long
Editing a mesh by
Mesh.edit_data() context manager still works the same way as in previous versions.
For more see the documentation for Mesh: https://ezdxf.mozman.at/docs/dxfentities/mesh.html
Drawing.layouts_and_blocks(): iterate over all layouts (mode space and paper space) and all block definitions
Drawing.chain_layouts_and_blocks(): chain entity spaces of all layouts and blocks. Yields an iterator for all entities in all layouts and blocks
Drawing.query(): entity query over all layouts and blocks
Drawing.groupby(): groups DXF entities of all layouts and blocks by an DXF attribute or a key function
For more see the documentation for Drawing: https://ezdxf.mozman.at/docs/drawing.html
To change redraw order associate a different sort handle to entities, this redefines the order in which the entities are regenerated.
Layout.set_redraw_order(handles): set redraw order of entities in model space or paper space layouts
For more see the documentation for Layout: https://ezdxf.mozman.at/docs/layouts.html#change-redraw-order
Changed behavior for deleting BLOCK definitions.
Drawing.blocks.delete_block(name, safe=True), new parameter save, check if block is still referenced(raises DXFValueError)
Drawing.blocks.delete_all_blocks(safe=True), if parameter safe is True, do not delete blocks that are still referenced
New helper class
ezdxf.algebra.Arc to create arcs from 2 points and an angle or radius, or from 3 points.
For more see the documentation for ezdxf.algebra.Arc: https://ezdxf.mozman.at/docs/algebra/arc.html
Basic support for embedded objects (new in AutoCAD 2018), ezdxf reads and writes the embedded data as it is, no interpretation no modification, just enough to not break DXF files with embedded objects at saving.
- MLEADER (incomplete)
- MLINE (incomplete)
- TABLE (incomplete)
- FIELD (incomplete)
- FIELDLIST (not documented by Autodesk)
- SUNSTUDY (incomplete) (no real world DXF files with SUNSTUDY for testing available)
- TABLESTYLE (incomplete)
- VBA_PROJECT (no real world DXF files with embedded VBA for testing available)
- for all other unsupported entities/objects exists only raw DXF tag support