/** * Manifold CSG (Constructive Solid Geometry) Operations * * Boolean operations for combining, subtracting, and intersecting 3D manifolds. * These replace the Rust BSP-tree implementations. */ import type { ManifoldObject, CrossSectionObject } from "./types"; /** * Union (Boolean OR) - Combine two manifolds * In manifold-3d, this is the `add()` method */ export declare function union(manifoldA: ManifoldObject, manifoldB: ManifoldObject): ManifoldObject; /** * Union multiple manifolds at once * More efficient than repeated pairwise unions */ export declare function unionMultiple(manifolds: ManifoldObject[]): ManifoldObject; /** * Difference (Boolean subtraction) - Subtract B from A */ export declare function difference(manifoldA: ManifoldObject, manifoldB: ManifoldObject): ManifoldObject; /** * Difference with multiple subtractors * Subtracts all manifolds in array from the first manifold */ export declare function differenceMultiple(base: ManifoldObject, subtractors: ManifoldObject[]): ManifoldObject; /** * Intersection (Boolean AND) - Keep only overlapping region */ export declare function intersection(manifoldA: ManifoldObject, manifoldB: ManifoldObject): ManifoldObject; /** * Intersection of multiple manifolds */ export declare function intersectionMultiple(manifolds: ManifoldObject[]): ManifoldObject; /** * Convex hull - Create smallest convex shape containing all manifolds */ export declare function hull(manifolds: ManifoldObject[]): ManifoldObject; /** * Minkowski sum - Approximation using hull of translated copies * * Manifold-3d doesn't have native Minkowski support, so we approximate it by: * 1. Getting vertices from the second shape * 2. Translating the first shape to each vertex position * 3. Taking the hull of all translated copies * * This is accurate for convex shapes and a reasonable approximation for others. * * @param manifoldA - Base shape to expand * @param manifoldB - Shape that defines the expansion * @returns Approximated Minkowski sum */ export declare function minkowski(manifoldA: ManifoldObject, manifoldB: ManifoldObject): ManifoldObject; /** * Batch boolean operation - Apply same operation to multiple manifolds * * @param manifolds - Array of manifolds to combine * @param operation - 'union' | 'intersection' */ export declare function batchBoolean(manifolds: ManifoldObject[], operation: "union" | "intersection"): ManifoldObject; /** * Compose - Alias for unionMultiple (OpenSCAD compatibility) */ export declare function compose(manifolds: ManifoldObject[]): ManifoldObject; /** * Decompose - Split a manifold into separate components * Useful for multi-part models */ export declare function decompose(manifold: ManifoldObject): ManifoldObject[]; /** * Check if a manifold is valid (no errors) */ export declare function isValid(manifold: ManifoldObject): boolean; /** * Get status code for a manifold */ export declare function getStatus(manifold: ManifoldObject): number; /** * Split a manifold by a plane * Returns two manifolds: [front, back] */ export declare function splitByPlane(manifold: ManifoldObject, normal: [number, number, number], offset: number): [ManifoldObject, ManifoldObject]; /** * Trim a manifold by a plane (keep only the front half) */ export declare function trimByPlane(manifold: ManifoldObject, normal: [number, number, number], offset: number): ManifoldObject; /** * Slice a manifold at a given height to get a 2D cross-section */ export declare function slice(manifold: ManifoldObject, height: number): CrossSectionObject; /** * Project a 3D manifold to 2D (orthographic projection onto XY plane) */ export declare function project(manifold: ManifoldObject): CrossSectionObject; //# sourceMappingURL=csg.d.ts.map