- logic 새 파일 다섯 — Cross_Wall_Geom(벽 1매) · Cross_Wall_Hatch_Geom(무늬 띠 · 물빼기 · 도수로 띠 · 원지반선) · Cross_Excavation_Geom(벽 터파기) · Cross_Design_Surface_Geom(암선 · 포장층) · Cross_Revetment_Geom(독립 기슭막이 배치) - logic 으로 옮김 — Body_Guard → Cross_Body_Guard · Structure_Layouts · Route_Carry_Patch(내용 그대로 · import 경로만) - inferStationInterval → common_util_station(글자표 없는 자리 · common_util_svg 는 다시 내보냄) — Node 묶음 ui_template_locale 끌림 끊음 - 부르는 쪽 import 줄 · 등록부 ts 경로 · 시험 · 도우미 경로 - test_472_3 GEOMETRY_PULLS 다섯 줄 걷음 · Wall_Hatch · Excavation · Design_Surface 세 줄은 Culvert · Box · Ford 그림 파일(518-2)이 그리기 함수로 부르는 동안 남김 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.1 KiB
TypeScript
49 lines
2.1 KiB
TypeScript
/* =============================================================================
|
|
* A00_Common/design/logic/design_calc_node_carry.ts
|
|
* 계산 Node 입구(`design_calc_node.ts`)의 노선 바뀐 [저장] 다시 얹기 몫(PLAN 472-6 6-B) — 브라우저가 쓰던 같은 TS.
|
|
*
|
|
* facility.rebase 입력 rebase { pipes?: { draft · before · after } · structures?: { draft · before · after } } →
|
|
* { pipes · structures }(세션 초안을 서버가 따라 옮긴 정본 위에 · `rebasePipeDraft` ·
|
|
* `rebaseStructureDraft` · 없는 몫 null)
|
|
* stations.carry 입력 carry(`RouteCarryInput` — 새 노선 상세 · 옛 노선 세션 칸 · 옛 열쇠 목록 · 측점 주인 ·
|
|
* 관 세션 장부 · 저장 관 앞뒤) → { patches · outside }(`routeCarryPatches`)
|
|
* ========================================================================== */
|
|
|
|
import {
|
|
rebasePipeDraft,
|
|
rebaseStructureDraft,
|
|
type FollowingPoint,
|
|
type FollowingStructure,
|
|
} from "@util/common_util_route_follow";
|
|
import {
|
|
routeCarryPatches,
|
|
type RouteCarryInput,
|
|
} from "../../../B06_Section/logic/B06_Section_Route_Carry_Patch";
|
|
|
|
type Pipe = FollowingPoint & { id?: string | null };
|
|
type Structure = FollowingStructure & { structure_id?: string | null };
|
|
type Rebase<T> = { draft: T[]; before: T[]; after: T[] };
|
|
|
|
export interface CarryInputs {
|
|
rebase?: { pipes?: Rebase<Pipe> | null; structures?: Rebase<Structure> | null };
|
|
carry?: RouteCarryInput;
|
|
}
|
|
|
|
/** id → 셈(입구 `RUNNERS` 에 얹음). */
|
|
export function carryRunners(inputs: CarryInputs): Record<string, () => unknown> {
|
|
return {
|
|
"facility.rebase": () => {
|
|
const rebase = inputs.rebase;
|
|
if (!rebase) return null;
|
|
const { pipes, structures } = rebase;
|
|
return {
|
|
pipes: pipes ? rebasePipeDraft(pipes.draft, pipes.before, pipes.after) : null,
|
|
structures: structures
|
|
? rebaseStructureDraft(structures.draft, structures.before, structures.after)
|
|
: null,
|
|
};
|
|
},
|
|
"stations.carry": () => (inputs.carry ? routeCarryPatches(inputs.carry) : null),
|
|
};
|
|
}
|