Add more general shape description.
This commit is contained in:
parent
cfb558e540
commit
422f458469
27 changed files with 234 additions and 106 deletions
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"height": 1.5, "color": [0.1, 0.1, 0.1], "shape": "bio", "radius": 1.5}
|
||||
{"shape": "pendant", "style": "dark", "division_patterns": ["ramp", "ramp", "inv_ramp", "inv_sine"], "fixture_radius": 0.3, "height": 4.305539689400392, "radius": 0.8584699492695225, "division_offsets": [0.25, 0.25, 0.25, 0.25], "division_radii": [0.5441324228652892, 0.6530641783849034, 0.7409502304795115, 0.751148488921151]}
|
Binary file not shown.
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 119 KiB |
|
@ -3,6 +3,7 @@ import sys
|
|||
import random
|
||||
import json
|
||||
import product_gen.generate_product
|
||||
import shapes.shape_description as sd
|
||||
from argparse import ArgumentParser
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -13,15 +14,17 @@ if __name__ == "__main__":
|
|||
if not os.path.exists(os.getcwd() + "/" + output):
|
||||
os.makedirs(os.getcwd() + "/" + output)
|
||||
|
||||
height = 1.5
|
||||
radius = 1.5
|
||||
color = [0.1, 0.1, 0.1]
|
||||
# Global bounding box
|
||||
bbox_xmax = 4.0
|
||||
bbox_ymax = 5.0
|
||||
|
||||
# Minimum feature sizes
|
||||
feature_xmin = 0.4
|
||||
feature_ymin = 1.0
|
||||
shape_parameters = sd.get_random_shape_description(shape,
|
||||
[bbox_xmax, bbox_ymax],
|
||||
[feature_xmin, feature_ymin])
|
||||
shape_parameters = product_gen.generate_product.generate(shape_parameters, output)
|
||||
|
||||
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