OpenSCAD is very powerful, but its also very limited, because variables can only be assigned once and trick workarounds are required to overcome this shortness. Why dont use another interpreter - like Python ?
Python has all the options you like and you can do clever things before rendering your 3D shapes( e.g. calculate the bits of an QR code)
This Variant is still under heavy development, but it already available for testing. Following commands are already available. My plan is to implement all of them and even more
These are the commands which are already available:
cube cylinder sphere
translate rotate
union intersection difference
square circle
linear_extrude rotate_extrude
A possible working program looks like
def foot(x,y):
c=cube([1,1,10])
return translate(c,[x,y,0])
def plate():
return cube([11,11,1])
parts=[]
parts.append(translate(plate(),[0,0,10]))
for y in [0,10]:
for x om [0,10]:
parts.append(foot(x,y]))
output(union(parts))
Have a look at its web page. it is at http://www.guenther-sohler.net/openscad
Category: Art ToolsThe author marked this model as their own original creation. Imported from Thingiverse.