← Small Garden House

Floor Slab Panel

v1 Claude approved

Create the base floor panel, 10000mm length x 5000mm width x 400mm height, solid structural insulated panel (OSB skin + EPS core). Act as the bearing surface for all walls.

Interfaces Provided

top_surface (face_contact)
◉
Agent initialized (status: waiting_for_dependencies, action: check_dependencies)
◉
Provider: google | Profile: balanced
◉
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
●
Received response (744 tokens)
◆
floor_panel_v1.py · 63 lines
import FreeCAD
import Part
import math
from FreeCAD import Vector

# === PARAMETRIC CONSTANTS ===
LENGTH = 10000         # Total X dimension (mm)
WIDTH = 5000           # Total Y dimension (mm)
HEIGHT = 400           # Total Z dimension (mm)

FACE_THICKNESS = 11    # OSB skin thickness top and bottom (mm)
CORE_THICKNESS = HEIGHT - (2 * FACE_THICKNESS)  # EPS foam core thickness (378mm)
PANEL_WIDTH = 1200     # Standard SIP panel width (mm)
SPLINE_W = 45          # Timber connecting spline width (mm)
SPLINE_D = CORE_THICKNESS # Spline depth matches core thickness

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

# Calculate panel widths layout along the X-axis
full_panels = LENGTH // PANEL_WIDTH
remainder = LENGTH % PANEL_WIDTH
panel_widths = [PANEL_WIDTH] * full_panels + ([remainder] if remainder > 0 else [])

parts = []
x_pos = 0

# === BUILD GEOMETRY ===
for i, pw in enumerate(panel_widths):
    # Bottom OSB Skin
    face_bottom = Part.makeBox(pw, WIDTH, FACE_THICKNESS, 
                               Vector(x_pos, 0, 0))
    # EPS Core
    core = Part.makeBox(pw, WIDTH, CORE_THICKNESS, 
                        Vector(x_pos, 0, FACE_THICKNESS))
    # Top OSB Skin
    face_top = Part.makeBox(pw, WIDTH, FACE_THICKNESS, 
                            Vector(x_pos, 0, FACE_THICKNESS + CORE_THICKNESS))
    
    parts.extend([face_bottom, core, face_top])
    x_pos += pw
    
    # Timber block spline at the joint between panels
    if i < len(panel_widths) - 1:
        spline = Part.makeBox(SPLINE_W, WIDTH, SPLINE_D, 
                              Vector(x_pos - (SPLINE_W / 2), 0, FACE_THICKNESS))
        parts.append(spline)

# Fuse all components into a single continuous floor slab
floor_slab = parts[0]
for p in parts[1:]:
    floor_slab = floor_slab.fuse(p)

# Remove internal coplanar seams for a clean continuous top/bottom face
floor_slab = floor_slab.removeSplitter()

# === FINAL ===
obj = doc.addObject("Part::Feature", "Body")
obj.Shape = floor_slab

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