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

This commit is contained in:
2026-09-09 23:08:31 +09:00
5 changed files with 434 additions and 3 deletions
@@ -1141,6 +1141,9 @@ OBSERVED_SPEC_KEYS: dict[str, tuple[str, ...]] = {
"ford_pavement": ("thickness_cm",),
# 배수관의 유입부 집수정은 관 자체와 **다른 줄**이다 — 관은 관대로 서고 집수정이 따로 선다.
"pipe_inlet_basin": ("inlet_basin_form", "inlet_basin_material", "pipe_diameter_mm"),
# 관보호공 날개벽 — **개소당**이고 치수가 형식마다 붙박이다(원본 탭 다섯). 형식을 고르지
# 않으면 날개벽 줄 자체가 안 선다(안 놓은 것과 같다).
"pipe_wing_wall": ("wing_wall_type", "pipe_diameter_mm"),
}
EXPANDERS = {
@@ -1216,9 +1219,27 @@ EXPANDER_WITHHELD: dict[str, str] = {}
#: (품셈도 관부설과 집수정을 다른 공종으로 둔다). 한 줄로 합치면 어느 쪽 물량인지 못 가른다.
ATTACHMENTS: dict[str, tuple[tuple[str, str, str], ...]] = {
# (붙는 종류, 그것이 있는지 보는 옵션 칸, 줄 이름 꼬리)
"pipe": (("pipe_inlet_basin", "inlet_basin_form", "유입부 집수정"),),
"pipe": (
("pipe_inlet_basin", "inlet_basin_form", "유입부 집수정"),
("pipe_wing_wall", "wing_wall_type", "관보호공 날개벽"),
),
}
#: 날개벽 「A-TYPE+집수정」은 집수정을 **품은** 형식이다 — 집수정 줄을 따로 세우면 한 개소를
#: 두 번 센다(원단위표 `double_count_rules` 와 짝).
WING_WALL_WITH_BASIN = "A-TYPE+집수정"
WING_WALL_DOUBLE_COUNT = (
"⚠ 날개벽을 「A-TYPE+집수정」으로 골랐는데 집수정 형식도 차 있음 — "
"그 날개벽 값이 집수정을 이미 품고 있어 **두 번 셀 수 있음**. 한쪽을 비울 것"
)
def wing_wall_double_count(options: dict[str, Any]) -> str | None:
"""겹쳐 세는 자리면 사유 한 줄. 값을 고치지 않고 **드러내기만** 한다."""
if str(options.get("wing_wall_type") or "") != WING_WALL_WITH_BASIN:
return None
return WING_WALL_DOUBLE_COUNT if options.get("inlet_basin_form") else None
def attachments_of(structure: dict[str, Any]) -> list[dict[str, Any]]:
"""구조물에 딸린 **별도 줄**을 만든다. 제원은 원본을 그대로 물려준다(치수 두 벌 금지)."""
@@ -1255,7 +1276,11 @@ def _observed_components(
from B08_Quantity.B08_Quantity_Wording import option_missing
return [], [option_missing(keys[0], type_id)]
return expand_observed(type_id, spec, structure, observed)
components, notes = expand_observed(type_id, spec, structure, observed)
warning = wing_wall_double_count(options)
if warning:
notes.append(warning)
return components, notes
def _observed_billing(