Skip to main content

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

Entities

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)

Uploaded Source

Built Distribution

dxface-0.0.4-py3-none-any.whl (13.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page