fix(bearing): show the offset between the two bearings as it is in the plan
- Blocks, solplates, and bearing centres sit at their real 교각축 positions; the pair's offset is not aligned away. The 편심 is written on the figure. - C4 and C5 dimensions run from the block edges to the bearings. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f67efd449
commit
9b3b465bfa
1 file changed
+12
-9
@@ -11,8 +11,8 @@ export interface BearingPlanOverlay {
|
||||
export const PAIR_CHIP_LABELS = ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩'];
|
||||
|
||||
/**
|
||||
* 교량받침 상세 · 평면 for one pair (승인 2026-10-26): the blocks and solplates are aligned in one row across the 교축
|
||||
* (x = n), with the actual 교각축 offset of the bearings written as text. The model's solplates are solid, the drawing values
|
||||
* 교량받침 상세 · 평면 for one pair (승인 2026-10-26): the bearings keep their actual 교각축 positions (the offset
|
||||
* between the two bearings is shown as it is), and the blocks and solplates follow them. The model's solplates are solid, the drawing values
|
||||
* 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 교축.
|
||||
*/
|
||||
@@ -23,9 +23,9 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin
|
||||
const k = m.blocks.find((b) => b.no === pair.backNo && b.row === '후열')!;
|
||||
const nc = (f.n + k.n) / 2;
|
||||
const sc = (f.s + k.s) / 2;
|
||||
// The pair is drawn on one line: every block, solplate and bearing sits at the pair's mean 교각축 position.
|
||||
// x: 교축 (n); y: 교각축 (s), the actual positions relative to the pair's mean. The offset is kept, not aligned.
|
||||
const X = (n: number) => (n - nc) * 1000;
|
||||
const Y = (_s: number) => 0;
|
||||
const Y = (s: number) => (s - sc) * 1000;
|
||||
const eccentricity = Math.abs(f.s - k.s) * 1000;
|
||||
const parts: string[] = [];
|
||||
|
||||
@@ -40,10 +40,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(`<rect x="${X(ib.n - 1.25)}" y="-600" width="2500" height="1200" fill="none" stroke="#6E8496" stroke-width="12"></rect>`);
|
||||
parts.push(`<rect x="${X(ib.n - 1.25)}" y="${Y(ib.s) - 600}" width="2500" height="1200" fill="none" stroke="#6E8496" stroke-width="12"></rect>`);
|
||||
} else {
|
||||
for (const b of [f, k]) {
|
||||
parts.push(`<rect x="${X(b.n) - 600}" y="-600" width="1200" height="1200" fill="none" stroke="#6E8496" stroke-width="12"></rect>`);
|
||||
parts.push(`<rect x="${X(b.n) - 600}" y="${Y(b.s) - 600}" width="1200" height="1200" fill="none" stroke="#6E8496" stroke-width="12"></rect>`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin
|
||||
parts.push(`<text x="${X(b.n) + 70}" y="${Y(b.s) - 60}" font-size="90" fill="#18212B">${b.no}</text>`);
|
||||
}
|
||||
if (eccentricity > 0.5) {
|
||||
parts.push(`<text x="0" y="${-700}" text-anchor="middle" font-size="80" fill="#55606E">편심 ${eccentricity.toFixed(0)} mm (교각축 방향, 블록은 한 줄로 맞춤)</text>`);
|
||||
parts.push(`<text x="0" y="${-700}" text-anchor="middle" font-size="80" fill="#55606E">편심 ${eccentricity.toFixed(0)} mm (교각축 방향, 위치 그대로)</text>`);
|
||||
}
|
||||
|
||||
// Dimensions along the bottom: C1 (bearing to block edge), C2 (between the bearings), C1, and C3 (block span).
|
||||
@@ -91,8 +91,11 @@ export function bearingPlanSvg(m: PierModel, pairIndex: number, overlay?: Bearin
|
||||
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)}`));
|
||||
parts.push(vdim(0, halfDepth, `C5 ${Math.round(d(k.no).rightMm)}`));
|
||||
// C4: from the low-side block edge to the front bearing; C5: from the back bearing to the high-side block edge.
|
||||
const lowEdge = ib ? Y(ib.s) - 600 : Y(f.s) - 600;
|
||||
const highEdge = ib ? Y(ib.s) + 600 : Y(k.s) + 600;
|
||||
parts.push(vdim(lowEdge, Y(f.s), `C4 ${Math.round(d(f.no).leftMm)}`));
|
||||
parts.push(vdim(Y(k.s), highEdge, `C5 ${Math.round(d(k.no).rightMm)}`));
|
||||
|
||||
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>`;
|
||||
}
|
||||
Reference in new issue
Block a user