From c4d4957dd2a71ff2da0db0e5ad00d1e1f708c30c Mon Sep 17 00:00:00 2001 From: ypshim Date: Mon, 26 Oct 2026 13:24:20 +0900 Subject: [PATCH] =?UTF-8?q?feat(bearing):=20show=20each=20bearing's=20?= =?UTF-8?q?=EB=B0=A9=EC=9C=84=20in=20the=20plan=20and=20turn=20the=20overl?= =?UTF-8?q?ays=20with=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Blocks, solplates, and the dashed drawing outlines are turned by the bearing's 방위 (rowSkewDeg), the same turn as the 3D block; each bearing is labelled with its 방위 in degrees. Co-Authored-By: Claude Haiku 5.5 --- src/view/bearing-plan-svg.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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 (교각축 방향, 위치 그대로)`);