Merge remote-tracking branches 'origin/main_laptop_1' and 'origin/sub_laptop_4' into sub_laptop_3

This commit is contained in:
2026-10-17 19:36:07 +09:00
4 changed files with 38 additions and 4 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ export async function refreshCrossDesigns(input: CrossRefreshInput): Promise<num
const sections = input.detail.cross_sections;
if (sections.length && sections.every((section) => section.preview)) return [];
useStationKeys(input.projectId, input.routeId, input.detail); // 세션 고침을 이 측점 목록으로 읽음(344-3)
await withPipeOptions(input.detail, input.projectId); // 관 옵션을 고친 뒤도 면적이 따라옴(387-4b)
await withPipeOptions(input.detail, input.projectId, true); // 관 옵션을 고친 뒤도 면적이 따라옴(387-4b)
const before = new Map(sections.map((section) => [section, JSON.stringify(section.design)]));
if (!refreshLocally(input)) await refreshFromServer(input);
// 구조물이 선 측점은 폐회로 면적이 정본이다 — **이 자리 한 곳**에서 늘 다시 얹는다(387-4 · 카드 그리기는
+8 -1
View File
@@ -92,11 +92,18 @@ export function withDraftAdjusts(
}
/** 관 옵션 조정값 몫 얹기(387-4b) — 관 초안 ?? 저장 관(페이지 자료 줄). 가게 · 자료 줄은 부를 때 늦게 불러옴 —
* 이 파일을 끄는 시험 · 묶음이 그 줄기(fetch · 가게)를 안 끌게. 못 받으면 그대로. */
* 이 파일을 끄는 시험 · 묶음이 그 줄기(fetch · 가게)를 안 끌게. 못 받으면 그대로.
* `reshape` = 관 제원도 형상 얹기 규칙으로 다시(다시 셈 창구 앞 · B06 폼 되보내기가 옵션 값을 제원에 그대로
* 써 넣어 최소 높이 · 집수정 쪽 칸이 서버와 갈림 — 집수정 높이 1.5 ↔ 2 등). */
export async function withPipeOptions(
detail: SectionDetailResponse,
projectId: string,
reshape = false,
): Promise<void> {
if (reshape)
await import("./B06_Section_Section_Drafts")
.then(({ withDraftShapes }) => withDraftShapes(detail, projectId))
.catch(() => undefined);
const pipes = await import("../B05_Profile/B05_Profile_Api_Pipes_Draft")
.then(
async ({ readPendingPipes }) =>
+21
View File
@@ -171,9 +171,30 @@ export async function swapSectionStations(
if (cache.get(key) !== swap.detail) return null; // 그 사이 다른 갈아끼움 · 새로 받음
emitSwap(swap.detail, swap.moves); // 세션 값 옮김 · 다시 그림(어느 보기든)
listeners.get(key)?.forEach((fn) => fn(swap.detail, swap.moves));
recrossSaved(projectId, key, swap.detail);
return { detail: swap.detail, moves: swap.moves };
}
/** 저장 노선 측점을 갈아끼움 — 그 차례 cross 는 옛 상세를 봐서 새 상세 설계 · 면적이 안 셈 → 묶음이 다 돈 뒤(새 측점
* 종단 · 화면 선이 선 뒤 · 그 전에 세면 계획고 0.5 mm 갈림) cross 한 번 더(387-4b · B05 만 연 면적 = B06). 노선 초안
* 동안은 묶음 새 노선 상세가 맡음. 묶음은 늦게 불러옴(가게 ↔ 묶음 순환 없음). */
function recrossSaved(projectId: string, key: string, detail: SectionDetailResponse): void {
void Promise.all([
import("../A00_Common/design/design_pipeline_cross"),
import("../A00_Common/design/design_pipeline_page"),
])
.then(async ([cross, page]) => {
await page.reconcilePagePipeline(projectId);
// 그 사이 다른 상세 · 다시 셈 창구 없음(묶음만 · 시험) · 노선 초안 = 안 부탁
if (cache.get(key) !== detail) return;
if (!page.pipelineOwnsCross(projectId) || page.pagePipeline(projectId)?.input("route"))
return;
cross.forceCross();
page.pipelineCross(projectId);
})
.catch(() => undefined);
}
/** 노선 초안 전 상태(349-0o) — 상세(초안 전 객체 그대로 · 되돌리면 캐시) · 측점 열쇠 · 측점 열쇠 칸 다섯(횡단 초안). */
export interface SectionHold {
detail: SectionDetailResponse;
+8 -2
View File
@@ -2,7 +2,8 @@
· 관 벽 높이 · 형태(조정 h · m) · 흙막이 n 단(h · m)을 상세 가게(`layPipeOptions`)가 얹은 값 = B06 폼 되보내기
(`applyPipeOptionsToCache`)가 얹은 값 · 구조물 면적도 같음
· 부르는 곳 = 상세 가게 읽기(새로고침 · 처음 열기) + 다시 셈 창구(관 옵션을 고친 뒤 묶음 cross)
· 부르는 곳 = 상세 가게 읽기(새로고침 · 처음 열기) + 다시 셈 창구(관 옵션을 고친 뒤 묶음 cross · 관 제원도 형상
얹기 규칙으로 다시) · 저장 노선 측점 갈아끼운 뒤 cross 한 번 더
./venv/Scripts/python.exe -m pytest resources/tester/test_387_4b_pipe_options.py -q
"""
@@ -46,4 +47,9 @@ def test_부르는_곳() -> None:
store = (ROOT / "B06_Section/B06_Section_Section_Store.ts").read_text(encoding="utf-8")
refresh = (ROOT / "B06_Section/B06_Section_Cross_Refresh.ts").read_text(encoding="utf-8")
assert "await withPipeOptions(detail, projectId);" in store
assert "await withPipeOptions(input.detail, input.projectId);" in refresh
assert "await withPipeOptions(input.detail, input.projectId, true);" in refresh
# 저장 노선 측점을 갈아끼운 뒤 — 묶음이 다 돈 뒤 cross 한 번 더(그 차례는 옛 상세를 봄)
body = store.split("function recrossSaved", 1)[1].split("\n}\n", 1)[0]
assert "await page.reconcilePagePipeline(projectId);" in body
assert "page.pipelineOwnsCross(projectId)" in body and "cross.forceCross();" in body
assert "recrossSaved(projectId, key, swap.detail);" in store