← Small Garden House

Internal Central Partition

v1 Claude approved

Create the internal central partition, 400mm length x 4200mm width x 1700mm height, SIP panel. Forms a butt joint with front/back walls. Cut two 700x1700mm door openings starting from the bottom to allow passage (full height of the wall panel itself).

Dependencies

floor_panel.top_surface front_wall.inner_face back_wall.inner_face

Interfaces Provided

top_surface (face_contact) door_openings (clearance)
◉
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
◉
Provider: google | Profile: balanced
◉
Provider updated to google / balanced
◇
Received interface floor_panel.top_surface: %{name: "top_surface", type: "face_contact", value: %{}, agent_id: "floor_panel"}
◉
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"}
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◇
Received interface back_wall.inner_face: %{name: "inner_face", type: "butt_joint", value: %{}, agent_id: "back_wall"}
◉
All dependencies resolved, starting generation
◉
Generating v1
◇
Received interface back_wall.top_surface: %{name: "top_surface", type: "face_contact", value: %{}, agent_id: "back_wall"}
○
Calling Gemini API for code generation (gemini-3.1-pro-preview)...
◇
Received interface back_wall.window_openings: %{name: "window_openings", type: "clearance", value: %{}, agent_id: "back_wall"}
◉
Provider updated to google / balanced
◉
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
●
Received response (1447 tokens)
◆
partition_wall_v1.py · 111 lines
import FreeCAD
import Part
from FreeCAD import Vector

# === PARAMETERS ===
WALL_THICKNESS = 400
WALL_LENGTH = 4200
WALL_HEIGHT = 1700

FACE_T = 11
CORE_T = WALL_THICKNESS - 2 * FACE_T
BOTTOM_PLATE_H = 90
TOP_PLATE_H = 180
PANEL_H = WALL_HEIGHT - BOTTOM_PLATE_H - TOP_PLATE_H

KING_W = 45
SPLINE_D = 140
SPLINE_W = 45

# Door 1: 700mm wide, hinge at Y=1450 (Opening Y=1450 to 2150)
# Door 2: 700mm wide, hinge at Y=2850 (Opening Y=2850 to 3550)
# This splits the wall into three solid zones:
zones = [
    {"start": 0,    "end": 1450, "ks_left": False, "ks_right": True},
    {"start": 2150, "end": 2850, "ks_left": True,  "ks_right": True},
    {"start": 3550, "end": 4200, "ks_left": True,  "ks_right": False}
]

# === DOCUMENT ===
doc = FreeCAD.ActiveDocument or FreeCAD.newDocument("InternalPartition")
parts = []

# === BUILD WALL ZONES ===
for zone in zones:
    z_start = zone["start"]
    z_end = zone["end"]
    z_len = z_end - z_start

    # Bottom and top plates (full thickness, running the length of the solid zone)
    bp = Part.makeBox(WALL_THICKNESS, z_len, BOTTOM_PLATE_H, Vector(0, z_start, 0))
    tp = Part.makeBox(WALL_THICKNESS, z_len, TOP_PLATE_H, Vector(0, z_start, WALL_HEIGHT - TOP_PLATE_H))
    parts.extend([bp, tp])

    p_start = z_start
    p_end = z_end

    # Full-depth king studs bounding the openings
    if zone["ks_left"]:
        ks = Part.makeBox(WALL_THICKNESS, KING_W, PANEL_H, Vector(0, p_start, BOTTOM_PLATE_H))
        parts.append(ks)
        p_start += KING_W

    if zone["ks_right"]:
        ks = Part.makeBox(WALL_THICKNESS, KING_W, PANEL_H, Vector(0, p_end - KING_W, BOTTOM_PLATE_H))
        parts.append(ks)
        p_end -= KING_W

    # SIP Panels filling the zone
    panel_len = p_end - p_start
    if panel_len > 0:
        full_panels = int(panel_len // 1200)
        remainder = panel_len % 1200
        widths = [1200] * full_panels + ([remainder] if remainder > 0 else [])

        y = p_start
        for i, pw in enumerate(widths):
            # OSB Faces and EPS Core
            f1 = Part.makeBox(FACE_T, pw, PANEL_H, Vector(0, y, BOTTOM_PLATE_H))
            co = Part.makeBox(CORE_T, pw, PANEL_H, Vector(FACE_T, y, BOTTOM_PLATE_H))
            f2 = Part.makeBox(FACE_T, pw, PANEL_H, Vector(FACE_T + CORE_T, y, BOTTOM_PLATE_H))
            parts.extend([f1, co, f2])
            y += pw
            
            # Block spline joining panels
            if i < len(widths) - 1:
                sp = Part.makeBox(SPLINE_D, SPLINE_W, PANEL_H, 
                                  Vector((WALL_THICKNESS - SPLINE_D)/2, y - SPLINE_W/2, BOTTOM_PLATE_H))
                parts.append(sp)

# Fuse all structural parts
wall = parts[0]
for p in parts[1:]:
    wall = wall.fuse(p)

# === HARDWARE: HINGE RECESSES & PINS ===
# Hinge knuckles modelled at the stated pivot origins (X=400, Y=1450 and Y=2850)
hinge_points = [
    (400, 1450, 400), (400, 1450, 1400),
    (400, 2850, 400), (400, 2850, 1400)
]

for hx, hy, hz in hinge_points:
    # Cut recess at the corner
    recess = Part.makeBox(15, 15, 80, Vector(hx - 15, hy - 15, hz - 40))
    wall = wall.cut(recess)
    
    # Add stationary hinge pin
    pin = Part.makeCylinder(4, 80, Vector(hx - 5, hy - 5, hz - 40))
    wall = wall.fuse(pin)

# Clean up internal geometry lines
wall = wall.removeSplitter()

# === FINAL EXPORT FEATURE ===
# Name MUST be exactly "Body" to satisfy export rules when using Part direct modeling
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = wall
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 / balanced
◉
Provider updated to google / balanced
◉
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
◉
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.985