← Small Garden House

Left Wall Front Window

v1 Claude approved

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

Dependencies

left_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
◉
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
◇
Received interface left_wall.top_surface: %{name: "top_surface", type: "face_contact", value: %{}, agent_id: "left_wall"}
◇
Received interface left_wall.window_openings: %{name: "window_openings", type: "clearance", value: %{}, agent_id: "left_wall"}
◉
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)
◉
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
●
Received response (912 tokens)
◆
window_left_1_v1.py · 69 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETRIC CONSTANTS ===
LENGTH = 400     # Overall depth (X)
WIDTH = 1000     # Overall width (Y)
HEIGHT = 1400    # Overall height (Z)

BUCK_T = 20      # Thickness of the outer buck lining the wall opening
FRAME_W = 70     # Width of the uPVC profile (face width)
FRAME_D = 70     # Depth of the uPVC profile
GLASS_T = 24     # Glass thickness (double glazing)
# === END PARAMETRIC CONSTANTS ===

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

# === SKETCHES & FEATURES ===
# 1. Outer Buck (lines the wall opening up to the full 400mm depth)
buck_outer = Part.makeBox(LENGTH, WIDTH, HEIGHT)
buck_inner = Part.makeBox(LENGTH, WIDTH - 2 * BUCK_T, HEIGHT - 2 * BUCK_T, 
                          Vector(0, BUCK_T, BUCK_T))
buck = buck_outer.cut(buck_inner)

# 2. uPVC Frame
# Positioned centrally within the 400mm wall depth
frame_x = (LENGTH - FRAME_D) / 2
frame_y = BUCK_T
frame_z = BUCK_T
frame_width = WIDTH - 2 * BUCK_T
frame_height = HEIGHT - 2 * BUCK_T

frame_outer_solid = Part.makeBox(FRAME_D, frame_width, frame_height, 
                                 Vector(frame_x, frame_y, frame_z))

# Calculate dimensions for the two glass panes separated by a central mullion
cut_w = (frame_width - 3 * FRAME_W) / 2
cut_h = frame_height - 2 * FRAME_W

# Voids to cut the glass openings from the frame solid
cut1 = Part.makeBox(FRAME_D, cut_w, cut_h, 
                    Vector(frame_x, frame_y + FRAME_W, frame_z + FRAME_W))
cut2 = Part.makeBox(FRAME_D, cut_w, cut_h, 
                    Vector(frame_x, frame_y + 2 * FRAME_W + cut_w, frame_z + FRAME_W))

cutters = cut1.fuse(cut2)
frame = frame_outer_solid.cut(cutters)

# 3. Glass Panes
glass_x = frame_x + (FRAME_D - GLASS_T) / 2
glass1 = Part.makeBox(GLASS_T, cut_w, cut_h, 
                      Vector(glass_x, frame_y + FRAME_W, frame_z + FRAME_W))
glass2 = Part.makeBox(GLASS_T, cut_w, cut_h, 
                      Vector(glass_x, frame_y + 2 * FRAME_W + cut_w, frame_z + FRAME_W))
glass = glass1.fuse(glass2)

# 4. Final Assembly
window = buck.fuse(frame).fuse(glass)
window = window.removeSplitter()

# Create the Part::Feature as required by the Pattern A standard
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = window

# === 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
★
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
v0.0.985