/** * Interactive Model Builder * * Helper functions for creating interactive CAD models with movable parts. * * @example * ```typescript * import { Shape, interactive } from '@moicad/sdk'; * * export default interactive({ * parts: [ * { * id: 'base', * shape: Shape.cube([30, 30, 10]), * constraint: { type: 'fixed' } * }, * { * id: 'lid', * shape: Shape.cube([30, 30, 2]).translate([0, 0, 10]), * constraint: { * type: 'hinge', * axis: [1, 0, 0], * pivot: [0, 30, 10], * range: [0, 110] * } * } * ] * }); * ``` */ import type { Shape } from '../shape'; import type { InteractiveModel, InteractivePart, Constraint, Vector3 } from './types'; /** * Create an interactive model from parts definition * * @param definition - Interactive model definition * @returns InteractiveModel with validated parts */ export declare function interactive(definition: InteractiveModel): InteractiveModel; /** * Create a fixed part (cannot move) */ export declare function fixedPart(id: string, shape: Shape, options?: Partial): InteractivePart; /** * Create a hinge part (rotates around axis) */ export declare function hingePart(id: string, shape: Shape, options: { axis: Vector3; pivot: Vector3; range?: [number, number]; springBack?: boolean; springStrength?: number; } & Partial): InteractivePart; /** * Create a slider part (moves along axis) */ export declare function sliderPart(id: string, shape: Shape, options: { axis: Vector3; range?: [number, number]; springBack?: boolean; springStrength?: number; } & Partial): InteractivePart; /** * Create a ball joint part (rotates freely around pivot) */ export declare function ballJointPart(id: string, shape: Shape, options: { pivot: Vector3; range?: [number, number]; } & Partial): InteractivePart; /** * Create a linked part (moves in sync with another part) */ export declare function linkedPart(id: string, shape: Shape, linkedTo: string, ratio: number, constraint?: Constraint, options?: Partial): InteractivePart; /** * Create a simple box with opening lid */ export declare function createBoxWithLid(width?: number, depth?: number, height?: number, lidThickness?: number, maxOpenAngle?: number): (Shape: typeof import('../shape').Shape) => InteractiveModel; /** * Create a drawer unit */ export declare function createDrawer(width?: number, depth?: number, height?: number, drawerHeight?: number, maxPull?: number): (Shape: typeof import('../shape').Shape) => InteractiveModel; //# sourceMappingURL=interactive.d.ts.map