조정창에서 좌·우 끝을 따로 잡는다 — ◀▶는 구체 길이, ▲▼는 그 끝의 구체 표고를 0.1m씩 움직인다. 좌·우 표고가 달라지면 구체가 기울고, 날개벽 구간 바닥(에이프런)은 각 끝 표고에서 수평을 지킨다(2026-08-25 사용자). - `computeBoxLayout`이 좌·우를 따로 푼다: 끝 표고·길이·성토선·에이프런 - 성토선은 그쪽 표고 기준으로 물매 1:1.2를 지키므로 표고를 내리면 구체가 길어진다 - 조정창 `_Cross_Box_Panel.ts` + 제어 `createBoxControls` + `design.box_adjust` 저장 (세션 → 캐시 → 확정 payload, 세월교와 같은 체계) - 3D: 구체 밖(날개벽 구간)에 서 있던 벽을 없앴다 — 천장 없는 통로가 생기던 자리는 날개벽 몫이다. 이제 상판·구체 저판·측벽 2매·에이프런 2매 + 날개벽 4매로 나뉜다 - 카드 렌더러의 구체 배선(선택 토글·강조·조정창)을 `_Cross_View_Bodies.ts`로 분리, 연동 플래그 세션은 `_Page_Link_Session.ts`로 분리(700줄 제한) 검증(10+0.9): 구체 5.34m·수평 → ◀ 1회 5.44m → ▼ 2회 표고 −0.2m·물매 1:28.4, 에이프런 두 장 모두 수평 유지, ↺ 원복. 3D 솔리드 10개(측벽 링 0.2m). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
74 lines
3.6 KiB
TypeScript
74 lines
3.6 KiB
TypeScript
/* =============================================================================
|
|
* B06_Section_UI_Page_Patches.ts
|
|
* 확정·임시저장이 보내는 **측점별 편집분(cross_patches) 조립** — 페이지
|
|
* (`_UI_Page.ts`)에서 700줄 제한으로 분리했다(2026-08-25).
|
|
*
|
|
* 세션·제어기에 흩어져 있던 조작값을 누가거리 하나로 합친다. 값은 만들지 않고
|
|
* 모으기만 한다 — 판정·한계는 각 제어기가 이미 끝냈다.
|
|
* ========================================================================== */
|
|
|
|
import type { CrossSectionPatch, StoredWallAdjust } from "./B06_Section_Api_Fetch";
|
|
import type { BasinAdjust } from "./B06_Section_UI_Cross_Culvert_Types";
|
|
import type { FordAdjust } from "./B06_Section_UI_Cross_Ford";
|
|
import type { BoxAdjust } from "./B06_Section_UI_Cross_Box";
|
|
import type { InletStructureChoice } from "./B06_Section_UI_Cross_Culvert";
|
|
|
|
export interface CrossPatchSources {
|
|
/** 암 경계선 오프셋(누가거리 문자열 키). */
|
|
rockOffsets: Map<string, number>;
|
|
/** 측점 개별 표시 반폭(m). */
|
|
stationWidths: Map<string, number>;
|
|
inletStructures: Map<string, InletStructureChoice>;
|
|
basinAdjustments: Map<string, BasinAdjust>;
|
|
revetAdjusts: Map<number, Record<string, StoredWallAdjust>>;
|
|
extraCounts: Map<number, { outlet: number; basin: number }>;
|
|
fordAdjusts: Map<number, FordAdjust>;
|
|
boxAdjusts: Map<number, BoxAdjust>;
|
|
linkFlags: Map<number, { detached?: boolean; followGrade?: boolean }>;
|
|
}
|
|
|
|
/** 누가거리별 패치를 합쳐 한 배열로 돌려준다. */
|
|
export function buildCrossPatches(sources: CrossPatchSources): CrossSectionPatch[] {
|
|
const patchByChainage = new Map<number, CrossSectionPatch>();
|
|
const patchFor = (chainageM: number): CrossSectionPatch => {
|
|
const existing = patchByChainage.get(chainageM);
|
|
if (existing) return existing;
|
|
const created: CrossSectionPatch = { chainage_m: chainageM };
|
|
patchByChainage.set(chainageM, created);
|
|
return created;
|
|
};
|
|
sources.rockOffsets.forEach((offset, chainage) => {
|
|
patchFor(Number(chainage)).rock_boundary_offset_m = offset;
|
|
});
|
|
// 개별 표시 반폭(2026-08-06) — design에 병합돼 재접근 시 유지된다.
|
|
sources.stationWidths.forEach((width, chainage) => {
|
|
patchFor(Number(chainage)).display_half_width_m = width;
|
|
});
|
|
sources.inletStructures.forEach((structure, chainage) => {
|
|
patchFor(Number(chainage)).inlet_structure = structure;
|
|
});
|
|
sources.basinAdjustments.forEach((adjust, chainage) => {
|
|
patchFor(Number(chainage)).basin_adjust = adjust;
|
|
});
|
|
// 기슭막이 4축·다단 단 수 — 세션 전용이던 값을 정본에 실어 확정한다(2026-08-24).
|
|
sources.revetAdjusts.forEach((adjusts, chainage) => {
|
|
patchFor(chainage).revet_adjust = adjusts;
|
|
});
|
|
sources.extraCounts.forEach((counts, chainage) => {
|
|
patchFor(chainage).extra_wall_counts = counts;
|
|
});
|
|
// 세월교 측벽 조작값(2026-08-25) — 배수관 값과 같은 자리에 실어 3D·재계산이 잇는다.
|
|
sources.fordAdjusts.forEach((adjust, chainage) => {
|
|
patchFor(chainage).ford_adjust = adjust;
|
|
});
|
|
sources.boxAdjusts.forEach((adjust, chainage) => {
|
|
patchFor(chainage).box_adjust = adjust;
|
|
});
|
|
// 연동 해제(측점별)·종단경사 반영(전체 공통) — 같은 체계로 정본에 싣는다.
|
|
sources.linkFlags.forEach((flags, chainage) => {
|
|
if (flags.detached !== undefined) patchFor(chainage).revet_link_detached = flags.detached;
|
|
if (flags.followGrade !== undefined) patchFor(chainage).revet_follow_grade = flags.followGrade;
|
|
});
|
|
return [...patchByChainage.values()];
|
|
}
|