feat(rebar): 코핑 배근 입력 12개 · CP01·CP02 검사 · 적용 버튼
- core/rebar/coping-settings.ts: 입력 정의, 기본값(코핑철근.md), 범위(코핑_입력범위_제안.md), 검사 함수 - 다리 수는 4·6·8 목록으로 두고 홀수는 CP02로 막음 - 값은 적용 버튼을 누를 때만 draft에 쓰고 다시 생성 (범위 밖이면 반영하지 않음) - PierInput.copingRebar, 모델 copingRebar, 변경 추적 키 추가 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec402e22d7
commit
9c93a6aa01
6 files changed
+212
-1
No files matched your search
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* 코핑 배근 입력 (승인 2026-10-26, 제안 = RAG/코핑_입력범위_제안.md). The 12 numbers of the ③ 코핑 배근 입력 panel.
|
||||
* Defaults are the 코핑철근.md values; the ranges are the proposal's, pending the design-standard check.
|
||||
*/
|
||||
export interface CopingRebarSettings {
|
||||
/** 피복 (철근 중심, mm). */
|
||||
cover: number;
|
||||
/** 주철근 기본간격 (mm). */
|
||||
mainSpacing: number;
|
||||
/** 주철근 끝단 최소 여유 (mm). */
|
||||
mainEndGap: number;
|
||||
/** 상면 주철근 단 간격 (mm). */
|
||||
mainLayerGap: number;
|
||||
/** 첫 전단철근 최소 여유 (피복 다음, mm). */
|
||||
firstShearGap: number;
|
||||
/** 전단철근 다리 수 (짝수). */
|
||||
shearLegs: number;
|
||||
/** 전단철근 간격 · 경사 (mm). */
|
||||
spacingS: number;
|
||||
/** 전단철근 간격 · Level (mm). */
|
||||
spacingL: number;
|
||||
/** 측면 수평 간격 (mm). */
|
||||
sideSpacing: number;
|
||||
/** 측면 위 끝 아래 최소 여유 (mm). */
|
||||
sideEndGap: number;
|
||||
/** C14 간격 위 2줄 (mm). */
|
||||
c14UpperSpacing: number;
|
||||
/** C14 간격 아래 줄 (mm). */
|
||||
c14LowerSpacing: number;
|
||||
}
|
||||
|
||||
export const DEFAULT_COPING_REBAR: CopingRebarSettings = {
|
||||
cover: 100,
|
||||
mainSpacing: 125,
|
||||
mainEndGap: 80,
|
||||
mainLayerGap: 57.2,
|
||||
firstShearGap: 200,
|
||||
shearLegs: 6,
|
||||
spacingS: 250,
|
||||
spacingL: 300,
|
||||
sideSpacing: 250,
|
||||
sideEndGap: 400,
|
||||
c14UpperSpacing: 1000,
|
||||
c14LowerSpacing: 2000,
|
||||
};
|
||||
|
||||
/** Allowed range per input (inclusive, mm). The shear legs are checked for evenness separately (CP02). */
|
||||
export const COPING_REBAR_RANGES: Record<keyof CopingRebarSettings, [number, number]> = {
|
||||
cover: [80, 150],
|
||||
mainSpacing: [100, 150],
|
||||
mainEndGap: [60, 100],
|
||||
mainLayerGap: [50, 70],
|
||||
firstShearGap: [100, 300],
|
||||
shearLegs: [4, 8],
|
||||
spacingS: [200, 350],
|
||||
spacingL: [200, 350],
|
||||
sideSpacing: [200, 300],
|
||||
sideEndGap: [300, 500],
|
||||
c14UpperSpacing: [800, 1200],
|
||||
c14LowerSpacing: [1500, 2500],
|
||||
};
|
||||
|
||||
export interface CopingSettingsIssue {
|
||||
code: 'CP01' | 'CP02';
|
||||
key: keyof CopingRebarSettings;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the settings against the ranges. CP01: a value is not a finite number or is out of range (W).
|
||||
* CP02: the shear leg count is odd (the 폐합 bars come in pairs of legs).
|
||||
*/
|
||||
export function copingSettingsIssues(s: CopingRebarSettings): CopingSettingsIssue[] {
|
||||
const out: CopingSettingsIssue[] = [];
|
||||
for (const key of Object.keys(COPING_REBAR_RANGES) as (keyof CopingRebarSettings)[]) {
|
||||
const v = s[key];
|
||||
const [lo, hi] = COPING_REBAR_RANGES[key];
|
||||
if (!Number.isFinite(v) || v < lo || v > hi) {
|
||||
out.push({ code: 'CP01', key, message: `CP01 ${key} ${v} 범위 밖 (${lo}–${hi})` });
|
||||
}
|
||||
}
|
||||
if (Number.isFinite(s.shearLegs) && s.shearLegs % 2 !== 0) {
|
||||
out.push({ code: 'CP02', key: 'shearLegs', message: `CP02 전단철근 다리 수 ${s.shearLegs}는 홀수 (짝수만 허용)` });
|
||||
}
|
||||
return out;
|
||||
}
|
||||
Reference in new issue
Block a user