Initial commit.
This commit is contained in:
parent
68d9a17dd1
commit
29ffa13092
17 changed files with 224546 additions and 0 deletions
33819
src/utility/base.stl
Normal file
33819
src/utility/base.stl
Normal file
File diff suppressed because it is too large
Load diff
15171
src/utility/chord.stl
Normal file
15171
src/utility/chord.stl
Normal file
File diff suppressed because it is too large
Load diff
40
src/utility/generate_image.py
Normal file
40
src/utility/generate_image.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
import os
|
||||
import product_gen.generate_lamp
|
||||
import product_gen.render_lamp
|
||||
|
||||
from argparse import ArgumentParser
|
||||
|
||||
def run(color):
|
||||
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)
|
||||
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)
|
||||
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 = color)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('-r', type=float, help='Red intensity.')
|
||||
parser.add_argument('-g', type=float, help='Red intensity.')
|
||||
parser.add_argument('-b', type=float, help='Red intensity.')
|
||||
args = parser.parse_args()
|
||||
run([args.r, args.g, args.b])
|
||||
|
BIN
src/utility/lamp.png
Normal file
BIN
src/utility/lamp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
42107
src/utility/shade.stl
Normal file
42107
src/utility/shade.stl
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue