feat(bearing): plan of a pair with block outline and overlaid drawing values (승인 2026-10-26)

- C4·C5 measured across the coping width (교각축 직각): the two coping edges
  at ±B/2 to the bearing centre. The former along-the-axis definition is replaced.
- view/bearing-plan-svg.ts: the plan of one pair with the model's solplates
  and the block outline(s) (일체: one 2500 × 1200; 분리: two 1200 × 1200), and
  the drawing A/B overlaid as dashed outlines.
- ② bearing card: 상세 보기 pair chips (①·⑥ …) and the overlay toggle.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 12:19:14 +09:00
1 parent 43a18182f3
commit b3a62850ab
5 files changed
+168 -12

No files matched your search

+5 -5
View File
@@ -12,14 +12,14 @@ function block(no: number, row: '전열' | '후열', s: number): BlockModel {
}
describe('받침 배치 규칙 (승인 2026-10-26)', () => {
it('C4 and C5 from the model: distances from each coping edge to the bearing centre (P1 ≈ 943 / 950 mm)', () => {
it('C4 and C5 from the model: distances from the two coping edges across the width (교각축 직각), P1 front 852 / 2248', () => {
const d = bearingEdgeDistances(model);
expect(d).toHaveLength(10);
const first = d.find((x) => x.no === 1 && x.row === '전열')!;
expect(first.leftMm).toBeCloseTo(943, 0);
expect(first.rightMm).toBeCloseTo(12000 - 943, 0);
// the two ends of one bearing sum to the coping length
for (const x of d) expect(x.leftMm + x.rightMm).toBeCloseTo(12000, 6);
expect(first.leftMm).toBeCloseTo(852, 0);
expect(first.rightMm).toBeCloseTo(2248, 0);
// the two edges are one coping width (3100) apart
for (const x of d) expect(x.leftMm + x.rightMm).toBeCloseTo(3100, 6);
});
it('the front and back bearings of one number are about 85 mm apart on P1, so 일체 is allowed', () => {
+32
View File
@@ -0,0 +1,32 @@
import { describe, expect, it } from 'vitest';
import { buildPier } from '../src/core/geometry';
import { bearingPlanSvg } from '../src/view/bearing-plan-svg';
import { loadP1 } from './helpers';
const separate = buildPier(loadP1());
const integrated = buildPier({ ...loadP1(), bearingLayout: '일체' });
describe('교량받침 상세 평면 (승인 2026-10-26)', () => {
it('shows C4 and C5 across the coping width (P1 front 852 / 2248)', () => {
const svg = bearingPlanSvg(separate, 0);
expect(svg).toContain('C4 852');
expect(svg).toContain('C5 950');
});
it('분리 draws two 1200 outlines; 일체 draws one 2500 outline (block outline only)', () => {
expect((bearingPlanSvg(separate, 0).match(/width="1200" height="1200"/g) ?? []).length).toBe(2);
expect(bearingPlanSvg(integrated, 0)).toContain('width="2500" height="1200"');
});
it('the drawing values are overlaid as dashed outlines only when given', () => {
const plain = bearingPlanSvg(separate, 0);
expect(plain).not.toContain('stroke-dasharray="40 25"');
const overlay = { front: { A: 700, B: 640 }, back: { A: 700, B: 540 } };
const svg = bearingPlanSvg(separate, 0, overlay);
expect((svg.match(/stroke-dasharray="40 25"/g) ?? []).length).toBe(2);
});
it('an unknown pair index gives an empty drawing', () => {
expect(bearingPlanSvg(separate, 99)).toBe('');
});
});