/** * Geometry helpers for professional connector paths. * Orthogonal polylines get filleted corners; mind-map branches use quadratic curves. */ /** Sample a quadratic Bézier into polyline points (flat [x,y,...]). */ export declare function quadraticToPoints(x0: number, y0: number, cx: number, cy: number, x1: number, y1: number, steps?: number): number[]; /** SVG path `d` for a quadratic mind-map branch. */ export declare function quadraticPathD(x0: number, y0: number, cx: number, cy: number, x1: number, y1: number): string; /** * Replace sharp orthogonal corners with arc fillets approximated as polylines. * Keeps endpoints exact; skips fillets when a segment is too short. */ export declare function roundOrthogonalCorners(points: number[], radius?: number, segments?: number): number[]; /** Sample a cubic Bézier into polyline points (flat [x,y,...]). */ export declare function cubicToPoints(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, steps?: number): number[]; /** * Mermaid-style horizontal link: exits source horizontally, enters target horizontally. * Smooth cubic when y differs (flowchart LR / mindmap look). */ export declare function mermaidHorizontalLink(x1: number, y1: number, x2: number, y2: number, steps?: number): number[]; /** * L-bend as a single cubic — exits along the first leg, enters along the second * (string / cable elbow, not a sharp corner). */ export declare function stringLCurve(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, tension?: number, steps?: number): number[]; /** * U-bend as a single cubic — vertical exit, horizontal span, vertical entry. * Control points sit on the rail so the wire bows like a flexible string. */ export declare function stringUCurve(x0: number, y0: number, railY: number, x3: number, y3: number, steps?: number): number[]; /** * Horizontal U (C-bend): leave left/right, span vertically, enter left/right. */ export declare function stringCCurve(x0: number, y0: number, railX: number, x3: number, y3: number, steps?: number): number[]; /** * Convert an orthogonal polyline skeleton into string-like U / L / S curves. * Keeps endpoints exact so arrows stay glued to connection ports. */ export declare function stringCurveFromOrthogonal(points: number[], steps?: number): number[]; /** * Smooth path through free waypoints (string through beads). * Uses Catmull-Rom → cubic segments so bends feel continuous while dragging. */ export declare function pathThroughWaypoints(x1: number, y1: number, waypoints: Array<{ x: number; y: number; }>, x2: number, y2: number, stepsPerSeg?: number): number[]; /** Uniform Catmull-Rom spline sampled as a flat polyline. */ export declare function catmullRomToPoints(points: number[], stepsPerSeg?: number): number[]; /** * Nearest point on a polyline to (x,y), plus insertion index for a new vertex * after the segment that contains the projection (1-based vertex index). */ export declare function nearestPointOnPolyline(points: number[], x: number, y: number): { x: number; y: number; segIndex: number; dist: number; t: number; }; /** * Mermaid flowchart TB bus geometry for parent → children. * Multi-child: shared stem + rail + drops; each drop path is also available * as a rounded elbow for professional T-junctions. */ export declare function mermaidOrgBusPaths(parentX: number, parentBottomY: number, children: Array<{ x: number; topY: number; }>, _cornerRadius?: number): { stem: number[]; bus: number[]; drops: number[][]; elbows: number[][]; };