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

South Wall Middle Column

v1 Gemini approved

Create a mid-column SIP panel, 400x100x2310mm. Cut 45mm deep routed channels on the bottom. Cut 22.5mm deep routed channels on both vertical faces to accept timber spline joints from the sill, headers, and adjacent parts. Left jamb provides hinge mounting points.

Dependencies

base_plate_south_left.base_spline south_wall_sill.side_spline_right

Interfaces Provided

hinge_jamb (face) side_spline_left (spline) side_spline_right (spline) top_support (face)
◉
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
◉
Provider: google | Profile: quality
◇
Received interface base_plate_south_left.base_spline: %{name: "base_spline", type: "spline", value: %{}, agent_id: "base_plate_south_left"}
◇
Received interface south_wall_sill.sill_top: %{name: "sill_top", type: "face", value: %{}, agent_id: "south_wall_sill"}
◇
Received interface south_wall_sill.side_spline_right: %{name: "side_spline_right", type: "spline", value: %{}, agent_id: "south_wall_sill"}
◉
All dependencies resolved, starting generation
◉
Generating v1
○
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 (1134 tokens)
◆
south_wall_mid_col_v1.py · 104 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETRIC CONSTANTS ===
# Part dimensions
WIDTH = 400.0
DEPTH = 100.0
HEIGHT = 2310.0

# SIP routing specs
OSB_THICKNESS = 15.0
CORE_DEPTH = DEPTH - (2.0 * OSB_THICKNESS)  # 70mm foam core
BOTTOM_CHANNEL_DEPTH = 45.0
SIDE_CHANNEL_DEPTH = 22.5

# Assembly positioning (offsets applied to find local coordinates)
ASSEMBLY_POS_X = 1500.0
ASSEMBLY_POS_Z = 45.0

# Kinematic hinge joint (pivot origin in assembly space)
# We map these to the local coordinate system of this part
LOCAL_PIVOT_X = 1900.0 - ASSEMBLY_POS_X  # 400.0 (Right face of the column)
LOCAL_PIVOT_Y = 60.0
LOCAL_PIVOT_Z = 1050.0 - ASSEMBLY_POS_Z  # 1005.0 (Center hinge)

# Hinge mortise dimensions
HINGE_MORTISE_W = 30.0  # Width across Y
HINGE_MORTISE_H = 100.0 # Height across Z
HINGE_MORTISE_D = 3.0   # Depth into X
SCREW_HOLE_RADIUS = 2.0
SCREW_HOLE_DEPTH = 30.0

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

# === SKETCHES & FEATURES ===
# Base SIP block
panel = Part.makeBox(WIDTH, DEPTH, HEIGHT)

# 1. Routed bottom channel (for sill spline)
bottom_channel = Part.makeBox(
    WIDTH, 
    CORE_DEPTH, 
    BOTTOM_CHANNEL_DEPTH, 
    Vector(0, OSB_THICKNESS, 0)
)
panel = panel.cut(bottom_channel)

# 2. Routed left vertical channel
left_channel = Part.makeBox(
    SIDE_CHANNEL_DEPTH, 
    CORE_DEPTH, 
    HEIGHT, 
    Vector(0, OSB_THICKNESS, 0)
)
panel = panel.cut(left_channel)

# 3. Routed right vertical channel
right_channel = Part.makeBox(
    SIDE_CHANNEL_DEPTH, 
    CORE_DEPTH, 
    HEIGHT, 
    Vector(WIDTH - SIDE_CHANNEL_DEPTH, OSB_THICKNESS, 0)
)
panel = panel.cut(right_channel)

# 4. Hinge Mortises (Left Jamb of the doorway = Right face of this column at X=400)
# Standard 3-hinge setup based off the central kinematic pivot point
hinge_z_centers = [LOCAL_PIVOT_Z - 800.0, LOCAL_PIVOT_Z, LOCAL_PIVOT_Z + 800.0]

for z_c in hinge_z_centers:
    # Cut rectangular mortise
    y_start = LOCAL_PIVOT_Y - (HINGE_MORTISE_W / 2.0)
    z_start = z_c - (HINGE_MORTISE_H / 2.0)
    x_start = WIDTH - HINGE_MORTISE_D
    
    mortise = Part.makeBox(
        HINGE_MORTISE_D,
        HINGE_MORTISE_W,
        HINGE_MORTISE_H,
        Vector(x_start, y_start, z_start)
    )
    panel = panel.cut(mortise)
    
    # Drill pilot holes for screws (3 per hinge)
    for offset in [-35.0, 0.0, 35.0]:
        screw_z = z_c + offset
        hole = Part.makeCylinder(
            SCREW_HOLE_RADIUS, 
            SCREW_HOLE_DEPTH, 
            Vector(WIDTH, LOCAL_PIVOT_Y, screw_z), 
            Vector(-1, 0, 0)  # Inward direction (-X)
        )
        panel = panel.cut(hole)

# === FINAL ===
# Use Part::Feature named "Body" to ensure export compatibility
feature = doc.addObject("Part::Feature", "Body")
feature.Shape = panel

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