"""
Moorebot Scout Robot Model
Generated by Gemini AI
Creates a detailed 3D model of the Moorebot Scout robot with:
- Chassis body (115x100x80mm with rounded bevel)
- 4 mecanum wheels with proper roller orientation
- Camera "eye" sensor mount
- Proper scale and positioning for robotics simulation
Author: Gemini AI
Category: robots
Tags: mecanum, wheeled, scout, moorebot
Dimensions: 115x100x80mm
Complexity: Medium
"""
import math
import bpy
# Clear scene
bpy.ops.object.select_all(action="SELECT")
bpy.ops.object.delete()
def create_mecanum_wheel(name, location, is_right_hand):
"""Create a mecanum wheel with properly oriented rollers."""
# Create the Hub
bpy.ops.mesh.primitive_cylinder_add(radius=15, depth=15, location=location)
hub = bpy.context.active_object
hub.name = f"{name}_Hub"
hub.rotation_euler[1] = math.radians(90) # Face sideways
# Create 8 rollers around the hub
num_rollers = 8
angle_offset = 45 if is_right_hand else -45
for i in range(num_rollers):
angle = (i / num_rollers) * math.pi * 2
# Position roller on the circumference
r_x = location[0]
r_y = location[1] + math.sin(angle) * 15
r_z = location[2] + math.cos(angle) * 15
bpy.ops.mesh.primitive_cylinder_add(radius=4, depth=18, location=(r_x, r_y, r_z))
roller = bpy.context.active_object
roller.name = f"{name}_Roller_{i}"
# The Secret Sauce: Rotate roller 45 degrees relative to wheel axis
roller.rotation_euler[0] = angle
roller.rotation_euler[1] = math.radians(angle_offset)
# Parent to Hub
roller.parent = hub
# 1. Create Chassis (115x100x80)
bpy.ops.mesh.primitive_cube_add(size=1, location=(0, 0, 50))
scout = bpy.context.active_object
scout.dimensions = (115, 100, 60)
scout.name = "Scout_Body"
# Rounded "Vibe Architect" Bevel
mod = scout.modifiers.new(name="ScoutBevel", type="BEVEL")
mod.width = 15
mod.segments = 8
# 2. Add the 4 Mecanum Wheels
# Offset: X +/- 50, Y +/- 40
create_mecanum_wheel("FL", (50, 45, 25), True) # Front Left
create_mecanum_wheel("FR", (-50, 45, 25), False) # Front Right
create_mecanum_wheel("BL", (50, -45, 25), False) # Back Left
create_mecanum_wheel("BR", (-50, -45, 25), True) # Back Right
# 3. Add the Camera "Eye"
bpy.ops.mesh.primitive_uv_sphere_add(radius=12, location=(0, 55, 65))
camera = bpy.context.active_object
camera.name = "Scout_Eye"