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

31 lines (30 loc) 977 B
/** * Conversion layer between react-three-nurbs data types and OpenCASCADE WASM objects. */ import type { SurfaceData, CurveData, FaceData, SolidData } from "../core/types"; type OC = any; /** * Convert our CurveData to an OCCT Geom_BSplineCurve. */ export declare function curveDataToOCCT(oc: OC, curve: CurveData): any; /** * Convert our SurfaceData to an OCCT Geom_BSplineSurface. */ export declare function surfaceDataToOCCT(oc: OC, surface: SurfaceData): any; /** * Convert a FaceData to an OCCT TopoDS_Face. */ export declare function faceDataToOCCT(oc: OC, face: FaceData): any; /** * Convert a SolidData to an OCCT TopoDS_Shape by sewing faces. */ export declare function solidToOCCT(oc: OC, solid: SolidData): any; /** * Extract tessellated mesh from an OCCT TopoDS_Shape. */ export declare function occtShapeToMesh(oc: OC, shape: any, deflection?: number): { vertices: Float32Array; indices: Uint32Array; normals: Float32Array; }; export {};