← Small Garden House

Front Internal Door

v1 Claude approved

Create internal door, 400mm length x 700mm width x 2000mm height, fitted into the partition wall and roof pocket.

Dependencies

partition_wall.door_openings roof_panel.door_pockets
◉
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
◉
Provider updated to google / balanced
◇
Received interface partition_wall.top_surface: %{name: "top_surface", type: "face_contact", value: %{}, agent_id: "partition_wall"}
◇
Received interface partition_wall.door_openings: %{name: "door_openings", type: "clearance", value: %{}, agent_id: "partition_wall"}
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◇
Received interface roof_panel.door_pockets: %{name: "door_pockets", type: "clearance", value: %{}, agent_id: "roof_panel"}
◉
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
●
Received response (1245 tokens)
◆
internal_door_1_v1.py · 96 lines
import FreeCAD
import Part
import Sketcher
import math
from FreeCAD import Vector, Placement, Rotation

FreeCAD.loadModule("PartDesign")
import PartDesign

# === PARAMETRIC CONSTANTS ===
LENGTH = 400      # mm (X-dimension)
WIDTH = 700       # mm (Y-dimension)
HEIGHT = 2000     # mm (Z-dimension)

# Hinge mechanism geometry centered along the Z-axis
HINGE_CUT_SIZE = 20
HINGE_KNUCKLE_H = 40
HINGE_GAP_H = 30
HINGE1_Z = 400    # Lower pivot point
HINGE2_Z = 1600   # Upper pivot point
PIN_RADIUS = 4
# === END PARAMETRIC CONSTANTS ===

# === DOCUMENT & BODY ===
doc = FreeCAD.ActiveDocument or FreeCAD.newDocument("Model")
body = doc.addObject("PartDesign::Body", "Body")

# === GEOMETRY ===

# 1. Main door slab
door = doc.addObject("PartDesign::AdditiveBox", "DoorBase")
door.Length = LENGTH
door.Width = WIDTH
door.Height = HEIGHT
door.Placement = Placement(Vector(0, 0, 0), Rotation())
body.addObject(door)
doc.recompute()

# 2. Lower Hinge (Centered at Z=400)
# Bottom clearance gap
h1_gap1 = doc.addObject("PartDesign::SubtractiveBox", "Hinge1GapBottom")
h1_gap1.Length = HINGE_CUT_SIZE
h1_gap1.Width = HINGE_CUT_SIZE
h1_gap1.Height = HINGE_GAP_H
h1_gap1.Placement = Placement(Vector(0, 0, HINGE1_Z - HINGE_KNUCKLE_H/2 - HINGE_GAP_H), Rotation())
body.addObject(h1_gap1)
doc.recompute()

# Top clearance gap
h1_gap2 = doc.addObject("PartDesign::SubtractiveBox", "Hinge1GapTop")
h1_gap2.Length = HINGE_CUT_SIZE
h1_gap2.Width = HINGE_CUT_SIZE
h1_gap2.Height = HINGE_GAP_H
h1_gap2.Placement = Placement(Vector(0, 0, HINGE1_Z + HINGE_KNUCKLE_H/2), Rotation())
body.addObject(h1_gap2)
doc.recompute()

# Pin hole
h1_pin = doc.addObject("PartDesign::SubtractiveCylinder", "Hinge1Pin")
h1_pin.Radius = PIN_RADIUS
h1_pin.Height = HINGE_KNUCKLE_H + 2 * HINGE_GAP_H
h1_pin.Placement = Placement(Vector(0, 0, HINGE1_Z - HINGE_KNUCKLE_H/2 - HINGE_GAP_H), Rotation())
body.addObject(h1_pin)
doc.recompute()

# 3. Upper Hinge (Centered at Z=1600)
# Bottom clearance gap
h2_gap1 = doc.addObject("PartDesign::SubtractiveBox", "Hinge2GapBottom")
h2_gap1.Length = HINGE_CUT_SIZE
h2_gap1.Width = HINGE_CUT_SIZE
h2_gap1.Height = HINGE_GAP_H
h2_gap1.Placement = Placement(Vector(0, 0, HINGE2_Z - HINGE_KNUCKLE_H/2 - HINGE_GAP_H), Rotation())
body.addObject(h2_gap1)
doc.recompute()

# Top clearance gap
h2_gap2 = doc.addObject("PartDesign::SubtractiveBox", "Hinge2GapTop")
h2_gap2.Length = HINGE_CUT_SIZE
h2_gap2.Width = HINGE_CUT_SIZE
h2_gap2.Height = HINGE_GAP_H
h2_gap2.Placement = Placement(Vector(0, 0, HINGE2_Z + HINGE_KNUCKLE_H/2), Rotation())
body.addObject(h2_gap2)
doc.recompute()

# Pin hole
h2_pin = doc.addObject("PartDesign::SubtractiveCylinder", "Hinge2Pin")
h2_pin.Radius = PIN_RADIUS
h2_pin.Height = HINGE_KNUCKLE_H + 2 * HINGE_GAP_H
h2_pin.Placement = Placement(Vector(0, 0, HINGE2_Z - HINGE_KNUCKLE_H/2 - HINGE_GAP_H), Rotation())
body.addObject(h2_pin)
doc.recompute()

# === 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 / balanced
◉
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 / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
◉
Provider updated to google / balanced
v0.0.985