import type { Rect } from './types'; /** Optional future log input. No strata, elevations or boring positions are inferred. */ export type GeologicalLog={id:string;source:string;groundEl:number|null;waterEl:number|null;layers:{name:string;topEl:number|null;bottomEl:number|null}[]}; export type GeologicalPanel={title:string;area:Rect;logs:readonly GeologicalLog[]}; export function geologicalPanel(area:Rect,logs:readonly GeologicalLog[]):GeologicalPanel|null { if(!logs.length)return null; for(const log of logs){ if(!log.source.trim())throw new Error('지질주상도 원본 출처가 필요합니다.'); for(const layer of log.layers)if(layer.topEl!==null&&layer.bottomEl!==null&&layer.topEl