diff options
| author | feurig <don@suspectdevices.com> | 2022-01-16 20:56:45 -0800 |
|---|---|---|
| committer | feurig <don@suspectdevices.com> | 2022-01-16 20:56:45 -0800 |
| commit | fb13f44e175ca7437250cc08588f67ca6695ef48 (patch) | |
| tree | 173c146694bb23c0e33d83065658aa68cb0247d0 | |
| parent | fd9539ec125c42214eb1ae63936507acda95a770 (diff) | |
Weird buggy shit
| -rw-r--r-- | nextLayer.blend | bin | 714424 -> 721656 bytes | |||
| -rw-r--r-- | nextLayer.blend1 | bin | 760444 -> 714424 bytes | |||
| -rw-r--r-- | nextLayer.py | 54 |
3 files changed, 31 insertions, 23 deletions
diff --git a/nextLayer.blend b/nextLayer.blend Binary files differindex 27f5661..f67cd89 100644 --- a/nextLayer.blend +++ b/nextLayer.blend diff --git a/nextLayer.blend1 b/nextLayer.blend1 Binary files differindex e11b2d9..27f5661 100644 --- a/nextLayer.blend1 +++ b/nextLayer.blend1 diff --git a/nextLayer.py b/nextLayer.py index c0e25b6..5239dd4 100644 --- a/nextLayer.py +++ b/nextLayer.py @@ -2,6 +2,9 @@ import bpy import math import mathutils +standLocationRadius=56.0 +standRadius=3.5 + bpy.ops.mesh.primitive_cylinder_add(vertices=64, radius=59, depth=5.0, location=(0,0, 1.25)) bigHole = bpy.context.selected_objects[0] bigHole.name="BigHole" @@ -19,13 +22,13 @@ 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,56, 1.25)) +bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, 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,56, 1.5)) -stand = bpy.context.selected_objects[0] -stand.name="Stand" +bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=4.0, depth=3.0, location=(0,-(standLocationRadius), 1.5)) +stand1 = bpy.context.selected_objects[0] +stand1.name="Stand1" bpy.ops.object.modifier_add(type='BOOLEAN') @@ -38,7 +41,7 @@ bpy.data.objects['ScrewHole'].select_set(state=True) bpy.ops.object.delete() bpy.ops.object.select_all(action='DESELECT') -bpy.data.objects['Stand'].select_set(state=False) +bpy.data.objects['Stand1'].select_set(state=False) bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.modifier_add(type='BOOLEAN') @@ -50,17 +53,17 @@ bpy.ops.object.select_all(action='DESELECT') bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.delete() -bpy.data.objects['Stand'].select_set(state=True) +bpy.data.objects['Stand1'].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=1.5, 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" +stand.name="Stand2" bpy.ops.object.modifier_add(type='BOOLEAN') @@ -73,7 +76,7 @@ bpy.data.objects['ScrewHole'].select_set(state=True) bpy.ops.object.delete() bpy.ops.object.select_all(action='DESELECT') -bpy.data.objects['Stand'].select_set(state=False) +bpy.data.objects['Stand2'].select_set(state=False) bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.modifier_add(type='BOOLEAN') @@ -85,18 +88,21 @@ bpy.ops.object.select_all(action='DESELECT') bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.delete() -bpy.data.objects['Stand'].select_set(state=True) +bpy.data.objects['Stand2'].select_set(state=True) nextLayer = bpy.context.selected_objects[0] nextLayer.name="NextLayer" +bpy.context.scene.cursor.location = mathutils.Vector((0.0,0.0,0.0)) +bpy.ops.object.origin_set(type='ORIGIN_CURSOR') - -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=1.5, 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)) -stand = bpy.context.selected_objects[0] -stand.name="Stand" +bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=(standRadius), depth=3.0, + location=(-(standLocationRadius), 0.0, 1.5)) +stand3 = bpy.context.selected_objects[0] +stand3.name="Stand3" bpy.ops.object.modifier_add(type='BOOLEAN') @@ -109,7 +115,7 @@ bpy.data.objects['ScrewHole'].select_set(state=True) bpy.ops.object.delete() bpy.ops.object.select_all(action='DESELECT') -bpy.data.objects['Stand'].select_set(state=False) +bpy.data.objects['Stand3'].select_set(state=False) bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.modifier_add(type='BOOLEAN') @@ -121,15 +127,17 @@ bpy.ops.object.select_all(action='DESELECT') bpy.data.objects['NextLayer'].select_set(state=True) bpy.ops.object.delete() -bpy.data.objects['Stand'].select_set(state=True) +bpy.data.objects['Stand3'].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.context.scene.cursor.location = mathutils.Vector((0.0,0.0,0.0)) +bpy.ops.object.origin_set(type='ORIGIN_CURSOR') + +bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.5, 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" @@ -148,7 +156,7 @@ bpy.data.objects['LastStand'].select_set(state=False) theStand=bpy.data.objects['LastStand'] nextLayer = bpy.data.objects['NextLayer'] nextLayer.select_set(state=True) -#bpy.context.active_object = nextLayer +bpy.context.active_object = nextLayer bpy.ops.object.modifier_add(type='BOOLEAN') bpy.context.object.modifiers["Boolean"].object = nextLayer @@ -157,7 +165,7 @@ bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean") bpy.ops.object.select_all(action='DESELECT') bpy.data.objects['NextLayer'].select_set(state=True) -bpy.ops.object.delete() +#bpy.ops.object.delete() nextLayer = bpy.data.objects['LastStand'] #bpy.data.objects['Stand'].select_set(state=True) nextLayer.name="NextLayer" |
