diff --git a/src/view/bearing-plan-svg.ts b/src/view/bearing-plan-svg.ts index 4827af5..ad1f0bd 100644 --- a/src/view/bearing-plan-svg.ts +++ b/src/view/bearing-plan-svg.ts @@ -16,6 +16,14 @@ export const PAIR_CHIP_LABELS = ['①', '②', '③', '④', '⑤', '⑥', '⑦' * dashed. 일체 draws one 2500 × 1200 outline; 분리 draws two 1200 × 1200 outlines. Dimensions: C1 (bearing to block edge), * C2 (between the bearings), C3 (block span). C4 and C5 are the outer margins along the 교축. */ +/** + * A rectangle centred on (cx, cy), turned by the bearing's 방위 (승인 2026-10-26). The angle is −rowSkewDeg, the same + * turn as the 3D block (rotateY(−skew)): the block's sides follow the bearing row. + */ +function rect(cx: number, cy: number, w: number, h: number, skewDeg: number, attrs: string): string { + return ``; +} + export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: BearingPlanOverlay): string { const pair = pairEccentricities(m.blocks)[pairIndex]; if (!pair) return ''; @@ -40,10 +48,10 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin // Block outline(s): one row. const ib = m.integratedBlocks.find((x) => x.frontNo === pair.frontNo); if (ib) { - parts.push(``); + parts.push(rect(X(ib.n), Y(ib.s), 2500, 1200, ib.rowSkewDeg, `fill="none" stroke="#6E8496" stroke-width="12"`)); } else { for (const b of [f, k]) { - parts.push(``); + parts.push(rect(X(b.n), Y(b.s), 1200, 1200, b.rowSkewDeg, `fill="none" stroke="#6E8496" stroke-width="12"`)); } } @@ -51,20 +59,20 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin for (const b of [f, k]) { if (b.plan) { const { A, B } = b.plan; - parts.push(``); + parts.push(rect(X(b.n), Y(b.s), A, B, b.rowSkewDeg, `fill="#EEF3F7" stroke="#2F6DB5" stroke-width="10"`)); } } // Drawing values overlaid (dashed) on the same bearings (#1 겹쳐 보이게). if (overlay) { for (const [b, v] of [[f, overlay.front], [k, overlay.back]] as const) { - parts.push(``); + parts.push(rect(X(b.n), Y(b.s), v.A, v.B, b.rowSkewDeg, `fill="none" stroke="#B4531F" stroke-width="10" stroke-dasharray="40 25"`)); } } // Bearing centres and numbers. for (const b of [f, k]) { parts.push(``); - parts.push(`${b.no}`); + parts.push(`${b.no} · 방위 ${b.rowSkewDeg.toFixed(2)}°`); } if (eccentricity > 0.5) { parts.push(`편심 ${eccentricity.toFixed(0)} mm (교각축 방향, 위치 그대로)`);