Wall Module Schema: Difference between revisions
Jump to navigation
Jump to search
(→Schema) |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
FreeCAD is just the rendering backend. | FreeCAD is just the rendering backend. | ||
=Schema= | =Schema= | ||
[[File:wall_module_schema.yaml]] | |||
=Compiler= | =Compiler= | ||
[[file:wall_module_compiler.zip]] | |||
= Generate a Wall Module CAD File in FreeCAD (Schema → Compiler → .FCStd) = | = Generate a Wall Module CAD File in FreeCAD (Schema → Compiler → .FCStd) = | ||
Latest revision as of 03:45, 3 March 2026
https://chatgpt.com/share/69706dec-54ac-8010-a171-74eb64954e9a
Steps
- Create schema
- Create compiler.
- Compile. This generated CAD in FreeCAD
Real Takeaway
You are no longer “designing wall modules.”
You are designing a wall-module language.
FreeCAD is just the rendering backend.
Schema
Compiler
Generate a Wall Module CAD File in FreeCAD (Schema → Compiler → .FCStd)
Prerequisites
- Install FreeCAD (GUI and command-line support).
- Create a working folder, e.g.:
~/ose_wall_compiler/
- Save these files into that folder:
wall_module_compiler.py(the compiler script)- One or more module spec files, e.g.
WM_WALL_48x120.json,WM_WINDOW_48x120.json,WM_DOOR_48x96.json
Step 1: Create a module specification file (JSON)
- In your working folder, create a JSON file such as
WM_WALL_48x120.json. - Paste a minimal wall module spec:
{
"schema_version": "wall_module_v0.1",
"module": {
"id": "WM_WALL_48x120",
"type": "wall_panel",
"width_in": 48,
"height_in": 120,
"stud_spacing_oc_in": 24,
"plates": { "top_plate_count": 2, "bottom_plate_count": 1 },
"sheathing": { "thickness_in": 0.4375 }
},
"openings": []
}
Step 2: (Optional) Create a window module spec
- Create
WM_WINDOW_48x120.json:
{
"schema_version": "wall_module_v0.1",
"module": {
"id": "WM_WINDOW_48x120",
"type": "wall_panel",
"width_in": 48,
"height_in": 120,
"stud_spacing_oc_in": 24,
"plates": { "top_plate_count": 2, "bottom_plate_count": 1 },
"sheathing": { "thickness_in": 0.4375 }
},
"openings": [
{
"id": "W1",
"type": "window",
"rough_opening": { "width_in": 36, "height_in": 48 },
"sill_height_from_bottom_in": 36,
"x_from_left_in": 6,
"header": { "type": "flush_built", "members": 2, "lumber": "2x12", "bias_to_face": "A" }
}
]
}
Step 3: (Optional) Create a door module spec
- Create
WM_DOOR_48x96.json:
{
"schema_version": "wall_module_v0.1",
"module": {
"id": "WM_DOOR_48x96",
"type": "wall_panel",
"width_in": 48,
"height_in": 96,
"stud_spacing_oc_in": 24,
"plates": { "top_plate_count": 2, "bottom_plate_count": 1 },
"sheathing": { "thickness_in": 0.4375 }
},
"openings": [
{
"id": "D1",
"type": "door",
"centered_in_module": true,
"rough_opening": { "width_in": 36, "height_in": 80 },
"header": { "type": "flush_built", "members": 2, "lumber": "2x12", "bias_to_face": "A" }
}
]
}
Step 4: Run the compiler (headless) to generate the FreeCAD file
- Open a terminal in the working folder.
- Run FreeCAD in command-line mode (
freecadcmd) to compile the JSON into an.FCStdfile:
Wall module
freecadcmd wall_module_compiler.py WM_WALL_48x120.json WM_WALL_48x120.fcstd
Window module
freecadcmd wall_module_compiler.py WM_WINDOW_48x120.json WM_WINDOW_48x120.fcstd
Door module
freecadcmd wall_module_compiler.py WM_DOOR_48x96.json WM_DOOR_48x96.fcstd
Step 5: If TechDraw causes issues, disable drawings
- Some FreeCAD installations may fail TechDraw in headless mode.
- Re-run with drawings disabled:
freecadcmd wall_module_compiler.py WM_WINDOW_48x120.json WM_WINDOW_48x120.fcstd --no-drawings
Step 6: Open the generated CAD file in FreeCAD (GUI)
- Launch FreeCAD.
- File → Open → select the generated
.fcstd. - Inspect the model tree:
WallModuleFraming→ plates / studs / openingsSheathing→ OSB panels
Step 7: Export geometry for fabrication workflows (optional)
- Export 2D/3D formats as needed:
- Select objects (or the
WallModulegroup) - File → Export
- Choose format:
- STEP (.step) for interchange
- STL for printing (if needed)
- DXF for 2D cutting (typically from TechDraw or Draft)
- Select objects (or the
Troubleshooting
- Command not found: freecadcmd
- On some systems it is named
FreeCADCmd. - Try:
FreeCADCmd wall_module_compiler.py ...
- On some systems it is named
- JSON parse errors
- Validate commas and braces; JSON must be strict.
- No TechDraw page appears
- Use
--no-drawings; geometry output is still correct. - Or generate drawings from within the FreeCAD GUI.
- Use
Output Contract (What You Get)
- A deterministic FreeCAD model file:
*.FCStd - Model contains real solids:
- Plates, studs, king/jack studs, headers, sills, cripples
- OSB sheathing panels sized per the sourcing rules
- Optional: TechDraw page(s), depending on your FreeCAD setup