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

Top Plate South

v1 Gemini approved

Create a timber top plate, 3000x100x45mm, C24 pine. It provides a downward sleeved timber spline into the routed channels on the top of the entire front south wall.

Dependencies

south_wall_left_col.top_support south_wall_mid_col.top_support south_wall_right_col.top_support south_wall_win_header.top_support south_wall_door_header.top_support
◉
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
◉
Provider: google | Profile: quality
◇
Received interface south_wall_left_col.side_spline_right: %{name: "side_spline_right", type: "spline", value: %{}, agent_id: "south_wall_left_col"}
◇
Received interface south_wall_left_col.top_support: %{name: "top_support", type: "face", value: %{}, agent_id: "south_wall_left_col"}
◇
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"}
◇
Received interface south_wall_mid_col.top_support: %{name: "top_support", type: "face", value: %{}, agent_id: "south_wall_mid_col"}
◇
Received interface south_wall_door_header.top_support: %{name: "top_support", type: "face", value: %{}, agent_id: "south_wall_door_header"}
◇
Received interface south_wall_win_header.top_support: %{name: "top_support", type: "face", value: %{}, agent_id: "south_wall_win_header"}
◉
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 (494 tokens)
◆
top_plate_south_v1.py · 41 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETERS ===
TOTAL_LENGTH = 3000.0  # mm
TOTAL_WIDTH = 100.0    # mm
TOTAL_HEIGHT = 45.0    # mm

SPLINE_DEPTH = 15.0    # mm (depth of the downward protrusion)
SPLINE_WIDTH = 34.0    # mm (~1/3 of the total width for a standard sliding fit)

# Derived dimensions
PLATE_HEIGHT = TOTAL_HEIGHT - SPLINE_DEPTH

# === DOCUMENT ===
doc = FreeCAD.ActiveDocument or FreeCAD.newDocument("TopPlateSouth")

# === GEOMETRY ===
# 1. Main top plate body
# Positioned such that its base is elevated by the spline's depth
plate = Part.makeBox(TOTAL_LENGTH, TOTAL_WIDTH, PLATE_HEIGHT, Vector(0, 0, SPLINE_DEPTH))

# 2. Downward sleeved timber spline
# Centered along the width (Y-axis) and sitting at the local origin's base (Z=0)
spline_y_offset = (TOTAL_WIDTH - SPLINE_WIDTH) / 2.0
spline = Part.makeBox(TOTAL_LENGTH, SPLINE_WIDTH, SPLINE_DEPTH, Vector(0, spline_y_offset, 0))

# 3. Fuse together into a single continuous solid
result = plate.fuse(spline)
result = result.removeSplitter()

# === FINAL ===
# Add the geometry to the document as a Part::Feature named exactly "Body"
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = result

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