[PythonCAD] Scripted generation of DXF/DWG files

Torsten Bronger bronger at physik.rwth-aachen.de
Sun Jul 1 09:26:10 CEST 2007


Hallöchen!

I have to prepare a lithography mask which means that there is a lot
of material on it that must be generated with for loops.  For
example, 100 very slim rectangles next do each other cannot be drawn
with the mouse, well, at least not conveniently.  ;-)

I know Python quite well and was wondering whether PythonCAD can
help me.  The machine that produces the masks needs DXF or DWG
files.  I read that PyCAD has a rudimentary own scripting language
but I'd prefer Python.  So, is it possible to say something like

import pycad
my_drawing = pycad.Drawing()
my_drawing.circle(10, 15)
for i in range(100):
    my_drawing.rectangle(5, i, 10, i+0.5)
...
my_drawing.write("mask.dxf", "dxf")

I.e., I wouldn't use the GUI at all.  Thanks for any info!

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at jabber.org
                      (See http://ime.webhop.org for ICQ, MSN, etc.)


More information about the PythonCAD mailing list