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

South Wall Door Header

v1 Gemini approved

Create a SIP door header panel, 900x100x255mm. Cut 22.5mm deep routed channels on left and right faces to form timber spline joints with the mid and right columns.

Dependencies

south_wall_mid_col.side_spline_right south_wall_right_col.side_spline_left

Interfaces Provided

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

# === PARAMETRIC CONSTANTS ===
LENGTH = 900.0         # Total length of the header
WIDTH = 100.0          # Thickness of the SIP panel
HEIGHT = 255.0         # Height of the header

SPLINE_DEPTH = 22.5    # Depth of the routed channel
OSB_THICKNESS = 11.0   # Thickness of the OSB skins (standard 11mm)
CORE_WIDTH = WIDTH - (2.0 * OSB_THICKNESS)  # Width of the foam core to be routed

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

# === BUILD GEOMETRY (Direct Modeling) ===
# 1. Base SIP block
base_panel = Part.makeBox(LENGTH, WIDTH, HEIGHT, Vector(0, 0, 0))

# 2. Left face routing (removes foam core to depth of spline)
left_cut = Part.makeBox(
    SPLINE_DEPTH, 
    CORE_WIDTH, 
    HEIGHT, 
    Vector(0, OSB_THICKNESS, 0)
)

# 3. Right face routing (removes foam core to depth of spline)
right_cut = Part.makeBox(
    SPLINE_DEPTH, 
    CORE_WIDTH, 
    HEIGHT, 
    Vector(LENGTH - SPLINE_DEPTH, OSB_THICKNESS, 0)
)

# Apply boolean subtract operations
final_shape = base_panel.cut(left_cut).cut(right_cut)

# Clean up internal geometry edges
final_shape = final_shape.removeSplitter()

# Add geometry to the document
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = final_shape

# === FINAL ===
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)
◉
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 google / balanced
v0.0.985