Python interface for AutoCAD DXF
Project description
dxface
Python interface for AutoCAD DXF.
Installation
Using pip:
$ pip install dxface
Supported Objects
The following DXF graphical objects are supported:
- POLYLINE
- LWPOLYLINE
- CIRCLE
- ARC
- LINE
Usage
Import the Entities
object.
from dxface import Entities
Create instance of Entities
from DXF file.
with open('drawing.dxf', 'r') as f:
dxf = f.read().splitlines()
entities = Entities(dxf)
Convert to SVG.
svg = entities.svg()
with open('drawing.svg', 'w') as f:
f.write(svg)
Access sublists containing DXF graphical objects
polylines = entities.polylines
lwpolylines = entities.lwpolylines
circles = entities.circles
arcs = entities.arcs
lines = entities.lines
UML diagram of Entities
object
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dxface-0.0.4.tar.gz
(5.4 kB
view hashes)
Built Distribution
dxface-0.0.4-py3-none-any.whl
(13.2 kB
view hashes)