export type SmartDimensionKind = 'distance' | 'dx' | 'dy' | 'angle' | 'radius' | 'diameter'; export type SmartSegmentEndpointKey = 'p1' | 'p2'; export interface SmartPointLike { readonly type: 'point'; readonly x: number; readonly y: number; readonly id?: number; } export interface SmartVertexLike { readonly x: number; readonly y: number; } export interface SmartSegmentLike { readonly type: 'segment'; readonly x1: number; readonly y1: number; readonly x2: number; readonly y2: number; readonly midX?: number; readonly midY?: number; readonly p1?: SmartVertexLike; readonly p2?: SmartVertexLike; readonly id?: number; } export interface SmartCurveLike { readonly type: 'circle' | 'arc'; readonly cx: number; readonly cy: number; readonly radius: number; readonly sweepAngle?: number; readonly id?: number; } export type SmartDimensionEntityLike = SmartPointLike | SmartSegmentLike | SmartCurveLike; export interface SmartSegmentAngleInfo { readonly vx: number; readonly vy: number; readonly startAngle: number; readonly sweep: number; readonly angleEndpointAKey: SmartSegmentEndpointKey | null; readonly angleEndpointBKey: SmartSegmentEndpointKey | null; } export interface SmartDimensionCandidate { readonly dimType: SmartDimensionKind; readonly label?: string; readonly x1: number; readonly y1: number; readonly x2: number; readonly y2: number; readonly angleStart?: number; readonly angleSweep?: number; readonly angleEndpointAKey?: SmartSegmentEndpointKey | null; readonly angleEndpointBKey?: SmartSegmentEndpointKey | null; readonly sourceA?: SmartDimensionEntityLike; readonly sourceB?: SmartDimensionEntityLike | null; } interface SmartAngleInfoOptions { readonly endpointAKey?: SmartSegmentEndpointKey | null; readonly endpointBKey?: SmartSegmentEndpointKey | null; } export declare function prefersDiameterByDefault(shape: SmartDimensionEntityLike | null | undefined): boolean; export declare function buildSmartSegmentAngleInfo(segA: SmartSegmentLike, segB: SmartSegmentLike, options?: SmartAngleInfoOptions): SmartSegmentAngleInfo; export declare function detectDimensionType(a: SmartDimensionEntityLike, b?: SmartDimensionEntityLike | null): SmartDimensionCandidate | null; export declare function detectAllDimensionTypes(a: SmartDimensionEntityLike, b?: SmartDimensionEntityLike | null): SmartDimensionCandidate[]; export declare const smartDimensions: Readonly<{ prefersDiameterByDefault: typeof prefersDiameterByDefault; detectDimensionType: typeof detectDimensionType; detectAllDimensionTypes: typeof detectAllDimensionTypes; buildSmartSegmentAngleInfo: typeof buildSmartSegmentAngleInfo; }>; export {};