Merge remote-tracking branch 'origin/sub_laptop_7' into main_laptop_1

This commit is contained in:
2026-10-10 14:48:14 +09:00
6 changed files with 183 additions and 10 deletions
@@ -121,7 +121,11 @@ class _SectionGeometry:
# ⚠ 옛 저장분(`ditch_choice` 가 없던 것)은 `legacy_ditch_enabled` 로 온다. 그 값은
# **자동값과 다를 때만 뜻이 있다** — 같으면 자동이 그렇게 냈던 것이고, 다르면
# 사용자가 일부러 바꾼 것이다. 그래서 **다를 때만** 선택으로 살린다(설계 의도 보존).
if section_mode == "both_fill":
# ⚠ 양측 성토는 **판정된 역할**로 가른다(206-1) — 입력 `section_mode` 는 옛 저장값일 수
# 있다(계획고를 올려 우 절토 → 양측 성토 · 입력은 right_cut 그대로). 입력으로 가르면 옛
# 측구 결과가 선택으로 둔갑해 양측 성토 단면에 측구가 섰다. ⚠ TS 짝 `SectionGeometry`.
both_fill = self.left_role == "fill" and self.right_role == "fill"
if both_fill:
auto_ditch = False
elif ground_at is not None:
ditch_edge = self.left_extent if ditch_side == "left" else -self.right_extent
@@ -136,10 +140,10 @@ class _SectionGeometry:
# 없는데, 그것을 선택으로 굳히면 **다시 같은 병**(지형이 바뀌어도 안 따라감)이 된다.
if choice is not None and bool(choice) == auto_ditch:
choice = None
# 양성(both_fill)은 측구가 설 자리가 없다 — 선택보다 기하가 먼저다.
self.has_ditch = auto_ditch if (choice is None or section_mode == "both_fill") else choice
# 양성(both_fill)은 측구가 설 자리가 없다 — 선택보다 기하가 먼저 · 남은 선택은 비움.
self.has_ditch = auto_ditch if (choice is None or both_fill) else choice
#: 그 측점에 **사용자가 정한 선택**(없으면 자동). 결과와 갈라 내보낸다.
self.ditch_choice = choice
self.ditch_choice = None if both_fill else choice
# 설계선 쉬프트 = 쪽마다 사면 이동(≥ 0 · 139-6 · 151-2) — 단면유형 · 측구 판정은 **옮기기 전**
# 노견에서(위) · 노견(폭 고정) · 측구 · 사면이 같이 바깥으로 · 늘어난 폭은 차도.
+4 -2
View File
@@ -388,8 +388,10 @@ export function buildDesignControls(
groundSegment.classList.add("b06-design__seg--header");
// 단면 유형은 지형에서 자동 판정되며(D-2), 제목행 pill로 표시한다(E-3, Cross_View에서 생성).
// 아래 옵션은 선행 조건 미충족 시 비활성 = 숨김(179-2 · CSS) — 편측의 쪽은 알약 글에.
const rockCut = isRock(state.ground) && state.mode !== "both_fill";
const hasDitch = state.mode !== "both_fill";
// 숨김은 「막힘 + 그려진 측구 없음」일 때만(206-1) — 측구가 그려져 있으면 단추를 보여 끌 수 있게.
const ditchDrawn = design?.ditch_enabled === true;
const rockCut = isRock(state.ground) && (state.mode !== "both_fill" || ditchDrawn);
const hasDitch = state.mode !== "both_fill" || ditchDrawn;
// 측구 생성 여부(자동 판정 or 사용자 override) — 측구형식은 측구가 있을 때만 의미 있다.
// 화면 표시는 **결과**를 보인다 — 선택이 없으면 자동으로 선 결과가 답이다.
const ditchOn = state.ditchEnabled ?? design?.ditch_enabled ?? true;
@@ -106,6 +106,8 @@ interface StaleCandidate {
geometry_preset?: string;
two_stage_slope?: boolean;
surface_drop_m?: number;
section_mode?: string;
ditch_enabled?: boolean;
} | null;
}
@@ -120,6 +122,8 @@ function isStaleSection(
// 이 조건이 B06 페이지에만 있어 B05는 재계산을 건너뛰었고, 같은 데이터인데 두 화면의
// 절토량이 갈렸다(2026-09-03 실측 228.52㎡ ↔ 270.12㎡). 판정을 여기 한 곳으로 모은다.
if (design.geometry_preset === "rock" && design.two_stage_slope === undefined) return true;
// 옛 엔진이 양측 성토에 측구를 세워 둔 저장분(206-1) — 지금 엔진으로 다시 셈.
if (design.section_mode === "both_fill" && design.ditch_enabled === true) return true;
if (!profiles?.length) return false;
const planned = designElevationAt(profiles, section.chainage_m);
if (planned === undefined) return false;