Merge remote-tracking branch 'origin/sub_laptop_3' into main_laptop_1
This commit is contained in:
@@ -74,6 +74,8 @@ export interface FacilityLane {
|
||||
/** 알약 = 구조물 + 관(가상 구조물 · 관 세션 id) — 평면 마커도 이것. */
|
||||
marks: () => StructureInstance[];
|
||||
stations: () => IrregularStation[];
|
||||
/** 종류 표 · 구조물 · 관 알림을 다 받음 = 측점 계획이 섬(그 전 측점은 「모름」 · 473). */
|
||||
ready: () => boolean;
|
||||
intervalM: () => number;
|
||||
onChange: (fn: () => void) => () => void;
|
||||
dispose: () => void;
|
||||
@@ -165,15 +167,19 @@ export function createFacilityLane(
|
||||
.catch(() => undefined);
|
||||
}
|
||||
|
||||
/** 측점 계획 입력이 다 옴 — 모름(관 알림 전 · 구조물 받기 전)을 빈 목록으로 셈하면 종단도가 저장 시설 측점
|
||||
* (관 등)을 뺀 선으로 횡단을 다시 셈 · 유토 배지가 잠깐 틀림(473 · 요구 272). */
|
||||
const known = (): boolean => types.length > 0 && reported !== null && structuresKnown;
|
||||
|
||||
function paint(force = false): void {
|
||||
const to = profile();
|
||||
if (!to) return;
|
||||
to.setStructureTypes([...types]);
|
||||
to.setStructures(marks());
|
||||
const signature = JSON.stringify(stations);
|
||||
// 종류 표를 받기 전 = 측점 계획 없음(빈 목록을 먼저 쓰면 종단도가 측점을 지웠다 다시 셈 · 467) ·
|
||||
// 입력이 다 오기 전 = 측점 계획 없음(빈 목록을 먼저 쓰면 종단도가 측점을 지웠다 다시 셈 · 467 · 473) ·
|
||||
// 같은 측점이면 안 씀 — 측점을 쓰면 종단도가 계산 묶음을 다시 돌림
|
||||
if (types.length && (force || painted?.to !== to || painted.stations !== signature)) {
|
||||
if (known() && (force || painted?.to !== to || painted.stations !== signature)) {
|
||||
to.setIrregularStations(stations);
|
||||
painted = { to, stations: signature };
|
||||
}
|
||||
@@ -183,7 +189,7 @@ export function createFacilityLane(
|
||||
/** 다시 셈 — 종류 표를 받기 전이면 측점은 미룸(받으면 다시 맞춤). */
|
||||
function refresh(carryEdits: boolean, force = false): void {
|
||||
pipes = reported ? shownPipes(reported) : [];
|
||||
if (types.length) {
|
||||
if (known()) {
|
||||
const next = plannedIrregular(
|
||||
planStations(withPipeIds(pipes, projectId), structures, types),
|
||||
intervalM,
|
||||
@@ -241,6 +247,7 @@ export function createFacilityLane(
|
||||
types: () => types,
|
||||
marks,
|
||||
stations: () => stations,
|
||||
ready: known,
|
||||
intervalM: () => intervalM,
|
||||
onChange(fn) {
|
||||
listeners.add(fn);
|
||||
|
||||
@@ -160,6 +160,8 @@ export function createDesignProfile(ctx: DesignProfileContext) {
|
||||
let stationInterval: number | undefined;
|
||||
let routeId: number | null = null;
|
||||
let irregularStations: IrregularStation[] = [];
|
||||
// 시설 줄이 측점을 처음 심기 전 = 저장 측점 그대로(빈 목록 = 저장 관 측점을 뺀 선 · 473)
|
||||
let planted = false;
|
||||
// 구조물 정본(structures.json) 목록과 타입 레지스트리 — 그래프 서클마크·벌룬에 쓴다.
|
||||
let structures: StructureInstance[] = [];
|
||||
let structureTypes: StructureType[] = [];
|
||||
@@ -291,7 +293,8 @@ export function createDesignProfile(ctx: DesignProfileContext) {
|
||||
}
|
||||
|
||||
/** 계획선 측점 줄 = 측점 한 벌 — 셈은 `design_profile_base` 몫(계산 묶음 planline 도 같은 기준). */
|
||||
const listed = (): AlignmentBase | null => listedBase(storedBase, detail, irregularStations);
|
||||
const listed = (): AlignmentBase | null =>
|
||||
listedBase(storedBase, detail, planted ? irregularStations : null);
|
||||
|
||||
/** 편집 후 다시 그린다 — 길게 누르기(초당 10회)도 한 프레임에 한 번만 그림. */
|
||||
function rebuild(): void {
|
||||
@@ -368,6 +371,7 @@ export function createDesignProfile(ctx: DesignProfileContext) {
|
||||
base: () => base,
|
||||
stationInterval: () => stationInterval,
|
||||
irregularStations: () => irregularStations,
|
||||
stationsPlanted: () => planted,
|
||||
minCoverTargets: () => minCoverTargets,
|
||||
structures: () => structures,
|
||||
structureTypes: () => structureTypes,
|
||||
@@ -521,6 +525,7 @@ export function createDesignProfile(ctx: DesignProfileContext) {
|
||||
/** 비정규 측점 목록을 반영해 그래프(세로선+라벨)·테이블(주석)을 다시 그린다. */
|
||||
setIrregularStations(stations: IrregularStation[]) {
|
||||
irregularStations = stations;
|
||||
planted = true;
|
||||
if (store !== preview) base = listed();
|
||||
if (base) alignment = buildAlignment(base, store.edits());
|
||||
pagePipeline.restartPagePipeline(projectId);
|
||||
|
||||
@@ -17,13 +17,13 @@ import { seatBornNodes } from "../../B05_Profile/logic/B05_Profile_Grade_Seat";
|
||||
|
||||
/** 계획선 측점 줄 = 측점 한 벌(서버 일반 + 지금 구조물 측점 · 272) — 표 · ▲▼ · 그래프 · 3D · 횡단 다시 셈(342-1)이
|
||||
* 같은 목록 · 사라진 구조물 측점의 꼭짓점은 서버와 같게 옮기거나 지우고 새 측점엔 세움(`followMovedNodes` · `seatBornNodes` · 427) ·
|
||||
* 늘 저장분에서 셈. */
|
||||
* 늘 저장분에서 셈. 심은 측점이 아직 없으면(null · 시설 줄 입력 전) 저장분 그대로(473). */
|
||||
export function listedBase(
|
||||
storedBase: AlignmentBase | null,
|
||||
detail: SectionDetailResponse | null,
|
||||
irregularStations: IrregularStation[],
|
||||
irregularStations: IrregularStation[] | null,
|
||||
): AlignmentBase | null {
|
||||
if (!storedBase || !detail) return storedBase;
|
||||
if (!storedBase || !detail || !irregularStations) return storedBase;
|
||||
const server = detail.longitudinal.stations;
|
||||
const planted = irregularGraphStations(irregularStations, maxChainageOf(detail.longitudinal));
|
||||
const list = oneStationList(server, planted);
|
||||
|
||||
@@ -87,7 +87,9 @@ export function createProfileSections(deps: ProfileSectionsDeps) {
|
||||
// 저장된 계획선의 정책은 만들 당시 기준이라 지금 설정(임도 종류·설계속도·지형)과
|
||||
// 다를 수 있다 — 그릴 때마다 페이지 설정 한 칸(세션 초안 ?? 저장 설정 · 횡단 보기와 같은 길 · 463)으로 맞춘다.
|
||||
applyPageSettings(profilePanel, projectId, state.latest ?? undefined);
|
||||
profilePanel.setIrregularStations(deps.bridge().irregularStations());
|
||||
// 시설 줄 입력이 다 온 뒤만 — 그 전 빈 목록은 저장 관 측점을 지운 선(473 · 다 오면 시설 줄이 심음)
|
||||
if (deps.bridge().stationsReady())
|
||||
profilePanel.setIrregularStations(deps.bridge().irregularStations());
|
||||
renderStationLines(detail);
|
||||
// 예상형상 코리도 — 저장본이 지금 정본과 맞을 때만 올린다. 낡았으면 [3D 업데이트] 대기
|
||||
// 표시만 켠다(2026-09-06 실측: 받아놓고 버리는 데다 다시 만드느라 전환이 16.7초까지 갔다).
|
||||
|
||||
Reference in New Issue
Block a user