A Python package to create/manipulate DXF drawings.
Project description
ezdxf
Abstract
A Python package to create and modify DXF drawings, independent of the DXF version. You can open/save every DXF file without losing any content (except comments), Unknown tags in the DXF file will be ignored but preserved for saving. With this behavior it is possible to open also DXF drawings that contains data from 3rd party applications.
Quick-Info
- ezdxf is a Python package to create new DXF files and read/modify/write existing DXF files
- the intended audience are programmers
- requires at least Python 3.7
- OS independent
- tested with CPython and pypy3
- C-extensions for CPython as binary wheels available on PyPI for Windows, Linux and macOS
- additional required packages: typing_extensions, pyparsing
- optional Cython implementation of some low level math classes
- MIT-License
- read/write/new support for DXF versions: R12, R2000, R2004, R2007, R2010, R2013 and R2018
- additional read support for DXF versions R13/R14 (upgraded to R2000)
- additional read support for older DXF versions than R12 (upgraded to R12)
- read/write support for ASCII DXF and Binary DXF
- preserves third-party DXF content
Included Extensions
- The
drawingadd-on is a translation layer to send DXF data to a render backend, interfaces to matplotlib, which can export images as png, pdf or svg, and PyQt5 are implemented. geoadd-on to support the__geo_interface__r12writeradd-on to write basic DXF entities direct and fast into a DXF R12 file or streamiterdxfadd-on to iterate over DXF entities of the modelspace of really big (> 5GB) DXF files which do not fit into memoryImporteradd-on to import entities, blocks and table entries from another DXF documentdxf2codeadd-on to generate Python code for DXF structures loaded from DXF documents as starting point for parametric DXF entity creationacadctbadd-on to read/write plot style files (CTB/STB)pycsgadd-on for Constructive Solid Geometry (CSG) modeling techniqueMTextExplodeadd-on for exploding MTEXT entities into single line TEXT entities
A simple example:
import ezdxf
# Create a new DXF document.
doc = ezdxf.new(dxfversion="R2010")
# Create new table entries (layers, linetypes, text styles, ...).
doc.layers.add("TEXTLAYER", color=2)
# DXF entities (LINE, TEXT, ...) reside in a layout (modelspace,
# paperspace layout or block definition).
msp = doc.modelspace()
# Add entities to a layout by factory methods: layout.add_...()
msp.add_line((0, 0), (10, 0), dxfattribs={"color": 7})
msp.add_text(
"Test",
dxfattribs={
"layer": "TEXTLAYER"
}).set_pos((0, 0.2), align="CENTER")
# Save the DXF document.
doc.saveas("test.dxf")
Example for the r12writer, which writes a simple DXF R12 file without in-memory structures:
from random import random
from ezdxf.addons import r12writer
MAX_X_COORD = 1000
MAX_Y_COORD = 1000
with r12writer("many_circles.dxf") as doc:
for _ in range(100000):
doc.add_circle((MAX_X_COORD*random(), MAX_Y_COORD*random()), radius=2)
The r12writer supports only the ENTITIES section of a DXF R12 drawing, no HEADER, TABLES or BLOCKS section is present, except FIXED-TABLES are written, than some additional predefined text styles and line types are available.
Installation
Basic installation by pip including the optional C-extensions from PyPI as binary wheels:
pip install ezdxf
Full installation with all dependencies (matplotlib, PyQt5) to use the drawing add-on:
pip install ezdxf[draw]
For more information about the setup & dependencies visit the documentation.
Website
Documentation
Documentation of development version at https://ezdxf.mozman.at/docs
Documentation of the latest release at https://ezdxf.readthedocs.io/
Contribution
The source code of ezdxf can be found at GitHub, target your pull requests
to the master branch:
https://github.com/mozman/ezdxf.git
Feedback
Questions and feedback at GitHub Discussions:
https://github.com/mozman/ezdxf/discussions
Questions at Stack Overflow:
Post questions at stack overflow and use the tag dxf or ezdxf.
Issue tracker at GitHub:
http://github.com/mozman/ezdxf/issues
Contact
Please always post questions at the forum or stack overflow to make answers available to other users as well.
Feedback is greatly appreciated.
Manfred
News
Version 0.17 - 2021-10-01
- Release notes: https://ezdxf.mozman.at/release-v0-17.html
- NEW: column support for MTEXT read and create, but no editing
- NEW: factory method
BaseLayout.add_mtext_static_columns() - NEW: factory method
BaseLayout.add_mtext_dynamic_manual_height_columns() - NEW: add-on tool
MTextExplode()to explode MTEXT entities into single line TEXT entities and additional LINE entities to emulate strokes, requires theMatplotlibpackage - NEW:
move_to()command and multi-path support for theezdxf.path.Pathclass - NEW: regular
make_path()support for the HATCH entity, returns a multi-path object - NEW: regular
make_primitive()support for the HATCH entity - NEW:
text2path.make_path_from_str()returns a multi-path object - NEW:
text2path.make_path_from_enity()returns a multi-path object - NEW:
MPOLYGONload/write/create support - NEW:
ezdxf.path.to_mpolygons()function: Path() to MPOLYGON converter - NEW:
ezdxf.path.render_mpolygons()function: render MPOLYGON entities form paths - NEW: store ezdxf and custom metadata in DXF files
- NEW: command
ezdxf browse FILE ..., PyQt DXF structure browser - NEW:
dxf2codeadd-on: functionblack()and methodCode.black_code_str()returns the code string formatted by Black - NEW:
ezdxf.uprightmodule to flip inverted extrusion vectors, for more information read the docs - NEW: support for
ACAD_PROXY_ENTITY - NEW:
BaseLayout.add_mtext_static_columns() - NEW:
BaseLayout.add_mtext_dynamic_manual_height_columns() - NEW: rendering support for inline codes in
MTEXTentities for thedrawingadd-on - NEW:
XDATAtransformation support - NEW: copy support for extension dictionaries
- CHANGE:
drawingadd-on: replaced the backendparamsargument (untyped dict) by the new typedConfigurationobject passed to the frontend class as argumentconfig - REMOVED: deprecated class methods
from_...(entity)fromPathclass, usepath.make_path(entity)instead - REMOVED: deprecated
Pathmethodsadd_...(entity), usepath.add_...(path, entity)function instead - BUGFIX: entity query did not match default values if the attribute was not present
- BUGFIX: groupby query did not match default values if the attribute was not present
- BUGFIX: ODAFC add-on - reintroduce accidentally removed global variable
exec_pathaswin_exec_path - BUGFIX: graphic entities are not allowed as
DICTIONARYentries - BUGFIX: copied
DICTIONARYwas not added to the OBJECTS section by callingfactory.bind() - BUGFIX:
XRecord.copy()copies content tags
Version 0.16.6 - 2021-08-28
- NEW:
MPOLYGONsupport for thedrawingadd-on - NEW:
MPOLYGONsupport for thegeoadd-on - NEW:
fastargument for methodMText.plain_text() - NEW: support for multi-line
ATTRIBandATTDEFentities in DXF R2018 - NEW:
Auditorremoves invalid DXF entities from layouts, blocks and the OBJECTS section - NEW:
Auditorremoves standalone ATTRIB entities from layouts and blocks - NEW:
Drawing.layers.add()factory method to create new layers - NEW:
Drawing.styles.add()factory method to create new text styles - NEW:
Drawing.linetypes.add()factory method to create new line types - CHANGE: renamed
RenderContext.current_layertoRenderContext.current_layer_properties - CHANGE: renamed
RenderContext.current_block_referencetoRenderContext.current_block_reference_properties - CHANGE: extended entity validation for
GROUP - REMOVED:
BaseLayout.add_attrib()factory method to add standaloneATTRIBentities.ATTRIBentities cannot exist as standalone entities. - BUGFIX: add missing "doc" argument to DXF loaders, DXF version was not available at loading stage
- BUGFIX: DXF export for
ARC_DIMENSION - BUGFIX:
Arc.flattening()always have to returnVec3instances - PREVIEW: new features to try out, API may change until official release in v0.17
- PREVIEW: support for
ACAD_PROXY_ENTITY - PREVIEW: Rendering support for inline codes in
MTEXTentities for thedrawingadd-on.
Version 0.16.5 - 2021-07-18
- NEW: hard dependency
typing_extensions - CHANGE: replaced
ezdxf.tools.rgbbyezdxf.colors - CHANGE:
optionsmodule renamed to_options; this eliminates the confusion between theoptionsmodule and the global objectezdxf.options - NEW: config file support, see docs
- NEW:
ezdxf configcommand to manage config files - NEW:
ezdxf.path.have_close_control_vertices(a, b), test for close control vertices of twoPathobjects - REMOVED: environment variable options, these are config file only options:
EZDXF_AUTO_LOAD_FONTSEZDXF_FONT_CACHE_DIRECTORYEZDXF_PRESERVE_PROXY_GRAPHICSEZDXF_LOG_UNPROCESSED_TAGSEZDXF_FILTER_INVALID_XDATA_GROUP_CODES
- REMOVED:
ezdxf.options.default_text_style, was not used - REMOVED:
ezdxf.options.auto_load_fonts, disabling auto load has no advantage - REMOVED:
Vectoralias forVec3 - REMOVED:
get_acis_data(),set_acis_data()and context manageredit_data()from ACIS based entities, useacis_dataproperty instead asList[str]orList[bytes] - BUGFIX:
Spline.construction_tool()recognizes start- and end tangents for B-splines from fit points if defined - PREVIEW: new features to try out, API may change until official release in v0.17
- PREVIEW:
dxf2codeadd-on: functionblack()and methodCode.black_code_str()returns the code string formatted by Black - PREVIEW:
ezdxf.uprightmodule to flip inverted extrusion vectors, for more information read the docs
Version 0.16.4 - 2021-06-20
- NEW:
PolylinePath.typeandEdgePath.typeasezdxf.entities.BoundaryPathTypeenum - NEW:
LineEdge.type,ArcEdge.type,EllipseEdge.typeandSplineEdge.typeasezdxf.entities.EdgeTypeenum - NEW:
Path.all_lines_to_curve3(), convert all LINE_TO commands into linear CURVE3_TO commands - NEW:
Path.all_lines_to_curve4(), convert all LINE_TO commands into linear CURVE4_TO commands - NEW: create an AppID
EZDXFwhen saving a DXF file by ezdxf - BUGFIX: loading crash of the PyQt
CADViewerclass - BUGFIX: loading
GEODATAversion 1, perhaps data is incorrect, logged as warning - BUGFIX:
HATCHspline edge from fit points require start- and end tangents - BUGFIX:
disassemble.make_primitive()transform LWPOLYLINE including width values into WCS - BUGFIX: ignore open loops in
HATCHedge paths - BUGFIX: correct application of the
Dimension.dxf.insertattribute - BUGFIX: fixed incorrect "thickness" transformation of OCS entities
- BUGFIX: add missing "width" transformation to POLYLINE and LWPOLYLINE
- BUGFIX: drawing add-on handles the invisible flag for INSERT correct
- PREVIEW: new features to try out, API may change until official release in v0.17
- PREVIEW:
move_to()command and multi-path support for theezdxf.path.Pathclass - PREVIEW:
MPOLYGONload/write/create support - PREVIEW: store ezdxf and custom metadata in DXF files, see docs
- PREVIEW: command
ezdxf browse FILE, PyQt DXF structure browser - PREVIEW: command
ezdxf strip FILE [FILE ...], remove comment tags (999) and the THUMBNAILIMAGE section
Version 0.16.3 - 2021-05-22
- NEW:
ezdxf.tools.text.MTextEditorclass, extracted from theMTextclass - NEW:
MText.set_bg_color(), new argumenttext_frameto add a text frame - CHANGE: move
MTextconstants toMTextEditorclass - CHANGE: move
MText.set_font()toMTextEditor.change_font() - CHANGE: move
MText.set_color()toMTextEditor.change_color() - CHANGE: move
MText.append_stacked_text()toMTextEditor.stacked_text() - BUGFIX: DXF export of GROUP checks for deleted entities
- BUGFIX: improved virtual DIMENSION handling
- BUGFIX: DIMENSION transformation also transform the content of the associated anonymous geometry block content
- BUGFIX:
drawingadd-on, true color values always override ACI colors - BUGFIX:
drawingadd-on, handle SOLID as OCS entity like TRACE - BUGFIX/CHANGE:
Vec2/3.__eq__()(==operator) compares all components with the full floating point precision, useVec2/3.isclose()to take floating point imprecision into account. This is an annoying but necessary change! - CHANGE: new signature for
Vec2/3.isclose(other, *, rel_tol=1e-9, abs_tol=1e-12), new argumentrel_tol, argumentsrel_tolandabs_tolare keyword only
Version 0.16.2 - 2021-04-21
- CHANGED:
ezdxf.path.add_bezier4p(), add linear Bezier curve segments as LINE_TO commands - CHANGED:
ezdxf.path.add_bezier3p(), add linear Bezier curve segments as LINE_TO commands - CHANGED:
$FINGERPRINTGUIDmatches AutoCAD pattern{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - CHANGED:
$VERSIONGUIDmatches AutoCAD pattern{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - BUGFIX: check for degenerated Bezier curves in
have_bezier_curves_g1_continuity() - BUGFIX: delete and unlink support for DXFTagStorage (unsupported entities)
Version 0.16.1 - 2021-04-10
- BUGFIX:
disassemble.recursive_decompose()was not recursive - BUGFIX:
Frontendfont resolver uses XDATA if no regular font file is defined - BUGFIX: version specific group code for header variable
$XCLIPFRAME - BUGFIX:
INSERT(block reference) transformation
Version 0.16 - 2021-03-27
- Release notes: https://ezdxf.mozman.at/release-v0-16.html
- NEW:
ezdxfcommand line launcher, supported commands:ppthe previousdxfppcommand, the DXF pretty printerauditDXF filesdrawand convert DXF files by the Matplotlib backendviewDXF files by the PyQt viewer
- NEW:
text2pathadd-on to createPathobjects from text strings and text entities, see docs - NEW:
bboxmodule to detect the extents (bounding boxes) of DXF entities, see docs - NEW:
zoommodule to reset the active viewport of layouts, see docs - NEW:
pathsub-package, an extended version of the previousezdxf.render.pathmodule, see docs - NEW: support module
disassemble, see docs- deconstruct complex nested DXF entities into a flat sequence
- create a "primitive" representation of DXF entities
- NEW: Using the optional
Matplotlibpackage by default for better font metric calculation and font rendering if available. - NEW: Cached font metrics are loaded at startup, this can be disabled by the
environment variable
EZDXF_AUTO_LOAD_FONTS=False, if this slows down the interpreter startup too much. - NEW:
Layout.reset_extents(), reset layout extents to the given values, or the AutCAD default values - NEW:
Layout.reset_limits(), reset layout limits to the given values, or the AutCAD default values - NEW:
Paperspace.reset_main_viewport(), reset the main viewport of a paper space layout to custom- or default values - NEW: quadratic Bézier curve support for the
Path()class - NEW:
ezdxf.entity.Textgetter/setter propertiesis_backwardandis_upside_down - NEW:
ezdxf.entity.TextStylegetter/setter propertiesis_backward,is_upside_downandis_vertical_stacked - NEW:
ezdxf.math.Bezier3P, optimized quadratic Bézier curve construction tool - NEW:
ezdxf.math.quadratic_to_cubic_bezier(),Bezier3PtoBezier4Pconverter - NEW:
ezdxf.math.bezier_to_bspline(), Bézier curves to B-spline converter - NEW:
ezdxf.math.clip_polygon_2d(), clip polygon by a convex clipping polygon - NEW:
ezdxf.math.basic_transformation(), returns a combined transformation matrix for translation, scaling and rotation about the z-axis - NEW:
ezdxf.math.best_fit_normal(), returns the normal vector of flat spatial planes - NEW:
fit_points_to_cubic_bezier()creates a visual equal SPLINE from fit points without end tangents like BricsCAD, but only for short B-splines. - CHANGED:
fit_points_to_cad_cv(), removed unused argumentsdegreeandmethod - CHANGED:
ezdxf.render.nestingcontent moved into theezdxf.pathpackage - CHANGED: renamed
MeshBuilder.render()toMeshBuilder.render_mesh() - CHANGED:
ezdxf.math.BSplineis immutable, all methods return a newBSplineobject - CHANGED: replaced
BSplineU()class by factory functionezdxf.math.open_uniform_bspline() - CHANGED: replaced
BSplineClosed()class by factory functionezdxf.math.closed_uniform_bspline() - CHANGED: renamed
rational_spline_from_arc()torational_bspline_from_arc() - CHANGED: renamed
rational_spline_from_ellipse()torational_bspline_from_ellipse() - BUGFIX: fixed
ezdxf.math.rational_bspline_from_ellipse()invalid parameter conversion - DEPRECATED:
ezdxf.render.pathmodule, replaced byezdxf.pathpackage - DEPRECATED:
Path.from_lwpolyline(), replaced by factorypath.make_path() - DEPRECATED:
Path.from_polyline(), replaced by factorypath.make_path() - DEPRECATED:
Path.from_spline(), replaced by factorypath.make_path() - DEPRECATED:
Path.from_ellipse(), replaced by factorypath.make_path() - DEPRECATED:
Path.from_arc(), replaced by factorypath.make_path() - DEPRECATED:
Path.from_circle(), replaced by factorypath.make_path() - DEPRECATED:
Path.add_curve(), replaced by functionpath.add_bezier4p() - DEPRECATED:
Path.add_ellipse(), replaced by functionpath.add_ellipse() - DEPRECATED:
Path.add_spline(), replaced by functionpath.add_spline() - DEPRECATED:
Path.from_vertices(), replaced by factorypath.from_vertices() - REMOVED:
Path.from_hatch_boundary_path(), replaced by factorypath.from_hatch() - REMOVED:
Path.from_hatch_polyline_path() - REMOVED:
Path.from_hatch_edge_path() - REMOVED:
BlocksSection.purge(), unsafe operation - REMOVED:
dxfppcommand, replaced byezdxf pp ... - REMOVED:
Layout.add_closed_spline(), broken and nobody noticed it - REMOVED:
Layout.add_closed_rational_spline(), broken and nobody noticed it
Version 0.15.2 - 2021-02-07
- Active Python 3.6 support removed, no tests and no deployment of binary wheels for Python 3.6
- NEW:
BoundingBox()intersection test, inside- and outside tests, union of two bounding boxes. - NEW:
ezdxf.math.ellipse_param_span(), works the same way asarc_angle_span_deg()for special cases - NEW:
DXFEntity.uuidproperty, returns an UUID on demand, which allows distinguishing even virtual entities without a handle - CHANGE: extraction of many text utility functions into
ezdxf.tools.text - CHANGE:
add_polyline2d(),add_polyline3d(),add_lwpolyline()andadd_mline()got argumentcloseto create a closed polygon and dxfattribclosedis deprecated,closeanddxfattribsfor these factories are keyword only arguments. - CHANGE: improved text alignment rendering in the drawing add-on
- CHANGE: moved
ezdxf.addons.drawing.fonts.pyintoezdxf.toolsand added a font measurement cache. - BUGFIX:
FITandALIGNEDtext rendering in the drawing add-on - BUGFIX: matplotlib backend uses linewidth=0 for solid filled polygons and the scaled linewidth for polygons with pattern filling
- BUGFIX: clipping path calculation for IMAGE and WIPEOUT
- BUGFIX: transformation of a closed (360deg) arc preserves a closed arc
- BUGFIX: bulge values near 0 but != 0 caused an exception in
Path.add_2d_polyline() - BUGFIX: invalid polygon building in the
geoadd-on
Version 0.15.1 - 2021-01-15
- NEW:
Spline.audit()audit support for the SPLINE entity - NEW: The
recovermodule tolerates malformed group codes and value tags. - Changed the
Matrix44.matrixattribute in the Python implementation to a "private" attributeMatrix44._matrix, because this attribute is not available in the Cython implementation - BUGFIX: proxy graphic decoding error on big-endian systems
- BUGFIX: invalid vertex subscript access in
dxf2codeadd-on - BUGFIX:
cubic_bezier_from_ellipse()recognizes full ellipses - BUGFIX:
cubic_bezier_from_arc()recognizes full circles - BUGFIX: pickle support for C-extensions
Vec2,Vec3,Matrix44andBezier4P - BUGFIX: attribute error when exporting matrices in the MATERIAL entity
Version 0.15 - 2020-12-30
- Release notes: https://ezdxf.mozman.at/release-v0-15.html
- NEW: linetype support for matplotlib- and pyqt drawing backend
- NEW: HATCH island support for matplotlib- and pyqt drawing backend
- NEW: basic HATCH pattern support for matplotlib- and pyqt drawing backend
- NEW: Font support for matplotlib- and pyqt drawing backend
- NEW: POINT mode support for matplotlib- and pyqt drawing backend, relative point size is not supported
- NEW: Proxy graphic support for the drawing add-on
- NEW: recover misplaced tags of the
AcDbEntitysubclass (color, layer, linetype, ...), supported by all loading modes - NEW:
ezdxf.addons.geomodule, support for the__geo_interface__, see docs and tutorial - NEW:
GeoData.setup_local_grid()setup geo data for CRS similar to EPSG:3395 World Mercator - NEW: MLINE support but without line break and fill break (gaps) features
- NEW:
Bezier.flattening()adaptive recursive flattening (approximation) - NEW:
Bezier4P.flattening()adaptive recursive flattening (approximation) - NEW:
Path.flattening()adaptive recursive flattening (approximation) - NEW:
Circle.flattening()approximation determined by a max. sagitta value - NEW:
Arc.flattening()approximation determined by a max. sagitta value - NEW:
ConstructionArc.flattening()approximation determined by a max. sagitta value - NEW:
ezdxf.math.distance_point_line_3d() - NEW:
ConstructionEllipse.flattening()adaptive recursive flattening (approximation) - NEW:
Ellipse.flattening()adaptive recursive flattening (approximation) - NEW:
BSpline.flattening()adaptive recursive flattening (approximation) - NEW:
Spline.flattening()adaptive recursive flattening (approximation) - NEW:
matplotlib.qsave(),ltypeargument to switch between matplotlib dpi based linetype rendering and AutoCAD like drawing units based linetype rendering - NEW:
Solid.vertices()returns OCS vertices in correct order (alsoTrace) - NEW:
Solid.wcs_vertices()returns WCS vertices in correct order (alsoTrace) - NEW:
Face3D.wcs_vertices()compatibility interface to SOLID and TRACE - NEW:
Hatch.paths.external_paths()returns iterable of external boundary paths - NEW:
Hatch.paths.outermost_paths()returns iterable of outer most boundary paths - NEW:
Hatch.paths.default_paths()returns iterable of default boundary paths - NEW:
Hatch.paths.rendering_paths()returns iterable of paths to process for rendering - NEW:
Drawing.unitsproperty to get/set document/modelspace units - NEW:
ezdxf.new()argumentunitsto setup document and modelspace units and $MEASUREMENT setting and the linetype setup is based on this $MEASUREMENT setting. - NEW:
pattern.load(measurement, factor)load scaled hatch pattern - NEW:
Path.from_hatch_boundary_path() - NEW:
odafc.export_dwg()new replace option to delete existing DWG files - NEW
Styletable entry supports extended font data - NEW:
Point.virtual_entities(), yield POINT entities as DXF primitives - NEW:
ezdxf.render.point, support module forPoint.virtual_entities() - NEW: Optional Cython implementation of some low level math classes: Vec2, Vec3, Matrix44, Bezier4P
- NEW: support for complex linetypes for the Importer add-on
- CHANGE: Optimized infrastructure for loading DXF attributes
- CHANGE:
Hatch.set_pattern_fill()uses HEADER variable $MEASUREMENT to determine the default scaling of predefined hatch pattern. - CHANGE: fix invalid linetype setup - new linetype scaling like common CAD applications
- CHANGE:
ezdxf.colorsmodule will consolidate all color/transparency related features - CHANGE: renamed
ezdxf.math.VectortoVec3, butVectorremains as synonym - DEPRECATED:
ezdxf.tools.rgbmodule replaced byezdxf.colors - REMOVED: deprecated
DXFEntity.transform_to_wcs()interface, useDXFEntity.transform(ucs.matrix) - REMOVED: deprecated
Hatch.edit_boundary()context manager, useHatch.pathsattribute - REMOVED: deprecated
Hatch.get_gradient()method, useHatch.gradientattribute - REMOVED: deprecated
Hatch.edit_gradient()context manager, useHatch.gradientattribute - REMOVED: deprecated
Hatch.edit_pattern()context manager, useHatch.patternattribute - REMOVED: deprecated
Hatch.get_seed_points()method, useHatch.seedsattribute - REMOVED: unnecessary argument
non_uniform_scalingfromInsert.explode() - REMOVED: unnecessary argument
non_uniform_scalingfromInsert.virtual_entities() - REMOVED: deprecated
Spline.edit_data()context manager, usefit_points,control_points,knotsandweightsattributes - BUGFIX:
ezdxf.math.has_clockwise_orientation()returnsTruefor counter-clock wise and vice versa - BUGFIX: default color for HATCH is 256 (by layer)
- BUGFIX: fixed broken complex linetype setup
- BUGFIX: validate loaded handle seed
Version 0.14.2 - 2020-10-18
- Release notes: https://ezdxf.mozman.at/release-v0-14.html
- BUGFIX: fix invalid attribute reference
self.drawing
Version 0.14.1 - 2020-09-19
- Release notes: https://ezdxf.mozman.at/release-v0-14.html
- BUGFIX: MLEADER and MLEADERSTYLE min DXF version changed to R2000
- BUGFIX: AutoCAD ignores not existing default objects in ACDBDICTIONARYWDFLT
and so ezdxf have to.
Auditor()creates a place holder object as default value.
Version 0.14 - 2020-09-12
- Release notes: https://ezdxf.mozman.at/release-v0-14.html
- NEW: DXF attribute setter validation, some special and undocumented Autodesk
table names may raise
ValueError()exceptions, please report this table names (layers, linetypes, styles, ...). DXF unicode notation "\U+xxxx" raises aValueError()if used as resource names like layer name or text style names, such files can only be loaded by the newrecovermodule. - NEW:
ezdxf.recovermodule to load DXF Documents with structural flaws, see docs - NEW: All DXF loading functions accept an unicode decoding error handler:
"surrogateescape", "ignore" or "strict", see docs
of the
recovermodule for more information. - NEW:
addons.drawing.Frontend()supports width attributes of LWPOLYLINE and 2D POLYLINE entities - NEW:
TraceBuilder()a render tool to generate quadrilaterals (TRACE, SOLID or 3DFACE), from LWPOLYLINE or 2D POLYLINE with width information, see docs - NEW:
Path()a render tool for paths build of lines and cubic Bezier curves, used for faster rendering of LWPOLYLINE, POLYLINE and SPLINE entities for render back-ends, see docs - NEW:
drawing.matplotlib.qsave()function, a simplified matplotlib export interface - NEW:
Arc.construction_tool()returns the 2DConstructionArc() - NEW:
Arc.apply_construction_tool()apply parameters fromConstructionArc() - NEW:
Leader.virtual_entities()yields 'virtual' DXF primitives - NEW:
Leader.explode()explode LEADER as DXF primitives into target layout - NEW:
LWPolyline.has_widthproperty isTrueif any width attribute is set - NEW:
Polyline.has_widthproperty isTrueif any width attribute is set - NEW:
Polyline.audit()extended verify and repair support - NEW:
Polyline.append_formatted_vertices(), support for user defined point format - NEW:
DXFVertex.format()support for user defined point format - NEW:
Drawing.blocks.purge()delete all unused blocks but protect modelspace- and paperspace layouts, special arrow blocks and DIMENSION and ACAD_TABLE blocks in use, but see also warning in the docs - NEW:
Insert.explode()support for MINSERT (multi insert) - NEW:
Insert.virtual_entities()support for MINSERT (multi insert) - NEW:
Insert.mcountproperty returns multi insert count - NEW:
Insert.multi_insert()yields a virtual INSERT entity for each grid element of a MINSERT entity - NEW:
Layout.add_wipeout()interface to create WIPEOUT entities - NEW:
Image.boundary_path_wcs(), returns boundary path in WCS coordinates - NEW:
Wipeout.boundary_path_wcs(), returns boundary path in WCS coordinates - NEW:
Wipeout.set_masking_area() - NEW:
BSpline.is_clampedproperty isTruefor a clamped (open) B-spline - NEW:
UCS.transform()general transformation interface - NEW:
Bezier4P.transform()general transformation interface - NEW:
Bezier4P.reverse()returns object with reversed control point order - NEW:
Bezier.transform()general transformation interface - NEW:
Bezier.reverse()returns object with reversed control point order - NEW:
has_clockwise_orientation(vertices)returnsTrueif the closed polygon of 2D vertices has clockwise orientation - NEW:
DXFEntity.new_extension_dict(), create explicit a new extension dictionary - NEW:
ezdxf.reorder, support module to implement modified entities redraw order - NEW: get DXF test file path from environment variable
EZDXF_TEST_FILES, imported automatically asezdxf.EZDXF_TEST_FILES - NEW:
arc_chord_length()andarc_segment_count()tool functions inezdxf.math - NEW:
Drawing.encode()to encode unicode strings with correct encoding and error handler - NEW:
ezdxf.has_dxf_unicode()to detect "\U+xxxx" encoded chars - NEW:
ezdxf.decode_dxf_unicode()to decode strings containing
"\U+xxxx" encoded chars, the newrecovermodule decodes such strings automatically. - CHANGE:
DXFEntity.get_extension_dict(), raisesAttributeErrorif entity has no extension dictionary - CHANGE:
DXFEntity.has_extension_dictis now a property not a method - CHANGE:
linspace()usesDecimal()for precise calculations, but still returns an iterable offloat - CHANGE:
Drawing.blocks.delete_all_blocks(), unsafe mode is disabled and argumentsafeis deprecated, will be removed in v0.16 - CHANGE: Dictionary raise
DXFValueErrorfor adding invalid handles - CHANGE:
BaseLayout.add_entity()will bind entity automatically to doc/db if possible - CHANGE: handle all layout names as case insensitive strings:
Model == MODEL - REMOVE:
option.check_entity_tag_structure, entity check is done only in recover mode - REMOVE:
legacy_modeinezdxf.read()andezdxf.readfile(), use theezdxf.recovermodule to load DXF Documents with structural flaws - REMOVE: Alias
DXFEntity.drawinguseDXFEntity.doc - REMOVE:
DXFEntity.entitydb - REMOVE:
DXFEntity.dxffactory - REMOVE:
DXFInvalidLayerName, replaced byDXFValueError - REMOVE:
Image.get_boundary_path(), replaced by propertyImage.boundary_path - REMOVE:
Image.get_image_def(), replaced by propertyImage.image_def - REMOVE:
filter_stackargument inezdxf.read()andezdxf.readfile() - BUGFIX: Set
non-constant-attribsflag (2) in BLOCK at DXF export if non constant ATTDEF entities are present. - BUGFIX: DXF R2018 -
HATCHextrusion vector (210) is mandatory? - BUGFIX: Layout names are case insensitive; "MODEL" == "Model"
- BUGFIX: Using "surrogateescape" error handler to preserve binary data in ASCII DXF files. Prior versions of ezdxf corrupted this data by using the "ignore" error handler; Example file with binary data in XRECORD is not valid for TrueView 2020 - so binary data is maybe not allowed.
Version 0.13.1 - 2020-07-18
- Release notes: https://ezdxf.mozman.at/release-v0-13.html
- BUGFIX: remove white space from structure tags like
"SECTION " - BUGFIX:
MeshBuilder.from_polyface()processing error of POLYMESH entities
Version 0.13 - 2020-07-04
- Release notes: https://ezdxf.mozman.at/release-v0-13.html
- NEW: general transformation interface:
DXFGraphic.transform(m), transform entity by a transformation matrixminplace - NEW: specialized entity transformation interfaces:
DXFGraphic.translate(dx, dy, dz)DXFGraphic.scale(sx, sy, sz)DXFGraphic.scale_uniform(s)DXFGraphic.rotate_axis(axis, angle)DXFGraphic.rotate_x(angle)DXFGraphic.rotate_y(angle)DXFGraphic.rotate_z(angle)
- NEW: drawing add-on by Matt Broadway is a translation layer to send DXF data to a render backend, supported backends for now: matplotlib and PyQt5, both packages are optional and not required to install ezdxf.
- NEW:
DXFGraphic.unlink_from_layout()to unlink entity from associated layout - NEW:
Arc.angles(num), yieldsnumangles from start- to end angle in counter clockwise order - NEW:
Circle.to_ellipse(), convert CIRCLE/ARC to ELLIPSE entity - NEW:
Circle.to_spline(), convert CIRCLE/ARC to SPLINE entity - NEW:
Ellipse.params(num), yieldsnumparams from start- to end param in counter clockwise order - NEW:
Ellipse.construction_tool(), return ellipse data asConstructionEllipse() - NEW:
Ellipse.apply_construction_tool(), applyConstructionEllipse()data - NEW:
Ellipse.to_spline(), convert ELLIPSE to SPLINE entity - NEW:
Ellipse.from_arc(), create a new ELLIPSE entity from CIRCLE or ARC entity (constructor) - NEW:
Spline.construction_tool(), return spline data asezdxf.math.BSpline() - NEW:
Spline.apply_construction_tool(), applyezdxf.math.BSpline()data - NEW:
Spline.from_arc(), create a new SPLINE entity from CIRCLE, ARC or ELLIPSE entity (constructor) - NEW:
Hatch.set_pattern_scale()to set scaling of pattern definition - NEW:
Hatch.set_pattern_angle()to set rotation angle of pattern definition - NEW:
Hatch.paths.polyline_to_edge_paths()convert polyline paths with bulge values to edge paths with lines and arcs - NEW:
Hatch.paths.arc_edges_to_ellipse_edges()convert arc edges to ellipse edges - NEW:
Hatch.paths.ellipse_edges_to_spline_edges()convert ellipse edges to spline edges - NEW:
Hatch.paths.all_to_spline_edges()convert all curves to approximated spline edges - NEW:
Hatch.paths.all_to_line_edges()convert all curves to approximated line edges - NEW:
Text.plain_text()returns text content without formatting codes - NEW:
ezdxf.math.ConstructionEllipse() - NEW:
ezdxf.math.linspace()likenumpy.linspace() - NEW:
ezdxf.math.global_bspline_interpolation()supports start- and end tangent constraints - NEW:
ezdxf.math.estimate_tangents()curve tangent estimator for given fit points - NEW:
ezdxf.math.estimate_end_tangent_magnitude()curve end tangent magnitude estimator for given fit points - NEW:
ezdxf.math.rational_bspline_from_arc()returns a rational B-spline for a circular arc - NEW:
ezdxf.math.rational_bspline_from_ellipse()returns a rational B-spline for an elliptic arc - NEW:
ezdxf.math.local_cubic_bspline_interpolation() - NEW:
ezdxf.math.cubic_bezier_from_arc()returns an approximation for a circular 2D arc by multiple cubic Bezier curves - NEW:
ezdxf.math.cubic_bezier_from_ellipse()returns an approximation for an elliptic arc by multiple cubic Bezier curves - NEW:
ezdxf.math.cubic_bezier_interpolation()returns an interpolation curve for arbitrary data points as multiple cubic Bezier curves - NEW:
ezdxf.math.LUDecompositionlinear equation solver, for more linear algebra tools see moduleezdxf.math.linalg - NEW:
ezdxf.render.random_2d_path()generate random 2D path for testing purpose - NEW:
ezdxf.render.random_3d_path()generate random 3D path for testing purpose - NEW:
BSpline()uses normalized knot vector for 'clamped' curves by default (open uniform knots) - NEW:
BSpline.points()compute multiple points - NEW:
BSpline.derivative()compute point and derivative up to n <= degree - NEW:
BSpline.derivatives()compute multiple points and derivatives up to n <= degree - NEW:
BSpline.params()return evenly spaced B-spline params from start- to end param - NEW:
BSpline.reverse()returns a new reversed B-spline - NEW:
BSpline.from_arc()B-spline from an arc, best approximation with a minimum number of control points - NEW:
BSpline.from_ellipse()B-spline from an ellipse, best approximation with a minimum number of control points - NEW:
BSpline.from_fit_points()B-spline from fit points - NEW:
BSpline.arc_approximation()B-spline approximation from arc vertices as fit points - NEW:
BSpline.ellipse_approximation()B-spline approximation from ellipse vertices as fit points - NEW:
BSpline.transform()transform B-spline by transformation matrix inplace - NEW:
BSpline.transform()transform B-spline by transformation matrix inplace - NEW:
BSpline.to_nurbs_python_curve()andBSpline.from_nurbs_python_curve(), interface to NURBS-Python,NURBS-Pythonis now a testing dependency - NEW:
BSpline.bezier_decomposition()decompose a non-rational B-spline into multiple Bezier curves - NEW:
BSpline.cubic_bezier_approximation()approximate any B-spline by multiple cubic Bezier curves - NEW:
Bezier.points()compute multiple points - NEW:
Bezier.derivative()compute point, 1st and 2nd derivative for one parameter - NEW:
Bezier.derivatives()compute point and derivative for multiple parameters - CHANGE:
Hatchfull support for rotated patterns. - CHANGE:
Hatch.set_pattern_definition()added argumentanglefor pattern rotation. - CHANGE:
Hatch.path.add_arcrenamed argumentis_counter_clockwisetoccw, typeboolandTrueby default - CHANGE:
Hatch.path.add_ellipserenamed argumentis_counter_clockwisetoccw, typeboolandTrueby default - CHANGE: renamed 2D
ConstructionXXX.move()methods totranslate() - CHANGE: renamed old
Insert.scale()toInsert.set_scale(), name conflict with transformation interface - CHANGE: renamed
Spline.set_periodic()toSpline.set_closed() - CHANGE: renamed
Spline.set_periodic_rational()toSpline.set_closed_rational() - CHANGE: renamed
ezdxf.math.bspline_control_frame()toezdxf.math.global_bspline_interpolation() - REMOVED:
ezdxf.math.Matrix33class,UCSandOCSusesMatrix44for transformations - REMOVED:
ezdxf.math.BRCSclass andInsert.brcs() - REMOVED:
ezdxf.math.ConstructionToolbase class - REMOVED:
ezdxf.math.normalize_angle(angle), replace call by expression:angle % math.tau - REMOVED:
ezdxf.math.DBSpline, integrated asBSpline.derivatives() - REMOVED:
ezdxf.math.DBSplineU, integrated asBSplineU.derivatives() - REMOVED:
ezdxf.math.DBSplineClosed, integrated asBSplineClosed.derivatives() - REMOVED:
ezdxf.math.DBezier, integrated asBezier.derivatives() - REMOVED:
BaseLayout.add_spline_approx(), incorrect and nobody noticed it - so it's not really needed, if required use thegeomdl.fitting.approximate_curve()function from the package NURBS-Python, see exampleusing_nurbs_python.py - REMOVED:
ezdxf.math.bspline_control_frame_approx(), incorrect and nobody noticed it - so it's not really needed - DEPRECATED:
DXFGraphic.transform_to_wcs(ucs), replace call byDXFGraphic.transform(ucs.matrix) - DEPRECATED:
non_uniform_scalingargument forInsert.explode() - DEPRECATED:
non_uniform_scalingargument forInsert.virtual_entities() - DEPRECATED: getter and edit methods in
Hatchfor attributespaths,gradient,patternandseeds - DEPRECATED:
Spline.edit_data()all attributes accessible by properties - BUGFIX:
ezdxf.math.intersection_ray_ray_3d() - BUGFIX:
Spline.set_periodic()created invalid data for BricsCAD - misleading information by Autodesk
Version 0.12.5 - 2020-06-05
- BUGFIX: DXF export error for hatches with rational spline edges
Version 0.12.4 - 2020-05-22
- BUGFIX: structure validator for XRECORD
Version 0.12.3 - 2020-05-16
- BUGFIX: DXF R2010+ requires zero length tag 97 for HATCH/SplineEdge if no fit points exist (vshu3000)
- BUGFIX: Export order of XDATA and embedded objects (vshu3000)
- BUGFIX: ATTRIB and ATTDEF did not load basic DXF attributes
- NEW:
BlockLayout()propertiescan_explodeandscale_uniformly - NEW:
Hatch.remove_association()
Version 0.12.2 - 2020-05-03
- BUGFIX:
XData.get()now raisesDXFValueErrorfor not existing appids, like all other methods of theXData()class - BUGFIX:
Layer.descriptionreturns an empty string for unknown XDATA structure inAcAecLayerStandard - BUGFIX: Initialize/Load
Hatchedge coordinates asVec2()objects - BUGFIX: typo in 3 point angular dimension subclass marker (vshu3000)
- BUGFIX: HATCH/SplineEdge did export length tag 97 if no fit points exist, creates invalid DXF for AutoCAD/BricsCAD (vshu3000)
- BUGFIX: Ellipse handling in
virtual_block_reference_entities()(Matt Broadway)
Version 0.12.1 - 2020-04-25
- BUGFIX: fixed uniform scaled ellipse handling in
explode.virtual_block_reference_entities() - BUGFIX: fixed crash caused by floating point inaccuracy in
Vector.angle_between()(Matt Broadway) - BUGFIX: fixed crash for axis transformation of nearly perpendicular ellipse axis
- BUGFIX: fixed
Hatch.has_critical_elements()
Version 0.12 - 2020-04-12
- Release notes: https://ezdxf.mozman.at/release-v0-12.html
- NEW:
Insert.block()returns associatedBlockLayout()orNoneif block not exist or is an XREF - NEW:
Insert.has_scalingreturnsTrueif any axis scaling is applied - NEW:
Insert.has_uniform_scalingreturnsTrueif scaling is uniform in x-, y- and z-axis. - NEW:
Insert.scale(factor)set uniform scaling. - NEW:
Insert.virtual_entities()yields 'virtual' entities of a block reference (experimental) - NEW:
Insert.explode()explode block reference entities into target layout (experimental) - NEW:
Insert.add_auto_attribs()add ATTRIB entities defined as ATTDEF in the block layout and fill tags with values defined by adict(experimental) - NEW:
LWPolyline.virtual_entities()yields 'virtual' LINE and ARC entities - NEW:
LWPolyline.explode()explode LWPOLYLINE as LINE and ARC entities into target layout - NEW:
Polyline.virtual_entities()yields 'virtual' LINE, ARC or 3DFACE entities - NEW:
Polyline.explode()explode POLYLINE as LINE, ARC or 3DFACE entities into target layout - NEW:
Dimension.virtual_entities()yields 'virtual' DXF entities - NEW:
Dimension.explode()explode DIMENSION as basic DXF entities into target layout - NEW:
Dimension.transform_to_wcs()support for UCS based entity transformation - NEW:
Dimension.override()returnsDimStyleOverride()object - NEW:
Dimension.render()render graphical representation as anonymous block - NEW:
Block()propertiesis_anonymous,is_xrefandis_xref_overlay - NEW:
R12FastStreamWriter.add_polyline_2d(), add 2D POLYLINE with start width, end width and bulge value support - NEW:
Ellipse.minor_axisproperty returns minor axis asVector - NEW: Option
ezdxf.options.write_fixed_meta_data_for_testing, writes always same timestamps and GUID - NEW: Support for loading and exporting proxy graphic encoded as binary data, by default disabled
- NEW:
ezdxf.proxygraphic.ProxyGraphic()class to examine binary encoded proxy graphic (Need more example data for testing!) - NEW: Get/set hyperlink for graphic entities
- NEW:
odafcadd-on to use an installed ODA File Converter for reading and writing DWG files - NEW: Support for reading and writing Binary DXF files
- NEW: Binary DXF support for
r12writeradd-on - CHANGE:
R12FastStreamWriter.add_polyline(), add 3D POLYLINE only, closed flag support - CHANGE: renamed
Insert.ucs()toInsert.brcs()which now returns aBRCS()object - CHANGE:
Polyline.close(),Polyline.m_close()andPolyline.n_close()can set and clear closed state. - BUGFIX:
Dimension.destroy()should not not destroy associated anonymous block, because if DIMENSION is used in a block, the anonymous block may be used by several block references - BUGFIX: floating point precision error in
intersection_line_line_2d() - BUGFIX: attribute error in
Polyline.transform_to_wcs()for 2d polylines - BUGFIX: LWPOLYLINE was always exported with
const_width=0 - BUGFIX:
Face3d.set_edge_visibility()set inverted state (visible <-> invisible) - BUGFIX: Load
AcDbEntitygroup codes from base class
Version 0.11.2 - 2020-04-03
- BUGFIX: upgrade error from DXF R13/14 to R2000
Version 0.11.1 - 2020-02-29
- NEW:
Meshbuilder.from_polyface()to interface toPOLYFACEandPOLYMESH - NEW:
Meshbuilder.render_polyface()createPOLYFACEobjects - NEW:
MeshAverageVertexMerger()an extended version ofMeshVertexMerger(), location of merged vertices is the average location of all vertices with the same key - NEW:
ezdxf.addons.iterdxfiterate over modelspace entities of really big DXF files (>1 GB) without loading them into memory - NEW:
ezdxf.addons.r12writersupportsPOLYFACEandPOLYMESHentities - NEW:
Layout.add_foreign_entity()copy/move simple entities from another DXF document or add unassigned DXF entities to a layout - NEW:
MText.plain_text()returns text content without formatting codes - CHANGE: refactor Auditor() into a DXF document fixer, fixes will be applied automatically (work in progress)
- CHANGE: moved
r12writerintoaddonssubpackage - CHANGE: moved
acadctbintoaddonssubpackage
Version 0.11 - 2020-02-15
- Release notes: https://ezdxf.mozman.at/release-v0-11.html
- Using standard git branches:
master: development statestable: latest stable release
- Requires Python 3.6
- NEW:
Dimension.get_measurement()supports angular, angular3p and ordinate dimensions - NEW:
Layout.add_radius_dim()implemented - NEW: shortcut calls
Layout.add_radius_dim_2p()andLayout.add_radius_dim_cra() - NEW:
Layout.add_diameter_dim()implemented - NEW: shortcut
Layout.add_diameter_dim_2p() - NEW:
Circle.vertices(angles)yields vertices for iterable angles in WCS - NEW:
Ellipse.vertices(params)yields vertices for iterable params in WCS - NEW: Arc properties
start_pointandend_pointreturns start- and end point of arc in WCS - NEW: Ellipse properties
start_pointandend_pointreturns start- and end point of ellipse in WCS - NEW: user defined point format support for 2d POLYLINE entities:
add_polyline2d([(1, 2, 0.5), (3, 4, 0)], format='xyb') - NEW:
Polyline.append_formatted_points()with user defined point format support - NEW:
Drawing.set_modelspace_vport(height, center)set initial view/zoom location for the modelspace - NEW: support for associating HATCH boundary paths to geometry entities
- NEW:
Drawing.output_encodingreturns required output encoding - NEW: User Coordinate System (UCS) based entity transformation, allows to work with UCS coordinates, which are
simpler if the UCS is chosen wisely, and transform them later into WCS coordinates. Entities which have a
transform_to_wcs(ucs)method, automatically take advantage of the new UCS transformation methods, but not all entity types are supported, embedded ACIS entities like 3DSOLID, REGION, SURFACE and so on, do not expose their geometry. - NEW:
transform_to_wcs(ucs)implemented for: 3DFACE, ARC, ATTDEF, ATTRIB, CIRCLE, ELLIPSE, HATCH, IMAGE, INSERT, LEADER, LINE, LWPOLYLINE, MESH, MTEXT, POINT, POLYLINE, RAY, SHAPE, SOLID, SPLINE, TEXT, TRACE, XLINE - NEW:
UCS.rotate(axis, angle)returns a new UCS rotated around WCS vectoraxis - NEW:
UCS.rotate_local_x(angle)returns a new UCS rotated around local x-axis - NEW:
UCS.rotate_local_y(angle)returns a new UCS rotated around local y-axis - NEW:
UCS.rotate_local_z(angle)returns a new UCS rotated around local z-axis - NEW:
UCS.copy()returns a new copy of UCS - NEW:
UCS.shift(delta)shifts UCS inplace by vectordelta - NEW:
UCS.moveto(location)set new UCS origin tolocationinplace - NEW:
sizeandcenterproperties for bounding box classes - NEW:
Insert.ucs()returns an UCS placed in block referenceinsertlocation, UCS axis aligned to the block axis. - NEW:
Insert.reset_transformation()reset block reference location, rotation and extrusion vector. - CHANGE: renamed
ezdxf.math.left_of_linetoezdxf.math.is_point_left_of_line - NEW:
ezdxf.math.point_to_line_relation()2D function returns-1for left oft line,+1for right oif line ,0on the line - NEW:
ezdxf.math.is_point_on_line_2d()test if 2D point is on 2D line - NEW:
ezdxf.math.distance_point_line_2d()distance of 2D point from 2D line - NEW:
ezdxf.math.is_point_in_polygon_2d()test if 2D point is inside of a 2D polygon - NEW:
ezdxf.math.intersection_line_line_2d()calculate intersection for 2D lines - NEW:
ezdxf.math.offset_vertices_2d()calculate 2D offset vertices for a 2D polygon - NEW:
ezdxf.math.normal_vector_3p()returns normal vector for 3 points - NEW:
ezdxf.math.is_planar_face()test if 3D face is planar - NEW:
ezdxf.math.subdivide_face()linear subdivision for 2D/3D faces/polygons - NEW:
ezdxf.math.intersection_ray_ray_3d()calculate intersection for 3D rays - NEW:
ezdxf.math.Plane()3D plane construction tool - NEW:
ezdxf.render.MeshTransformer()inplace mesh transformation class, subclass ofMeshBuilder() - NEW:
MeshBuilder.render()added UCS support - NEW:
MeshBuilder.render_normals()render face normals as LINE entities, useful to check face orientation - NEW:
ezdxf.render.forms.cone_2p()create 3D cone mesh from two points - NEW:
ezdxf.render.forms.cylinder_2p()create 3D cylinder mesh from two points - NEW:
ezdxf.render.forms.sphere()create 3D sphere mesh - NEW:
pycsgadd-on, a simple Constructive Solid Geometry (CSG) kernel created by Evan Wallace (Javascript) and Tim Knip (Python) - CHANGE: Changed predefined pattern scaling to BricsCAD and AutoCAD standard, set global option
ezdxf.options.use_old_predefined_pattern_scalingto True, to use the old pattern scaling before v0.11 - CHANGE: removed
ezdxf.PATTERNconstant, usePATTERN = ezdxf.pattern.load()instead, set argumentold_pattern=Trueto use the old pattern scaling before v0.11 - CHANGE:
Table.key()accepts only strings, therefore tables checkinaccepts also only strings likeentity.dxf.name - NEW: load DXF comments from file (
ezdxf.comments.from_file) or stream (ezdxf.comments.from_stream) - BUGFIX: fixed incorrect HATCH pattern scaling
- BUGFIX: fixed base point calculation of aligned dimensions
- BUGFIX: fixed length extension line support for linear dimensions
- BUGFIX:
UCS.to_ocs_angle_deg()andUCS.to_ocs_angle_rad() - BUGFIX: check for unsupported DXF versions at
new() - BUGFIX: fixed dxf2src error for the HATCH entity
- BUGFIX:
is_point_left_of_line()algorithm was incorrect - BUGFIX: default
dimtxstyisStandardifoptions.default_dimension_text_styleis not defined - BUGFIX: default arrows for minimal defined dimstyles are closed filled arrows
- BUGFIX: use
Standardas default for undefined dimension styles, e.g.EZDXFwithout setup
Version 0.10.4 - 2020-01-31
- BUGFIX: height group code (40) for TEXT, ATTRIB and ATTDEF is mandatory
Version 0.10.3 - 2020-01-29
- BUGFIX: min DXF version for VISUALSTYLE object is R2000
Version 0.10.2 - 2019-10-05
- NEW:
Dimension.get_measurement()returns the actual dimension measurement in WCS units, no scaling applied; angular and ordinate dimension are not supported yet. - BUGFIX: ordinate dimension exports wrong feature location
- BUGFIX:
Hatch.set_pattern_fill()did not set pattern scale, angle and double values
Version 0.10.1 - 2019-09-07
- BUGFIX: group code for header var $ACADMAINTVER is 90 for DXF R2018+ and 70 for previous DXF versions. This is a critical bug because AutoCAD 2012/2013 (and possibly earlier versions) will not open DXF files with the new group code 90 for header variable $ACADMAINTVER.
Version 0.10 - 2019-09-01
- Release notes: https://ezdxf.mozman.at/release-v0-10.html
- unified entity system for all DXF versions
- saving as later DXF version than the source DXF version is possible, but maybe data loss if saving as an older DXF version than source DXF version (ezdxf is not a DXF converter)
- templates no more needed and removed from package
- CHANGE:
DXFEntity- renamed
DXFEntity.drawingtoDXFEntity.doc DXFEntity.get_xdata()keywordxdata_tagrenamed totagsDXFEntity.set_xdata()keywordxdata_tagrenamed totags- renamed
DXFEntity.remove_reactor_handle()renamed toDXFEntity.discard_reactor_handle() DXFEntity.get_extension_dict()returnsExtensionDictobject instead of the raw DICTIONARY object- renamed
DXFEntity.supports_dxf_attrib()toDXFEntity.is_supported_dxf_attrib() - renamed
DXFEntity.dxf_attrib_exists()toDXFEntity.has_dxf_attrib()
- renamed
- CHANGE:
Layerentity- removed
Layer.dxf.line_weightas synonym forLayer.dxf.lineweight - renamed
Layer.dxf.plot_style_nametoLayer.dxf.plotstyle_handle - renamed
Layer.dxf.materialtoLayer.dxf.material_handle
- removed
- CHANGE: same treatment of
Viewportentity for all DXF versions - CHANGE:
Polyline.vertices()is now an attributePolyline.vertices, implemented as regular Python list. - CHANGE:
Insert.attribs()is now an attributeInsert.attribs, implemented as regular Python list. - CHANGE: renamed
Viewport.dxf.center_pointtoViewport.dxf.center - CHANGE: renamed
Viewport.dxf.target_pointtoViewport.dxf.target - CHANGE: direct access to hatch paths (
Hatch.paths), pattern (Hatch.pattern) and gradient (Hatch.gradient), context manager to edit this data is not needed anymore, but still available for backward compatibility - CHANGE: Options
- removed
template_dir, no more needed - new
log_unprocessed_tagsto log unprocessed (unknown) DXF tags
- removed
- CHANGE:
Dimension()removes associated anonymous dimension block at deletion - CHANGE: safe block deletion protects not explicit referenced blocks like anonymous dimension blocks and arrow blocks
- CHANGE:
Importeradd-on rewritten, API incompatible to previous ezdxf versions, but previous implementation was already broken - CHANGE: moved
add_attdef()to generic layout interface, adding ATTDEF to model- and paperspace is possible - CHANGE: entity query - exclude DXF types from
'*'search, by appending type name with a preceding '!' e.g. query for all entities except LINE ="* !LINE" - CHANGE: entity query - removed regular expression support for type name match
- CHANGE: integration of
MTextDatamethods intoMText - CHANGE: removed
edit_data,get_text,set_textmethods fromMText - restructured package, module and test file organization
- NEW: support for
Layer.dxf.true_colorandLayer.dxf.transparencyattributes (DXF R2004+, undocumented) - NEW:
Layer.rgb,Layer.color,Layer.descriptionandLayer.transparencyproperties - NEW: renaming a
Layeralso renames references to this layer, but use with care - NEW: support for adding LEADER entities
- NEW:
Dimension.get_geometry_block(), returns the associated anonymous dimension block orNone - NEW:
EntityQuery()gotfirstandlastproperties, to get first or last entity orNoneif query result is empty - NEW: added
ngon(),star()andgear()toezdxf.render.forms - NEW: Source code generator to create Python source code from DXF entities, to recreate this entities by ezdxf. This tool creates only simple structures as a useful starting point for parametric DXF entity creation from existing DXF files. Not all DXF entities are supported!
- NEW: support for named plot style files (STB)
- NEW: can open converted Gerber DXF files tagged as "Version 1.0, Gerber Technology."
- BUGFIX: fixed MTEXT and GEODATA text splitting errors (do not split at '^')
- BUGFIX: fixed some subclass errors, mostly DXF reference errors
- BUGFIX: VERTEX entity inherit
ownerandlinetypeattribute from POLYLINE entity - BUGFIX: MTEXT - replacement of
\nby\Pat DXF export to avoid invalid DXF files. - tested with CPython 3.8
- removed batch files (.bat) for testing, use
toxcommand instead
Version 0.9 - 2019-02-24
- Release notes: https://ezdxf.mozman.at/release-v0-9.html
- IMPORTANT: Python 2 support REMOVED, if Python 2 support needed: add
ezdxf<0.9to yourrequirements.txt - NEW: testing on Manjaro Linux in a VM by tox
- CHANGE: converted NEWS.rst to NEWS.md and README.rst to README.md
- CHANGE: moved
Importer()fromezdxf.toolstoezdxf.addons- internal structures of modern DXF files are too complex and too undocumented to support importing data in a reliable way - usingImporter()may corrupt your DXF files or just don't work! - NEW: type annotations to core package and add-ons.
- NEW: argument
setupinezdxf.new('R12', setup=True)to setup default line types, text styles and dimension styles, this feature is disabled by default. - NEW: Duplicate table entries:
dwg.styles.duplicate_entry('OpenSans', new_name='OpenSansNew'), this works for all tables, but is intended to duplicate STYLES and DIMSTYLES. - CHANGED: replaced proprietary fonts in style declarations by open source fonts
- NEW: open source fonts to download https://github.com/mozman/ezdxf/tree/master/fonts
- OpenSansCondensed-Light font used for default dimension styles
- NEW: subpackage
ezdxf.render, because of DIMENSION rendering - NEW: support for AutoCAD standard arrows
- NEW: support for creating linear DIMENSION entities
- NEW: background color support for MTEXT
- CHANGE: DXF template cleanup, removed non standard text styles, dimension styles, layers and blocks
- CHANGE: text style STANDARD uses
txtfont - CHANGE: renamed subpackage
ezdxf.algebratoezdxf.math - CHANGE: moved
addons.curvestorender.curves - CHANGE: moved
addons.meshtorender.mesh - CHANGE: moved
addons.r12splinetorender.r12spline - CHANGE: moved
addons.formstorender.forms - CHANGE: renamed construction helper classes into Construction...()
Ray2D()renamed toConstructionRay()Circle()renamed toConstructionCircle()Arc()renamed toConstructionArc()
- NEW: construction tools
ConstructionLine()andConstructionBox() - REMOVED:
almost_equalusemath.isclose - REMOVED:
almost_equal_pointsuseezdxf.math.is_close_points - BUGFIX: closed LWPOLYLINE did not work in AutoCAD (tag order matters), introduced with v0.8.9 packed data structure
- BUGFIX:
UCS.to_ocs_angle_deg()corrected
Version 0.8.9 - 2018-11-28
-
Release notes: https://ezdxf.mozman.at/release-v0-8-9.html
-
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 points, faster
__getitem__; added__setitem__,__delitem__,insert()andappend()methods; renameddiscard_points()inclear(); removedget_rstrip_points()and ctx managerrstrip_points(); user defined point format; -
NEW: packed data for SPLINE, knots, weights, fit- and control points are stored as
array.array();Spline.get_knot_values(),Spline.get_weights(),Spline.get_control_points()andSpline.get_fit_points()are deprecated, direct access to this attributes bySpline.knot_values,Spline.weights,Spline.control_pointsandSpline.fit_points, all attributes with a list-like interface. Knot, control point and fit point counter updated automatically, therefore counters are read only now. -
NEW: packed data for MESH, vertices, faces, edges and edge crease values stored as
array.array(), high level interface unchanged -
NEW:
Drawing.layouts_and_blocks(), iterate over all layouts (mode space and paper space) and all block definitions. -
NEW:
Drawing.chain_layouts_and_blocks(), chain entity spaces of all layouts and blocks. Yields an iterator for all entities in all layouts and blocks -
NEW:
Drawing.query(), entity query over all layouts and blocks -
NEW:
Drawing.groupby(), groups DXF entities of all layouts and blocks by an DXF attribute or a key function -
NEW:
Layout.set_redraw_order()andLayout.get_redraw_order(), to change redraw order of entities in model space and paper space layouts -
NEW:
BlockLayout.is_layout_block,Trueif block is a model space or paper space block definition -
NEW:
ezdxf.algebra.Archelper class to create arcs from 2 points and an angle or radius, or from 3 points -
NEW:
ezdxf.algebra.Arc.add_to_layout()with UCS support to create 3D arcs -
NEW: rename paper space layouts by
Drawing.layouts.rename(old_name, new_name) -
NEW: 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.
-
CHANGE:
Drawing.blocks.delete_block(name, safe=True), new parameter save, check if block is still referenced (raisesDXFValueError) -
CHANGE:
Drawing.blocks.delete_all_blocks(safe=True), if parameter safe isTrue, do not delete blocks that are still referenced -
BUGFIX: invalid CLASS definition for DXF version R2000 (AC1015) fixed, bug was only triggered at upgrading from R13/R14 to R2000
-
BUGFIX: fixed broken
Viewport.AcDbViewportproperty -
BASIC read support for many missing DXF entities/objects
- ACAD_PROXY_GRAPHIC
- HELIX
- LEADER
- LIGHT
- MLEADER (incomplete)
- MLINE (incomplete)
- OLEFRAME
- OLE2FRAME
- SECTION
- TABLE (incomplete)
- TOLERANCE
- WIPEOUT
- ACAD_PROXY_OBJECT
- DATATABLE
- DICTIONARYVAR
- DIMASSOC
- FIELD (incomplete)
- FIELDLIST (not documented by Autodesk)
- IDBUFFER
- LAYER_FILTER
- MATERIAL
- MLEADERSTYLE
- MLINESTYLE
- SORTENTSTABLE
- SUN
- 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)
- VISUALSTYLE
- WIPEOUTVARIABLES
- for all unsupported entities/objects exist only raw DXF tag support
Version 0.8.8 - 2018-04-02
- Release notes: https://ezdxf.mozman.at/release-v0-8-8.html
- NEW: read/write support for GEODATA entity
- NEW: read/(limited)write support for SURFACE, EXTRUDEDSURFACE, REVOLVEDSURFACE, LOFTEDSURFACE and SWEPTSURFACE entity
- NEW: support for extension dictionaries
- NEW:
add_spline_control_frame(), create and add B-spline control frame from fit points - NEW:
add_spline_approx(), approximate B-spline by a reduced count of control points - NEW:
ezdxf.setup_linetypes(dwg), setup standard line types - NEW:
ezdxf.setup_styles(dwg), setup standard text styles - NEW:
LWPolyline.vertices()yields all points as(x, y)tuples in OCS,LWPolyline.dxf.elevationis the z-axis value - NEW:
LWPolyline.vertices_in_wcs()yields all points as(x, y, z)tuples in WCS - NEW: basic
__str__()and__repr__()support for DXF entities, returns just DXF type and handle - NEW: bulge related function in module
ezdxf.algebra.bulge - NEW: Object Coordinate System support by
DXFEntity.ocs()andOCS()class in module ezdxf.algebra - NEW: User Coordinate System support by
UCS()class in moduleezdxf.algebra - CHANGE:
DXFEntity.set_app_data()andEntity.set_xdataaccept also list of tuples as tags,DXFTag()is not required - BUGFIX: entity structure validator excepts group code >= 1000 before XDATA section (used in AutoCAD Civil 3D and AutoCAD Map 3D)
Version 0.8.7 - 2018-03-04
- Release notes: https://ezdxf.mozman.at/release-v0-8-7.html
- NEW: entity.get_layout() returns layout in which entity resides or None if unassigned
- NEW: copy any DXF entity by entity.copy() without associated layout, add copy to any layout you want, by layout.add_entity().
- NEW: copy entity to another layout by entity.copy_to_layout(layout)
- NEW: move entity from actual layout to another layout by entity.move_to_layout(layout)
- NEW: support for splines by control points: add_open_spline(), add_closed_spline(), add_rational_spline(), add_closed_rational_spline()
- NEW: bspline_control_frame() calculates B-spline control points from fit points, but not the same as AutoCAD
- NEW: R12Spline add-on, 2d B-spline with control frame support by AutoCAD, but curve is just an approximated POLYLINE
- NEW: added entity.get_flag_state() and entity.set_flag_state() for easy access to binary coded flags
- NEW: set new $FINGERPRINTGUID for new drawings
- NEW: set new $VERSIONGUID on saving a drawing
- NEW: improved IMAGE support, by adding RASTERVARIABLES entity, use Drawing.set_raster_variables(frame, quality, units)
- BUGFIX: closing user defined image boundary path automatically, else AutoCAD crashes
Version 0.8.6 - 2018-02-17
- Release notes: https://ezdxf.mozman.at/release-v0-8-6.html
- NEW: ezdxf project website: https://ezdxf.mozman.at/
- CHANGE: create all missing tables of the TABLES sections for DXF R12
- BUGFIX: entities on new layouts will be saved
- NEW: Layout.page_setup() and correct 'main' viewport for DXF R2000+; For DXF R12 page_setup() exists, but does not provide useful results. Page setup for DXF R12 is still a mystery to me.
- NEW: Table(), MText(), Ellipse(), Spline(), Bezier(), Clothoid(), LinearDimension(), RadialDimension(), ArcDimension() and AngularDimension() composite objects from dxfwrite as add-ons, these add-ons support DXF R12
- NEW: geometry builder as add-ons: MeshBuilder(), MeshVertexMerger(), MengerSponge(), SierpinskyPyramid(), these add-ons require DXF R2000+ (MESH entity)
- BUGFIX: fixed invalid implementation of context manager for r12writer
Version 0.8.5 - 2018-01-28
- Release notes: https://ezdxf.mozman.at/release-v0-8-5.html
- CHANGE: block names are case insensitive 'TEST' == 'Test' (like AutoCAD)
- CHANGE: table entry (layer, linetype, style, dimstyle, ...) names are case insensitive 'TEST' == 'Test' (like AutoCAD)
- CHANGE: raises DXFInvalidLayerName() for invalid characters in layer names: <>/":;?*|=`
- CHANGE: audit process rewritten
- CHANGE: skip all comments, group code 999
- CHANGE: removed compression for unused sections (THUMBNAILSECTION, ACDSDATA)
- NEW: write DXF R12 files without handles: set dwg.header['$HANDLING']=0, default value is 1
- added subclass marker filter for R12 and prior files in legacy_mode=True (required for malformed DXF files)
- removed special check for Leica Disto Unit files, use readfile(filename, legacy_mode=True) (malformed DXF R12 file, see previous point)
Version 0.8.4 - 2018-01-14
-
Release notes: https://ezdxf.mozman.at/release-v0-8-4.html
-
NEW: Support for complex line types with text or shapes
-
NEW: DXF file structure validator at SECTION level, tags outside of sections will be removed
-
NEW: Basic read support for DIMENSION
-
CHANGE: improved exception management, in the future ezdxf should only raise exceptions inherited from DXFError for DXF related errors, previous exception classes still work
- DXFValueError(DXFError, ValueError)
- DXFKeyError(DXFError, KeyError)
- DXFAttributeError(DXFError, AttributeError)
- DXFIndexError(DXFError, IndexError)
- DXFTableEntryError(DXFValueError)
-
speedup low level tag reader around 5%, and speedup tag compiler around 5%
Version 0.8.3 - 2018-01-02
- CHANGE: Lwpolyline - suppress yielding z coordinates if they exists (DXFStructureError: z coordinates are not defined in the DXF standard)
- NEW: setup creates a script called 'dxfpp' (DXF Pretty Printer) in the Python script folder
- NEW: basic support for DXF format AC1032 introduced by AutoCAD 2018
- NEW: ezdxf use logging and writes all logs to a logger called 'ezdxf'. Logging setup is the domain of the application!
- NEW: warns about multiple block definitions with the same name in a DXF file. (DXFStructureError)
- NEW: legacy_mode parameter in ezdxf.read() and ezdxf.readfile(): tries do fix coordinate order in LINE entities (10, 11, 20, 21) by the cost of around 5% overall speed penalty at DXF file loading
Version 0.8.2 - 2017-05-01
- NEW: Insert.delete_attrib(tag) - delete ATTRIB entities from the INSERT entity
- NEW: Insert.delete_all_attribs() - delete all ATTRIB entities from the INSERT entity
- BUGFIX: setting attribs_follow=1 at INSERT entity before adding an attribute entity works
Version 0.8.1 - 2017-04-06
- NEW: added support for constant ATTRIB/ATTDEF to the INSERT (block reference) entity
- NEW: added ATTDEF management methods to BlockLayout (has_attdef, get_attdef, get_attdef_text)
- NEW: added (read/write) properties to ATTDEF/ATTRIB for setting flags (is_const, is_invisible, is_verify, is_preset)
Version 0.8.0 - 2017-03-28
- added groupby(dxfattrib='', key=None) entity query function, it is supported by all layouts and the query result container: Returns a dict, where entities are grouped by a dxfattrib or the result of a key function.
- added ezdxf.audit() for DXF error checking for drawings created by ezdxf - but not very capable yet
- dxfattribs in factory functions like add_line(dxfattribs=...), now are copied internally and stay unchanged, so they can be reused multiple times without getting modified by ezdxf.
- removed deprecated Drawing.create_layout() -> Drawing.new_layout()
- removed deprecated Layouts.create() -> Layout.new()
- removed deprecated Table.create() -> Table.new()
- removed deprecated DXFGroupTable.add() -> DXFGroupTable.new()
- BUGFIX in EntityQuery.extend()
Version 0.7.9 - 2017-01-31
- BUGFIX: lost data if model space and active layout are called *MODEL_SPACE and *PAPER_SPACE
Version 0.7.8 - 2017-01-22
- BUGFIX: HATCH accepts SplineEdges without defined fit points
- BUGFIX: fixed universal line ending problem in ZipReader()
- Moved repository to GitHub: https://github.com/mozman/ezdxf.git
Version 0.7.7 - 2016-10-22
- NEW: repairs malformed Leica Disto DXF R12 files, ezdxf saves a valid DXF R12 file.
- NEW: added Layout.unlink(entity) method: unlinks an entity from layout but does not delete entity from the drawing database.
- NEW: added Drawing.add_xref_def(filename, name) for adding external reference definitions
- CHANGE: renamed parameters for EdgePath.add_ellipse() - major_axis_vector -> major_axis; minor_axis_length -> ratio to be consistent to the ELLIPSE entity
- UPDATE: Entity.tags.new_xdata() and Entity.tags.set_xdata() accept tuples as tags, no import of DXFTag required
- UPDATE: EntityQuery to support both 'single' and "double" quoted strings - Harrison Katz harrison@neadwerx.com
- improved DXF R13/R14 compatibility
Version 0.7.6 - 2016-04-16
- NEW: r12writer.py - a fast and simple DXF R12 file/stream writer. Supports only LINE, CIRCLE, ARC, TEXT, POINT, SOLID, 3DFACE and POLYLINE. The module can be used without ezdxf.
- NEW: Get/Set extended data on DXF entity level, add and retrieve your own data to DXF entities
- NEW: Get/Set app data on DXF entity level (not important for high level users)
- NEW: Get/Set/Append/Remove reactors on DXF entity level (not important for high level users)
- CHANGE: using reactors in PdfDefinition for well defined UNDERLAY entities
- CHANGE: using reactors and IMAGEDEF_REACTOR for well defined IMAGE entities
- BUGFIX: default name=None in add_image_def()
Version 0.7.5 - 2016-04-03
- NEW: Drawing.acad_release property - AutoCAD release number for the drawing DXF version like 'R12' or 'R2000'
- NEW: support for PDFUNDERLAY, DWFUNDERLAY and DGNUNDERLAY entities
- BUGFIX: fixed broken layout setup in repair routine
- BUGFIX: support for utf-8 encoding on saving, DXF R2007 and later is saved with UTF-8 encoding
- CHANGE: Drawing.add_image_def(filename, size_in_pixel, name=None), renamed key to name and set name=None for auto-generated internal image name
- CHANGE: argument order of Layout.add_image(image_def, insert, size_in_units, rotation=0., dxfattribs=None)
Version 0.7.4 - 2016-03-13
- NEW: support for DXF entity IMAGE (work in progress)
- NEW: preserve leading file comments (tag code 999)
- NEW: writes saving and upgrading comments when saving DXF files; avoid this behavior by setting options.store_comments = False
- NEW: ezdxf.new() accepts the AutoCAD release name as DXF version string e.g. ezdxf.new('R12') or R2000, R2004, R2007, ...
- NEW: integrated acadctb.py module from my dxfwrite package to read/write AutoCAD .ctb config files; no docs so far
- CHANGE: renamed Drawing.groups.add() to new() for consistent name schema for adding new items to tables (public interface)
- CHANGE: renamed Drawing..create() to new() for consistent name schema for adding new items to tables, this applies to all tables: layers, styles, dimstyles, appids, views, viewports, ucs, block_records. (public interface)
- CHANGE: renamed Layouts.create() to new() for consistent name schema for adding new items to tables (internal interface)
- CHANGE: renamed Drawing.create_layout() to new_layout() for consistent name schema for adding new items (public interface)
- CHANGE: renamed factory method .add_3Dface() to add_3dface()
- REMOVED: logging and debugging options
- BUGFIX: fixed attribute definition for align_point in DXF entity ATTRIB (AC1015 and newer)
- Cleanup DXF template files AC1015 - AC1027, file size goes down from >60kb to ~20kb
Version 0.7.3 - 2016-03-06
- Quick bugfix release, because ezdxf 0.7.2 can damage DXF R12 files when saving!!!
- NEW: improved DXF R13/R14 compatibility
- BUGFIX: create CLASSES section only for DXF versions newer than R12 (AC1009)
- TEST: converted a bunch of R8 (AC1003) files to R12 (AC1009), AutoCAD didn't complain
- TEST: converted a bunch of R13 (AC1012) files to R2000 (AC1015), AutoCAD did not complain
- TEST: converted a bunch of R14 (AC1014) files to R2000 (AC1015), AutoCAD did not complain
Version 0.7.2 - 2016-03-05
- NEW: reads DXF R13/R14 and saves content as R2000 (AC1015) - experimental feature, because of the lack of test data
- NEW: added support for common DXF attribute line weight
- NEW: POLYLINE, POLYMESH - added properties is_closed, is_m_closed, is_n_closed
- BUGFIX: MeshData.optimize() - corrected wrong vertex optimization
- BUGFIX: can open DXF files without existing layout management table
- BUGFIX: restore module structure ezdxf.const
Version 0.7.1 - 2016-02-21
- Supported/Tested Python versions: CPython 2.7, 3.4, 3.5, pypy 4.0.1 and pypy3 2.4.0
- NEW: read legacy DXF versions older than AC1009 (DXF R12) and saves it as DXF version AC1009.
- NEW: added methods is_frozen(), freeze(), thaw() to class Layer()
- NEW: full support for DXF entity ELLIPSE (added add_ellipse() method)
- NEW: MESH data editor - implemented add_face(vertices), add_edge(vertices), optimize(precision=6) methods
- BUGFIX: creating entities on layouts works
- BUGFIX: entity ATTRIB - fixed halign attribute definition
- CHANGE: POLYLINE (POLYFACE, POLYMESH) - on layer change also change layer of associated VERTEX entities
Version 0.7.0 - 2015-11-26
- Supported Python versions: CPython 2.7, 3.4, pypy 2.6.1 and pypy3 2.4.0
- NEW: support for DXF entity HATCH (solid fill, gradient fill and pattern fill), pattern fill with background color supported
- NEW: support for DXF entity GROUP
- NEW: VIEWPORT entity, but creating new viewports does not work as expected - just for reading purpose.
- NEW: support for new common DXF attributes in AC1018 (AutoCAD 2004): true_color, color_name, transparency
- NEW: support for new common DXF attributes in AC1021 (AutoCAD 2007): shadow_mode
- NEW: extended custom vars interface
- NEW: dxf2html - added support for custom properties in the header section
- NEW: query() supports case insensitive attribute queries by appending an 'i' to the query string, e.g. '*[layer=="construction"]i'
- NEW: Drawing.cleanup() - call before saving the drawing but only if necessary, the process could take a while.
- BUGFIX: query parser couldn't handle attribute names containing '_'
- CHANGE: renamed dxf2html to pp (pretty printer), usage: py -m ezdxf.pp yourfile.dxf (generates yourfile.html in the same folder)
- CHANGE: cleanup file structure
Version 0.6.5 - 2015-02-27
- BUGFIX: custom properties in header section written after $LASTSAVEDBY tag - the only way AutoCAD accepts custom tags
Version 0.6.4 - 2015-02-27
- NEW: Support for custom properties in the header section - Drawing.header.custom_vars - but so far AutoCAD ignores new created custom properties by ezdxf- I don't know why.
- BUGFIX: wrong DXF subclass for Arc.extrusion (error in DXF Standard)
- BUGFIX: added missing support files for dxf2html
Version 0.6.3 - 2014-09-10
- Beta status
- BUGFIX: Text.get_pos() - dxf attribute error "alignpoint"
Version 0.6.2 - 2014-05-09
- Beta status
- NEW: set
ezdxf.options.compress_default_chunks = Trueto compress unnecessary Sections (like THUMBNAILIMAGE) in memory with zlib - NEW: Drawing.compress_binary_data() - compresses binary data (mostly code 310) in memory with zlib or set
ezdxf.options.compress_binary_data = Trueto compress binary data of every drawing you open. - NEW: support for MESH entity
- NEW: support for BODY, 3DSOLID and REGION entity, you get the ACIS data
- CHANGE: Spline() - removed context managers fit_points(), control_points(), knot_values() and weights() and added a general context_manager edit_data(), similar to Mesh.edit_data() - unified API
- CHANGE: MText.buffer() -> MText.edit_data() - unified API (MText.buffer() still exists as alias)
- CHANGE: refactored internal structure - only two DXF factories remaining:
- LegacyDXFFactory() for AC1009 (DXF12) drawings
- ModernDXFFactory() for newer DXF versions except DXF13/14.
- BUGFIX: LWPolyline.get_rstrip_point() removed also x- and y-coords if zero
- BUGFIX: opens DXF12 files without handles again
- BUGFIX: opens DXF12 files with HEADER section but without $ACADVER set
Version 0.6.1 - 2014-05-02
- Beta status
- NEW: create new layouts - Drawing.create_layout(name, dxfattribs=None)
- NEW: delete layouts - Drawing.delete_layout(name)
- NEW: delete blocks - Drawing.blocks.delete_block(name)
- NEW: read DXF files from zip archives (its slow).
- CHANGE: LWPolyline returns always 5-tuples (x, y, start_width, end_width, bulge). start_width, end_width and bulge is 0 if not present.
- NEW: LWPolyline.get_rstrip_points() -> generates points without appending zeros.
- NEW: LWPolyline.rstrip_points() -> context manager for points without appending zeros.
- BUGFIX: fixed handle creation bug for DXF12 files without handles, a code 5/105 issue
- BUGFIX: accept floats as int (thanks to ProE)
- BUGFIX: accept entities without owner tag (thanks to ProE)
- improved dxf2html; creates a more readable HTML file; usage: python -m ezdxf.dxf2html filename.dxf
Version 0.6.0 - 2014-04-25
- Beta status
- Supported Python versions: CPython 2.7, 3.4 and pypy 2.2.1
- Refactoring of internal structures
- CHANGE: appended entities like VERTEX for POLYLINE and ATTRIB for INSERT are linked to the main entity and do not appear in layouts, model space or blocks (modelspace.query('VERTEX') is always an empty list).
- CHANGE: refactoring of the internal 2D/3D point representation for reduced memory footprint
- faster unittests
- BUGFIX: opens minimalistic DXF12 files
- BUGFIX: support for POLYLINE new (but undocumented) subclass names: AcDbPolyFaceMesh, AcDbPolygonMesh
- BUGFIX: support for VERTEX new (but undocumented) subclass names: AcDbFaceRecord, AcDbPolyFaceMeshVertex, AcDbPolygonMeshVertex, AcDb3dPolylineVertex
- CHANGE: Polyline.get_mode() returns new names: AcDb2dPolyline, AcDb3dPolyline, AcDbPolyFaceMesh, AcDbPolygonMesh
- CHANGE: separated layout spaces - each layout has its own entity space
Version 0.5.2 - 2014-04-15
- Beta status
- Supported Python versions: CPython 2.7, 3.3, 3.4 and pypy 2.2.1
- BUGFIX: ATTRIB definition error for AC1015 and later (error in DXF specs)
- BUGFIX: entity.dxf_attrib_exists() returned True for unset attribs with defined DXF default values
- BUGFIX: layout.delete_entity() didn't delete following data entities for INSERT (ATTRIB) & POLYLINE (VERTEX)
- NEW: delete all entities from layout/block/entities section
- cleanup DXF template files
Version 0.5.1 - 2014-04-14
- Beta status
- Supported Python versions: CPython 2.7, 3.3, 3.4 and pypy 2.2.1
- BUGFIX: restore Python 2 compatibility (has no list.clear() method); test launcher did not run tests in sub-folders, because of missing init.py files
Version 0.5.0 - 2014-04-13
- Beta status
- BUGFIX: Drawing.get_layout_setter() - did not work with entities without DXF attribute paperspace
- NEW: default values for DXF attributes as defined in the DXF standard, this allows usage of optional DXF attributes (with defined default values) without check of presence, like entity.dxf.paperspace.
- NEW: DXF entities SHAPE, RAY, XLINE, SPLINE
- NEW: delete entities from layout/block
- CHANGE: entity 3DFACE requires 3D coordinates (created by add_3Dface())
- CHANGE: LWPolyline all methods return points as (x, y, [start_width, [end_width, [bulge]]]) tuples
- updated docs
Version 0.4.2 - 2014-04-02
- Beta status
- Supported Python versions: CPython 2.7, 3.3, 3.4 and pypy 2.1
- NEW: DXF entities LWPOLYLINE, MTEXT
- NEW: convenience methods place(), grid(), get_attrib_text() and has_attrib() for the Insert entity
- CHANGE: pyparsing as external dependency
- BUGFIX: iteration over drawing.entities yields full functional entities (correct layout attribute)
- BUGFIX: install error with pip and missing DXF template files of versions 0.4.0 & 0.4.1
Version 0.3.0 - 2013-07-20
- Alpha status
- Supported Python versions: CPython 2.7, 3.3 and pypy 2.0
- NEW: Entity Query Language
- NEW: Import data from other DXF files
- CHANGE: License changed to MIT License
Version 0.1.0 - 2010-03-14
- Alpha status
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezdxf-0.17.zip.
File metadata
- Download URL: ezdxf-0.17.zip
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea32bfc344422dd50e6c6ce38b1789d95d4bb53386fa0e4e5aa0859573187dfb
|
|
| MD5 |
e5a1ffaea18d4b155a05b1cf3a817027
|
|
| BLAKE2b-256 |
74395520d04958ffec120dbe1ebe1fe74e1cc7350e09cddcea25399f2aca77a9
|
File details
Details for the file ezdxf-0.17-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: ezdxf-0.17-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e179380d656bc6fe73e8b1ec40b21ea24cfad0891c7c50c3e45bb459cb2d726b
|
|
| MD5 |
8059ae94958c3aeed62cafaf7699b23f
|
|
| BLAKE2b-256 |
d4980fe601401411b334595d5b895ab54c5bd52b206d44860822009337b98e46
|
File details
Details for the file ezdxf-0.17-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d849c36949014ecfca1a5f94bc61198983e0516bcdb0fce86363ad7c80675ec
|
|
| MD5 |
5320cc279ed0783f73679b8e1c725808
|
|
| BLAKE2b-256 |
fdfc81d20d5f6e6b64af66ed4dadba2066125e748ded287d4e7f80dec9522386
|
File details
Details for the file ezdxf-0.17-cp39-cp39-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc2007331ec5c452f40855051500712ed3a212dafadd89318f98e2200dab817
|
|
| MD5 |
7c4e65a18107a76fb8558da080e3b461
|
|
| BLAKE2b-256 |
15d12b980cc33e5680ebdd512ac6609e091e9ed5a239bfdac6696f458ff354c6
|
File details
Details for the file ezdxf-0.17-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: ezdxf-0.17-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3119ef6e9f22b6c49a4f2842db9301e0f2cae8046e91e1fe20ac9377d2ef9022
|
|
| MD5 |
a9e0ccd17c3eb1df6823b87631c11a73
|
|
| BLAKE2b-256 |
738acf74f462e73d484dc48fe0a652761d3f715f4826d8d4f23a9ade2a88c3d6
|
File details
Details for the file ezdxf-0.17-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2134e1dd0b1e06ec03324ca2683da072ae36638122eb5ac39d211c491b78d870
|
|
| MD5 |
dff4d945df674da8dedec2279871d725
|
|
| BLAKE2b-256 |
82ed7f32760e9ecde589cc86bdfb77bbca143e045cf290314d8a519e389d0d15
|
File details
Details for the file ezdxf-0.17-cp38-cp38-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbefb370a2c692779e08164b2c4333174e428fb66d5309a8c4ebcce1703f081a
|
|
| MD5 |
3f08096a4744340a5b455d08496bbc64
|
|
| BLAKE2b-256 |
6762161fa30e0f24c044f0d1868f204b49d7dd9376b5e26272fb0560219e3894
|
File details
Details for the file ezdxf-0.17-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: ezdxf-0.17-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b90a54eaa0dabc33cec97c7cff395a77831cc6da1a44e0df121df2f0c462c01
|
|
| MD5 |
14d37d66df816f28aedfaef7f8528b6d
|
|
| BLAKE2b-256 |
dbe04fdcdc78b30c972029f099e6bd1143213c321b7ae7e7cf806f2c69f4ab24
|
File details
Details for the file ezdxf-0.17-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26504456c8aca5ad0b171b174182aeb98c3b6886b665fe7b8eefcce18db9c5d
|
|
| MD5 |
bed1f1193f750b1f0c73b248f1667aee
|
|
| BLAKE2b-256 |
173013ea9da55347f1aedaa5d3992cd2e823eca07a5a784c9accdc5cb43dfb37
|
File details
Details for the file ezdxf-0.17-cp37-cp37m-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ezdxf-0.17-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b29b3332e35af1e6b19f42d57c270e91f4206b4c9ed677d8e9b67cbcd5021dab
|
|
| MD5 |
0badc49a47b79b7a116150d3d4d09d29
|
|
| BLAKE2b-256 |
1acf999526fc440f0511a0ce4def9797e652707dfc74c19296ced76471a54192
|