feat(ground): 하상 selectable; 설계홍수위 and 세굴 깊이 for 하상
- shape-options: a per-option "confirmed" flag; 하상 is confirmed, 해상 is not. - The 위치 chips store the choice in the pier's draft; 선택 shows it. - 하상: the groundwater inputs give way to 설계홍수위 DHWL (floodLevelEl) and 세굴 깊이 (scourDepthM). The groundwater value is kept (남겨두기). - Checks: G07 DHWL missing, G08 DHWL below the 지반고, G09 scour negative or the scour line below the footing bottom. The groundwater check is skipped for 하상. - Section: the DHWL as a solid line and the 세굴선 dashed. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7b5517e312
commit
26a5aff517
9 files changed
+163
-45
No files matched your search
+3
-1
@@ -23,7 +23,7 @@ export const EDITABLE_FIELDS = [
|
||||
] as const;
|
||||
|
||||
/** Inputs tracked for overrides and pending changes: the numeric cards plus 열별 본수 (an array, compared by value). */
|
||||
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'strataRows'] as const;
|
||||
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'scourDepthM', 'strataRows'] as const;
|
||||
|
||||
export type EditableKey = (typeof TRACKED_KEYS)[number];
|
||||
|
||||
@@ -47,6 +47,8 @@ export const FIELD_LABELS: Record<EditableKey, string> = {
|
||||
groundPosition: '지반 위치',
|
||||
groundWaterOn: '지하수위 고려',
|
||||
groundWaterEl: '지하수위 EL',
|
||||
floodLevelEl: '설계홍수위 DHWL',
|
||||
scourDepthM: '세굴 깊이',
|
||||
strataRows: '지층 행',
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ export const COPY_ITEMS: Record<CopyItem, ItemRule> = {
|
||||
'coping-length': { label: '코핑 길이 L', keys: ['copingLengthMm'], defaultOn: false, pileItem: false },
|
||||
'pile-length': { label: '말뚝 길이', keys: ['pileLengthMm'], defaultOn: false, pileItem: true },
|
||||
'pile-rows': { label: '열별 본수', keys: ['pileRows'], defaultOn: false, pileItem: true },
|
||||
'ground-position': { label: '지반 위치·지하수위', keys: ['groundPosition', 'groundWaterOn', 'groundWaterEl'], defaultOn: false, pileItem: false },
|
||||
'ground-position': { label: '지반 위치·지하수위', keys: ['groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl'], defaultOn: false, pileItem: false },
|
||||
};
|
||||
|
||||
export const DEFAULT_COPY_ITEMS: CopyItem[] = (Object.keys(COPY_ITEMS) as CopyItem[]).filter((k) => COPY_ITEMS[k].defaultOn);
|
||||
|
||||
+20
-2
@@ -16,7 +16,8 @@ export const PILE_EMBED_D = 1.0;
|
||||
/**
|
||||
* 지반·지층 입력 검사 (승인 2026-10-26).
|
||||
* G01: 층 하단 EL은 위 경계보다 낮아야 함. G02: 지하수위는 지반고와 가장 아래 층 사이에 있어야 함.
|
||||
* G03: 층 이름은 지층 목록에 있어야 함. Ground values are inputs only; they do not change the 3D model.
|
||||
* G03: 층 이름은 지층 목록에 있어야 함. 하상: G07 DHWL 없음, G08 DHWL이 지반고보다 낮음, G09 세굴선 확인.
|
||||
* Ground values are inputs only; they do not change the 3D model.
|
||||
*/
|
||||
export function validateGround(input: PierInput, issues: Issue[]): void {
|
||||
const rows = input.strataRows ?? [];
|
||||
@@ -31,7 +32,24 @@ export function validateGround(input: PierInput, issues: Issue[]): void {
|
||||
}
|
||||
upper = row.bottomEl;
|
||||
});
|
||||
if (input.groundWaterOn) {
|
||||
const position = input.groundPosition ?? '육상';
|
||||
if (position === '하상') {
|
||||
// 하상 (승인 2026-10-26): the 설계홍수위 DHWL replaces the groundwater level.
|
||||
const f = input.floodLevelEl;
|
||||
if (f === undefined || !Number.isFinite(f)) {
|
||||
issues.push({ code: 'G07', level: 'W', pier: input.name, message: '하상입니다. 설계홍수위(DHWL) EL을 입력하세요.' });
|
||||
} else if (f < input.groundEl) {
|
||||
issues.push({ code: 'G08', level: 'W', pier: input.name, message: `설계홍수위 ${f.toFixed(3)}이 지반고 ${input.groundEl.toFixed(3)}보다 낮습니다.` });
|
||||
}
|
||||
const scour = input.scourDepthM;
|
||||
if (scour !== undefined) {
|
||||
if (!(scour >= 0)) {
|
||||
issues.push({ code: 'G09', level: 'W', pier: input.name, message: '세굴 깊이는 0 이상이어야 합니다.' });
|
||||
} else if (input.groundEl - scour < input.footingBottomEl) {
|
||||
issues.push({ code: 'G09', level: 'W', pier: input.name, message: `세굴선 EL ${(input.groundEl - scour).toFixed(3)}이 확대기초 하면 ${input.footingBottomEl.toFixed(3)}보다 낮습니다 (기초 노출).` });
|
||||
}
|
||||
}
|
||||
} else if (input.groundWaterOn) {
|
||||
const w = input.groundWaterEl;
|
||||
const lowest = rows.length ? rows[rows.length - 1].bottomEl : undefined;
|
||||
if (w === undefined || !Number.isFinite(w)) {
|
||||
|
||||
@@ -8,6 +8,8 @@ export interface ShapeOption {
|
||||
label: string;
|
||||
/** 굵은 글씨 in the spec: the default that the 1단계 model builds. */
|
||||
isDefault: boolean;
|
||||
/** The rule for this option is confirmed (승인 2026-10-26: 하상), so it can be chosen even if it is not the default. */
|
||||
confirmed?: boolean;
|
||||
}
|
||||
|
||||
export interface ShapeGroup {
|
||||
@@ -17,6 +19,7 @@ export interface ShapeGroup {
|
||||
|
||||
const d = (label: string): ShapeOption => ({ label, isDefault: true });
|
||||
const x = (label: string): ShapeOption => ({ label, isDefault: false });
|
||||
const ok = (label: string): ShapeOption => ({ label, isDefault: false, confirmed: true });
|
||||
|
||||
export const SHAPE_GROUPS: Record<MemberId, ShapeGroup[]> = {
|
||||
bearing: [{ title: '배치', options: [d('분리'), x('일체')] }],
|
||||
@@ -34,14 +37,14 @@ export const SHAPE_GROUPS: Record<MemberId, ShapeGroup[]> = {
|
||||
{ title: '말뚝 종류', options: [d('강관'), x('PHC'), x('복합')] },
|
||||
{ title: '경사말뚝', options: [d('없음'), x('있음')] },
|
||||
],
|
||||
ground: [{ title: '위치', options: [d('육상'), x('하상'), x('해상')] }],
|
||||
ground: [{ title: '위치', options: [d('육상'), ok('하상'), x('해상')] }],
|
||||
};
|
||||
|
||||
export const UNDEFINED_REASON = '규칙 미정 (Q6 확정 전 선택 불가)';
|
||||
|
||||
/** Options currently selectable. Defaults are the only choices today. */
|
||||
/** Options currently selectable: the defaults and the options whose rule is confirmed. */
|
||||
export function isSelectable(option: ShapeOption): boolean {
|
||||
return option.isDefault;
|
||||
return option.isDefault || option.confirmed === true;
|
||||
}
|
||||
|
||||
/** The default summary of a member, e.g. "교좌면 직각 · 하면 직선". */
|
||||
|
||||
@@ -61,6 +61,10 @@ export interface PierInput {
|
||||
groundPosition?: GroundPosition;
|
||||
groundWaterOn?: boolean;
|
||||
groundWaterEl?: number;
|
||||
/** 설계홍수위 DHWL (m), used for 하상 only. Kept when the position changes (승인 2026-10-26). */
|
||||
floodLevelEl?: number;
|
||||
/** 세굴 깊이 (m) below the 지반고, used for 하상 only. */
|
||||
scourDepthM?: number;
|
||||
strataRows?: StrataRow[];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user