feat(B06): 측구터파기 단면적을 토사/암으로 가름 — 새 입력 없이 암반 경계선으로
별표2 Ⅰ.1.나.(5) 「측구터파기 단면적」이 횡단도 표의 법정 칸인데 한 값뿐이라 「측구 토사 / 측구 암석」 두 칸이 반만 채워졌다. - 가르는 근거는 **절토 분리와 같은 것**(지반 유형 + 암반 경계선). 새 입력을 만들지 않았다. - 측구 상단에서 암반 경계선까지의 깊이로 공칭 도형(사다리꼴·L형)을 가로로 가른다. - ⚠ 근거가 없으면 **나누지 않는다.** 사유를 `ditch_split_basis` 로 함께 냄: rock_boundary / soil_ground / rock_ground_no_boundary / no_ditch. - 기존 `ditch_area_m2` 는 **합계로 그대로** 두고 갈래를 덧붙였다 — B08 이 순서대로 옮겨 갈 수 있게. - 파이썬·TS 짝을 함께 고침. 거울 테스트 통과. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ from typing import Any
|
||||
from B06_Section.B06_Section_Engine_Areas import (
|
||||
_bench_cut_length,
|
||||
_split_cut_areas,
|
||||
_split_ditch_area,
|
||||
_trapezoid_areas,
|
||||
)
|
||||
from common_util.common_util_cross_berm import (
|
||||
@@ -749,6 +750,28 @@ def compute_cross_design(
|
||||
"depth_m": group["ditch_depth_m"],
|
||||
}
|
||||
|
||||
# 측구터파기 토사/암 분리 — **새 입력을 만들지 않는다.** 절토 분리와 같은 근거
|
||||
# (지반 유형 + 암반 경계선)를 그대로 쓴다. 별표2 Ⅰ.1.나.(5) 「측구터파기 단면적」이
|
||||
# 횡단도 표의 법정 칸이라 반만 채워 나가면 안 된다(2026-09-09).
|
||||
# 근거가 없으면 **나누지 않고** 사유를 함께 내보낸다 — 절반을 임의로 가르지 않는다.
|
||||
if not geometry.has_ditch:
|
||||
ditch_soil_area, ditch_rock_area = 0.0, 0.0
|
||||
ditch_split_basis = "no_ditch"
|
||||
elif preset_key != "rock":
|
||||
# 토사 지반 — 암반 경계선 자체가 없다. 전량 토사(절토 분리와 같은 판정).
|
||||
ditch_soil_area, ditch_rock_area = ditch_area, 0.0
|
||||
ditch_split_basis = "soil_ground"
|
||||
elif rock_boundary_offset_m is None or not geometry.ditch_points:
|
||||
# 암 지반인데 경계선 값이 없다(구 데이터) — 가를 근거가 없으므로 전량 암.
|
||||
ditch_soil_area, ditch_rock_area = 0.0, ditch_area
|
||||
ditch_split_basis = "rock_ground_no_boundary"
|
||||
else:
|
||||
ditch_top_z = geometry.ditch_points[0][1]
|
||||
mid_offset = sum(point[0] for point in geometry.ditch_points) / len(geometry.ditch_points)
|
||||
boundary_z = ground_at(mid_offset) - abs(float(rock_boundary_offset_m))
|
||||
ditch_soil_area, ditch_rock_area = _split_ditch_area(ditch_spec, ditch_top_z - boundary_z)
|
||||
ditch_split_basis = "rock_boundary"
|
||||
|
||||
# 자동 판정된 절/성토 역할에서 실제 단면 유형을 도출해 echo한다(D-2, 표시·저장용).
|
||||
if geometry.left_role == "cut" and geometry.right_role == "cut":
|
||||
resolved_mode = "both_cut"
|
||||
@@ -824,6 +847,12 @@ def compute_cross_design(
|
||||
round(fill_ground_slope, 4) if fill_ground_slope is not None else None
|
||||
),
|
||||
"ditch_area_m2": round(ditch_area, 4),
|
||||
# 측구터파기 내역(합=ditch_area_m2). 가른 근거는 `ditch_split_basis` 로 함께 낸다:
|
||||
# rock_boundary(암반 경계선으로 가름) · soil_ground(토사 지반이라 전량 토사) ·
|
||||
# rock_ground_no_boundary(암 지반인데 경계선 없음 — 전량 암) · no_ditch(측구 없음).
|
||||
"ditch_soil_area_m2": round(ditch_soil_area, 4),
|
||||
"ditch_rock_area_m2": round(ditch_rock_area, 4),
|
||||
"ditch_split_basis": ditch_split_basis,
|
||||
"design_line": design_line,
|
||||
# 절토 사면을 경사 구간별로 쪼갠 목록(소단 제외).
|
||||
# ⚠ **지금 이 값을 읽는 곳은 없다**(2026-09-07). 원래 임자였던 별표2 법정 경사 검사는
|
||||
|
||||
Reference in New Issue
Block a user