aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeurig <don@suspectdevices.com>2022-01-15 16:16:46 -0800
committerfeurig <don@suspectdevices.com>2022-01-15 16:16:46 -0800
commit3974f60f910e00a7157c350da06a30b5610ca25a (patch)
tree4dd860b280eabea77ed07b2738121fc56bea9d8b
parentd6dad460cd1a1fc8e5fc6da1a546711c90573316 (diff)
Make Second Layer Parameterized....
-rw-r--r--nextLayer.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/nextLayer.py b/nextLayer.py
index 6c6f8a2..78039c2 100644
--- a/nextLayer.py
+++ b/nextLayer.py
@@ -1,6 +1,11 @@
import bpy
import math
import mathutils
+StandLocationRadius=56.0
+MountRadius=2.5
+StandMountWallThickness=1
+StandRadius=MountRadius+StandMountWallThickness
+StandHoleRadius=MountRadius+StandMountWallThickness
bpy.ops.mesh.primitive_cylinder_add(vertices=64, radius=59, depth=5.0, location=(0,0, 1.25))
bigHole = bpy.context.selected_objects[0]
@@ -19,11 +24,10 @@ bpy.ops.object.select_all(action='DESELECT')
bpy.data.objects['BigHole'].select_set(state=True)
bpy.ops.object.delete()
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, depth=5.0, location=(0,55.0, 1.25))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandHoleRadius, depth=5.0, location=(0,(StandLocationRadius), 1.25))
screwHole = bpy.context.selected_objects[0]
screwHole.name="ScrewHole"
-
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=4.0, depth=3.0, location=(0,55.0, 1.5))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandRadius, depth=3.0, location=(0,(StandLocationRadius), 1.5))
stand = bpy.context.selected_objects[0]
stand.name="Stand"
@@ -54,11 +58,11 @@ bpy.data.objects['Stand'].select_set(state=True)
nextLayer = bpy.context.selected_objects[0]
nextLayer.name="NextLayer"
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, depth=5.0, location=(0,-55.0, 1.25))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandHoleRadius, depth=5.0, location=(0,-(StandLocationRadius), 1.25))
screwHole = bpy.context.selected_objects[0]
screwHole.name="ScrewHole"
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=4.0, depth=3.0, location=(0,-55.0, 1.5))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandRadius, depth=3.0, location=(0,-(StandLocationRadius), 1.5))
stand = bpy.context.selected_objects[0]
stand.name="Stand"
@@ -90,11 +94,11 @@ nextLayer = bpy.context.selected_objects[0]
nextLayer.name="NextLayer"
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, depth=5.0, location=(55.0, 0.0, 1.25))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandHoleRadius, depth=5.0, location=((StandLocationRadius), 0.0, 1.25))
screwHole = bpy.context.selected_objects[0]
screwHole.name="ScrewHole"
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=4.0, depth=3.0, location=(55.0, 0.0, 1.5))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandRadius, depth=3.0, location=((StandLocationRadius), 0.0, 1.5))
stand = bpy.context.selected_objects[0]
stand.name="Stand"
@@ -125,11 +129,11 @@ bpy.data.objects['Stand'].select_set(state=True)
nextLayer = bpy.context.selected_objects[0]
nextLayer.name="NextLayer"
#
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, depth=5.0, location=(-55.0, 0.0, 1.25))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandHoleRadius, depth=5.0, location=(-(StandLocationRadius), 0.0, 1.25))
screwHole = bpy.context.selected_objects[0]
screwHole.name="ScrewHole"
-bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=4.0, depth=3.0, location=(-55.0, 0.0, 1.5))
+bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=StandRadius, depth=3.0, location=(-(StandLocationRadius), 0.0, 1.5))
lastStand = bpy.context.selected_objects[0]
lastStand.name="LastStand"