2023年3月24日金曜日

円 穴 xyz

aaa
https://shion-no-yahiro.com/boolean/















import bpy
from math import radians

# Create outer circle
bpy.ops.mesh.primitive_circle_add(radius=2, vertices=32)

# Create inner circle
bpy.ops.mesh.primitive_circle_add(radius=1, vertices=32)

# Select the inner circle
inner_circle = bpy.context.object

# Move the inner circle to the center of the outer circle
inner_circle.location = (0, 0, 0)

# Add boolean modifier to the outer circle
modifier = bpy.context.object.modifiers.new(name="Boolean", type="BOOLEAN")
modifier.object = inner_circle
modifier.operation = 'DIFFERENCE'

# Apply the modifier to make the outer circle hollow
bpy.ops.object.modifier_apply(modifier='Boolean')

# Select rotation axis
zion_xyz = 'zana'

if zion_xyz == 'yana':
    # Rotate 90 degrees around X-axis
    bpy.context.object.rotation_euler[0] = radians(90)
    bpy.context.object.rotation_euler[1] = radians(0)
    bpy.context.object.rotation_euler[2] = radians(0)
    # Scale along X-axis
    bpy.context.object.scale[0] = 1
    bpy.context.object.scale[1] = 1
    bpy.context.object.scale[2] = 1
    
elif zion_xyz == 'xana':
    # Rotate 90 degrees around Y-axis
    bpy.context.object.rotation_euler[0] = radians(0)
    bpy.context.object.rotation_euler[1] = radians(90)
    bpy.context.object.rotation_euler[2] = radians(0)
    # Scale along Y-axis
    bpy.context.object.scale[0] = 1
    bpy.context.object.scale[1] = 1
    bpy.context.object.scale[2] = 1
    
elif zion_xyz == 'zana':
    # Rotate 90 degrees around Z-axis
    bpy.context.object.rotation_euler[0] = radians(0)
    bpy.context.object.rotation_euler[1] = radians(0)
    bpy.context.object.rotation_euler[2] = radians(0)
    # Scale along Z-axis
    bpy.context.object.scale[0] = 1
    bpy.context.object.scale[1] = 1
    bpy.context.object.scale[2] = 1
    
else:
    print('Invalid rotation axis selected.')

# Select the outer circle
bpy.context.view_layer.objects.active = bpy.context.selected_objects[0]
























bbb

連番 007 未来光円錐 過去光円錐 円周中心からの球体放出

aaa 参考 2023年3月26日日曜日 製作 002b 未来光円錐の方向 線路レールで https://ia2023sha.blogspot.com/2023/03/002b.html import bpy import math zion_co...