Problem
'routing' admits the longest/thinnest builders (pipe/duct/liquid-line/HVAC) whose bbox can be near-zero in one axis. The export viewport is a fixed 20%+1m pad computed once and fit preserving aspect; an extreme utility-run aspect yields a poor fit or geometry bleeding off-page when label collision shifts push toward the viewport edge. Reachable only because 'routing' exists; the old scopes are unaffected.
Suggested fix
Re-measure the viewport against the routed (post-filter) geometry, clamp the pad on the short axis, and/or re-fit after annotation collision resolution; add an end-to-end export test with a collinear pipe run.
Evidence
packages/editor/src/lib/floorplan/floorplan-export.tsx:521-524 -- const padding = Math.max(MIN_PLAN_PADDING_M, Math.max(modelBounds.width, modelBounds.height) * PLAN_PADDING_RATIO)
Source
Branch feat/floorplan-export-routing-scope (head f2d3051) — planned PR for #619.
Metadata
Severity: P3 | Confidence: 75 | Reviewer(s): adversarial | Finding ID: floorplan-export-tsx-521-extreme-aspect-viewport
Problem
'routing' admits the longest/thinnest builders (pipe/duct/liquid-line/HVAC) whose bbox can be near-zero in one axis. The export viewport is a fixed 20%+1m pad computed once and fit preserving aspect; an extreme utility-run aspect yields a poor fit or geometry bleeding off-page when label collision shifts push toward the viewport edge. Reachable only because 'routing' exists; the old scopes are unaffected.
Suggested fix
Re-measure the viewport against the routed (post-filter) geometry, clamp the pad on the short axis, and/or re-fit after annotation collision resolution; add an end-to-end export test with a collinear pipe run.
Evidence
packages/editor/src/lib/floorplan/floorplan-export.tsx:521-524 -- const padding = Math.max(MIN_PLAN_PADDING_M, Math.max(modelBounds.width, modelBounds.height) * PLAN_PADDING_RATIO)
Source
Branch feat/floorplan-export-routing-scope (head f2d3051) — planned PR for #619.
Metadata
Severity: P3 | Confidence: 75 | Reviewer(s): adversarial | Finding ID: floorplan-export-tsx-521-extreme-aspect-viewport