feat(ground): load ground_model.json and apply the pier-centre ground EL

- ground-model.ts: read and check schema 1 of the Python ground model.
- ② 지반·지층 card: import the json, show the DTM value beside the excel
  value, and apply it only when the user presses the button (tracked as an
  override, revertible).
- groundEl becomes an editable, tracked input; the project file keeps the
  imported model and checks it on open.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 16:48:27 +09:00
1 parent 304b350481
commit c3606011b5
5 files changed
+208 -1

No files matched your search

+4
View File
@@ -1,4 +1,5 @@
import type { FckByMember, Material } from './rebar/common';
import { checkGroundModel, type GroundModelFile } from './ground-model';
import type { PierInput } from './types';
/** Project file schema (spec §8). Bump only with a migration. */
@@ -37,6 +38,8 @@ export interface ProjectFile {
bearingDrawing?: Record<string, { no: number; elx: number; h1: number; h2: number }[]>;
/** ② 부재별 fck (MPa). Absent in older files: every member uses the 공통 fck. */
fckByMember?: FckByMember;
/** 지반 모델 (ground_model.json)의 교각별 지반고. Absent = 불러오지 않음. Applied to a pier only by the user. */
groundModel?: GroundModelFile;
}
/** Serialises a project to the pretty-printed JSON stored in <교량명>_교각설계.pzr.json. */
@@ -68,6 +71,7 @@ export function parseProject(text: string): ProjectFile {
}
}
}
if (obj.groundModel !== undefined) checkGroundModel(obj.groundModel);
obj.piers.forEach((p, i) => {
if (!p || typeof p.id !== 'string' || !p.input) throw new Error(`교각 ${i + 1}: id 또는 input이 없습니다.`);
const input = p.input;