Exemplo n.º 1
0
def example001(size=50, hole=25):
	cy_r = float(hole)/2
	cy_h = (float(size) * 2.5)/2
	
	s = sphere(size/2)
	c1 = cylinder(cy_h, cy_r, transforms={'rotate': (0, 0, 0)}, center=True)
	c2 = cylinder(cy_h, cy_r, transforms={'rotate': (90, 0, 0)}, center=True)
	c3 = cylinder(cy_h, cy_r, transforms={'rotate': (0, 90, 0)}, center=True)
	render_example(s-c1-c2-c3, 'example001')
Exemplo n.º 2
0
def example001(size=50, hole=25):
    cy_r = float(hole) / 2
    cy_h = (float(size) * 2.5) / 2

    s = sphere(size / 2)
    c1 = cylinder(cy_h, cy_r, transforms={'rotate': (0, 0, 0)}, center=True)
    c2 = cylinder(cy_h, cy_r, transforms={'rotate': (90, 0, 0)}, center=True)
    c3 = cylinder(cy_h, cy_r, transforms={'rotate': (0, 90, 0)}, center=True)
    render_example(s - c1 - c2 - c3, 'example001')
Exemplo n.º 3
0
import pyscad

c = pyscad.cube(10)
s = pyscad.sphere(3, position=(10,10,10))
i = c+s

i.export_stl('./demo.stl')

print "Source:"
print i.to_source()
print ''

i.render()
Exemplo n.º 4
0
import pyscad

c = pyscad.cube(10)
s = pyscad.sphere(3, position=(10, 10, 10))
i = c + s

i.export_stl('./demo.stl')

print "Source:"
print i.to_source()
print ''

i.render()