← Small Garden House

Front Left Window

v1 Claude approved

Create uPVC window insert, 1000mm length x 400mm width x 1400mm height.

Dependencies

front_wall.window_openings
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
Provider: google | Profile: balanced
Provider updated to google / balanced
Provider updated to google / balanced
Received interface front_wall.inner_face: %{name: "inner_face", type: "butt_joint", value: %{}, agent_id: "front_wall"}
Received interface front_wall.top_surface: %{name: "top_surface", type: "face_contact", value: %{}, agent_id: "front_wall"}
Received interface front_wall.window_openings: %{name: "window_openings", type: "clearance", value: %{}, agent_id: "front_wall"}
All dependencies resolved, starting generation
Generating v1
Provider updated to google / balanced
Calling Gemini API for code generation (gemini-3.1-pro-preview)...
Generation token budget: max_tokens=12288, thinking_budget=0 (retry_count=0)
Provider updated to google / balanced
Provider updated to google / balanced
Received response (955 tokens)
window_front_1_v1.py · 87 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETERS ===
# Dimensions map to X=Length, Y=Width (Depth), Z=Height
LENGTH = 1000
WIDTH = 400
HEIGHT = 1400

FRAME_THICKNESS = 70
SASH_THICKNESS = 60
SASH_DEPTH = 60
GLASS_THICKNESS = 24
MULLION_WIDTH = 60

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

# === BUILD GEOMETRY ===

# 1. Outer Frame (occupies the full depth of the wall opening)
outer_base = Part.makeBox(LENGTH, WIDTH, HEIGHT)
outer_cut = Part.makeBox(
    LENGTH - 2 * FRAME_THICKNESS,
    WIDTH,
    HEIGHT - 2 * FRAME_THICKNESS,
    Vector(FRAME_THICKNESS, 0, FRAME_THICKNESS)
)
outer_frame = outer_base.cut(outer_cut)

# 2. Sash Frame (Inner frame holding the glass)
sash_y = (WIDTH - SASH_DEPTH) / 2  # Centered in the deep outer frame

sash_base = Part.makeBox(
    LENGTH - 2 * FRAME_THICKNESS,
    SASH_DEPTH,
    HEIGHT - 2 * FRAME_THICKNESS,
    Vector(FRAME_THICKNESS, sash_y, FRAME_THICKNESS)
)

sash_cut = Part.makeBox(
    LENGTH - 2 * FRAME_THICKNESS - 2 * SASH_THICKNESS,
    SASH_DEPTH,
    HEIGHT - 2 * FRAME_THICKNESS - 2 * SASH_THICKNESS,
    Vector(FRAME_THICKNESS + SASH_THICKNESS, sash_y, FRAME_THICKNESS + SASH_THICKNESS)
)
sash = sash_base.cut(sash_cut)

# 3. Central Mullion (Vertical divider)
mullion = Part.makeBox(
    MULLION_WIDTH,
    SASH_DEPTH,
    HEIGHT - 2 * FRAME_THICKNESS - 2 * SASH_THICKNESS,
    Vector((LENGTH - MULLION_WIDTH) / 2, sash_y, FRAME_THICKNESS + SASH_THICKNESS)
)
sash = sash.fuse(mullion)

# 4. Glass Panes
glass_y = sash_y + (SASH_DEPTH - GLASS_THICKNESS) / 2
glass_pane_w = (LENGTH - 2 * FRAME_THICKNESS - 2 * SASH_THICKNESS - MULLION_WIDTH) / 2
glass_pane_h = HEIGHT - 2 * FRAME_THICKNESS - 2 * SASH_THICKNESS

glass_1 = Part.makeBox(
    glass_pane_w,
    GLASS_THICKNESS,
    glass_pane_h,
    Vector(FRAME_THICKNESS + SASH_THICKNESS, glass_y, FRAME_THICKNESS + SASH_THICKNESS)
)

glass_2 = Part.makeBox(
    glass_pane_w,
    GLASS_THICKNESS,
    glass_pane_h,
    Vector(FRAME_THICKNESS + SASH_THICKNESS + glass_pane_w + MULLION_WIDTH, glass_y, FRAME_THICKNESS + SASH_THICKNESS)
)

# === COMBINE AND ADD TO DOCUMENT ===
window = outer_frame.fuse([sash, glass_1, glass_2])
window = window.removeSplitter()

feature = doc.addObject("Part::Feature", "WindowInsert")
feature.Shape = window
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
Ready for review (v1)
Provider updated to google
Component approved by user
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
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
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.542