/** * 기둥 직경 D (승인 2026-10-23): free input 1200–3000 mm in 50 mm steps. Checks, all in mm: * - D < Level 폭 (the column meets the Level zone); * - D + 2·c ≤ 코핑 폭 B (c = 125, 기둥철근.md: 기둥 면 ~ P1 중심 피복); * - the arc spacing of the 주철근 (2π·r1 / n_div, n_div = 46 kept) ≥ max(1.5·d_b, 40), with d_b = 32 (S32). * Pure: gives the messages for the 알림 list. */ import type { PierModel } from './geometry'; export const COLUMN_D_RANGE = { min: 1200, max: 3000, step: 50 } as const; export const COLUMN_COVER_MM = 125; const N_DIV = 46; const DB_MAIN = 31.8; export function columnDiameterIssues(dMm: number, model: PierModel): string[] { const out: string[] = []; if (!Number.isFinite(dMm) || dMm < COLUMN_D_RANGE.min || dMm > COLUMN_D_RANGE.max || Math.round(dMm) % COLUMN_D_RANGE.step !== 0) { out.push(`기둥 직경은 ${COLUMN_D_RANGE.min}~${COLUMN_D_RANGE.max} mm, ${COLUMN_D_RANGE.step} mm 단위여야 합니다.`); return out; } const levelW = model.copingGeom.levelWidth; if (dMm >= levelW) out.push(`기둥 직경 ${dMm} mm가 Level 폭 ${levelW} mm 이상입니다.`); const copingW = model.copingB * 1000; if (dMm + 2 * COLUMN_COVER_MM > copingW) out.push(`기둥 직경 ${dMm} mm와 피복이 코핑 폭 ${copingW} mm를 넘습니다.`); const r1 = dMm / 2 - COLUMN_COVER_MM; const arc = (2 * Math.PI * r1) / N_DIV; const minArc = Math.max(1.5 * DB_MAIN, 40); if (arc < minArc) out.push(`주철근 순간격 ${arc.toFixed(1)} mm가 최소 ${minArc.toFixed(1)} mm보다 작습니다.`); return out; }