dxfwrite

A Python library to create DXF R12 drawings
Download

dxfwrite Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL v3
  • Price:
  • FREE
  • Publisher Name:
  • mozman
  • Publisher web site:
  • http://bitbucket.org/mozman/

dxfwrite Tags


dxfwrite Description

A Python library to create DXF R12 drawings dxfwrite is a Python library to create DXF R12 drawings.A simple example:from dxfwrite import DXFEngine as dxfdrawing = dxf.drawing('test.dxf')drawing.add(dxf.line((0, 0), (10, 0), color=7))drawing.add_layer('TEXTLAYER', color=2)drawing.add(dxf.text('Test', insert=(0, 0.2), layer='TEXTLAYER')drawing.save()supported DXF R12 entities * ARC * ATTDEF * ATTRIB * BLOCK * CIRCLE * 3DFACE * INSERT * LINE * POINT * POLYLINE (special Polyface and Polymesh objects are available) * SHAPE (not tested) * SOLID * TRACE * TEXT * VERTEX (only for internal use, see Polyline, Polyface and Polymesh objects)not supported DXF R12 entities * DIMENSIONemulated entities from DXF R13 and later * MTEXT (R13) ... emulated as composite entity MText * ELLIPSE (R13) ... approximated by Ellipse * SPLINE (R13) ... approximated by Spline * LWPOLYLINE (R13) ... use POLYLINE * TABLE (R2005) ... emulated as composite entity Tablecomposite entities * MText -- multi line text * LinearDimension * AngularDimension * ArcDimension * RadialDimension * Table -- text and blockrefs containing table like a HTML-table * Ellipse -- approximated as POLYLINE * Spline -- cubic spline curve through breakpoints without additional control points, approximated as POLYLINE * Bezier -- cubic bezier curve through breakpoints with additional control points, approximated as POLYLINE * Clothoid -- Euler spiral, approximated as POLYLINEread/write AutoCAD ctb-filesThe module acadctb provides the ability to read and write AutoCAD ctb-files. With ctb-files you can assign a new color or lineweight to a dxf-color-index for plotting or printing, but this has to be supported by the used application.a simple example:from dxfwrite import acadctbctb = acadctb.load('test.ctb')style1 = ctb.get_style(1) # dxf color index (1 .. 255)style1.set_color(23, 177, 68) # set rgb values (0..255)style1.set_lineweight(0.7)ctb.save('new.ctb')Installationwith easy_install:easy_install dxfwriteor from source:python setup.py installDocumentationhttp://bitbucket.org/mozman/dxfwrite/wiki/Home Requirements: · Python


dxfwrite Related Software