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

This commit is contained in:
2026-10-05 23:29:07 +09:00
4 changed files with 19 additions and 3 deletions
+2 -1
View File
@@ -327,7 +327,8 @@ def _wing_spec(values: dict[str, Any], defaults: dict[str, Any], side: str) -> d
height = _number(
values.get(f"{prefix}_height_m"), _number(defaults.get(f"{prefix}_height_m"), 0.0)
)
installed = str(install or "").strip() != "없음"
# BOX암거 유입·유출 구조(표 02) — 없음 · 날개벽 · 흙막이 · 옛 값 있음 = 날개벽. 날개벽만 세움.
installed = str(install or "").strip() not in ("없음", "흙막이")
extend = (length or 0.0) * math.cos(math.radians(angle or 0.0)) if installed else 0.0
return {
"installed": installed,
+2 -1
View File
@@ -241,7 +241,8 @@ function wingSpec(
const length = num(values[`${prefix}_length_m`], num(defaults[`${prefix}_length_m`], 0.0));
const angle = num(values[`${prefix}_angle_deg`], num(defaults[`${prefix}_angle_deg`], 45.0));
const height = num(values[`${prefix}_height_m`], num(defaults[`${prefix}_height_m`], 0.0));
const installed = String(install ?? "").trim() !== "없음";
// BOX암거 유입·유출 구조(표 02) — 없음 · 날개벽 · 흙막이 · 옛 값 있음 = 날개벽. 날개벽만 세움.
const installed = !["없음", "흙막이"].includes(String(install ?? "").trim());
return {
installed,
height_m: height,
+8
View File
@@ -45,6 +45,14 @@ def test_box_wing_extends_slab() -> None:
assert spec["wing_in"]["slab_extend_m"] == round(2 * math.cos(math.radians(45)), 3)
def test_box_structure_choices() -> None:
"""유입·유출 구조(표 02) — 날개벽 · 옛 값 있음만 날개벽을 세움 · 흙막이 · 없음은 안 세움."""
for value, installed in (("날개벽", True), ("있음", True), ("흙막이", False), ("없음", False)):
spec = _box_set({"wing_in": value, "wing_in_length_m": 2})
assert spec["wing_in"]["installed"] is installed
assert (spec["wing_in"]["slab_extend_m"] > 0) is installed
def test_attach_box_only_owner_station(tmp_path: Path) -> None:
"""BOX암거는 **소유 측점 한 곳에만** `box` 키로 붙는다(2026-08-25 사용자 확정).
@@ -58,7 +58,13 @@ POINTS = [
{
"chainage_m": 80.0,
"facility": "box_culvert",
"options": {"body_width_m": 3.0, "body_height_m": 2.5, "wing_out_length_m": 2.0},
"options": {
"body_width_m": 3.0,
"body_height_m": 2.5,
"wing_in": "날개벽",
"wing_out": "흙막이",
"wing_out_length_m": 2.0,
},
},
{
"chainage_m": 100.0,