Merge remote-tracking branch 'origin/sub_laptop_5' into main_laptop_1
# Conflicts: # B08_Quantity/B08_Quantity_Router_Summary.py # B08_Quantity/B08_Quantity_UI_Page.css # B08_Quantity/B08_Quantity_UI_Summary.ts # main.py
This commit is contained in:
@@ -256,6 +256,21 @@ def quantity_settings(project_root: str | Path) -> dict[str, Any]:
|
||||
return load_settings(project_root).get("quantity") or {}
|
||||
|
||||
|
||||
#: 연암 % 기본 — 암 전체 기준 · 경암 = 100 − 연암 · 파일에 안 쓰고 읽을 때 채움(PLAN 122)
|
||||
SOFT_ROCK_PCT_DEFAULT = 90.0
|
||||
|
||||
|
||||
def soft_rock_pct(settings: dict[str, Any]) -> float:
|
||||
"""연암 %(0~100) — `rock_ratios_pct` 연암 · 없으면 100 − 경암 · 둘 다 없으면 기본 90."""
|
||||
ratios = settings.get("rock_ratios_pct") or {}
|
||||
for name, flip in (("연암", False), ("경암", True)):
|
||||
value = ratios.get(name)
|
||||
if isinstance(value, (int, float)) and not isinstance(value, bool):
|
||||
pct = min(max(float(value), 0.0), 100.0)
|
||||
return 100.0 - pct if flip else pct
|
||||
return SOFT_ROCK_PCT_DEFAULT
|
||||
|
||||
|
||||
def estimation_settings(project_root: str | Path) -> dict[str, Any]:
|
||||
"""B09 구획만 꺼낸다 — 범위 계수·장비 규격처럼 **사용자가 고른 단가 조건**이 여기 산다."""
|
||||
return load_settings(project_root).get("estimation") or {}
|
||||
|
||||
Reference in New Issue
Block a user