User talk:Seeker: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (17 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[File:First attempts.png|thumb]] | |||
== Nick_Log == | |||
= CAD Automation = | |||
'''Goal''': Eliminate the 1000-hour documentation bottleneck for OSE machines using open source code. | |||
== 1. The Bottleneck (Context) == | |||
Currently, creating the "Gold Standard" documentation for a single OSE machine (BOMs, cut lists, fabrication diagrams, exploded views) requires hundreds of hours of manual CAD work. If a design changes (e.g., using 12ft lumber instead of 10ft), the entire documentation set must be manually updated. | |||
'''The Solution''': Parametric Automation. | |||
By defining the machine in a text-based Schema (YAML), we can generate: | |||
# The 3D Source Code (FreeCAD .FCStd) | |||
# The Blueprints (PDF) (Coming Soon) | |||
# The BOM (CSV) (Coming Soon) | |||
A change in dimensions takes 3 seconds to re-compile, not 3 weeks to re-draw. | |||
== 2. Technical Architecture (The "How") == | |||
This system uses a "Headless Complier" approach. It treats physical objects like software code. | |||
=== The Tech Stack === | |||
( | * '''Language''': Python 3.11+ | ||
* '''CAD Engine''': FreeCAD 0.21+ (Open Source) | |||
* '''Input Format''': YAML (Human-readable text) | |||
* '''Output Format''': .FCStd (Native FreeCAD) + STL/STEP (Fabrication) | |||
== | === The Compiler Logic === | ||
The compiler (`wall_compiler.py`) performs three steps: | |||
# '''Parse''': Reads `height: 10ft` from YAML and converts to millimeters (FreeCAD's native unit) | |||
# '''Construct''': Uses `FreeCAD` and `Part` libraries to programmatically generate geometry (vectors, shapes) in memory | |||
# '''Assemble''': Places studs, sheathing, and openings into a named group and saves the document | |||
=== Why Headless? === | |||
We run FreeCAD with the `--console` flag. This allows generation to happen on a server or in a CI/CD pipeline, enabling a future where OSE machines are "built" automatically whenever a design file is updated on the Wiki. | |||
== 3. Replication Guide (Run it Yourself) == | |||
Everyone should be able to replicate this wall module generator. It runs on Windows, Mac, and Linux. | |||
=== Step 1: Install FreeCAD === | |||
* Download: <https://www.freecad.org/downloads.php> (Version 0.21+) | |||
* Or via CLI (Mac): `brew install --cask freecad` | |||
=== Step 2: Create Your Wall Schema === | |||
Create a file named `my_wall.yaml`: | |||
```yaml | |||
module_type: wall | |||
version: 1.0 | |||
dimensions: | |||
height: 10ft | |||
width: 12ft | |||
stud_spacing: 16in | |||
materials: | |||
studs: "2x6" | |||
sheathing: "OSB 7/16" | |||
openings: | |||
- type: window | |||
width: 3ft | |||
height: 4ft | |||
position: centered | |||
offset_from_bottom: 3ft | |||
``` | |||
[[File:Wallmodulesecondtry.png|thumb|better than first.]] | |||
=== Step 3: Run the Compiler === | |||
(Requires Python 3.11+) | |||
```bash | |||
# Clone the automation repo | |||
git clone https://github.com/eternalflame/ose-cad-automation.git | |||
cd ose-cad-automation | |||
# Compile YAML to FreeCAD macro | |||
python3 compilers/wall_compiler.py my_wall.yaml | |||
``` | |||
=== Step 4: View in FreeCAD === | |||
Open FreeCAD, open the Python console (View -> Panels -> Python Console), and run: | |||
```python | |||
exec(open('examples/wall_10ft_12ft_macro.py').read()) | |||
``` | |||
Result: A fully modeled 3D wall appears instantly. | |||
== 4. Project Log (Transparency) == | |||
=== Jan 19, 2026: Headless Automation === | |||
* '''Milestone''': Achieved true headless execution. The compiler can now generate `.FCStd` files without opening the FreeCAD GUI. | |||
* '''Impact''': This paves the way for "Server-Side CAD" where users can request a custom module on the Wiki and receive the file instantly. | |||
* '''Codebase''': Refactored `wall_compiler.py` to decouple unit conversion logic from geometry generation. | |||
=== Jan 18, 2026: Context Preservation === | |||
* '''Concept''': Implemented a "Context Locking" system for development. | |||
* '''Application''': Volunteers can often lose track of complex CAD dependencies. By committing a `context.md` alongside code, we ensure any contributor can pick up the "mental state" of the previous developer instantly. | |||
=== Jan 16, 2026: Strategy Formation === | |||
* '''Research''': Audited 50+ GVCS machines to identify common structural patterns (frames, panels, pivots). | |||
* '''Conclusion''': 80% of OSE machines share 20% of the same geometric primitives. Automation should focus on these primitives first (Walls, Frames, Pivot joints). | |||
Latest revision as of 02:52, 20 January 2026
Nick_Log
CAD Automation
Goal: Eliminate the 1000-hour documentation bottleneck for OSE machines using open source code.
1. The Bottleneck (Context)
Currently, creating the "Gold Standard" documentation for a single OSE machine (BOMs, cut lists, fabrication diagrams, exploded views) requires hundreds of hours of manual CAD work. If a design changes (e.g., using 12ft lumber instead of 10ft), the entire documentation set must be manually updated.
The Solution: Parametric Automation. By defining the machine in a text-based Schema (YAML), we can generate:
- The 3D Source Code (FreeCAD .FCStd)
- The Blueprints (PDF) (Coming Soon)
- The BOM (CSV) (Coming Soon)
A change in dimensions takes 3 seconds to re-compile, not 3 weeks to re-draw.
2. Technical Architecture (The "How")
This system uses a "Headless Complier" approach. It treats physical objects like software code.
The Tech Stack
- Language: Python 3.11+
- CAD Engine: FreeCAD 0.21+ (Open Source)
- Input Format: YAML (Human-readable text)
- Output Format: .FCStd (Native FreeCAD) + STL/STEP (Fabrication)
The Compiler Logic
The compiler (`wall_compiler.py`) performs three steps:
- Parse: Reads `height: 10ft` from YAML and converts to millimeters (FreeCAD's native unit)
- Construct: Uses `FreeCAD` and `Part` libraries to programmatically generate geometry (vectors, shapes) in memory
- Assemble: Places studs, sheathing, and openings into a named group and saves the document
Why Headless?
We run FreeCAD with the `--console` flag. This allows generation to happen on a server or in a CI/CD pipeline, enabling a future where OSE machines are "built" automatically whenever a design file is updated on the Wiki.
3. Replication Guide (Run it Yourself)
Everyone should be able to replicate this wall module generator. It runs on Windows, Mac, and Linux.
Step 1: Install FreeCAD
- Download: <https://www.freecad.org/downloads.php> (Version 0.21+)
- Or via CLI (Mac): `brew install --cask freecad`
Step 2: Create Your Wall Schema
Create a file named `my_wall.yaml`:
```yaml module_type: wall version: 1.0
dimensions:
height: 10ft width: 12ft stud_spacing: 16in
materials:
studs: "2x6" sheathing: "OSB 7/16"
openings:
- type: window width: 3ft height: 4ft position: centered offset_from_bottom: 3ft
```
Step 3: Run the Compiler
(Requires Python 3.11+)
```bash
- Clone the automation repo
git clone https://github.com/eternalflame/ose-cad-automation.git cd ose-cad-automation
- Compile YAML to FreeCAD macro
python3 compilers/wall_compiler.py my_wall.yaml ```
Step 4: View in FreeCAD
Open FreeCAD, open the Python console (View -> Panels -> Python Console), and run:
```python exec(open('examples/wall_10ft_12ft_macro.py').read()) ```
Result: A fully modeled 3D wall appears instantly.
4. Project Log (Transparency)
Jan 19, 2026: Headless Automation
- Milestone: Achieved true headless execution. The compiler can now generate `.FCStd` files without opening the FreeCAD GUI.
- Impact: This paves the way for "Server-Side CAD" where users can request a custom module on the Wiki and receive the file instantly.
- Codebase: Refactored `wall_compiler.py` to decouple unit conversion logic from geometry generation.
Jan 18, 2026: Context Preservation
- Concept: Implemented a "Context Locking" system for development.
- Application: Volunteers can often lose track of complex CAD dependencies. By committing a `context.md` alongside code, we ensure any contributor can pick up the "mental state" of the previous developer instantly.
Jan 16, 2026: Strategy Formation
- Research: Audited 50+ GVCS machines to identify common structural patterns (frames, panels, pivots).
- Conclusion: 80% of OSE machines share 20% of the same geometric primitives. Automation should focus on these primitives first (Walls, Frames, Pivot joints).