← Test Lab — Gemini — 2026-05-15T12:44

Front Entry Door

v1 Gemini approved

Create a timber framed and glazed front entry door, 890x45x2090mm. Swings outward. Mounts to the left jamb with 3 steel butt hinges.

Dependencies

south_wall_mid_col.hinge_jamb
◉
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
◉
Provider: google | Profile: quality
◇
Received interface south_wall_mid_col.hinge_jamb: %{name: "hinge_jamb", type: "face", value: %{}, agent_id: "south_wall_mid_col"}
◉
All dependencies resolved, starting generation
◉
Generating v1
◇
Received interface south_wall_mid_col.side_spline_left: %{name: "side_spline_left", type: "spline", value: %{}, agent_id: "south_wall_mid_col"}
○
Calling Gemini API for code generation (gemini-3.1-pro-preview)...
◇
Received interface south_wall_mid_col.side_spline_right: %{name: "side_spline_right", type: "spline", value: %{}, agent_id: "south_wall_mid_col"}
◇
Received interface south_wall_mid_col.top_support: %{name: "top_support", type: "face", value: %{}, agent_id: "south_wall_mid_col"}
◉
Generation token budget: max_tokens=12288, thinking_budget=0 (retry_count=0)
●
Received response (1115 tokens)
◆
front_door_v1.py · 88 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETRIC CONSTANTS ===
WIDTH = 890.0
THICKNESS = 45.0
HEIGHT = 2090.0

STILE_W = 120.0
TOP_RAIL_H = 120.0
BOTTOM_RAIL_H = 200.0
MID_RAIL_H = 120.0
MID_RAIL_Z = 900.0

PANEL_THICKNESS = 15.0
GLASS_THICKNESS = 10.0

HINGE_HEIGHT = 100.0
HINGE_WIDTH = 35.0
HINGE_DEPTH = 3.0
HINGE_BARREL_R = 6.0
# Hinge placements: bottom, middle, top
HINGE_CENTERS = [250.0, HEIGHT / 2.0, HEIGHT - 250.0]
# === END PARAMETRIC CONSTANTS ===

# === DOCUMENT & BODY ===
doc = FreeCAD.ActiveDocument or FreeCAD.newDocument("Model")

# === BUILD GEOMETRY ===
# 1. Base Timber Door Frame
door_wood = Part.makeBox(WIDTH, THICKNESS, HEIGHT)

# 2. Cut Openings for Panel and Glass
bot_open_W = WIDTH - 2 * STILE_W
bot_open_H = MID_RAIL_Z - BOTTOM_RAIL_H
bot_opening = Part.makeBox(bot_open_W, THICKNESS, bot_open_H, Vector(STILE_W, 0, BOTTOM_RAIL_H))

top_open_W = WIDTH - 2 * STILE_W
top_open_H = HEIGHT - TOP_RAIL_H - (MID_RAIL_Z + MID_RAIL_H)
top_opening = Part.makeBox(top_open_W, THICKNESS, top_open_H, Vector(STILE_W, 0, MID_RAIL_Z + MID_RAIL_H))

door_wood = door_wood.cut(bot_opening).cut(top_opening)

# 3. Add Insert Panels (Bottom Solid, Top Glass)
bot_panel = Part.makeBox(
    bot_open_W, PANEL_THICKNESS, bot_open_H,
    Vector(STILE_W, (THICKNESS - PANEL_THICKNESS) / 2.0, BOTTOM_RAIL_H)
)

top_glass = Part.makeBox(
    top_open_W, GLASS_THICKNESS, top_open_H,
    Vector(STILE_W, (THICKNESS - GLASS_THICKNESS) / 2.0, MID_RAIL_Z + MID_RAIL_H)
)

# Combine the timber frame with the panels
door_solid = door_wood.fuse(bot_panel).fuse(top_glass)

# 4. Add Hinge Hardware & Recesses
hardware_shapes = []
for hz in HINGE_CENTERS:
    # Cut timber recess for the hinge leaf
    recess = Part.makeBox(HINGE_DEPTH, HINGE_WIDTH, HINGE_HEIGHT, Vector(0, 0, hz - HINGE_HEIGHT / 2.0))
    door_solid = door_solid.cut(recess)

    # Re-add the steel hinge leaf to fill the recess
    leaf = Part.makeBox(HINGE_DEPTH, HINGE_WIDTH, HINGE_HEIGHT, Vector(0, 0, hz - HINGE_HEIGHT / 2.0))
    
    # Add the pivot barrel exactly on the kinematic rotation axis (X=0, Y=0)
    barrel = Part.makeCylinder(HINGE_BARREL_R, HINGE_HEIGHT, Vector(0, 0, hz - HINGE_HEIGHT / 2.0))
    
    hardware_shapes.extend([leaf, barrel])

# Merge all hardware into the door body
final_shape = door_solid
for shape in hardware_shapes:
    final_shape = final_shape.fuse(shape)

# Clean up internal boolean split lines
final_shape = final_shape.removeSplitter()

# === FINAL ===
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = final_shape
doc.recompute()

if FreeCAD.GuiUp:
    FreeCAD.Gui.ActiveDocument.ActiveView.fitAll()
●
Executing in FreeCAD...
◉
StepAnalyzer failed: FreeCAD could not read STEP file: FreeCAD exception thrown (File to load not existing or not readable) — skipping
●
FreeCAD execution succeeded
●
Exported: model.stl
◉
Generation succeeded and component was auto-approved (v1)
◉
All components approved — triggering placement recomputation
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to anthropic
◉
Provider updated to google / balanced
v0.0.985