[OpenSCAD] PyOpenSCAD - Demand, priorities?

Evan T. Jones evan_t_jones at mac.com
Sun Feb 13 00:15:40 CET 2011

Strictly Python => OpenSCAD code compiling.  This doesn't remove OpenSCAD code from the toolchain, but means it can happen in the background and you're free to use all the python libraries, mutable dictionaries, or anything else that you want to generate the raw SCAD code.  The Amaze-ing Box (http://www.thingiverse.com/thing:1481)  is a pretty comprehensive example that uses a Python imaging library to wrap an image around a cylinder and extrude the image into a maze.  

A simple example:


from pyopenscad import *
use( '/path/to/MCAD/boxes.scad')

d = difference()
d.add( roundedBox( size=[15, 20, 10], radius=2.5, sidesonly=False))
d.add( cube(8))

print scad_render( d)

yields the OpenSCAD string:

use </path/to/MCAD/boxes.scad>

difference() {
	roundedBox(sidesonly = false, radius = 2.5000000000, size = [15, 20, 10]);
	cube(center = false, size = 8);


On Feb 12, 2011, at 2:52 PM, Bryan Bishop wrote:

> On Sat, Feb 12, 2011 at 4:35 PM, Evan T. Jones <evan_t_jones at mac.com> wrote:
> TL;DNR:  I'm gonna release a Python => OpenSCAD bridge.  Anybody interested?
> Sure, I'm interested. What is it that your python library actually does? Does it replace CGAL and OpenCSG? Does it spit out .scad files? Does it use pyparsing (or whatever) to convert .scad files to stl?
> - Bryan
> http://heybryan.org/
> 1 512 203 0507

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20110213/84744a7d/attachment.html

More information about the OpenSCAD mailing list