diff --git a/src/product_gen/__pycache__/generate_shades.cpython-35.pyc b/src/product_gen/__pycache__/generate_shades.cpython-35.pyc index 0aa8352..0b890f6 100644 Binary files a/src/product_gen/__pycache__/generate_shades.cpython-35.pyc and b/src/product_gen/__pycache__/generate_shades.cpython-35.pyc differ diff --git a/src/product_gen/generate_shades.py b/src/product_gen/generate_shades.py index da853c2..7b762fc 100644 --- a/src/product_gen/generate_shades.py +++ b/src/product_gen/generate_shades.py @@ -102,6 +102,9 @@ def generate_mesh_shade(shape_parameters): bm = bmesh.from_edit_mesh(cube.data) slat_thickness = 0.06 max_rad = 0.0 + max_z = 0.0 + min_z = 0.0 + rad_min_z = 0.0 for i in range( len( bm.verts ) ): bm.verts.ensure_lookup_table() vert = bm.verts[i] @@ -114,7 +117,7 @@ def generate_mesh_shade(shape_parameters): if abs(vert.co.z)max_rad: max_rad = vert.co.x + max_z = vert.co.z + + if vert.co.z0.5: + bpy.ops.mesh.primitive_torus_add(location=(0.0, 0.0, min_z), + major_radius=rad_min_z, + minor_radius=0.02) for ob in bpy.context.scene.objects: if ob.type == 'MESH': diff --git a/src/rendering/__pycache__/setup_renderer.cpython-35.pyc b/src/rendering/__pycache__/setup_renderer.cpython-35.pyc index 6eabeae..aabeac7 100644 Binary files a/src/rendering/__pycache__/setup_renderer.cpython-35.pyc and b/src/rendering/__pycache__/setup_renderer.cpython-35.pyc differ diff --git a/src/rendering/setup_renderer.py b/src/rendering/setup_renderer.py index d365d35..34fa8b1 100644 --- a/src/rendering/setup_renderer.py +++ b/src/rendering/setup_renderer.py @@ -20,4 +20,5 @@ def setup_renderer(shape_parameters, engine="CYCLES"): this_scene.render.resolution_y = 600.0 this_scene.render.tile_x = 32 this_scene.render.tile_y = 32 - this_scene.render.resolution_percentage = 50.0 \ No newline at end of file + this_scene.render.resolution_percentage = 50.0 + this_scene.render.image_settings.compression = 60.0 \ No newline at end of file diff --git a/src/shapes/__pycache__/shape_description.cpython-35.pyc b/src/shapes/__pycache__/shape_description.cpython-35.pyc index 6e95e91..f510404 100644 Binary files a/src/shapes/__pycache__/shape_description.cpython-35.pyc and b/src/shapes/__pycache__/shape_description.cpython-35.pyc differ diff --git a/src/shapes/shape_description.py b/src/shapes/shape_description.py index c8f14cc..2944a2e 100644 --- a/src/shapes/shape_description.py +++ b/src/shapes/shape_description.py @@ -43,8 +43,10 @@ def get_random_shape_description(shape, bbox, feature_min): shape_description = copy.deepcopy(_shape_description) shape_description["shape"] = shape - feature_height = feature_min[1] + random.random()*(bbox[1]-feature_min[1]) feature_radius = feature_min[0] + random.random()*(bbox[0]-feature_min[0]) + #feature_height = 0.8*feature_radius + feature_height = feature_min[1] + random.random()*(bbox[1]-feature_min[1]) + shape_description["height"] = feature_height shape_description["radius"] = feature_radius shape_description["division_pattern"] = random.choice(_division_types) diff --git a/src/utility/test789/test789.blend b/src/utility/test789/test789.blend index 5faacdf..f8d0c45 100644 Binary files a/src/utility/test789/test789.blend and b/src/utility/test789/test789.blend differ diff --git a/src/utility/test789/test789.blend1 b/src/utility/test789/test789.blend1 index d388e6e..976c997 100644 Binary files a/src/utility/test789/test789.blend1 and b/src/utility/test789/test789.blend1 differ diff --git a/src/utility/test789/test789.json b/src/utility/test789/test789.json index e0eed55..7ccf48f 100644 --- a/src/utility/test789/test789.json +++ b/src/utility/test789/test789.json @@ -1 +1 @@ -{"shape": "mesh", "radius": 2.436703407562188, "division_param1": 1.0, "fixture_radius": 0.3, "output": "test789", "division_pattern": "sinusoid", "height": 1.9801308149425492, "style": "billard", "division_param2": 1.0, "fixture_length": 0.3, "stem_length": 0.5} \ No newline at end of file +{"division_param1": 1.0, "division_param2": 1.0, "stem_length": 0.5, "fixture_length": 0.3, "style": "billard", "radius": 3.687568125159161, "output": "test789", "shape": "mesh", "division_pattern": "circle", "fixture_radius": 0.3, "height": 3.6552215108138246} \ No newline at end of file diff --git a/src/utility/test789/test789.png b/src/utility/test789/test789.png index 743e12b..33c7156 100644 Binary files a/src/utility/test789/test789.png and b/src/utility/test789/test789.png differ