/** * Manifold 2D Extrusion and Operations * * Functions for extruding 2D shapes into 3D and performing 2D operations. * These replace the Rust WASM extrusion implementations. */ import type { ManifoldObject } from "./types"; /** * Linear extrude - Extrude a 2D shape along the Z-axis * * @param shape - Shape to extrude (can be 3D manifold, will be projected to 2D first) * @param height - Height to extrude * @param twist - Twist angle in degrees (default: 0) * @param scaleTop - Scale factor at top (number or [x, y]) (default: 1) * @param slices - Number of slices for twist (default: based on twist angle) * @param center - Center the extrusion vertically (default: false) */ export declare function linearExtrude(shape: ManifoldObject, height: number, twist?: number, scaleTop?: number | [number, number], slices?: number, center?: boolean): ManifoldObject; /** * Rotate extrude - Revolve a 2D shape around the Y-axis * * @param shape - Shape to revolve (will be projected to 2D first) * @param angle - Angle to revolve in degrees (default: 360) * @param segments - Number of segments (default: based on $fn or angle) */ export declare function rotateExtrude(shape: ManifoldObject, angle?: number, segments?: number): ManifoldObject; /** * Offset - Expand or contract a 2D shape * * @param shape - Shape to offset (will be projected to 2D first) * @param delta - Offset distance (positive = expand, negative = contract) * @param chamfer - Use chamfer/miter instead of round (default: false) * @param segments - Number of segments for round corners */ export declare function offset(shape: ManifoldObject, delta: number, chamfer?: boolean, segments?: number): ManifoldObject; /** * Resize a shape to specific dimensions * * @param shape - Shape to resize * @param newSize - [width, height, depth] target dimensions * @param auto - Maintain aspect ratio (default: false) */ export declare function resize(shape: ManifoldObject, newSize: [number, number, number], auto?: boolean): ManifoldObject; /** * Project a 3D manifold to 2D (orthographic projection onto XY plane) * Returns a thin 3D manifold representing the 2D projection */ export declare function project(manifold: ManifoldObject): ManifoldObject; /** * Helper: Check if a manifold is effectively 2D (very thin in Z) */ export declare function is2D(manifold: ManifoldObject, threshold?: number): boolean; /** * Helper: Get the thickness of a manifold in Z direction */ export declare function getThickness(manifold: ManifoldObject): number; //# sourceMappingURL=extrude.d.ts.map