Island detection for the HATCH entity is now supported, the example shows the
effect of the HATCH styles NESTED
, OUTERMOST
and IGNORE
(from left to
right), the example script can be found
here:
The HATCH entity also got support for hatch pattern, but this is just an approximation, because neither matplotlib nor PyQt5 have proper fill pattern support in the style of a CAD application.
Disabling the hatch pattern support is often the better solution:
Set the backend param
hatch_pattern
to 0
to disable pattern usage, or set it to 2
to use a
solid fill as replacement for the pattern, or set param show_hatch
to 0
to
disable hatch rendering at all.
Support for linetype rendering. The native linetype support by matplotlib and
PyQt5 is fast but not implemented in the way as CAD applications do it. In CAD
applications the linetypes are rendered in real drawing units, this means the
length of lines and gaps is always the same independent of the zoom level.
This is not the case for the matplotlib and the PyQt5 backends, therefore
the drawing
add-on provides a custom line renderer, but it's slower than the
native one. The backend param
linetype_renderer
controls which line renderer is used, set the param to
"internal"
to use the native line rendering of the backend (default), or set
it to "ezdxf"
to use the custom line render provided by the add-on.
Font support for TrueType Fonts. SHX fonts have to be substituted by the according TrueType fonts, but the replacement fonts for the SHX fonts are not available for free. The best rendering results can be archived by installing an Autodesk product (TrueView), because this will install the replacement fonts automatically:
The current supported SHX fonts, and their replacement TrueType fonts are listed here.
POINT mode support, see the
docs about the POINT
entity and the various point modes. The DXF format supports only one point mode
for ALL points in a DXF document, because the point mode is defined by the
global header variable $PDMODE
. Relative sizing to the viewport is not supported.
Example for POINT mode 66:
MLINE support, but without line break and fill break features (gaps).
Proxy graphic support. If no native rendering support for an entity exist, the proxy graphic will be shown if present (e.g. MLEADER).
The ezdxf.addons.geo
module adds support for the __geo_interface__
.
See the docs and the
tutorial for more
information.
wcs_vertices()
for SOLID, TRACE and 3DFACE.GeoData.setup_local_grid()
setup geo data for CRS similar to EPSG:3395 World
MercatorVector()
is renamed to Vec3()
, but an alias Vector()
still exist.ezdxf.math.distance_point_line_3d()
to calculate the
distance between a 3D vertex and a 3D line.Cython implementations for some math tools and objects:
This speed up some rendering tasks, but not the loading or writing process.
BoundingBox()
intersection test, inside- and outside tests, union of
two bounding boxes.ezdxf.math.ellipse_param_span()
, works the same way as
arc_angle_span_deg()
for special casesDXFEntity.uuid
property, returns an UUID on demand, which allows
distinguishing even virtual entities without a handle ezdxf.tools.text
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.ezdxf.addons.drawing.fonts.py
into ezdxf.tools
and added a
font measurement cache. FIT
and ALIGNED
text rendering in the drawing add-on Path.add_2d_polyline()
geo
add-onSpline.audit()
audit support for the SPLINE entityrecover
module tolerates malformed group codes and value tags.Matrix44.matrix
attribute in the Python implementation to a
"private" attribute Matrix44._matrix
, because this attribute is not
available in the Cython implementation dxf2code
add-on cubic_bezier_from_ellipse()
recognizes full ellipses cubic_bezier_from_arc()
recognizes full circles Vec2
, Vec3
, Matrix44
and
Bezier4P
AcDbEntity
subclass (color, layer,
linetype, ...), supported by all loading modesezdxf.addons.geo
module, support for the
__geo_interface__
,
see docs and
tutorialGeoData.setup_local_grid()
setup geo data for CRS similar to EPSG:3395
World MercatorBezier.flattening()
adaptive recursive flattening (approximation)Bezier4P.flattening()
adaptive recursive flattening (approximation)Path.flattening()
adaptive recursive flattening (approximation)Circle.flattening()
approximation determined by a max. sagitta valueArc.flattening()
approximation determined by a max. sagitta valueConstructionArc.flattening()
approximation determined by a max. sagitta valueezdxf.math.distance_point_line_3d()
ConstructionEllipse.flattening()
adaptive recursive flattening (approximation)Ellipse.flattening()
adaptive recursive flattening (approximation)BSpline.flattening()
adaptive recursive flattening (approximation)Spline.flattening()
adaptive recursive flattening (approximation)matplotlib.qsave()
, ltype
argument to switch between matplotlib dpi
based linetype rendering and AutoCAD like drawing units based linetype
renderingSolid.vertices()
returns OCS vertices in correct order (also Trace
)Solid.wcs_vertices()
returns WCS vertices in correct order (also Trace
)Face3D.wcs_vertices()
compatibility interface to SOLID and TRACEHatch.paths.external_paths()
returns iterable of external boundary pathsHatch.paths.outermost_paths()
returns iterable of outer most boundary pathsHatch.paths.default_paths()
returns iterable of default boundary pathsHatch.paths.rendering_paths()
returns iterable of paths to process for renderingDrawing.units
property to get/set document/modelspace unitsezdxf.new()
argument units
to setup document and modelspace units and
$MEASUREMENT setting and the linetype setup is based on this $MEASUREMENT
setting.pattern.load(measurement, factor)
load scaled hatch patternPath.from_hatch_boundary_path()
odafc.export_dwg()
new replace option to delete existing DWG filesStyle
table entry supports extended font dataPoint.virtual_entities()
, yield POINT entities as DXF primitivesezdxf.render.point
, support module for Point.virtual_entities()
Hatch.set_pattern_fill()
uses HEADER variable $MEASUREMENT to
determine the default scaling of predefined hatch pattern. ezdxf.colors
module will consolidate all color/transparency related
featuresezdxf.math.Vector
to Vec3
, but Vector
remains as synonymezdxf.tools.rgb
module replaced by ezdxf.colors
DXFEntity.transform_to_wcs()
interface,
use DXFEntity.transform(ucs.matrix)
Hatch.edit_boundary()
context manager,
use Hatch.paths
attributeHatch.get_gradient()
method,
use Hatch.gradient
attributeHatch.edit_gradient()
context manager,
use Hatch.gradient
attributeHatch.edit_pattern()
context manager,
use Hatch.pattern
attributeHatch.get_seed_points()
method,
use Hatch.seeds
attributenon_uniform_scaling
from Insert.explode()
non_uniform_scaling
from
Insert.virtual_entities()
Spline.edit_data()
context manager,
use fit_points
, control_points
, knots
and weights
attributesezdxf.math.has_clockwise_orientation()
returns True
for
counter-clock wise and vice versa