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

19 lines (18 loc) 724 B
import { BufferGeometry } from "three"; import type { NurbsCurve } from "../core"; /** * Computes a bilinear Coons patch from 4 boundary curves. * * S(u,v) = (1-v)*bottom(u) + v*top(u) * + (1-u)*left(v) + u*right(v) * - [(1-u)(1-v)*P00 + u(1-v)*P10 + (1-u)v*P01 + u*v*P11] * * Boundary layout: * bottom: u=0..1, v=0 (bottom edge) * top: u=0..1, v=1 (top edge) * left: v=0..1, u=0 (left edge) * right: v=0..1, u=1 (right edge) * * Corner points: P00=bottom(0), P10=bottom(1), P01=top(0), P11=top(1) */ export declare function computeCoonsPatch(bottom: NurbsCurve, top: NurbsCurve, left: NurbsCurve, right: NurbsCurve, resolutionU: number, resolutionV: number): BufferGeometry;