fix(abut): 교대 받침 공통 규칙을 교각 솔플레이트 규칙 형식으로 변경
- 이전 가정(받침 A×B 700×640, h3 181, T 30, 여유 100)을 없애고, 교각과 같은 솔플레이트 규칙(src/core/solplate-rule.ts)을 씀 (결정 2026-11-03: 교각 규칙을 기본값으로) - 입력: 솔플레이트 교직 L 1000, 교축 W 1100, 종단 기울기 S −0.5 %. 받침높이 H는 교대 받침 시트 값(A1 275 mm)으로 고정 - 계산: T = ⌈22 + L·|S|/200⌉ = 25, h3 = H − T = 250, T1 27.5 / T2 22.5, E = 400. 교각 카드와 같은 안내 줄 표시 - 받침 종류 · 용량 입력은 유지. ELEVATION TABLE의 A·B 열 삭제, 삽도는 솔플레이트 L × W 기준 - 테스트 갱신. 전체 651건 통과, 타입 검사·빌드 통과. 브라우저 시각 확인은 미실시 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b02dde153
commit
6b969f4a7c
7 files changed
+137
-110
No files matched your search
@@ -49,7 +49,7 @@ describe('교대 받침 방위각 (엑셀 받침 시트 6번째 열)', () => {
|
||||
});
|
||||
|
||||
it('the ELEVATION table shows the 방위각 (CAD = the workbook value, 진북) and the block turn', () => {
|
||||
const [r] = abutElevationRows(model, resolveBearingRule()).filter((x) => x.no === 1);
|
||||
const [r] = abutElevationRows(model, resolveBearingRule(), rec.bearingHeightMm).filter((x) => x.no === 1);
|
||||
expect(r.azimuthCadDeg).toBeCloseTo(75 + 56 / 60 + 55.9 / 3600, 6);
|
||||
expect(r.azimuthNorthDeg).toBeCloseTo(90 - (75 + 56 / 60 + 55.9 / 3600), 6);
|
||||
expect(r.rotDeg).toBeCloseTo(model.bearings.find((b) => b.no === 1)!.rotDeg, 9);
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { abutBearingPlanSvg, abutBearingSectionSvg, abutSolplateSvg, type AbutBearingDetail } from '../src/view/abut-bearing-svg';
|
||||
|
||||
// 운곡교 A1 받침 ① (교대 받침 표의 값: 블럭 125 = 75 + 50, h3 181, T 30, L 800, T1 38 / T2 22, 회전 −4.42°).
|
||||
// 운곡교 A1 받침 ① (교대 받침 표: 블럭 125 = 75 + 50, H 275 → T 25, h3 250, L 1000 × W 1100, T1 27.5 / T2 22.5, 회전 −4.42°).
|
||||
const d: AbutBearingDetail = {
|
||||
no: 1, blockMm: 1200, padMm: 1000, A: 700, B: 640, L: 800, W: 740,
|
||||
h1: 75, h2: 50, h3: 181, h4: 30, T1: 38, T2: 22, rotDeg: -4.42, S: -1.91, seatEl: 44.367, z: 44.492,
|
||||
no: 1, blockMm: 1200, padMm: 1000, L: 1000, W: 1100,
|
||||
h1: 75, h2: 50, h3: 250, h4: 25, T1: 27.5, T2: 22.5, rotDeg: -4.42, S: -0.5, seatEl: 44.367, z: 44.492,
|
||||
};
|
||||
|
||||
describe('교대 받침 삽도 (시안 ② 교량받침 카드)', () => {
|
||||
it('평면: block, pad, solplate and bearing sizes, turned by the bearing azimuth', () => {
|
||||
it('평면: block, pad and solplate L × W, turned by the bearing azimuth', () => {
|
||||
const svg = abutBearingPlanSvg(d);
|
||||
expect(svg).toContain('700 × 640');
|
||||
expect(svg).toContain('솔플 800 × 740 · 패드 1000');
|
||||
expect(svg).toContain('솔플 1000 × 1100');
|
||||
expect(svg).toContain('패드 1000 (점선)');
|
||||
expect(svg).toContain('rotate(4.420 150 130)');
|
||||
expect(svg.match(/<rect /g)).toHaveLength(4);
|
||||
expect(svg.match(/<rect /g)).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('단면: the four layers and E = h1 + h2 + h3 + h4 = 336', () => {
|
||||
it('단면: the four layers and E = h1 + h2 + h3 + h4 = 400', () => {
|
||||
const svg = abutBearingSectionSvg(d);
|
||||
for (const s of ['h1 75', 'h2 50', 'h3 181', 'h4 30', 'E = 336', '교좌면 44.367', 'z 44.492']) expect(svg).toContain(s);
|
||||
for (const s of ['h1 75', 'h2 50', 'h3 250', 'h4 25', 'E = 400', '교좌면 44.367', 'z 44.492']) expect(svg).toContain(s);
|
||||
expect(svg.match(/<rect /g)).toHaveLength(4);
|
||||
});
|
||||
|
||||
it('솔플레이트: L, W, T1 → T2 and the slope', () => {
|
||||
const svg = abutSolplateSvg(d);
|
||||
for (const s of ['T1 38', 'T2 22', 'L 800 · W 740', 'S -1.910 %']) expect(svg).toContain(s);
|
||||
for (const s of ['T1 27.5', 'T2 22.5', 'L 1000 · W 1100', 'S -0.500 %']) expect(svg).toContain(s);
|
||||
});
|
||||
});
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
ABUT_BEARING_RULE_DEFAULT,
|
||||
abutBearingChecks,
|
||||
abutElevationRows,
|
||||
abutSolplatePlan,
|
||||
abutSolplateRows,
|
||||
resolveBearingRule,
|
||||
} from '../src/core/abut/bearing-table';
|
||||
@@ -21,16 +22,22 @@ const input = toAbutInput(rec);
|
||||
const model = buildAbut(input);
|
||||
const members = buildMembers(model, { bottomEl: input.foundationBottomEl, pileLengthMm: input.pileLengthMm });
|
||||
const rule = resolveBearingRule();
|
||||
const H = rec.bearingHeightMm;
|
||||
|
||||
describe('교대 받침 카드 표 (시안 ②, QA-15 가정)', () => {
|
||||
it('ELEVATION: block 125 = concrete 75 + pad 50, E = 75 + 50 + 181 + 30 = 336', () => {
|
||||
const rows = abutElevationRows(model, rule);
|
||||
describe('교대 받침 카드 (교각 솔플레이트 규칙, 받침높이 H = 교대 시트 값)', () => {
|
||||
it('the rule defaults are the pier rule: 1000 × 1100 · −0.5 %, H 275 from the 교대 sheet', () => {
|
||||
expect(ABUT_BEARING_RULE_DEFAULT).toMatchObject({ lengthMm: 1000, widthMm: 1100, slopePct: -0.5 });
|
||||
expect(H).toBe(275);
|
||||
// T = ⌈22 + 1000·0.5/200⌉ = 25, h3 = 275 − 25 = 250, T1/T2 = 25 ± 2.5
|
||||
expect(abutSolplatePlan(rule, H)).toMatchObject({ T: 25, h3: 250, T1: 27.5, T2: 22.5 });
|
||||
});
|
||||
|
||||
it('ELEVATION: block 125 = 75 + 50, E = 75 + 50 + 250 + 25 = 400', () => {
|
||||
const rows = abutElevationRows(model, rule, H);
|
||||
expect(rows).toHaveLength(5);
|
||||
for (const r of rows) {
|
||||
expect(r.h1).toBe(75);
|
||||
expect(r.h2).toBe(50);
|
||||
expect(r.E).toBe(336);
|
||||
expect(r.solplateTopEl).toBeCloseTo(r.seatEl + 0.336, 6);
|
||||
expect([r.h1, r.h2, r.h3, r.h4, r.E]).toEqual([75, 50, 250, 25, 400]);
|
||||
expect(r.solplateTopEl).toBeCloseTo(r.seatEl + 0.4, 6);
|
||||
}
|
||||
const first = rows.find((r) => r.no === 1)!;
|
||||
expect(first.seg).toBe('①');
|
||||
@@ -38,24 +45,21 @@ describe('교대 받침 카드 표 (시안 ②, QA-15 가정)', () => {
|
||||
expect(first.z).toBeCloseTo(44.492, 3);
|
||||
});
|
||||
|
||||
it('솔플레이트: L 800, W 740, S = −1.91 %, T1 38 / T2 22, check 16 ≈ 15.3', () => {
|
||||
const [r] = abutSolplateRows(model, rule, rec.slopeI);
|
||||
expect(r.L).toBe(800);
|
||||
expect(r.W).toBe(740);
|
||||
expect(r.S).toBeCloseTo(-1.91, 2);
|
||||
expect([r.T, r.T1, r.T2]).toEqual([30, 38, 22]);
|
||||
expect(r.check).toBe('16 ≈ 15.3');
|
||||
it('솔플레이트 TABLE: L 1000, W 1100, S −0.5 %, T 25, T1 27.5 / T2 22.5, check 5.0 = 5.0', () => {
|
||||
const [r] = abutSolplateRows(model, rule, H);
|
||||
expect([r.L, r.W, r.S, r.T, r.T1, r.T2]).toEqual([1000, 1100, -0.5, 25, 27.5, 22.5]);
|
||||
expect(r.check).toBe('5.0 = 5.0');
|
||||
});
|
||||
|
||||
it('the rule inputs change the table: h3 200 gives E 355, margin 150 gives L 850', () => {
|
||||
const r2 = resolveBearingRule({ h3Mm: 200, solplateMarginMm: 150 });
|
||||
expect(abutElevationRows(model, r2)[0].E).toBe(355);
|
||||
expect(abutSolplateRows(model, r2, rec.slopeI)[0].L).toBe(850);
|
||||
expect(ABUT_BEARING_RULE_DEFAULT.kind).toBe('탄성받침');
|
||||
it('the rule inputs change the plan: S −1.91 gives T 32 and h3 243', () => {
|
||||
const steep = resolveBearingRule({ slopePct: -1.91 });
|
||||
// T = ⌈22 + 1000·1.91/200⌉ = ⌈31.55⌉ = 32
|
||||
expect(abutSolplatePlan(steep, H)).toMatchObject({ T: 32, h3: 243 });
|
||||
expect(abutElevationRows(model, steep, H)[0].E).toBe(75 + 50 + 275);
|
||||
});
|
||||
|
||||
it('checks: W02, W04 (흉벽 ≈ 145 · 전면 255), W03 and I01 all clear for A1', () => {
|
||||
const lines = abutBearingChecks(model, members, rule);
|
||||
const lines = abutBearingChecks(model, members, rule, H);
|
||||
expect(lines).toHaveLength(4);
|
||||
expect(lines[0]).toContain('W02 없음');
|
||||
// 시안 145 is bearing ① (lateral 0.745); the smallest gap over the five bearings is 144 (lateral 0.744).
|
||||
@@ -66,12 +70,13 @@ describe('교대 받침 카드 표 (시안 ②, QA-15 가정)', () => {
|
||||
expect(lines[3]).toContain('I01 없음');
|
||||
});
|
||||
|
||||
it('the rule edit keeps only changed values, refuses 0 and an empty 받침 종류, and the project file accepts it', () => {
|
||||
const edited = applyBearingRule(applyBearingRule(rec, 'h3Mm', 200), 'kind', '포트받침 3000 kN');
|
||||
expect(edited.bearingRule).toEqual({ h3Mm: 200, kind: '포트받침 3000 kN' });
|
||||
expect(() => applyBearingRule(rec, 'solplateTMm', 0)).toThrow('0보다 큰');
|
||||
it('the rule edit keeps only changed values, refuses L 0 and a rule thicker than H, and the project file accepts it', () => {
|
||||
const edited = applyBearingRule(applyBearingRule(rec, 'lengthMm', 900), 'kind', '포트받침 3000 kN');
|
||||
expect(edited.bearingRule).toEqual({ lengthMm: 900, kind: '포트받침 3000 kN' });
|
||||
expect(() => applyBearingRule(rec, 'lengthMm', 0)).toThrow('0보다');
|
||||
expect(() => applyBearingRule(rec, 'slopePct', 60)).toThrow('받침높이');
|
||||
expect(() => applyBearingRule(rec, 'kind', ' ')).toThrow('받침 종류');
|
||||
expect(() => checkStoredAbutments([edited])).not.toThrow();
|
||||
expect(() => checkStoredAbutments([{ ...edited, bearingRule: { h3Mm: 'x' } }])).toThrow('받침 규칙');
|
||||
expect(() => checkStoredAbutments([{ ...edited, bearingRule: { lengthMm: 'x' } }])).toThrow('받침 규칙');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user