fix(구조물표): 322-3 고침 — B06 을 바로 열어도 옛 소수 관 자리 = 정수 m 초안(B05 snapOldStations 와 같은 셈 · 요구 167) · 계획고 편집 · 고름 따라감 · 알림 한 줄 같은 글 · 투영 이월 끝 = 선 길이(관이 전부 0 m 로 가던 흠) · design_view_cross 685줄 안(322-3 넘침)
- B06 구조물 목록 load: 관 초안 없고 저장분에 소수 자리 = `snapPlan` 으로 옮긴 초안(persistPipes) → 카드 · 측점 계획이 B05 를 먼저 연 것과 같음 · 정본은 [저장]에서(B08 사본 이름도 PUT 길) - 서버 관 읽기는 그대로(파일 = 측점) · `project_pipe_points` 끝 = 선 길이 - 시험: test_322_3_flow 견본(85.05 … 982.64) → 85 · 173 · 258 · 352 · 440 · 534 · 620 · 720 · 804 · 900 · 983 · 정수 저장분 = 새 미리 뜬 카드 0 · 소수 저장분 = 정수 자리로 · test_322_3_saved_snap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
This commit is contained in:
@@ -54,6 +54,7 @@ import {
|
||||
import { showToast } from "@ui/ui_template_elements";
|
||||
import { snapStructureStation } from "../common_util/common_util_structure_station";
|
||||
import { plantsStation } from "../B05_Profile/B05_Profile_UI_Profile_Structures";
|
||||
import { snapNotice, snapPlan } from "../B05_Profile/B05_Profile_UI_Structures_Snap";
|
||||
import {
|
||||
adjustDockRoot,
|
||||
refreshAdjustSlots,
|
||||
@@ -427,6 +428,9 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc
|
||||
(basin) => Math.abs(basin.chainage_m - pipe.chainage_m) < PIPE_MATCH_M,
|
||||
)?.design_flow_m3s ?? null,
|
||||
}));
|
||||
// 옛 소수 관 자리 = 정수 m 초안(요구 167 · B05 `snapOldStations` 와 같은 셈) — B06 을 바로 열어도
|
||||
// 카드 · 측점이 B05 를 거친 것과 같음 · 정본은 [저장]에서
|
||||
if (!pendingPipes) snapOldPipes(projectId);
|
||||
section.setPipeFacilities(pipeFacilities);
|
||||
// 종단 알약 레인 — 구조물 정본 + 계곡 통과 시설(관 정본)을 합쳐 B05 와 같은 표기로.
|
||||
pushMarks();
|
||||
@@ -500,6 +504,24 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc
|
||||
deps.onPipesWritten?.();
|
||||
}
|
||||
|
||||
/** 옛 소수 관 자리 → 정수 m(확인 창 없이) — 계획고 편집 · 고름도 새 자리로(`movePipeTo` 와 같은 따라가기). */
|
||||
function snapOldPipes(projectId: string): void {
|
||||
const plan = snapPlan([], pipeFacilities);
|
||||
plan.pipes.forEach(({ from, to, attributes }) => {
|
||||
const hit = pipeFacilities.find((pipe) => pipe.chainage_m === from);
|
||||
if (!hit) return;
|
||||
deps.shared.profile?.resetStationEdit(from, to);
|
||||
followMovedPipe(projectId, from, to);
|
||||
Object.assign(hit, { chainage_m: to, start_m: attributes.start_m, end_m: attributes.end_m });
|
||||
});
|
||||
if (plan.pipes.length) {
|
||||
pipeFacilities.sort((left, right) => left.chainage_m - right.chainage_m);
|
||||
persistPipes();
|
||||
deps.onStructuresChanged?.(); // 새 자리 횡단을 미리 떠 카드로
|
||||
}
|
||||
snapNotice(plan.pipes.length, plan.skipped);
|
||||
}
|
||||
|
||||
/** 관 옮기기 — 폼의 측점 칸과 종단 끌기가 같은 길을 탄다. 재분할은 [저장]·[확정] 뒤. */
|
||||
function movePipeTo(fromChainageM: number, toChainageM: number): void {
|
||||
if (!deps.projectId) {
|
||||
|
||||
Reference in New Issue
Block a user