Upgrade lighting setup and change to 600x600 px.
This commit is contained in:
parent
d4ac6705e5
commit
565ded39fc
28 changed files with 157 additions and 91139 deletions
33819
test/base.stl
33819
test/base.stl
File diff suppressed because it is too large
Load diff
15171
test/chord.stl
15171
test/chord.stl
File diff suppressed because it is too large
Load diff
BIN
test/lamp.png
BIN
test/lamp.png
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
42107
test/shade.stl
42107
test/shade.stl
File diff suppressed because it is too large
Load diff
BIN
test/test/test.blend
Normal file
BIN
test/test/test.blend
Normal file
Binary file not shown.
BIN
test/test/test.blend1
Normal file
BIN
test/test/test.blend1
Normal file
Binary file not shown.
1
test/test/test.json
Normal file
1
test/test/test.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"shape": "pendant", "radius": 0.5, "height": 1.5, "color": [0.1, 0.1, 0.1]}
|
BIN
test/test/test.png
Normal file
BIN
test/test/test.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 523 KiB |
|
@ -1,29 +1,27 @@
|
|||
import os
|
||||
import product_gen.generate_lamp
|
||||
import product_gen.render_lamp
|
||||
import sys
|
||||
import random
|
||||
import json
|
||||
import product_gen.generate_product
|
||||
from argparse import ArgumentParser
|
||||
|
||||
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 = [25.0, 128.0, 132.0])
|
||||
if __name__ == "__main__":
|
||||
|
||||
shape = "pendant"
|
||||
output = "test"
|
||||
|
||||
if not os.path.exists(os.getcwd() + "/" + output):
|
||||
os.makedirs(os.getcwd() + "/" + output)
|
||||
|
||||
height = 1.5
|
||||
radius = 0.5
|
||||
color = [0.1, 0.1, 0.1]
|
||||
|
||||
product_gen.generate_product.generate(shape, height, radius, color, output)
|
||||
|
||||
shape_parameters = {"shape": shape,
|
||||
"height": height,
|
||||
"radius": radius,
|
||||
"color": color}
|
||||
with open(os.getcwd() + "/" + output + "/"+ output + '.json', 'w') as outfile:
|
||||
json.dump(shape_parameters, outfile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue