Skip to content

Commit 35bbfb9

Browse files
committed
feat(viz): Plotly cross-section + BPP top view + gasket outline (Phase 3)
Phase 3 of Visual Stack Designer (v0.4). Also fixes ruff format nit in test_components.py that broke Phase 2 CI (ruff format --check was stricter than ruff check). src/visualization.py (NEW): - draw_layer_cross_section(assembly, max_visible_cells=6): side-view stacked bar chart in mm. For N > max_visible_cells, shows 3 cells top + "... X collapsed ..." box + 3 cells bottom to keep Plotly shape count bounded at high N (N=200 smoke-tested). - draw_bpp_top_view(bpp, active_area, gasket): SVG-shape flow-field renderer. 3 patterns (serpentine meander, parallel fingers, interdigitated alt. inlet/outlet). Ports as diagonal-corner circles. - draw_gasket_outline(gasket, active_area): standalone gasket with cut-out. - draw_assembly_summary(a): 2-panel placeholder for export (v0.4 minimal). - No new runtime deps: plotly is already in requirements. tests/test_visualization.py (NEW, 5): figure creation for N=1 and N=200 (compressed-view label check), all 4 BPP presets render shapes, KeyError on unknown BPP or gasket, gasket outline has 2 shapes (outer + cutout). 122 tests green (was 117, +5). Ruff check + format both clean.
1 parent 2169362 commit 35bbfb9

3 files changed

Lines changed: 492 additions & 3 deletions

File tree

0 commit comments

Comments
 (0)