import type { MultiFn2 } from "@thi.ng/defmulti"; import type { IShape } from "./api.js"; import { Group } from "./api/group.js"; /** * Function overrides for {@link splitArcLength}. */ export type SplitArcLengthFn = {} & MultiFn2; /** * Splits given shape into {@link Polyline} segments of given (max) arc length. * Returns a {@link Group} of shapes/polylines. * * @remarks * If the shape has a `__samples` attribute, it will be removed in the result to * avoid recursive application. * * Currently only implemented for: * * - {@link Group} * - {@link Polyline} * * Other shape types will be attempted to be auto-converted via * {@link asPolyline} first. Only shapes with a single boundary are supported. * * Nested groups are NOT supported. Groups are processing their child shapes and * forming new child groups of given max. arc lengths and potentially splitting * shapes if they don't fit within the current subgroup... * * @example * ```ts * import { circle, group, inscribedSquare, splitArcLength } from "@thi.ng/geom"; * * // circle (to be sampled as octagon) * const a = circle(100, { stroke: "red", __samples: 8 }); * * // inner square of circle * const b = inscribedSquare(a, { stroke: "blue" }); * * // process as group, split/partition into subgroups of arclength max. 200 * splitArcLength(group({}, [a, b]), 200); * ``` * * Result serialized to SVG: * * ```xml * * * * * * * * * * * * * * * * * * * * * * * * ``` * * @param shape * @param dist */ export declare const splitArcLength: SplitArcLengthFn; //# sourceMappingURL=split-arclength.d.ts.map