react-three-nurbs
Version:
A React component library for NURBS (Non-Uniform Rational B-Spline) curves, surfaces, and solids in Three.js. Built with React Three Fiber, zero external NURBS dependencies — all math implemented from scratch. Boolean operations powered by OpenCASCADE WAS
22 lines (21 loc) • 663 B
TypeScript
import { Vector3 } from "three";
export interface SurfaceDefinition {
controlPoints: number[][][];
weights: number[][];
degreeU: number;
degreeV: number;
knotsU?: number[];
knotsV?: number[];
}
export interface IntersectionCurve {
points: Vector3[];
}
export interface UseSurfaceIntersectionOptions {
surface0: SurfaceDefinition | null;
surface1: SurfaceDefinition | null;
tolerance?: number;
}
export interface UseSurfaceIntersectionResult {
curves: IntersectionCurve[];
}
export declare function useSurfaceIntersection({ surface0, surface1, tolerance, }: UseSurfaceIntersectionOptions): UseSurfaceIntersectionResult;