METADATA 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. Metadata-Version: 2.1
  2. Name: ezdxf
  3. Version: 0.9
  4. Summary: A Python package to create/manipulate DXF drawings.
  5. Home-page: https://ezdxf.mozman.at
  6. Author: Manfred Moitzi
  7. Author-email: me@mozman.at
  8. License: MIT License
  9. Download-URL: https://pypi.org/project/ezdxf/
  10. Keywords: DXF,CAD
  11. Platform: OS Independent
  12. Classifier: Development Status :: 5 - Production/Stable
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: 3.5
  17. Classifier: Programming Language :: Python :: 3.6
  18. Classifier: Programming Language :: Python :: 3.7
  19. Classifier: Programming Language :: Python :: Implementation :: CPython
  20. Classifier: Programming Language :: Python :: Implementation :: PyPy
  21. Classifier: Intended Audience :: Developers
  22. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  23. Provides: ezdxf
  24. Requires-Python: >=3.5
  25. Description-Content-Type: text/markdown
  26. Requires-Dist: pyparsing (>=2.0.1)
  27. ezdxf
  28. =====
  29. Abstract
  30. --------
  31. A Python package to create and modify DXF drawings, independent from the DXF
  32. version. You can open/save every DXF file without losing any content (except comments),
  33. Unknown tags in the DXF file will be ignored but preserved for saving. With this behavior
  34. it is possible to open also DXF drawings that contains data from 3rd party applications.
  35. Quick-Info
  36. ----------
  37. - ezdxf is a Python package to create new DXF files and read/modify/write existing DXF files
  38. - the intended audience are developers
  39. - requires at least CPython 3.5, for Python 2 support use ezdxf < 0.9
  40. - OS independent
  41. - additional required packages: [pyparsing](https://pypi.org/project/pyparsing/)
  42. - MIT-License
  43. - read/write/new support for DXF versions: R12, R2000, R2004, R2007, R2010, R2013 and R2018
  44. - additional read support for DXF versions R13/R14 (upgraded to R2000)
  45. - additional read support for older DXF versions than R12 (upgraded to R12)
  46. - preserves third-party DXF content
  47. - additional fast DXF R12 writer, that creates just an ENTITIES section with support for the basic DXF entities
  48. a simple example:
  49. ```python
  50. import ezdxf
  51. drawing = ezdxf.new(dxfversion='R2010')
  52. # alternative: use the AutoCAD release name
  53. # ezdxf.new(dxfversion='R2010')
  54. modelspace = drawing.modelspace()
  55. modelspace.add_line((0, 0), (10, 0), dxfattribs={'color': 7})
  56. drawing.layers.new('TEXTLAYER', dxfattribs={'color': 2})
  57. # use set_pos() for proper TEXT alignment:
  58. # the relations between halign, valign, insert and align_point are tricky.
  59. modelspace.add_text(
  60. 'Test',
  61. dxfattribs={
  62. 'layer': 'TEXTLAYER'
  63. }).set_pos((0, 0.2), align='CENTER')
  64. drawing.saveas('test.dxf')
  65. ```
  66. example for the *r12writer*, writes a simple DXF R12 file without in-memory structures:
  67. ```python
  68. from random import random
  69. from ezdxf.r12writer import r12writer
  70. MAX_X_COORD = 1000.0
  71. MAX_Y_COORD = 1000.0
  72. CIRCLE_COUNT = 100000
  73. with r12writer("many_circles.dxf") as dxf:
  74. for i in range(CIRCLE_COUNT):
  75. dxf.add_circle((MAX_X_COORD*random(), MAX_Y_COORD*random()), radius=2)
  76. ```
  77. The r12writer supports only the ENTITIES section of a DXF R12 drawing, no HEADER, TABLES or BLOCKS section is
  78. present, except FIXED-TABLES are written, than some additional predefined text styles and line types are available.
  79. Installation
  80. ------------
  81. Install with pip:
  82. pip install ezdxf
  83. Install develop version (only if you have to)::
  84. pip install git+https://github.com/mozman/ezdxf.git@develop
  85. For Python 2 users:
  86. pip install ezdxf<0.9
  87. or from source:
  88. python setup.py install
  89. Website
  90. -------
  91. https://ezdxf.mozman.at/
  92. Documentation
  93. -------------
  94. Documentation of development version at https://ezdxf.mozman.at/docs
  95. Documentation of latest release at http://ezdxf.readthedocs.io/
  96. Contribution
  97. ------------
  98. The source code of ezdxf can be found at GitHub.com:
  99. http://github.com/mozman/ezdxf.git
  100. Only pull requests for the **develop** branch will be accepted.
  101. Feedback
  102. --------
  103. Issue Tracker at:
  104. http://github.com/mozman/ezdxf/issues
  105. Questions and Feedback at Google Groups:
  106. https://groups.google.com/d/forum/python-ezdxf
  107. python-ezdxf@googlegroups.com
  108. Feedback is greatly appreciated.
  109. Manfred
  110. Contact
  111. -------
  112. ezdxf@mozman.at
  113. News
  114. ====
  115. Version 0.9 - 2019-02-24
  116. ------------------------
  117. - Release notes: https://ezdxf.mozman.at/release-v0-9.html
  118. - IMPORTANT: Python 2 support REMOVED, if Python 2 support needed: add `ezdxf<0.9` to your `requirements.txt`
  119. - NEW: testing on Manjaro Linux in a VM by tox
  120. - CHANGE: converted NEWS.rst to NEWS.md and README.rst to README.md
  121. - CHANGE: moved `Importer()` from `ezdxf.tools` to `ezdxf.addons` - internal structures of modern DXF files are too complex
  122. and too undocumented to support importing data in a reliable way - using `Importer()` may corrupt your DXF files or just
  123. don't work!
  124. - NEW: type annotations to core package and add-ons.
  125. - NEW: argument `setup` in `ezdxf.new('R12', setup=True)` to setup default line types, text styles and dimension styles,
  126. this feature is disabled by default.
  127. - NEW: Duplicate table entries: `dwg.styles.duplicate_entry('OpenSans', new_name='OpenSansNew')`, this works for
  128. all tables, but is intended to duplicate STYLES and DIMSTYLES.
  129. - CHANGED: replaced proprietary fonts in style declarations by open source fonts
  130. - NEW: open source fonts to download https://github.com/mozman/ezdxf/tree/master/fonts
  131. - __OpenSansCondensed-Light__ font used for default dimension styles
  132. - NEW: subpackage `ezdxf.render`, because of DIMENSION rendering
  133. - NEW: support for AutoCAD standard arrows
  134. - NEW: support for creating linear DIMENSION entities
  135. - NEW: background color support for MTEXT
  136. - CHANGE: DXF template cleanup, removed non standard text styles, dimension styles, layers and blocks
  137. - CHANGE: text style STANDARD uses `txt` font
  138. - CHANGE: renamed subpackage `ezdxf.algebra` to `ezdxf.math`
  139. - CHANGE: moved `addons.curves` to `render.curves`
  140. - CHANGE: moved `addons.mesh` to `render.mesh`
  141. - CHANGE: moved `addons.r12spline` to `render.r12spline`
  142. - CHANGE: moved `addons.forms` to `render.forms`
  143. - CHANGE: renamed construction helper classes into Construction...()
  144. - `Ray2D()` renamed to `ConstructionRay()`
  145. - `Circle()` renamed to `ConstructionCircle()`
  146. - `Arc()` renamed to `ConstructionArc()`
  147. - NEW: construction tools `ConstructionLine()` and `ConstructionBox()`
  148. - REMOVED: `almost_equal` use `math.isclose`
  149. - REMOVED: `almost_equal_points` use `ezdxf.math.is_close_points`
  150. - BUGFIX: closed LWPOLYLINE did not work in AutoCAD (tag order matters), introduced with v0.8.9 packed data structure
  151. - BUGFIX: `UCS.to_ocs_angle_deg()` corrected
  152. Version 0.8.9 - 2018-11-28
  153. --------------------------
  154. - Release notes: https://ezdxf.mozman.at/release-v0-8-9.html
  155. - IMPORTANT: Python 2 support will be dropped in ezdxf v0.9.0, because Python 2 support get more and more annoying.
  156. - CHANGE: refactoring of internal tag representation for a smaller memory footprint, but with some speed penalty
  157. - NEW: packed data for LWPOLYLINE points, faster `__getitem__`; added `__setitem__`, `__delitem__`, `insert()` and
  158. `append()` methods; renamed `discard_points()` in `clear()`; removed `get_rstrip_points()` and ctx manager
  159. `rstrip_points()`; user defined point format;
  160. - NEW: packed data for SPLINE, knots, weights, fit- and control points are stored as `array.array()`;
  161. `Spline.get_knot_values()`, `Spline.get_weights()`, `Spline.get_control_points()` and `Spline.get_fit_points()` are
  162. deprecated, direct access to this attributes by `Spline.knot_values`, `Spline.weights`, `Spline.control_points` and
  163. `Spline.fit_points`, all attributes with a list-like interface. Knot, control point and fit point counter updated
  164. automatically, therefore counters are read only now.
  165. - NEW: packed data for MESH, vertices, faces, edges and edge crease values stored as `array.array()`, high level interface unchanged
  166. - NEW: `Drawing.layouts_and_blocks()`, iterate over all layouts (mode space and paper space) and all block definitions.
  167. - NEW: `Drawing.chain_layouts_and_blocks()`, chain entity spaces of all layouts and blocks. Yields an iterator for all
  168. entities in all layouts and blocks
  169. - NEW: `Drawing.query()`, entity query over all layouts and blocks
  170. - NEW: `Drawing.groupby()`, groups DXF entities of all layouts and blocks by an DXF attribute or a key function
  171. - NEW: `Layout.set_redraw_order()` and `Layout.get_redraw_order()`, to change redraw order of entities in model space and
  172. paper space layouts
  173. - NEW: `BlockLayout.is_layout_block`, `True` if block is a model space or paper space block definition
  174. - NEW: `ezdxf.algebra.Arc` helper class to create arcs from 2 points and an angle or radius, or from 3 points
  175. - NEW: `ezdxf.algebra.Arc.add_to_layout()` with UCS support to create 3D arcs
  176. - NEW: rename paper space layouts by `Drawing.layouts.rename(old_name, new_name)`
  177. - NEW: Basic support for embedded objects (new in AutoCAD 2018), ezdxf reads and writes the embedded data as it is,
  178. no interpretation no modification, just enough to not break DXF files with embedded objects at saving.
  179. - CHANGE: `Drawing.blocks.delete_block(name, safe=True)`, new parameter save, check if block is still referenced
  180. (raises `DXFValueError`)
  181. - CHANGE: `Drawing.blocks.delete_all_blocks(safe=True)`, if parameter safe is `True`, do not delete blocks that are still referenced
  182. - BUGFIX: invalid CLASS definition for DXF version R2000 (AC1015) fixed, bug was only triggered at upgrading from R13/R14 to R2000
  183. - BUGFIX: fixed broken `Viewport.AcDbViewport` property
  184. - __BASIC__ read support for many missing DXF entities/objects
  185. - ACAD_PROXY_GRAPHIC
  186. - HELIX
  187. - LEADER
  188. - LIGHT
  189. - MLEADER (incomplete)
  190. - MLINE (incomplete)
  191. - OLEFRAME
  192. - OLE2FRAME
  193. - SECTION
  194. - TABLE (incomplete)
  195. - TOLERANCE
  196. - WIPEOUT
  197. - ACAD_PROXY_OBJECT
  198. - DATATABLE
  199. - DICTIONARYVAR
  200. - DIMASSOC
  201. - FIELD (incomplete)
  202. - FIELDLIST (not documented by Autodesk)
  203. - IDBUFFER
  204. - LAYER_FILTER
  205. - MATERIAL
  206. - MLEADERSTYLE
  207. - MLINESTYLE
  208. - SORTENTSTABLE
  209. - SUN
  210. - SUNSTUDY (incomplete) (no real world DXF files with SUNSTUDY for testing available)
  211. - TABLESTYLE (incomplete)
  212. - VBA_PROJECT (no real world DXF files with embedded VBA for testing available)
  213. - VISUALSTYLE
  214. - WIPEOUTVARIABLES
  215. - for all unsupported entities/objects exist only raw DXF tag support
  216. Version 0.8.8 - 2018-04-02
  217. --------------------------
  218. - Release notes: https://ezdxf.mozman.at/release-v0-8-8.html
  219. - NEW: read/write support for GEODATA entity
  220. - NEW: read/(limited)write support for SURFACE, EXTRUDEDSURFACE, REVOLVEDSURFACE, LOFTEDSURFACE and SWEPTSURFACE entity
  221. - NEW: support for extension dictionaries
  222. - NEW: `add_spline_control_frame()`, create and add B-spline control frame from fit points
  223. - NEW: `add_spline_approx()`, approximate B-spline by a reduced count of control points
  224. - NEW: `ezdxf.setup_linetypes(dwg)`, setup standard line types
  225. - NEW: `ezdxf.setup_styles(dwg)`, setup standard text styles
  226. - NEW: `LWPolyline.vertices()` yields all points as `(x, y)` tuples in OCS, `LWPolyline.dxf.elevation` is the z-axis value
  227. - NEW: `LWPolyline.vertices_in_wcs()` yields all points as `(x, y, z)` tuples in WCS
  228. - NEW: basic `__str__()` and `__repr__()` support for DXF entities, returns just DXF type and handle
  229. - NEW: bulge related function in module `ezdxf.algebra.bulge`
  230. - NEW: Object Coordinate System support by `DXFEntity.ocs()` and `OCS()` class in module ezdxf.algebra
  231. - NEW: User Coordinate System support by `UCS()` class in module `ezdxf.algebra`
  232. - CHANGE: `DXFEntity.set_app_data()` and `Entity.set_xdata` accept also list of tuples as tags, `DXFTag()` is not required
  233. - BUGFIX: entity structure validator excepts group code >= 1000 before XDATA section (used in AutoCAD Civil 3D and AutoCAD Map 3D)
  234. Version 0.8.7 - 2018-03-04
  235. --------------------------
  236. - Release notes: https://ezdxf.mozman.at/release-v0-8-7.html
  237. - NEW: entity.get_layout() returns layout in which entity resides or None if unassigned
  238. - NEW: copy any DXF entity by entity.copy() without associated layout, add copy to any layout you want, by
  239. layout.add_entity().
  240. - NEW: copy entity to another layout by entity.copy_to_layout(layout)
  241. - NEW: move entity from actual layout to another layout by entity.move_to_layout(layout)
  242. - NEW: support for splines by control points: add_open_spline(), add_closed_spline(), add_rational_spline(),
  243. add_closed_rational_spline()
  244. - NEW: bspline_control_frame() calculates B-spline control points from fit points, but not the same as AutoCAD
  245. - NEW: R12Spline add-on, 2d B-spline with control frame support by AutoCAD, but curve is just an approximated POLYLINE
  246. - NEW: added entity.get_flag_state() and entity.set_flag_state() for easy access to binary coded flags
  247. - NEW: set new $FINGERPRINTGUID for new drawings
  248. - NEW: set new $VERSIONGUID on saving a drawing
  249. - NEW: improved IMAGE support, by adding RASTERVARIABLES entity, use Drawing.set_raster_variables(frame, quality, units)
  250. - BUGFIX: closing user defined image boundary path automatically, else AutoCAD crashes
  251. Version 0.8.6 - 2018-02-17
  252. --------------------------
  253. - Release notes: https://ezdxf.mozman.at/release-v0-8-6.html
  254. - NEW: ezdxf project website: https://ezdxf.mozman.at/
  255. - CHANGE: create all missing tables of the TABLES sections for DXF R12
  256. - BUGFIX: entities on new layouts will be saved
  257. - NEW: Layout.page_setup() and correct 'main' viewport for DXF R2000+; For DXF R12 page_setup() exists, but does not
  258. provide useful results. Page setup for DXF R12 is still a mystery to me.
  259. - NEW: Table(), MText(), Ellipse(), Spline(), Bezier(), Clothoid(), LinearDimension(), RadialDimension(),
  260. ArcDimension() and AngularDimension() composite objects from dxfwrite as add-ons, these add-ons support DXF R12
  261. - NEW: geometry builder as add-ons: MeshBuilder(), MeshVertexMerger(), MengerSponge(), SierpinskyPyramid(), these
  262. add-ons require DXF R2000+ (MESH entity)
  263. - BUGFIX: fixed invalid implementation of context manager for r12writer
  264. Version 0.8.5 - 2018-01-28
  265. --------------------------
  266. - Release notes: https://ezdxf.mozman.at/release-v0-8-5.html
  267. - CHANGE: block names are case insensitive 'TEST' == 'Test' (like AutoCAD)
  268. - CHANGE: table entry (layer, linetype, style, dimstyle, ...) names are case insensitive 'TEST' == 'Test' (like AutoCAD)
  269. - CHANGE: raises DXFInvalidLayerName() for invalid characters in layer names: <>/\":;?*|=`
  270. - CHANGE: audit process rewritten
  271. - CHANGE: skip all comments, group code 999
  272. - CHANGE: removed compression for unused sections (THUMBNAILSECTION, ACDSDATA)
  273. - NEW: write DXF R12 files without handles: set dwg.header['$HANDLING']=0, default value is 1
  274. - added subclass marker filter for R12 and prior files in legacy_mode=True (required for malformed DXF files)
  275. - removed special check for Leica Disto Unit files, use readfile(filename, legacy_mode=True) (malformed DXF R12 file,
  276. see previous point)
  277. Version 0.8.4 - 2018-01-14
  278. --------------------------
  279. - Release notes: https://ezdxf.mozman.at/release-v0-8-4.html
  280. - NEW: Support for complex line types with text or shapes
  281. - NEW: DXF file structure validator at SECTION level, tags outside of sections will be removed
  282. - NEW: Basic read support for DIMENSION
  283. - CHANGE: improved exception management, in the future ezdxf should only raise exceptions inherited from DXFError for
  284. DXF related errors, previous exception classes still work
  285. - DXFValueError(DXFError, ValueError)
  286. - DXFKeyError(DXFError, KeyError)
  287. - DXFAttributeError(DXFError, AttributeError)
  288. - DXFIndexError(DXFError, IndexError)
  289. - DXFTableEntryError(DXFValueError)
  290. - speedup low level tag reader around 5%, and speedup tag compiler around 5%
  291. Version 0.8.3 - 2018-01-02
  292. --------------------------
  293. - CHANGE: Lwpolyline - suppress yielding z coordinates if they exists (DXFStructureError: z coordinates are not defined in the DXF standard)
  294. - NEW: setup creates a script called 'dxfpp' (DXF Pretty Printer) in the Python script folder
  295. - NEW: basic support for DXF format AC1032 introduced by AutoCAD 2018
  296. - NEW: ezdxf use logging and writes all logs to a logger called 'ezdxf'. Logging setup is the domain of the application!
  297. - NEW: warns about multiple block definitions with the same name in a DXF file. (DXFStructureError)
  298. - NEW: legacy_mode parameter in ezdxf.read() and ezdxf.readfile(): tries do fix coordinate order in LINE
  299. entities (10, 11, 20, 21) by the cost of around 5% overall speed penalty at DXF file loading
  300. Version 0.8.2 - 2017-05-01
  301. --------------------------
  302. - NEW: Insert.delete_attrib(tag) - delete ATTRIB entities from the INSERT entity
  303. - NEW: Insert.delete_all_attribs() - delete all ATTRIB entities from the INSERT entity
  304. - BUGFIX: setting attribs_follow=1 at INSERT entity before adding an attribute entity works
  305. Version 0.8.1 - 2017-04-06
  306. --------------------------
  307. - NEW: added support for constant ATTRIB/ATTDEF to the INSERT (block reference) entity
  308. - NEW: added ATTDEF management methods to BlockLayout (has_attdef, get_attdef, get_attdef_text)
  309. - NEW: added (read/write) properties to ATTDEF/ATTRIB for setting flags (is_const, is_invisible, is_verify, is_preset)
  310. Version 0.8.0 - 2017-03-28
  311. --------------------------
  312. - added groupby(dxfattrib='', key=None) entity query function, it is supported by all layouts and the query result
  313. container: Returns a dict, where entities are grouped by a dxfattrib or the result of a key function.
  314. - added ezdxf.audit() for DXF error checking for drawings created by ezdxf - but not very capable yet
  315. - dxfattribs in factory functions like add_line(dxfattribs=...), now are copied internally and stay unchanged, so they
  316. can be reused multiple times without getting modified by ezdxf.
  317. - removed deprecated Drawing.create_layout() -> Drawing.new_layout()
  318. - removed deprecated Layouts.create() -> Layout.new()
  319. - removed deprecated Table.create() -> Table.new()
  320. - removed deprecated DXFGroupTable.add() -> DXFGroupTable.new()
  321. - BUFIX in EntityQuery.extend()