TIER 4 · COMPLEX GEOMETRY·t4_01

A spur gear with 20 teeth, module 2mm (so pitch diameter 40mm), face width 10mm, and a central bore 8mm in diameter.

Claude Opus 4.6Zoo ML-ephantGemini 2.5 FlashGPT-5Text2CadQuery (Qwen 3B)
3D RENDER · Text2CadQuery (Qwen 3B)
CADQUERY (PYTHON)SOURCE
✓ executed
import cadquery as cq

# --- Part 1: Spur Gear ---
outer_radius = 0.02 * 0.04  # Sketch radius scaled
inner_radius = 0.01 * 0.04  # Inner hole radius scaled
tooth_width = (0.025 - 0.015) * 0.04  # Width of each tooth
num_teeth = 20
extrude_depth = 0.01

part_1 = (
    cq.Workplane("XY")
    .circle(outer_radius)
    .extrude(extrude_depth)
    .faces(">Z")
    .workplane()
    .circle(inner_radius)
    .cutThruAll()
)

# Create the teeth profile
tooth_profile = (
    cq.Workplane("XY")
    .moveTo(0.01 * 0.04, 0)
    .lineTo(0.02 * 0.04, 0)
    .lineTo(0.02 * 0.04, tooth_width)
    .lineTo(0.015 * 0.04, tooth_width)
    .lineTo(0.01 * 0.04, 0)
    .close()
)

# Extrude the teeth profile to create the teeth
tooths = tooth_profile.extrude(extrude_depth)

# Position the teeth on the gear
for i in range(num_teeth):
    angle = i * 360 / num_teeth
    rotated_tooths = tooths.rotate((0, 0, 0), (0, 0, 1), angle)
    part_1 = part_1.union(rotated_tooths)

# --- Coordinate System Transformation for Part 1 ---
part_1 = part_1.translate((0.005, 0.005, 0))

# --- Assembly ---
assembly = part_1

# Export to STL
cq.exporters.export(assembly, "./stlcq/0079/00795900.stl")
COMPARE · SAME PROMPT
Claude Opus 4.6
Zoo ML-ephant
Gemini 2.5 Flash
'Workplane' object has no attribute 'gear'
GPT-5
no output