Mesh lights in reasonable condition now.
|
@ -59,7 +59,8 @@ def generate_pendant_shade(shape_parameters):
|
|||
rad = shape_parameters["fixture_radius"]
|
||||
else:
|
||||
rad = morph_shape(abs(vert.co.z)-shape_parameters["stem_length"],
|
||||
depth, radius-shape_parameters["fixture_radius"],
|
||||
depth-shape_parameters["stem_length"],
|
||||
radius-shape_parameters["fixture_radius"],
|
||||
morph_type=shape_parameters["division_pattern"])
|
||||
rad += shape_parameters["fixture_radius"]
|
||||
vert.co.x = rad*math.sin(theta)
|
||||
|
@ -94,12 +95,13 @@ def generate_mesh_shade(shape_parameters):
|
|||
cube.name = "shade"
|
||||
bpy.ops.object.mode_set(mode='EDIT')
|
||||
|
||||
num_subdivisions = 3
|
||||
num_subdivisions = 4
|
||||
for idx in range(num_subdivisions):
|
||||
bpy.ops.mesh.subdivide()
|
||||
|
||||
bm = bmesh.from_edit_mesh(cube.data)
|
||||
slat_thickness = 0.05
|
||||
slat_thickness = 0.06
|
||||
max_rad = 0.0
|
||||
for i in range( len( bm.verts ) ):
|
||||
bm.verts.ensure_lookup_table()
|
||||
vert = bm.verts[i]
|
||||
|
@ -113,11 +115,14 @@ def generate_mesh_shade(shape_parameters):
|
|||
rad = shape_parameters["fixture_radius"]
|
||||
else:
|
||||
rad = morph_shape(abs(vert.co.z)-shape_parameters["stem_length"],
|
||||
depth,
|
||||
depth-shape_parameters["stem_length"],
|
||||
radius1-shape_parameters["fixture_radius"],
|
||||
morph_type=shape_parameters["division_pattern"])
|
||||
rad += shape_parameters["fixture_radius"]
|
||||
print(radius1, rad, shape_parameters["fixture_radius"])
|
||||
vert.co.x += rad
|
||||
if vert.co.x>max_rad:
|
||||
max_rad = vert.co.x
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
||||
|
@ -133,7 +138,7 @@ def generate_mesh_shade(shape_parameters):
|
|||
|
||||
# Add torus
|
||||
bpy.ops.mesh.primitive_torus_add(location=(0.0, 0.0, -depth),
|
||||
major_radius=radius1,
|
||||
major_radius=max_rad,
|
||||
minor_radius=0.02)
|
||||
|
||||
for ob in bpy.context.scene.objects:
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"shape": "mesh", "division_param2": 1.0, "division_pattern": "logistic", "radius": 4.2770602359636, "output": "test789", "division_param1": 1.0, "style": "billard", "fixture_radius": 0.3, "height": 0.7970418353862341, "fixture_length": 0.3, "stem_length": 0.5}
|
||||
{"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}
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 122 KiB |
BIN
src/utility/test789/test789.png0001.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
src/utility/test789/test789.png0002.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
src/utility/test789/test789.png0003.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
src/utility/test789/test789.png0004.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
src/utility/test789/test789.png0005.png
Normal file
After Width: | Height: | Size: 122 KiB |