32 lines
937 B
Python
32 lines
937 B
Python
|
import os
|
||
|
import product_gen.generate_lamp
|
||
|
import product_gen.render_lamp
|
||
|
|
||
|
height = 150.0
|
||
|
radius = 100.0
|
||
|
thickness = 3.0
|
||
|
shade = product_gen.generate_lamp.generate_shade(height, radius, thickness)
|
||
|
work_dir = os.getcwd()
|
||
|
shade.exportStl(work_dir + "/shade.stl")
|
||
|
|
||
|
height = 20.0
|
||
|
radius = 15.0
|
||
|
thickness = 3.0
|
||
|
base = product_gen.generate_lamp.generate_base(height, radius, thickness)
|
||
|
work_dir = os.getcwd()
|
||
|
base.exportStl(work_dir + "/base.stl")
|
||
|
|
||
|
height = 150.0
|
||
|
radius = 2.0
|
||
|
thickness = 1.0
|
||
|
chord = product_gen.generate_lamp.generate_chord(height, radius, thickness)
|
||
|
work_dir = os.getcwd()
|
||
|
chord.exportStl(work_dir + "/chord.stl")
|
||
|
|
||
|
product_gen.render_lamp.render_lamp(work_dir + "/shade.stl",
|
||
|
work_dir + "/base.stl",
|
||
|
work_dir + "/chord.stl",
|
||
|
work_dir + "/lamp.png",
|
||
|
color = [25.0, 128.0, 132.0])
|
||
|
|