48 lines
2.0 KiB
Markdown
48 lines
2.0 KiB
Markdown
# Implementation Plan
|
|
|
|
## Checklist
|
|
|
|
1. Capture a parity baseline before product-code edits.
|
|
2. Add `blender/osmassets/building.py` with the current building assembly and
|
|
detail helper logic.
|
|
3. Import `building.py` in `blender/generate_scene.py`.
|
|
4. Remove inline `_assemble_building()` and `add_building_details()` from
|
|
`generate_scene.py`.
|
|
5. Replace the building call site with `building.assemble(...)`, passing
|
|
`args["office_overrides"]` instead of the full `args` dict.
|
|
6. Run Python validation:
|
|
- `python3 -m py_compile blender/osmassets/building.py`
|
|
- `python3 -m py_compile blender/generate_scene.py`
|
|
- `python3 -m unittest blender/tests/test_pure.py`
|
|
7. Capture parity after the refactor.
|
|
8. Compare before/after parity snapshots and inspect any non-ignored diff.
|
|
9. Update `.trellis/spec` and `docs/changelog.md` only for durable status or
|
|
convention changes discovered during implementation.
|
|
10. Commit, archive the task, and record the journal entry.
|
|
|
|
## Validation Commands
|
|
|
|
```bash
|
|
node scripts/parity.js capture building-module-before --stages blender,cesium
|
|
python3 -m py_compile blender/osmassets/building.py
|
|
python3 -m py_compile blender/generate_scene.py
|
|
python3 -m unittest blender/tests/test_pure.py
|
|
node scripts/parity.js capture building-module-after --stages blender,cesium
|
|
node scripts/parity.js compare building-module-before building-module-after
|
|
```
|
|
|
|
## Risk Points
|
|
|
|
- Passing `office_overrides` instead of `args` changes the function contract;
|
|
verify `office_override` custom properties and industrial classification via
|
|
parity.
|
|
- `Building_<way_id>_Windows` mesh construction depends on `MeshBatch` object
|
|
naming and `add_wall_panel()` geometry; copy it mechanically.
|
|
- `make_prism()` can return `None` on degenerate input, but the current call
|
|
site filters `len(ring) >= 3`. Preserve the existing behavior and return
|
|
tuple shape.
|
|
- Do not reorder building material creation or catalog entries; material order
|
|
affects GLB material indices.
|
|
- Parity is mandatory because this is a pure refactor of bpy-layer scene
|
|
generation.
|