2.0 KiB
2.0 KiB
Implementation Plan
Checklist
- Capture a parity baseline before product-code edits.
- Add
blender/osmassets/roads.pywith current GeoJSON road layer assembly and OSM fallback logic. - Import
roads.pyinblender/generate_scene.py. - Remove inline
add_geojson_layer()fromgenerate_scene.py. - Replace the GeoJSON road layer call site with
roads.assemble_geojson_layer(...). - Replace the OSM fallback loop with
roads.assemble_osm_fallback(...). - Run Python validation:
python3 -m py_compile blender/osmassets/roads.pypython3 -m py_compile blender/generate_scene.pypython3 -m unittest blender/tests/test_pure.py
- Capture parity after the refactor.
- Compare before/after parity snapshots and inspect any non-ignored diff.
- Update
.trellis/specanddocs/changelog.mdonly for durable status or convention changes discovered during implementation. - Commit, archive the task, and record the journal entry.
Validation Commands
node scripts/parity.js capture road-module-before --stages blender,cesium
python3 -m py_compile blender/osmassets/roads.py
python3 -m py_compile blender/generate_scene.py
python3 -m unittest blender/tests/test_pure.py
node scripts/parity.js capture road-module-after --stages blender,cesium
node scripts/parity.js compare road-module-before road-module-after
Risk Points
ROAD_LAYERSorder is load-bearing. Do not reorder, filter, or copy it into a second list.road_countsmust remain owned bygenerate_scene.py; fallback roads must still leave it unchanged.Layer catalog warning:print text must remain unchanged because it is the only runtime warning for JS/Python layer drift.Road_<layer_id>andOSM_Road_<way_id>names affect parity digests.clip_polygon()andfeature_in_bounds()behavior must be reused exactly; do not replace with new geometry logic.- Parity is mandatory because this is a pure refactor of bpy-layer scene generation.