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:
ypshimandClaude Opus 5.5 committed 2026-11-03 18:37:17 +09:00
1 parent 4b02dde153
commit 6b969f4a7c
7 files changed
+137 -110

No files matched your search

+15 -10
View File
@@ -5,7 +5,7 @@
import type { AbutRecord } from './parse';
import type { WingForm } from './geometry';
import { shapeIssues, type AbutShape } from './shape';
import type { AbutBearingRule } from './bearing-table';
import { abutBearingRuleIssues, resolveBearingRule, type AbutBearingRule } from './bearing-table';
export type AbutEditKey = 'seatEl' | 'foundationBottomEl' | 'groundEl' | 'pileLengthMm' | 'skewDeg' | 'slopeI';
@@ -87,14 +87,17 @@ export const SHAPE_EDIT_FIELDS: { key: keyof AbutShape; label: string }[] = [
{ key: 'parapetLevelRightMm', label: '흉벽 상단 Level 우 (mm, 계산 미사용)' },
];
/** 받침 규칙 입력칸 (② 교량받침 카드, 시안 공통 · 규칙). 기본값은 교각 P1 전열 값 (가정, QA-15). */
export const BEARING_RULE_FIELDS: { key: 'h3Mm' | 'solplateTMm' | 'solplateMarginMm'; label: string }[] = [
{ key: 'h3Mm', label: '받침 높이 h3 (mm)' },
{ key: 'solplateTMm', label: '솔플레이트 T (mm)' },
{ key: 'solplateMarginMm', label: '솔플 여유 L − A, W − B (mm)' },
/** 받침 규칙 입력칸 (② 교량받침 카드): 교각 솔플레이트 규칙과 같은 칸. 받침높이 H는 교대 받침 시트 값으로 고정 (2026-11-03). */
export const BEARING_RULE_FIELDS: { key: 'lengthMm' | 'widthMm' | 'slopePct'; label: string }[] = [
{ key: 'lengthMm', label: '솔플레이트 교직 L (mm)' },
{ key: 'widthMm', label: '솔플레이트 교축 W (mm)' },
{ key: 'slopePct', label: '종단 기울기 S (%)' },
];
/** Changes one 받침 규칙 value: the numbers must be greater than 0, the 받침 종류 must not be empty. */
/**
* Changes one 받침 규칙 value. L and W must be greater than 0, S any number, and the rule must still build a solplate with
* the 교대 받침높이 H (the pier rule's checks). The 받침 종류 must not be empty.
*/
export function applyBearingRule(rec: AbutRecord, key: keyof AbutBearingRule, value: number | string): AbutRecord {
if (key === 'kind') {
const kind = String(value).trim();
@@ -102,7 +105,9 @@ export function applyBearingRule(rec: AbutRecord, key: keyof AbutBearingRule, va
return { ...rec, bearingRule: { ...(rec.bearingRule ?? {}), kind } };
}
const n = Number(value);
if (!(Number.isFinite(n) && n > 0)) throw new Error('받침 규칙 값은 0보다 큰 숫자여야 합니다.');
return { ...rec, bearingRule: { ...(rec.bearingRule ?? {}), [key]: n } };
if (!Number.isFinite(n)) throw new Error('솔플레이트 규칙 값은 숫자여야 합니다.');
const bearingRule = { ...(rec.bearingRule ?? {}), [key]: n };
const issues = abutBearingRuleIssues(resolveBearingRule(bearingRule), rec.bearingHeightMm);
if (issues.length > 0) throw new Error(issues[0]);
return { ...rec, bearingRule };
}