diff --git a/src/view/coping-rebar-svg.ts b/src/view/coping-rebar-svg.ts index d7cd0f3..48f9b8c 100644 --- a/src/view/coping-rebar-svg.ts +++ b/src/view/coping-rebar-svg.ts @@ -96,9 +96,9 @@ export function copingFrontSvg(records: BarRecord[], lengthMm: number, columnSm // First chain (the top line): the 전단·띠 positions of C9 (@250) and C10 (@300) along the coping, ends to the bar extents. const loops = bars.filter((r) => /^C(9|10|11)$/.test(r.name)); const topChain = chainDims(positionsOf(loops), 0, lengthMm); - const dimY = minY - 1100; + const dimY = minY - 1500; for (const d of topChain) { - parts.push(`${d.text}`); + parts.push(`${d.text}`); } // Second chain (the lower line): the upper C14 bars, measured from the column centre (0). const c14 = bars.filter((r) => r.name === 'C14'); @@ -106,12 +106,12 @@ export function copingFrontSvg(records: BarRecord[], lengthMm: number, columnSm const c14Upper = c14.filter((r) => r.pts.every((p) => p[1] >= c14Top - 0.3)); const col = columnSm * 1000; const lowerChain = chainDims(positionsOf(c14Upper).map((v) => v - col), minX - col, maxX - col); - const dimY2 = dimY - 600; + const dimY2 = dimY - 900; for (const d of lowerChain) { - parts.push(`${d.text}`); + parts.push(`${d.text}`); } - parts.push(`기둥 중심`); - parts.push(`코핑 길이 ${lengthMm}`); + parts.push(`기둥 중심 (0)`); + parts.push(`코핑 길이 ${lengthMm}`); // Bubbles: one per bar group, a leader from the bubble to the middle of the group's bars. const at = (where: string): [number, number] => { @@ -158,9 +158,9 @@ export function copingFrontSvg(records: BarRecord[], lengthMm: number, columnSm } const vx = minX - 1500; - const vy = minY - 1900; + const vy = minY - 3400; const vw = maxX - minX + 3000; - const vh = legendY - minY + 1900 + 400; + const vh = legendY - vy + 400; return `${parts.join('')}`; } diff --git a/tests/coping-rebar-svg.test.ts b/tests/coping-rebar-svg.test.ts index 5fdf202..e59dc22 100644 --- a/tests/coping-rebar-svg.test.ts +++ b/tests/coping-rebar-svg.test.ts @@ -69,8 +69,8 @@ describe('정면 두 번째 치수선과 범례 (승인 2026-10-26, 시안)', () describe('정면 치수는 3D 철근 위치에서 계산 (승인 2026-10-26)', () => { it('the chains come from the bar positions and match the 시안 values', () => { const svg = copingFrontSvg(scene.records, model.copingL * 1000, model.columns[0].s); - const texts = [...svg.matchAll(/font-size="150"[^>]*>([^<]*) x[1]); - expect(texts).toEqual(['300', '18@250=4500', '8@300=2400', '18@250=4500', '300', '900', '10@1000=10000', '900', '기둥 중심']); + const texts = [...svg.matchAll(/font-size="220"[^>]*>([^<]*) x[1]); + expect(texts).toEqual(['300', '18@250=4500', '8@300=2400', '18@250=4500', '300', '900', '10@1000=10000', '900']); }); });