feat(bearing): 솔플레이트 규칙을 교각별 입력으로 바꾸고 도면 불러오기 제거 (C안)
- 받침 기준 카드, 도면 불러오기(xlsx·csv·dxf), 도면 참조 표·오버레이 제거 - 교각마다 솔플레이트 규칙 입력: 받침높이 H(솔플레이트 포함) 211, 교직 L 1000, 교축 W 1100, 종단 기울기 S −0.5 % (기본값, 가정 표시) - 중심 두께 T = ⌈22 + L·|S|/200⌉ 로 계산해 얇은 쪽 T2가 22 mm 이상이 되게 함 (기본값 T 25, T2 22.5, h3 = H − T = 186) - geometry·scene·SVG는 교각 규칙에서 만든 같은 솔플레이트 계획을 모든 받침에 사용 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f25e36c050
commit
36b26209df
23 files changed
+257
-1081
No files matched your search
+19
-18
@@ -1,41 +1,42 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildPier } from '../src/core/geometry';
|
||||
import { solplateGeometry } from '../src/core/solplate';
|
||||
import { SOLPLATE_RULE_DEFAULT, solplatePlan } from '../src/core/solplate-rule';
|
||||
import { loadP1 } from './helpers';
|
||||
|
||||
const model = buildPier(loadP1());
|
||||
const front1 = model.blocks.filter((b) => b.row === '전열')[0];
|
||||
const params = { A: 700, B: 640, margin: 100, T: 30, slopePct: -1.91 };
|
||||
const plan = solplatePlan(SOLPLATE_RULE_DEFAULT);
|
||||
|
||||
describe('솔플레이트 기하 (1단계, 승인 2026-10-23)', () => {
|
||||
it('L = A + 100 and W = B + 100 along the 교축 and the 교각축 직각', () => {
|
||||
const g = solplateGeometry(front1, 181, params);
|
||||
expect(g.L).toBeCloseTo(0.8, 6);
|
||||
expect(g.W).toBeCloseTo(0.74, 6);
|
||||
describe('솔플레이트 기하 (C안, 2026-11-03)', () => {
|
||||
it('L = 교직 1000 across the 교각축 직각 (n) and W = 교축 1100 along the 교축 (s)', () => {
|
||||
const g = solplateGeometry(front1, plan);
|
||||
expect(g.L).toBeCloseTo(1.0, 6);
|
||||
expect(g.W).toBeCloseTo(1.1, 6);
|
||||
});
|
||||
|
||||
it('the thick end T1 is on the 시점 side (−s): T1 ≈ 38, T2 ≈ 22 mm, and T1 + T2 = 2T', () => {
|
||||
const g = solplateGeometry(front1, 181, params);
|
||||
expect(g.T1 * 1000).toBeCloseTo(37.64, 1);
|
||||
expect(g.T2 * 1000).toBeCloseTo(22.36, 1);
|
||||
expect((g.T1 + g.T2) * 1000).toBeCloseTo(60, 6);
|
||||
// The top at the 시점 corners is the thick side.
|
||||
it('the thick end T1 is on the (−) side: T1 = 27.5 mm, T2 = 22.5 mm, and T1 + T2 = 2T', () => {
|
||||
const g = solplateGeometry(front1, plan);
|
||||
expect(g.T1 * 1000).toBeCloseTo(27.5, 6);
|
||||
expect(g.T2 * 1000).toBeCloseTo(22.5, 6);
|
||||
expect((g.T1 + g.T2) * 1000).toBeCloseTo(50, 6);
|
||||
// The top at the (−) corners is the thick side.
|
||||
const topAtStart = g.corners.filter((c) => Math.abs(c[1] - (g.bottom + g.T1)) < 1e-9);
|
||||
expect(topAtStart.length).toBe(2);
|
||||
});
|
||||
|
||||
it('the underside is the bearing top: block top (EL.X) + h3', () => {
|
||||
const g = solplateGeometry(front1, 181, params);
|
||||
expect(g.bottom).toBeCloseTo(front1.padTop + 0.181, 6);
|
||||
it('the underside is the bearing top: block top (EL.X) + h3 (186 mm)', () => {
|
||||
const g = solplateGeometry(front1, plan);
|
||||
expect(g.bottom).toBeCloseTo(front1.padTop + 0.186, 6);
|
||||
});
|
||||
|
||||
it('volume = L·W·T (the taper averages to the centre thickness)', () => {
|
||||
const g = solplateGeometry(front1, 181, params);
|
||||
expect(g.volume).toBeCloseTo(g.L * g.W * 0.03, 9);
|
||||
const g = solplateGeometry(front1, plan);
|
||||
expect(g.volume).toBeCloseTo(g.L * g.W * 0.025, 9);
|
||||
});
|
||||
|
||||
it('the solplate is centred on the block and follows the row direction', () => {
|
||||
const g = solplateGeometry(front1, 181, params);
|
||||
const g = solplateGeometry(front1, plan);
|
||||
const c = g.corners.reduce((acc, p) => [acc[0] + p[0] / 8, acc[1] + p[2] / 8] as [number, number], [0, 0]);
|
||||
expect(c[0]).toBeCloseTo(front1.s, 6);
|
||||
expect(c[1]).toBeCloseTo(front1.n, 6);
|
||||
|
||||
Reference in new issue
Block a user