Skip to main content

A Python package to create/manipulate DXF drawings.

Project description

ezdxf

Abstract

A Python package for creating and modifying DXF drawings, regardless of the DXF version. You can open/save any DXF file without losing content (except comments). Unknown tags in the DXF file are ignored but retained for saving. With this behavior it is possible to also open DXF drawings that contain data from third-party applications.

Quick-Info

  • ezdxf is a Python package to create new DXF files and read/modify/write existing DXF files
  • MIT-License
  • the intended audience are programmers
  • requires at least Python 3.7
  • OS independent
  • tested with CPython and pypy3
  • has type annotations and passes mypy --ignore-missing-imports -p ezdxf successful
  • additional required packages for the core package without add-ons: typing_extensions, pyparsing
  • read/write/new support for DXF versions: R12, R2000, R2004, R2007, R2010, R2013 and R2018
  • read-only support for DXF versions R13/R14 (upgraded to R2000)
  • read-only support for older DXF versions than R12 (upgraded to R12)
  • read/write support for ASCII DXF and Binary DXF
  • retains third-party DXF content
  • optional C-extensions for CPython are included in the binary wheels, available on PyPI for Windows, Linux and macOS

Included Extensions

Additional packages required for these add-ons are not automatically installed during the basic setup, for more information about the setup & dependencies visit the documentation.

  • The drawing add-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.
  • r12writer add-on to write basic DXF entities direct and fast into a DXF R12 file or stream
  • iterdxf add-on to iterate over DXF entities from the modelspace of huge DXF files (> 5GB) which do not fit into memory
  • Importer add-on to import entities, blocks and table entries from another DXF document
  • dxf2code add-on to generate Python code for DXF structures loaded from DXF documents as starting point for parametric DXF entity creation
  • acadctb add-on to read/write plot style files (CTB/STB)
  • pycsg add-on for basic Constructive Solid Geometry (CSG) modeling
  • MTextExplode add-on for exploding MTEXT entities into single-line TEXT entities
  • text2path add-on to convert text into linear paths
  • geo add-on to support the __geo_interface__
  • meshex for exchanging meshes with other tools as STL, OFF or OBJ files
  • openscad add-on, an interface to OpenSCAD
  • odafc add-on, an interface to the ODA File Converter to read and write DWG files

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

https://ezdxf.mozman.at/

Documentation

Documentation of the 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.

ezdxf@mozman.at

Feedback is greatly appreciated.

Manfred

News

Version 0.18 - 2022-07-29

  • Release notes: https://ezdxf.mozman.at/release-v0-18.html
  • NEW: angular dimension rendering support, new factory methods: add_angular_dim_2l(), add_angular_dim_3p(), add_angular_dim_cra(), add_angular_dim_arc()
  • NEW: arc length dimension rendering support, new factory methods: add_arc_dim_3p(), add_arc_dim_cra(), add_arc_dim_arc()
  • NEW: ordinate dimension rendering support, new factory methods: add_ordinate_dim(), add_ordinate_x_dim(), add_ordinate_y_dim()
  • NEW: extended query functionality for the EntityQuery class
  • NEW: function ezdxf.tools.text.is_upside_down_text_angle() in WCS
  • NEW: function ezdxf.tools.text.upright_text_angle() in WCS
  • NEW: helper class ezdxf.math.ConstructionPolyline to measure, interpolate and divide polylines and anything that can be approximated or flattened into vertices
  • NEW: approximation tool for parametrized curves: ezdxf.math.ApproxParamT()
  • NEW: BoundingBox(2d).intersection(other), returns the 3D/2D bbox of the intersection space
  • NEW: BoundingBox(2d).has_intersection(other) replaces deprecated method intersect()
  • NEW: BoundingBox(2d).has_overlap(other) replaces deprecated method overlap()
  • DEPRECATED: method BoundingBox(2d).intersect() will be removed in v1.0.0
  • DEPRECATED: method BoundingBox(2d).overlap() will be removed in v1.0.0
  • CHANGE: BoundingBox(2d).is_empty is True for bounding boxes with a size of 0 in any dimension or has no data
  • NEW: ezdxf.gfxattribs.GfxAttribs() class, docs
  • NEW: TextEntityAlignment enum replaces the string based alignment definition
  • NEW: method Text.get_placement(), replaces get_pos()
  • NEW: method Text.set_placement(), replaces set_pos()
  • NEW: method Text.get_align_enum(), replaces get_align()
  • NEW: method Text.set_align_enum(), replaces set_align()
  • NEW: virtual DXF attribute MText.dxf.text, adds compatibility to other text based entities: TEXT, ATTRIB, ATTDEF
  • NEW: command ezdxf info FILE [FILE ...], show info and optional stats of DXF files
  • NEW: module ezdxf.appsettings, docs
  • NEW: module ezdxf.addons.binpacking, a simple solution for the bin-packing problem in 2D and 3D, docs
  • NEW: arguments height and rotationfor factory methods add_text() and add_attdef()
  • NEW: argument size_inches in function ezdxf.addons.drawing.matplotlib.qsave()
  • NEW: DXF/DWG converter function ezdxf.addons.odafc.convert()
  • NEW: support for layer attribute override in VIEWPORT entities
  • NEW: mesh exchange add-on ezdxf.addons.meshex: STL, OFF, and OBJ mesh loader and STL, OFF, OBJ, PLY, OpenSCAD and IFC4 mesh exporter, docs
  • NEW: ezdxf.addons.openscad add-on as interface to OpenSCAD, docs
  • NEW: acis module, a toolbox to handle ACIS data, docs
  • NEW: factory function add_helix() to create new HELIX entities
  • NEW: precise bounding box calculation for Bezier curves
  • NEW: module ezdxf.math.trianglation for polygon triangulation with hole support
  • NEW: spatial search tree ezdxf.math.rtree.RTree
  • NEW: module ezdxf.math.clustering for DBSCAN and K-means clustering
  • CHANGE: keyword only argument dxfattribs for factory methods add_text() and add_attdef()
  • CHANGE: recover module - recovered integer and float values are logged as severe errors
  • CHANGE: method Path.all_lines_to_curve3 replaced by function path.lines_to_curve3()
  • CHANGE: method Path.all_lines_to_curve4 replaced by function path.lines_to_curve4()
  • CHANGE: replaced arguments flatten and segments by argument fast of tool function Path.bbox()
  • CHANGE: replaced argument flatten by argument fast in the ezdxf.bbox module
  • CHANGE: restructure of the ezdxf.math sub-package
  • BUGFIX #663: improve handling of large coordinates in Bezier4P and Bezier3P classes
  • BUGFIX #655: fixed invalid flattening of 3D ARC entities
  • BUGFIX #640: DXF loader ignore data beyond EOF tag
  • BUGFIX #620: add missing caret decoding to fast_plain_mtext()
  • BUGFIX: 3DSOLID export for DXF R2004 has no subclass AcDb3dSolid

Version 0.17.2 - 2022-01-06

  • NEW: extended binary wheels support
    • manylinux2010_x86_64 for Python < 3.10 and manylinux2014_x86_64 for Python >= 3.10
    • musllinux_2010_x86_64 for Python < 3.10 and musllinux_2014_x86_64 for Python >= 3.10
    • manylinux_2014_aarch64 for ARM64 based Linux
    • musllinux_2014_aarch64 for ARM64 based Linux
    • macosx_11_0_arm64 for Apple Silicon
    • macosx_10_9_universal2 for Apple Silicon & x86
  • NEW: Auditor fixes invalid transparency values
  • NEW: Auditor fixes invalid crease data in MESH entities
  • NEW: add transparency argument to LayerTable.add()
  • NEW: support for transparency BYLAYER and BYBLOCK for the drawing add-on
  • NEW: Textstyle.make_font() returns the ezdxf font abstraction
  • NEW: added dxfattribs argument to method Drawing.set_modelspace_vport()
  • NEW: ezdxf.math.split_bezier() function to split Bezier curves of any degree
  • NEW: ezdxf.math.intersection_line_line_3d()
  • NEW: ezdxf.math.intersect_poylines_2d()
  • NEW: ezdxf.math.intersect_poylines_3d()
  • NEW: ezdxf.math.quadratic_bezier_from_3p()
  • NEW: ezdxf.math.cubic_bezier_from_3p()
  • NEW: BoundingBox.contains(), check if a bounding box contains completely another bounding box
  • NEW: TextEntityAlignment enum replaces the string based alignment definition
  • NEW: method Text.get_placement(), replaces get_pos()
  • NEW: method Text.set_placement(), replaces set_pos()
  • NEW: method Text.get_align_enum(), replaces get_align()
  • NEW: method Text.set_align_enum(), replaces set_align()
  • DEPRECATED: method Text.get_pos() will be removed in v1.0.0
  • DEPRECATED: method Text.set_pos() will be removed in v1.0.0
  • DEPRECATED: method Text.get_align() will be removed in v1.0.0
  • DEPRECATED: method Text.set_align() will be removed in v1.0.0
  • CHANGE: moved enum MTextEntityAlignment to ezdxf.enums
  • CHANGE: moved enum MTextParagraphAlignment to ezdxf.enums
  • CHANGE: moved enum MTextFlowDirection to ezdxf.enums
  • CHANGE: moved enum MTextLineAlignment to ezdxf.enums
  • CHANGE: moved enum MTextStroke to ezdxf.enums
  • CHANGE: moved enum MTextLineSpacing to ezdxf.enums
  • CHANGE: moved enum MTextBackgroundColor to ezdxf.enums
  • CHANGE: Dimstyle.set_tolerance(): argument align as enum MTextLineAlignment
  • CHANGE: DimstyleOverride.set_tolerance(): argument align as enum MTextLineAlignment
  • CHANGE: MeshData.add_edge() is changed to MeshData.add_edge_crease(), this fixes my misunderstanding of edge and crease data in the MESH entity.
  • BUGFIX #574: flattening issues in Path() and ConstructionEllipse()
  • BUGFIX: drawing add-on shows block references in ACAD_TABLE at the correct location
  • BUGFIX #589: Polyface.virtual_entities() yields correct triangle faces
  • BUGFIX: prevent invalid DXF export of the MESH entity
  • PREVIEW: arc length dimension rendering support, new factory methods: add_arc_dim_3p(), add_arc_dim_cra(), add_arc_dim_arc()
  • PREVIEW: ordinate dimension rendering support, new factory methods: add_ordinate_dim(), add_ordinate_x_dim(), add_ordinate_y_dim()
  • PREVIEW: ezdxf.gfxattribs.GfxAttribs() class, docs
  • PREVIEW: command ezdxf info FILE [FILE ...], show info and optional stats of DXF files
  • PREVIEW: approximation tool for parametrized curves: ezdxf.math.ApproxParamT()

Version 0.17.1 - 2021-11-14

  • CHANGE: using PySide6 as Qt binding if installed, PyQt5 is still supported as fallback
  • NEW: tracking feature for DXF entity copies, new properties of DXFEntity
    • source_of_copy - the immediate source of an entity copy
    • origin_of_copy - the first non virtual source entity of an entity copy
    • is_copy - is True if the entity is a copy
  • NEW: source entity tracking for virtual sub-entities for: POINT, LWPOLYLINE, POLYLINE, LEADER, MLINE, ACAD_PROXY_ENTITY
  • NEW: source block reference tracking for virtual entities created from block references, new properties of DXFEntity
    • has_source_block_reference - is True if the virtual entity was created by a block reference
    • source_block_reference - the immediate source block reference (INSERT), which created the virtual entity, otherwise None
  • NEW: ezdxf.tools.text_size module to measure TEXT and MTEXT entity dimensions
  • CHANGE: --ltype arguments of the draw command to approximate and accurate to be in sync with the drawing add-on configuration.
  • CHANGE: --ltype arguments of the view command to approximate and accurate to be in sync with the drawing add-on configuration.
  • REMOVE --scale argument of the view command
  • REMOVE: PolylinePath.PATH_TYPE, use PolylinePath.type instead
  • REMOVE: EdgePath.PATH_TYPE, use EdgePath.type instead
  • BUGFIX: invalid XDATA processing in XData.safe_init()
  • BUGFIX: group code 1003 is valid in XDATA section
  • BUGFIX: fix loading error of DIMSTYLE attribute dimtxsty
  • BUGFIX: fix "Next Entity" and "Previous Entity" actions in the browse command
  • BUGFIX: export MTEXT entities with column count different than the count of linked MTEXT entities
  • BUGFIX: fix invalid text rotation for relative text shifting for linear dimensions
  • PREVIEW: angular dimension rendering support, new factory methods: add_angular_dim_2l(), add_angular_dim_3p(), add_angular_dim_cra()
  • PREVIEW: helper class ezdxf.math.ConstructionPolyline to measure, interpolate and divide polylines and anything that can be approximated or flattened into vertices

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 the Matplotlib package
  • NEW: move_to() command and multi-path support for the ezdxf.path.Path class
  • 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: MPOLYGON load/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: dxf2code add-on: function black() and method Code.black_code_str() returns the code string formatted by Black
  • NEW: ezdxf.upright module 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 MTEXT entities for the drawing add-on
  • NEW: XDATA transformation support
  • NEW: copy support for extension dictionaries
  • CHANGE: drawing add-on: replaced the backend params argument (untyped dict) by the new typed Configuration object passed to the frontend class as argument config
  • REMOVED: deprecated class methods from_...(entity) from Path class, use path.make_path(entity) instead
  • REMOVED: deprecated Path methods add_...(entity), use path.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_path as win_exec_path
  • BUGFIX: graphic entities are not allowed as DICTIONARY entries
  • BUGFIX: copied DICTIONARY was not added to the OBJECTS section by calling factory.bind()
  • BUGFIX: XRecord.copy() copies content tags

Version 0.16.6 - 2021-08-28

  • NEW: MPOLYGON support for the drawing add-on
  • NEW: MPOLYGON support for the geo add-on
  • NEW: fast argument for method MText.plain_text()
  • NEW: support for multi-line ATTRIB and ATTDEF entities in DXF R2018
  • NEW: Auditor removes invalid DXF entities from layouts, blocks and the OBJECTS section
  • NEW: Auditor removes 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_layer to RenderContext.current_layer_properties
  • CHANGE: renamed RenderContext.current_block_reference to RenderContext.current_block_reference_properties
  • CHANGE: extended entity validation for GROUP
  • REMOVED: BaseLayout.add_attrib() factory method to add standalone ATTRIB entities. ATTRIB entities 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 return Vec3 instances
  • 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 MTEXT entities for the drawing add-on.

Version 0.16.5 - 2021-07-18

  • NEW: hard dependency typing_extensions
  • CHANGE: replaced ezdxf.tools.rgb by ezdxf.colors
  • CHANGE: options module renamed to _options; this eliminates the confusion between the options module and the global object ezdxf.options
  • NEW: config file support, see docs
  • NEW: ezdxf config command to manage config files
  • NEW: ezdxf.path.have_close_control_vertices(a, b), test for close control vertices of two Path objects
  • REMOVED: environment variable options, these are config file only options:
    • EZDXF_AUTO_LOAD_FONTS
    • EZDXF_FONT_CACHE_DIRECTORY
    • EZDXF_PRESERVE_PROXY_GRAPHICS
    • EZDXF_LOG_UNPROCESSED_TAGS
    • EZDXF_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: Vector alias for Vec3
  • REMOVED: get_acis_data(), set_acis_data() and context manager edit_data() from ACIS based entities, use acis_data property instead as List[str] or List[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: dxf2code add-on: function black() and method Code.black_code_str() returns the code string formatted by Black
  • PREVIEW: ezdxf.upright module to flip inverted extrusion vectors, for more information read the docs

Version 0.16.4 - 2021-06-20

  • NEW: PolylinePath.type and EdgePath.type as ezdxf.entities.BoundaryPathType enum
  • NEW: LineEdge.type, ArcEdge.type, EllipseEdge.type and SplineEdge.type as ezdxf.entities.EdgeType enum
  • 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 EZDXF when saving a DXF file by ezdxf
  • BUGFIX: loading crash of the PyQt CADViewer class
  • BUGFIX: loading GEODATA version 1, perhaps data is incorrect, logged as warning
  • BUGFIX: HATCH spline 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 HATCH edge paths
  • BUGFIX: correct application of the Dimension.dxf.insert attribute
  • 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 the ezdxf.path.Path class
  • PREVIEW: MPOLYGON load/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.MTextEditor class, extracted from the MText class
  • NEW: MText.set_bg_color(), new argument text_frame to add a text frame
  • CHANGE: move MText constants to MTextEditor class
  • CHANGE: move MText.set_font() to MTextEditor.change_font()
  • CHANGE: move MText.set_color() to MTextEditor.change_color()
  • CHANGE: move MText.append_stacked_text() to MTextEditor.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: drawing add-on, true color values always override ACI colors
  • BUGFIX: drawing add-on, handle SOLID as OCS entity like TRACE
  • BUGFIX/CHANGE: Vec2/3.__eq__() (== operator) compares all components with the full floating point precision, use Vec2/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 argument rel_tol, arguments rel_tol and abs_tol are 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: $FINGERPRINTGUID matches AutoCAD pattern {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
  • CHANGED: $VERSIONGUID matches 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: Frontend font 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: ezdxf command line launcher, supported commands:
    • pp the previous dxfpp command, the DXF pretty printer
    • audit DXF files
    • draw and convert DXF files by the Matplotlib backend
    • view DXF files by the PyQt viewer
  • NEW: text2path add-on to create Path objects from text strings and text entities, see docs
  • NEW: bbox module to detect the extents (bounding boxes) of DXF entities, see docs
  • NEW: zoom module to reset the active viewport of layouts, see docs
  • NEW: path sub-package, an extended version of the previous ezdxf.render.path module, see docs
  • NEW: support module disassemble, see docs
    1. deconstruct complex nested DXF entities into a flat sequence
    2. create a "primitive" representation of DXF entities
  • NEW: Using the optional Matplotlib package 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.Text getter/setter properties is_backward and is_upside_down
  • NEW: ezdxf.entity.TextStyle getter/setter properties is_backward, is_upside_down and is_vertical_stacked
  • NEW: ezdxf.math.Bezier3P, optimized quadratic Bézier curve construction tool
  • NEW: ezdxf.math.quadratic_to_cubic_bezier(), Bezier3P to Bezier4P converter
  • 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 arguments degree and method
  • CHANGED: ezdxf.render.nesting content moved into the ezdxf.path package
  • CHANGED: renamed MeshBuilder.render() to MeshBuilder.render_mesh()
  • CHANGED: ezdxf.math.BSpline is immutable, all methods return a new BSpline object
  • CHANGED: replaced BSplineU() class by factory function ezdxf.math.open_uniform_bspline()
  • CHANGED: replaced BSplineClosed() class by factory function ezdxf.math.closed_uniform_bspline()
  • CHANGED: renamed rational_spline_from_arc() to rational_bspline_from_arc()
  • CHANGED: renamed rational_spline_from_ellipse() to rational_bspline_from_ellipse()
  • BUGFIX: fixed ezdxf.math.rational_bspline_from_ellipse() invalid parameter conversion
  • DEPRECATED: ezdxf.render.path module, replaced by ezdxf.path package
  • DEPRECATED: Path.from_lwpolyline(), replaced by factory path.make_path()
  • DEPRECATED: Path.from_polyline(), replaced by factory path.make_path()
  • DEPRECATED: Path.from_spline(), replaced by factory path.make_path()
  • DEPRECATED: Path.from_ellipse(), replaced by factory path.make_path()
  • DEPRECATED: Path.from_arc(), replaced by factory path.make_path()
  • DEPRECATED: Path.from_circle(), replaced by factory path.make_path()
  • DEPRECATED: Path.add_curve(), replaced by function path.add_bezier4p()
  • DEPRECATED: Path.add_ellipse(), replaced by function path.add_ellipse()
  • DEPRECATED: Path.add_spline(), replaced by function path.add_spline()
  • DEPRECATED: Path.from_vertices(), replaced by factory path.from_vertices()
  • REMOVED: Path.from_hatch_boundary_path(), replaced by factory path.from_hatch()
  • REMOVED: Path.from_hatch_polyline_path()
  • REMOVED: Path.from_hatch_edge_path()
  • REMOVED: BlocksSection.purge(), unsafe operation
  • REMOVED: dxfpp command, replaced by ezdxf 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 as arc_angle_span_deg() for special cases
  • NEW: DXFEntity.uuid property, 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() and add_mline() got argument close to create a closed polygon and dxfattrib closed is deprecated, close and dxfattribs for these factories are keyword only arguments.
  • CHANGE: improved text alignment rendering in the drawing add-on
  • CHANGE: moved ezdxf.addons.drawing.fonts.py into ezdxf.tools and added a font measurement cache.
  • BUGFIX: FIT and ALIGNED text 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 geo add-on

Version 0.15.1 - 2021-01-15

  • NEW: Spline.audit() audit support for the SPLINE entity
  • NEW: The recover module tolerates malformed group codes and value tags.
  • Changed the Matrix44.matrix attribute in the Python implementation to a "private" attribute Matrix44._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 dxf2code add-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, Matrix44 and Bezier4P
  • 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 AcDbEntity subclass (color, layer, linetype, ...), supported by all loading modes
  • NEW: ezdxf.addons.geo module, 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(), ltype argument 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 (also Trace)
  • NEW: Solid.wcs_vertices() returns WCS vertices in correct order (also Trace)
  • 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.units property to get/set document/modelspace units
  • NEW: ezdxf.new() argument units to 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 Style table entry supports extended font data
  • NEW: Point.virtual_entities(), yield POINT entities as DXF primitives
  • NEW: ezdxf.render.point, support module for Point.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.colors module will consolidate all color/transparency related features
  • CHANGE: renamed ezdxf.math.Vector to Vec3, but Vector remains as synonym
  • DEPRECATED: ezdxf.tools.rgb module replaced by ezdxf.colors
  • REMOVED: deprecated DXFEntity.transform_to_wcs() interface, use DXFEntity.transform(ucs.matrix)
  • REMOVED: deprecated Hatch.edit_boundary() context manager, use Hatch.paths attribute
  • REMOVED: deprecated Hatch.get_gradient() method, use Hatch.gradient attribute
  • REMOVED: deprecated Hatch.edit_gradient() context manager, use Hatch.gradient attribute
  • REMOVED: deprecated Hatch.edit_pattern() context manager, use Hatch.pattern attribute
  • REMOVED: deprecated Hatch.get_seed_points() method, use Hatch.seeds attribute
  • REMOVED: unnecessary argument non_uniform_scaling from Insert.explode()
  • REMOVED: unnecessary argument non_uniform_scaling from Insert.virtual_entities()
  • REMOVED: deprecated Spline.edit_data() context manager, use fit_points, control_points, knots and weights attributes
  • BUGFIX: ezdxf.math.has_clockwise_orientation() returns True for 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

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 a ValueError() if used as resource names like layer name or text style names, such files can only be loaded by the new recover module.
  • NEW: ezdxf.recover module 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 recover module 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 2D ConstructionArc()
  • NEW: Arc.apply_construction_tool() apply parameters from ConstructionArc()
  • NEW: Leader.virtual_entities() yields 'virtual' DXF primitives
  • NEW: Leader.explode() explode LEADER as DXF primitives into target layout
  • NEW: LWPolyline.has_width property is True if any width attribute is set
  • NEW: Polyline.has_width property is True if 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.mcount property 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_clamped property is True for 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) returns True if 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 as ezdxf.EZDXF_TEST_FILES
  • NEW: arc_chord_length() and arc_segment_count() tool functions in ezdxf.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 new recover module decodes such strings automatically.
  • CHANGE: DXFEntity.get_extension_dict(), raises AttributeError if entity has no extension dictionary
  • CHANGE: DXFEntity.has_extension_dict is now a property not a method
  • CHANGE: linspace() uses Decimal() for precise calculations, but still returns an iterable of float
  • CHANGE: Drawing.blocks.delete_all_blocks(), unsafe mode is disabled and argument safe is deprecated, will be removed in v0.16
  • CHANGE: Dictionary raise DXFValueError for 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_mode in ezdxf.read() and ezdxf.readfile(), use the ezdxf.recover module to load DXF Documents with structural flaws
  • REMOVE: Alias DXFEntity.drawing use DXFEntity.doc
  • REMOVE: DXFEntity.entitydb
  • REMOVE: DXFEntity.dxffactory
  • REMOVE: DXFInvalidLayerName, replaced by DXFValueError
  • REMOVE: Image.get_boundary_path(), replaced by property Image.boundary_path
  • REMOVE: Image.get_image_def(), replaced by property Image.image_def
  • REMOVE: filter_stack argument in ezdxf.read() and ezdxf.readfile()
  • BUGFIX: Set non-constant-attribs flag (2) in BLOCK at DXF export if non constant ATTDEF entities are present.
  • BUGFIX: DXF R2018 - HATCH extrusion 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

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 matrix m inplace
  • 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), yields num angles 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), yields num params from start- to end param in counter clockwise order
  • NEW: Ellipse.construction_tool(), return ellipse data as ConstructionEllipse()
  • NEW: Ellipse.apply_construction_tool(), apply ConstructionEllipse() 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 as ezdxf.math.BSpline()
  • NEW: Spline.apply_construction_tool(), apply ezdxf.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() like numpy.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.LUDecomposition linear equation solver, for more linear algebra tools see module ezdxf.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() and BSpline.from_nurbs_python_curve(), interface to NURBS-Python, NURBS-Python is 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: Hatch full support for rotated patterns.
  • CHANGE: Hatch.set_pattern_definition() added argument angle for pattern rotation.
  • CHANGE: Hatch.path.add_arc renamed argument is_counter_clockwise to ccw, type bool and True by default
  • CHANGE: Hatch.path.add_ellipse renamed argument is_counter_clockwise to ccw, type bool and True by default
  • CHANGE: renamed 2D ConstructionXXX.move() methods to translate()
  • CHANGE: renamed old Insert.scale() to Insert.set_scale(), name conflict with transformation interface
  • CHANGE: renamed Spline.set_periodic() to Spline.set_closed()
  • CHANGE: renamed Spline.set_periodic_rational() to Spline.set_closed_rational()
  • CHANGE: renamed ezdxf.math.bspline_control_frame() to ezdxf.math.global_bspline_interpolation()
  • REMOVED: ezdxf.math.Matrix33 class, UCS and OCS uses Matrix44for transformations
  • REMOVED: ezdxf.math.BRCS class and Insert.brcs()
  • REMOVED: ezdxf.math.ConstructionTool base class
  • REMOVED: ezdxf.math.normalize_angle(angle), replace call by expression: angle % math.tau
  • REMOVED: ezdxf.math.DBSpline, integrated as BSpline.derivatives()
  • REMOVED: ezdxf.math.DBSplineU, integrated as BSplineU.derivatives()
  • REMOVED: ezdxf.math.DBSplineClosed, integrated as BSplineClosed.derivatives()
  • REMOVED: ezdxf.math.DBezier, integrated as Bezier.derivatives()
  • REMOVED: BaseLayout.add_spline_approx(), incorrect and nobody noticed it - so it's not really needed, if required use the geomdl.fitting.approximate_curve() function from the package NURBS-Python, see example using_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 by DXFGraphic.transform(ucs.matrix)
  • DEPRECATED: non_uniform_scaling argument for Insert.explode()
  • DEPRECATED: non_uniform_scaling argument for Insert.virtual_entities()
  • DEPRECATED: getter and edit methods in Hatch for attributes paths, gradient, pattern and seeds
  • 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() properties can_explode and scale_uniformly
  • NEW: Hatch.remove_association()

Version 0.12.2 - 2020-05-03

  • BUGFIX: XData.get() now raises DXFValueError for not existing appids, like all other methods of the XData() class
  • BUGFIX: Layer.description returns an empty string for unknown XDATA structure in AcAecLayerStandard
  • BUGFIX: Initialize/Load Hatch edge coordinates as Vec2() 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 associated BlockLayout() or None if block not exist or is an XREF
  • NEW: Insert.has_scaling returns True if any axis scaling is applied
  • NEW: Insert.has_uniform_scaling returns True if 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 a dict (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() returns DimStyleOverride() object
  • NEW: Dimension.render() render graphical representation as anonymous block
  • NEW: Block() properties is_anonymous, is_xref and is_xref_overlay
  • NEW: R12FastStreamWriter.add_polyline_2d(), add 2D POLYLINE with start width, end width and bulge value support
  • NEW: Ellipse.minor_axis property returns minor axis as Vector
  • 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: odafc add-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 r12writer add-on
  • CHANGE: R12FastStreamWriter.add_polyline(), add 3D POLYLINE only, closed flag support
  • CHANGE: renamed Insert.ucs() to Insert.brcs() which now returns a BRCS() object
  • CHANGE: Polyline.close(), Polyline.m_close() and Polyline.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 AcDbEntity group codes from base class

Project details


Release history Release notifications | RSS feed

This version

0.18

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezdxf-0.18.zip (1.9 MB view hashes)

Uploaded source

Built Distributions

ezdxf-0.18-cp310-cp310-win_amd64.whl (1.4 MB view hashes)

Uploaded cp310

ezdxf-0.18-cp310-cp310-macosx_11_0_arm64.whl (1.4 MB view hashes)

Uploaded cp310

ezdxf-0.18-cp39-cp39-win_amd64.whl (1.5 MB view hashes)

Uploaded cp39

ezdxf-0.18-cp39-cp39-macosx_11_0_arm64.whl (1.4 MB view hashes)

Uploaded cp39

ezdxf-0.18-cp38-cp38-win_amd64.whl (1.5 MB view hashes)

Uploaded cp38

ezdxf-0.18-cp38-cp38-macosx_11_0_arm64.whl (1.4 MB view hashes)

Uploaded cp38

ezdxf-0.18-cp37-cp37m-win_amd64.whl (1.4 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page