feat(bearing): C4 and C5 as vertical dimensions on the left, as in the 시안

- C4 runs from the block top edge to the bearing row, C5 from the bearing row
  to the bottom edge. The values are the model's C4 and C5.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 13:16:31 +09:00
1 parent da58fbfdbe
commit 29acfba1e1
1 file changed
+8 -3
+8 -3
View File
@@ -84,9 +84,14 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin
parts.push(dimLine(X(k.n), xRight, y1, `C1 ${Math.round(d(k.no).rightMm ?? 600)}`));
parts.push(dimLine(xLeft, xRight, y2, `C3 ${Math.round((xRight - xLeft))}`));
// C4 and C5: the outer margins along the 교축, shown at the outer block edges.
parts.push(`<text x="${xLeft - 60}" y="-60" text-anchor="end" font-size="90" fill="#18212B">C4 ${Math.round(d(f.no).leftMm ?? 0)}</text>`);
parts.push(`<text x="${xRight + 60}" y="-60" font-size="90" fill="#18212B">C5 ${Math.round(d(k.no).rightMm ?? 0)}</text>`);
// C4 and C5 as in the 시안: vertical dimensions on the left of the blocks, from the top edge to the bearing row (C4) and
// from the bearing row to the bottom edge (C5). Values: the model's C4 and C5 (outer margins).
const xv = xLeft - 300;
const halfDepth = 600;
const vdim = (y1: number, y2: number, label: string) =>
`<line x1="${xv}" y1="${y1}" x2="${xv}" y2="${y2}" stroke="#55606E" stroke-width="6"></line><line x1="${xv - 50}" y1="${y1}" x2="${xv + 50}" y2="${y1}" stroke="#55606E" stroke-width="6"></line><line x1="${xv - 50}" y1="${y2}" x2="${xv + 50}" y2="${y2}" stroke="#55606E" stroke-width="6"></line><text x="${xv - 90}" y="${(y1 + y2) / 2 + 30}" text-anchor="end" font-size="90" fill="#18212B">${label}</text>`;
parts.push(vdim(-halfDepth, 0, `C4 ${Math.round(d(f.no).leftMm ?? 0)}`));
parts.push(vdim(0, halfDepth, `C5 ${Math.round(d(k.no).rightMm ?? 0)}`));
return `<svg viewBox="-1900 -1300 3800 2600" width="100%" style="max-width: 560px; height: auto" role="img" aria-label="교량받침 상세 평면: 쌍 ${pair.frontNo}·${pair.backNo}, 블록 한 줄, 교축·교각축 방향, C1·C2·C3, C4·C5, 도면값 겹쳐 보기">${parts.join('')}</svg>`;
}