Feature preview v0.16 #344
Replies: 2 comments
-
Added SPLINE edge support to Path() to HATCH conversion: |
Beta Was this translation helpful? Give feedback.
-
The new text2path add-on provide some tools to convert text strings and text based DXF entities into outer- and inner These are SPLINE and POLYLINE entities created from text strings: The letter "g" shows in detail the lossless Bèzier- into cubic B-spline curve conversion: These are HATCH entities created from text strings displayed in TrueView (AutoCAD): Text rendering depends on the font rendering engine used by the backend. The Unfortunately, BricsCAD sometimes has problems rendering hatches with inner boundary paths as closed SPLINE edges: It seems to depend on the position of the letters. I am assuming that it is a floating point precision problem. Here are some randomly placed "o" in BricsCAD: Fortunately, the Matplotlib and PyQt backends work correctly. |
Beta Was this translation helpful? Give feedback.
-
This is a small preview of some features of the next version of ezdxf v0.16.
The focus of this new version was on improving the
Path
class and unify the methods to work with paths. The first improvement was to replace the differentPath.from<Entity>
methods by a simplemake_path()
function to createPath
objects from many DXF types.Next step was to add the reverse direction to create DXF entities from
Path
objects and helper functions to add them in a single step to a layout.The new
disassemble
module creates graphic primitives from most DXF entities. These extra abstraction was chosen to represent linear entities like LINE, POLYLINE, SPLINES and mesh entities like MESH, POLYMESH and POLYFACE in a unified data structure. The newbbox
module use this primitives to calculate bounding boxes for many entities in an easy way.This are all low level features and do not sound very exciting in the first place, but in combination this creates advanced tools like creating HATCH entities from arbitrary DXF entities (complete source code).
Create some DXF entities:
Create HATCH entities form these DXF entities:
These hatches have only polygon paths, it is not possible to create edge paths by this method. This also prevents associative hatches, because the hatch has no corresponding source DXF entities.
This features are in beta stage but already merged into the master branch, so everyone can use it and send bug reports.
Beta Was this translation helpful? Give feedback.
All reactions