Merge remote-tracking branch 'origin/dev' into sub_laptop_8

This commit is contained in:
2026-10-10 15:38:11 +09:00
9 changed files with 325 additions and 10 deletions
@@ -361,6 +361,8 @@ export function createStructuresBridge(deps: StructuresBridgeDeps) {
},
/** 그래프·3D가 쓰는 현재 비정규 측점 목록(물넘이포장 제외 — 알약 레인 몫). */
irregularStations: () => withoutFordPavement(irregularStations),
/** 구조물 종류의 군(A~G · 모르면 undefined) — 측점 고름이 덮어 열 구조물을 가름(216-1). */
typeGroup: (typeId: string) => structureTypeMap.get(typeId)?.group,
/** 관 지점 목록이 바뀜 — 측점 투영과 알약 레인을 한 번에 맞춘다. */
setPipes(pipes: PipeProjection[]): void {
pipeStations = pipesToStations(pipes);
+8 -4
View File
@@ -27,6 +27,9 @@ export interface SelectionSyncPorts {
selectGraph: (stationId: string | null, chainageM?: number | null) => void;
/** 좌측 구조물 폼 선택(누가거리 기준). */
selectSidebar: (chainageM: number | null) => void;
/** 측점 하나 고름(측점선 · 3D 띠) → 좌측 폼 — 횡단 카드 고름과 같은 규칙(관 → 덮는 구조물 · 노면공 뺌 →
* 없으면 폼 비움 · 216-1). 없으면 selectSidebar. */
openAtStation?: (chainageM: number | null) => void;
/** 배수유역도 세부유역 강조(누가거리 기준). */
selectBasin: (chainageM: number | null) => void;
/** 배수유역도 계획선 위 측점 마킹(누가거리 기준). 유역 없는 구조물도 위치를 보여 준다. */
@@ -79,17 +82,18 @@ export function createSelectionSync(ports: SelectionSyncPorts): SelectionSync {
// 측점선 · 3D 띠 · 표 고름도 고름 한 칸에 — 일반 측점을 안 적어 옛 배관 고름이 이겼음(188-1)
const at =
stationId === null ? null : (station?.chainage_m ?? ports.regularChainage?.(stationId));
if (at !== undefined) ports.remember?.(at);
// 규칙 측점을 고른 것이면 구조물 폼은 건드리지 않는다(고를 항목이 없다).
if (stationId !== null && !stationId.startsWith(prefix)) return;
if (at === undefined) return; // 모르는 측점 — 폼 · 고름 한 칸 안 건드림
ports.setSyncing(true);
try {
ports.selectSidebar(station ? station.chainage_m : null);
// 일반 측점도 폼이 따라감 — 일반 측점이면 폼을 안 건드려 옛 폼이 남았음(B06 카드 규칙 · 216-1)
(ports.openAtStation ?? ports.selectSidebar)(at);
ports.selectPipeForm?.(station && isPipeStation(station) ? station.chainage_m : null);
ports.selectStructure3D?.(station ? station.chainage_m : null);
} finally {
ports.setSyncing(false);
}
// 폼이 연 구조물 · 푼 관 알림이 적은 고름을 이 측점으로 덮음 — 마지막 고름 하나(188-1)
ports.remember?.(at);
},
selectStationOfPipe(chainageM) {
if (ports.isSyncing()) return;
@@ -617,8 +617,8 @@ export function createStructuresSection(
loadPipeForm(pipe);
},
resolveAt: (selection) => resolveSelection(selection, pipeFacilities, structures),
selectAt(selection) {
const hit = resolveSelection(selection, pipeFacilities, structures);
selectAt(selection, coverable) {
const hit = resolveSelection(selection, pipeFacilities, structures, coverable);
if (hit.pipeChainageM !== null) this.selectPipeByChainage(hit.pipeChainageM);
else this.selectById(hit.structureId);
return hit;
@@ -174,8 +174,11 @@ export interface StructuresSection {
/** 측점 · 구조물 고름 한 값을 폼이 열 항목으로 푼다 — 열지는 않는다(관 계열이 먼저). */
resolveAt: (selection: DesignSelection) => ResolvedSelection;
/** 고름 한 값으로 폼을 연다(관 → 구조물 순) — 어느 화면에서 골라도 같은 거리 · 같은 순서다.
* 고를 항목이 없으면 폼을 해제한다. 푼 결과를 돌려준다. */
selectAt: (selection: DesignSelection) => ResolvedSelection;
* 고를 항목이 없으면 폼을 해제한다. 푼 결과를 돌려준다. `coverable` = 덮어 열어도 되는 구조물(측점 고름 · 216-1). */
selectAt: (
selection: DesignSelection,
coverable?: (entry: StructureInstance) => boolean,
) => ResolvedSelection;
/** 종단 그래프 우클릭으로 타입을 지정해 추가한다. */
addAt: (chainageM: number, typeId: string) => void;
/** 종단 그래프에서 마크를 끌어 옮긴다. 옮겼으면 true. */