Files
Aislo/common_util/common_util_excavation.ts
T
eomsangdonandClaude Opus 5.5 172ff8170b refactor(511-B B-6 정리): 운영 부름 0 파이썬 짝 걷음 · 남는 짝 머리에 남는 까닭 · 등록부 until 걷음 · 알려진 차 까닭 · 322_3 flow 빨강 고침
걷은 함수(운영 부름 0 · 전수 확인 = 화면 · 서버 · 체인 · 추천 엔진 · B07 · 시험)
- common_util/common_util_excavation.py 통째(126 줄 · pipe_trench_width_m · wall_trench_area_m2 · wall_trench_width_m · 서버 = Node excavation.trench)
- Engine_Grade_Carry.carry_edits(Node carry_seat 겉) · Route_Save_Parts.seat_route_moved(시험 헬퍼 helper_475_1_moved 로 옮김)
- Engine_Tilt.attach_underdrains · Engine_Structures_Wall.attach_wall_structures · load_wall_structures
- Engine_Grade_Alignment.tangent_elevation(부름 0) · station_key.dedupe_station_keys · loose_chainage
줄 수 전 → 후: excavation.py 126 → 0 · Grade_Carry 178 → 157 · Save_Parts 289 → 269 · Wall 221 → 197 · Tilt 115 → 112 · station_key 141 → 122 · Alignment 657 → 654

남는 짝(머리 「남는 까닭」 한 줄) — Grade · Grade_Profile · Alignment · CurveLaw(2~4 순위 폴백 · 추천) · NodeEdits · SampleExtend · Router_Design · Ranges · Engine_Design · Areas · cross_berm(DTM 아닌 지표면 · Node 못 부를 때 · B07 · 추천) · Tilt · Wall · Culvert(B04 B07 B08) · route_follow · structure_station · station_key · route_polyline(745 줄 · 까닭 = 등록부 R1 줄)

등록부 — until 칸 걷음(G1 = py 표본기 남김 · 까닭 note) · C6 pair = attach_underdrain_specs · F8 pair null
알려진 차 — golden KNOWN 셋 그대로 나타남(R7 표본 출처 · W0 저장 때 경고 · X2 입력 선 자릿수 · 까닭 고침) · underdrain 알려진 차 까닭 · 511_b5 KNOWN_ARC 그대로
계산 자리 창 — 45 줄 · 서버만 아닌 41(바꿀 수 있음 40 + F9) · 서버만 넷(G3 D1 D2 N1 줄마다 까닭) · 옛 까닭 「짝 모으는 중 · B-4」 글 걷음
test_322_3_flow 빨강 — 헬퍼가 @config/config_frontend 흉내(511-A design_calc_server import)
시험 기준 — 걷은 짝 거울 = 걷기 전 파이썬 값 고정(excavation · station_key) · Node carry_seat · attach_underdrain_specs · wall_specs_from

검증: 고친 대상 시험 97 파일 562 통과 · 21 건너뜀 · typecheck 0 · 700 줄 넘는 새 파일 없음 — 요구 320-4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:34:08 +09:00

88 lines
4.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =============================================================================
* common_util_excavation.ts
* 터파기 단면 — 관·벽 두 갈래. **근거의 급이 다르므로 갈라 둔다.**
*
* 한 벌 — 화면(B06 횡단도)이 그리고 서버(B08 수량 · Node `excavation.trench`)가 셈.
* 파이썬 짝 = 운영 부름 0 이라 걷음(511-B B-6) · 시험 `resources/tester/test_excavation_mirror.py`.
*
* ① 관 — 법정 시방서에 표가 있다: `KCS 44 40 10 배수관(23.01) §3.2(4) 그림 3.2-1`.
* 「설계도서에 따로 표기되지 않았을 때에는 … 기준 폭에 따라야 한다」
* ⚠ **관경 + 2b 로 계산하지 않는다** — 표가 관 두께·작업여유를 이미 담고 있다.
* ② 벽 — 법정 근거 없음. 실무 정본 식(`구조도(기슭막이).xls` 7탭):
* 터파기 = 기초 0.5 × 0.9 (기초버림이면 0.1 × 0.7) + H × (평균두께 + 0.2)
* ⚠ **비탈을 주지 않는다 — 정본이 수직으로 센다.** 축 이름은 「기초유 / 기초버림」이다.
* ========================================================================== */
/** 관경(㎜) → 터파기 폭(㎜). KCS 44 40 10 그림 3.2-1 표 그대로. */
export const PIPE_TRENCH_WIDTH_MM: Record<number, number> = {
300: 700,
350: 800,
400: 900,
450: 1000,
500: 1100,
600: 1200,
700: 1400,
800: 1600,
900: 1700,
1000: 1800,
1100: 2000,
1200: 2100,
1300: 2200,
1400: 2400,
1500: 2500,
};
/** 한쪽 여유폭(m) — 같은 그림. 표에 없는 관경을 넣었을 때의 안내용. */
export const PIPE_TRENCH_CLEARANCE_NORMAL_M = 0.3;
export const PIPE_TRENCH_CLEARANCE_SOFT_M = 0.5;
/** 벽 터파기 — 실무 정본 식의 수. */
export const WALL_TRENCH_CLEARANCE_M = 0.2;
export const WALL_FOUNDATION_DEPTH_M = 0.5;
export const WALL_FOUNDATION_WIDTH_M = 0.9;
export const WALL_BLINDING_DEPTH_M = 0.1;
export const WALL_BLINDING_WIDTH_M = 0.7;
/** 근거의 급 — 화면 노티스가 이 문구를 그대로 쓴다. */
export const BASIS_PIPE = "법정 표(KCS 44 40 10 그림 3.2-1) — 설계도서에 따로 없으면 이 값";
export const BASIS_WALL =
"법정 근거 없음 · 실무 정본 식(구조도 기슭막이 xls) 기본값 — 확인 후 쓸 것";
/** 관경(㎜)에 대응하는 터파기 폭(m). 표에 없으면 `null`(지어내지 않는다). */
export function pipeTrenchWidthM(diameterMm: number | null | undefined): number | null {
if (diameterMm === null || diameterMm === undefined) return null;
const key = Math.round(Number(diameterMm));
if (!Number.isFinite(key)) return null;
const width = PIPE_TRENCH_WIDTH_MM[key];
return width === undefined ? null : width / 1000;
}
/**
* 벽 터파기 단면적(㎡/m). 높이·평균두께가 없으면 `null`.
* `hasFoundation=false` 면 기초분이 버림 몫(0.1 × 0.7)으로 줄어든다.
*/
export function wallTrenchAreaM2(
heightM: number | null | undefined,
averageThicknessM: number | null | undefined,
hasFoundation: boolean,
): number | null {
if (heightM === null || heightM === undefined) return null;
if (averageThicknessM === null || averageThicknessM === undefined) return null;
const height = Number(heightM);
const thickness = Number(averageThicknessM);
if (!Number.isFinite(height) || !Number.isFinite(thickness)) return null;
if (height <= 0 || thickness <= 0) return null;
const base = hasFoundation
? WALL_FOUNDATION_DEPTH_M * WALL_FOUNDATION_WIDTH_M
: WALL_BLINDING_DEPTH_M * WALL_BLINDING_WIDTH_M;
return base + height * (thickness + WALL_TRENCH_CLEARANCE_M);
}
/** 벽 터파기 폭(m) — 평균두께 + 여유 0.2. 값이 없으면 `null`. */
export function wallTrenchWidthM(averageThicknessM: number | null | undefined): number | null {
if (averageThicknessM === null || averageThicknessM === undefined) return null;
const thickness = Number(averageThicknessM);
if (!Number.isFinite(thickness) || thickness <= 0) return null;
return thickness + WALL_TRENCH_CLEARANCE_M;
}