From 5cc5329caccf953a440a065c7c44d05777d68461 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 9 Sep 2026 13:18:21 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06):=20=EC=9E=90=EB=8F=99=EA=B3=BC=20?= =?UTF-8?q?=EA=B0=99=EC=9D=80=20=EC=B8=A1=EA=B5=AC=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EC=9D=80=20=E3=80=8C=EC=9E=90=EB=8F=99=E3=80=8D=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=ED=92=80=EB=A6=BC=20=E2=80=94=20=EB=8B=A4=EC=8B=9C?= =?UTF-8?q?=20=EA=B5=B3=EC=A7=80=20=EC=95=8A=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 화면 토글이 **2단**이라 「자동으로 되돌리기」 단추가 없음. 되돌리려면 원래 값으로 다시 누르는 수밖에 없는데, 그것을 선택으로 굳히면 **방금 고친 병이 그대로 되돌아옴** (지형이 바뀌어도 안 따라감). ⇒ 선택이 자동값과 같으면 **선택 없음(자동)** 으로 본다. 파이썬·TS 짝 양쪽. 시험 하나 추가 — 「자동과 같은 선택은 자동으로 푼다」. 전체 617 통과. Co-Authored-By: Claude Opus 5 (1M context) --- B06_Section/B06_Section_Engine_Design_Geometry.py | 9 ++++++--- common_util/common_util_cross_design_geometry.ts | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/B06_Section/B06_Section_Engine_Design_Geometry.py b/B06_Section/B06_Section_Engine_Design_Geometry.py index bc790a10..cefdf8c2 100644 --- a/B06_Section/B06_Section_Engine_Design_Geometry.py +++ b/B06_Section/B06_Section_Engine_Design_Geometry.py @@ -127,9 +127,12 @@ class _SectionGeometry: auto_ditch = True # ground_at 이 없으면 보수적으로 생성 choice = ditch_choice if choice is None and legacy_ditch_enabled is not None: - choice = ( - None if bool(legacy_ditch_enabled) == auto_ditch else bool(legacy_ditch_enabled) - ) + choice = bool(legacy_ditch_enabled) + # ⚠ **자동과 같은 값을 고른 것은 「자동」으로 본다**(2026-09-09). 화면 토글이 2단이라 + # 「자동으로 되돌리기」 단추가 없다 — 되돌리려면 원래 값으로 다시 누르는 수밖에 + # 없는데, 그것을 선택으로 굳히면 **다시 같은 병**(지형이 바뀌어도 안 따라감)이 된다. + 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 #: 그 측점에 **사용자가 정한 선택**(없으면 자동). 결과와 갈라 내보낸다. diff --git a/common_util/common_util_cross_design_geometry.ts b/common_util/common_util_cross_design_geometry.ts index 2dd43f0a..a4cb1081 100644 --- a/common_util/common_util_cross_design_geometry.ts +++ b/common_util/common_util_cross_design_geometry.ts @@ -193,8 +193,12 @@ export class SectionGeometry { let choice = params.ditchChoice ?? null; const legacy = params.ditchEnabled; if (choice === null && legacy !== null && legacy !== undefined) { - choice = Boolean(legacy) === autoDitch ? null : Boolean(legacy); + choice = Boolean(legacy); } + // ⚠ **자동과 같은 값을 고른 것은 「자동」으로 본다**(짝: 파이썬). 토글이 2단이라 + // 「자동으로 되돌리기」 단추가 없고, 원래 값으로 다시 누른 것을 선택으로 굳히면 + // **다시 같은 병**이 된다. + if (choice !== null && Boolean(choice) === autoDitch) choice = null; // 양성(both_fill)은 측구가 설 자리가 없다 — 선택보다 기하가 먼저다. this.hasDitch = choice === null || params.sectionMode === "both_fill" ? autoDitch : choice; /** 그 측점에 **사용자가 정한 선택**(없으면 자동). 결과와 갈라 내보낸다. */