UNPKG

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) 1.1 kB
/** * Validates that a control point grid has consistent dimensions and is compatible with the given degrees. * For surfaces: checks that all rows have the same length and dimensions are >= degree + 1. */ export declare function validateControlPoints(controlPoints: number[][][], degreeU: number, degreeV: number): string | null; /** * Validates a knot vector: correct length, non-decreasing. */ export declare function validateKnots(knots: number[], numControlPoints: number, degree: number, name?: string): string | null; /** * Validates that a 2D weights array matches the control points dimensions. */ export declare function validateWeights2D(weights: number[][], controlPoints: number[][][]): string | null; /** * Validates that a 1D weights array matches the control points count. */ export declare function validateWeights1D(weights: number[], numControlPoints: number): string | null; /** * Validates that a degree is valid for the given number of control points. */ export declare function validateDegree(degree: number, numControlPoints: number, name?: string): string | null;