You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.8 KiB
Markdown
101 lines
3.8 KiB
Markdown
# Wire Duct and DIN Rail Assets Implementation Plan
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
**Goal:** Generate reusable FreeCAD and STEP assets for one wire duct and one DIN 35mm rail.
|
|
|
|
**Architecture:** Add one focused FreeCAD Python generator under `data/examples/qet_cabinet_assets/`. The script bootstraps the registered Windows FreeCAD runtime, creates separate FreeCAD documents for the wire duct and DIN rail, saves `.FCStd`, exports `.step`, and writes a JSON report for verification.
|
|
|
|
**Tech Stack:** FreeCAD Python API, Part workbench primitives, registered QETDeps FreeCAD Python runtime, Markdown documentation.
|
|
|
|
---
|
|
|
|
### Task 1: Generator and README
|
|
|
|
**Files:**
|
|
- Create: `data/examples/qet_cabinet_assets/create_qet_cabinet_assets.py`
|
|
- Create: `data/examples/qet_cabinet_assets/README.md`
|
|
|
|
- [ ] **Step 1: Create the generator**
|
|
|
|
Create `create_qet_cabinet_assets.py`. It must:
|
|
|
|
- Bootstrap Windows FreeCAD DLL paths from `QET_FREECAD_RUNTIME_JSON` or `%LOCALAPPDATA%\QETDeps\runtime.json`.
|
|
- Generate `qet_wire_duct.FCStd` and `qet_wire_duct.step`.
|
|
- Generate `qet_din_rail.FCStd` and `qet_din_rail.step`.
|
|
- Write `qet_cabinet_assets_report.json`.
|
|
- Use dimensions from the approved spec.
|
|
- Avoid creating terminal LCS objects or engineering binding properties.
|
|
|
|
- [ ] **Step 2: Create the README**
|
|
|
|
Create `README.md` describing the two assets, dimensions, file roles, regeneration command, and the fact that neither model contains terminal semantics.
|
|
|
|
### Task 2: Generate and Verify
|
|
|
|
**Files:**
|
|
- Generate: `data/examples/qet_cabinet_assets/qet_wire_duct.FCStd`
|
|
- Generate: `data/examples/qet_cabinet_assets/qet_wire_duct.step`
|
|
- Generate: `data/examples/qet_cabinet_assets/qet_din_rail.FCStd`
|
|
- Generate: `data/examples/qet_cabinet_assets/qet_din_rail.step`
|
|
- Generate: `data/examples/qet_cabinet_assets/qet_cabinet_assets_report.json`
|
|
|
|
- [ ] **Step 1: Run generator**
|
|
|
|
Run:
|
|
|
|
```powershell
|
|
$runtime = Get-Content -LiteralPath 'C:\Users\ng123\AppData\Local\QETDeps\runtime.json' -Raw | ConvertFrom-Json
|
|
$env:QET_FREECAD_RUNTIME_JSON = 'C:\Users\ng123\AppData\Local\QETDeps\runtime.json'
|
|
& $runtime.freecad_python 'D:\LightWork3D\data\examples\qet_cabinet_assets\create_qet_cabinet_assets.py'
|
|
```
|
|
|
|
Expected: command exits `0` and prints all generated output paths.
|
|
|
|
- [ ] **Step 2: Verify files**
|
|
|
|
Run:
|
|
|
|
```powershell
|
|
Get-ChildItem -LiteralPath 'D:\LightWork3D\data\examples\qet_cabinet_assets' | Select-Object Name,Length
|
|
```
|
|
|
|
Expected: four model files and one report exist with non-zero sizes.
|
|
|
|
- [ ] **Step 3: Verify FCStd documents and STEP headers**
|
|
|
|
Open both FCStd documents with the registered FreeCAD Python runtime and assert that objects exist, no object has `Role="Terminal"`, and no engineering binding properties exist. Read the first line of both STEP files and assert it is `ISO-10303-21;`.
|
|
|
|
### Task 3: Commit
|
|
|
|
**Files:**
|
|
- Add: `docs/superpowers/plans/2026-05-26-wire-duct-din-rail-assets-implementation.md`
|
|
- Add: `data/examples/qet_cabinet_assets/`
|
|
|
|
- [ ] **Step 1: Stage intended files only**
|
|
|
|
Run:
|
|
|
|
```powershell
|
|
git add -- docs/superpowers/plans/2026-05-26-wire-duct-din-rail-assets-implementation.md data/examples/qet_cabinet_assets
|
|
git diff --cached --name-only
|
|
```
|
|
|
|
Expected: only the plan and `qet_cabinet_assets` files are staged.
|
|
|
|
- [ ] **Step 2: Commit**
|
|
|
|
Run:
|
|
|
|
```powershell
|
|
git commit -m "feat: add wire duct and din rail model assets"
|
|
```
|
|
|
|
Expected: a commit containing only the generated assets, generator, report, README, and plan.
|
|
|
|
## Self-Review
|
|
|
|
- Spec coverage: implements both FCStd and STEP outputs for the line duct and DIN rail, report, README, and validation.
|
|
- Placeholder scan: no TBD/TODO/fill-later language is present.
|
|
- Type consistency: output file names match the approved spec.
|