brepkit-wasm 2.84.0 → 2.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/brepkit_wasm.d.ts CHANGED
@@ -271,6 +271,20 @@ export class BrepKernel {
271
271
  * Returns an error if the solid handle is invalid or conversion fails.
272
272
  */
273
273
  convertToBspline(solid: number): number;
274
+ /**
275
+ * Recognize and replace NURBS faces and edges with their analytic
276
+ * (elementary) forms wherever possible (Plane/Cylinder/Sphere/
277
+ * Cone/Torus surfaces; Line/Circle/Ellipse edges).
278
+ *
279
+ * Inverse of `convertToBspline`: useful after STEP/IGES import
280
+ * to recover analytic types from B-spline-only exports.
281
+ * Returns the total number of faces and edges converted.
282
+ *
283
+ * # Errors
284
+ *
285
+ * Returns an error if topology lookups fail.
286
+ */
287
+ convertToElementary(solid: number): number;
274
288
  /**
275
289
  * Build a convex hull solid from a point cloud.
276
290
  *
@@ -578,6 +578,28 @@ export class BrepKernel {
578
578
  }
579
579
  return ret[0] >>> 0;
580
580
  }
581
+ /**
582
+ * Recognize and replace NURBS faces and edges with their analytic
583
+ * (elementary) forms wherever possible (Plane/Cylinder/Sphere/
584
+ * Cone/Torus surfaces; Line/Circle/Ellipse edges).
585
+ *
586
+ * Inverse of `convertToBspline`: useful after STEP/IGES import
587
+ * to recover analytic types from B-spline-only exports.
588
+ * Returns the total number of faces and edges converted.
589
+ *
590
+ * # Errors
591
+ *
592
+ * Returns an error if topology lookups fail.
593
+ * @param {number} solid
594
+ * @returns {number}
595
+ */
596
+ convertToElementary(solid) {
597
+ const ret = wasm.brepkernel_convertToElementary(this.__wbg_ptr, solid);
598
+ if (ret[2]) {
599
+ throw takeFromExternrefTable0(ret[1]);
600
+ }
601
+ return ret[0] >>> 0;
602
+ }
581
603
  /**
582
604
  * Build a convex hull solid from a point cloud.
583
605
  *
Binary file
@@ -580,6 +580,28 @@ class BrepKernel {
580
580
  }
581
581
  return ret[0] >>> 0;
582
582
  }
583
+ /**
584
+ * Recognize and replace NURBS faces and edges with their analytic
585
+ * (elementary) forms wherever possible (Plane/Cylinder/Sphere/
586
+ * Cone/Torus surfaces; Line/Circle/Ellipse edges).
587
+ *
588
+ * Inverse of `convertToBspline`: useful after STEP/IGES import
589
+ * to recover analytic types from B-spline-only exports.
590
+ * Returns the total number of faces and edges converted.
591
+ *
592
+ * # Errors
593
+ *
594
+ * Returns an error if topology lookups fail.
595
+ * @param {number} solid
596
+ * @returns {number}
597
+ */
598
+ convertToElementary(solid) {
599
+ const ret = wasm.brepkernel_convertToElementary(this.__wbg_ptr, solid);
600
+ if (ret[2]) {
601
+ throw takeFromExternrefTable0(ret[1]);
602
+ }
603
+ return ret[0] >>> 0;
604
+ }
583
605
  /**
584
606
  * Build a convex hull solid from a point cloud.
585
607
  *
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "brepkit-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for brepkit — browser-native B-Rep solid modeling",
5
- "version": "2.84.0",
5
+ "version": "2.85.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",