/** * 솔플레이트 기하 (승인 2026-10-23, C안 2026-11-03). Pure: the solplate of one bearing, from its block (position, rowSkew) * and the pier's solplate plan. The plan is L across the 교각축 직각 (n) and W along the 교축 (s). The top tapers across L: * the thick end T1 is at the (−) side of the 교각축 직각 direction (n = −L/2), the thin end T2 at (+) (n = +L/2). * The underside is the bearing top (block top EL.X + h3). Lengths in m, as in the model. */ import { blockFramePoint, type BlockModel } from './geometry'; import type { SolplatePlan } from './types'; export interface SolplateGeometry { /** Length across the 교각축 직각 (m) and width along the 교축 (m). */ L: number; W: number; /** Thickness at the (−) side (T1) and the (+) side (T2) of the 교각축 직각 direction (m). */ T1: number; T2: number; /** Underside (EL m): the bearing top = block top (EL.X) + h3. */ bottom: number; /** Eight corners: [s, y, n] in the model's local frame (EL m); order (a, c, bottom|top) with a along s and c along n. */ corners: [number, number, number][]; /** Volume (m³): L·W·(T1 + T2)/2. */ volume: number; } /** Solplate of the bearing at `block`, from the pier's solplate plan (mm). */ export function solplateGeometry(block: BlockModel, plan: SolplatePlan): SolplateGeometry { const L = plan.L / 1000; // across the 교각축 직각 (n) const W = plan.W / 1000; // along the 교축 (s) const T1 = plan.T1 / 1000; const T2 = plan.T2 / 1000; const bottom = block.padTop + plan.h3 / 1000; const thickAt = (c: number) => T1 + ((T2 - T1) * (c + L / 2)) / L; const corners: [number, number, number][] = []; for (const a of [-W / 2, W / 2]) { for (const c of [-L / 2, L / 2]) { const [s, n] = blockFramePoint(block, a, c); corners.push([s, bottom, n]); corners.push([s, bottom + thickAt(c), n]); } } return { L, W, T1, T2, bottom, corners, volume: (L * W * (T1 + T2)) / 2 }; }