fix(rebar): draw the lower 정면 chain and the 기둥 중심 tick at the column position

- The chain is computed from the column centre (0) and is now drawn at the
  column's position on the coping (x = column s), so the 0 sits on the column.
- P1: the 10@1000 span runs from 1000 to 11000 mm, centred on the column at 6000 mm.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 15:01:08 +09:00
1 parent a4ae6de485
commit 41c1ecd340
2 files changed
+17 -2

No files matched your search

+12
View File
@@ -79,3 +79,15 @@ describe('chainDims', () => {
expect(chainDims([300, 550, 800, 1100], 0, 1400).map((d) => d.text)).toEqual(['300', '2@250=500', '2@300=600']);
});
});
describe('아래 치수선의 0 = 기둥 중심 (승인 2026-10-26)', () => {
it('the column-centre tick sits at the middle of the 10@1000 span (the 10 intervals are centred on the column)', () => {
const col = model.columns[0].s * 1000;
const svg = copingFrontSvg(scene.records, model.copingL * 1000, model.columns[0].s);
expect(svg).toContain(`<line x1="${col}" y1=`);
const seg = [...svg.matchAll(/<line x1="([-\d.]+)" y1="[-\d.]+" x2="([-\d.]+)" y2="[-\d.]+" stroke="#18212B" stroke-width="10"/g)].map((m) => [Number(m[1]), Number(m[2])]);
const span = seg.find(([a, b]) => b - a > 9000 && b - a < 11000);
expect(span).toBeDefined();
expect((span![0] + span![1]) / 2).toBeCloseTo(col, 0);
});
});