brepkit-wasm 2.43.9 → 2.44.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
@@ -347,6 +347,26 @@ export class BrepKernel {
347
347
  * Returns a new solid handle.
348
348
  */
349
349
  defeature(solid: number, face_handles: Uint32Array): number;
350
+ /**
351
+ * Detect surface-level coincident face pairs between two solids
352
+ * without performing a boolean operation.
353
+ *
354
+ * Useful for warning users about same-domain configurations
355
+ * (face stacks, coaxial cylinders, concentric spheres) before a
356
+ * boolean. Returns a JSON array string of objects:
357
+ * `[{"faceA": <u32>, "faceB": <u32>, "sameOrientation": <bool>, "aabbOverlap": <bool>}, ...]`.
358
+ *
359
+ * `sameOrientation` is `true` when the surface normals point the
360
+ * same way at corresponding parametric points (e.g., two coplanar
361
+ * faces with the same `+z` normal). `aabbOverlap` filters pairs
362
+ * that are same-domain on the surface but geometrically disjoint.
363
+ *
364
+ * # Errors
365
+ *
366
+ * Returns an error if either solid handle is invalid or any face /
367
+ * edge / vertex lookup fails internally.
368
+ */
369
+ detectCoincidentFaces(a: number, b: number): string;
350
370
  /**
351
371
  * Detect small features (faces below an area threshold).
352
372
  *
package/brepkit_wasm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @ts-self-types="./brepkit_wasm.d.ts" */
2
-
3
2
  import * as wasm from "./brepkit_wasm_bg.wasm";
4
3
  import { __wbg_set_wasm } from "./brepkit_wasm_bg.js";
4
+
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
@@ -752,6 +752,46 @@ export class BrepKernel {
752
752
  }
753
753
  return ret[0] >>> 0;
754
754
  }
755
+ /**
756
+ * Detect surface-level coincident face pairs between two solids
757
+ * without performing a boolean operation.
758
+ *
759
+ * Useful for warning users about same-domain configurations
760
+ * (face stacks, coaxial cylinders, concentric spheres) before a
761
+ * boolean. Returns a JSON array string of objects:
762
+ * `[{"faceA": <u32>, "faceB": <u32>, "sameOrientation": <bool>, "aabbOverlap": <bool>}, ...]`.
763
+ *
764
+ * `sameOrientation` is `true` when the surface normals point the
765
+ * same way at corresponding parametric points (e.g., two coplanar
766
+ * faces with the same `+z` normal). `aabbOverlap` filters pairs
767
+ * that are same-domain on the surface but geometrically disjoint.
768
+ *
769
+ * # Errors
770
+ *
771
+ * Returns an error if either solid handle is invalid or any face /
772
+ * edge / vertex lookup fails internally.
773
+ * @param {number} a
774
+ * @param {number} b
775
+ * @returns {string}
776
+ */
777
+ detectCoincidentFaces(a, b) {
778
+ let deferred2_0;
779
+ let deferred2_1;
780
+ try {
781
+ const ret = wasm.brepkernel_detectCoincidentFaces(this.__wbg_ptr, a, b);
782
+ var ptr1 = ret[0];
783
+ var len1 = ret[1];
784
+ if (ret[3]) {
785
+ ptr1 = 0; len1 = 0;
786
+ throw takeFromExternrefTable0(ret[2]);
787
+ }
788
+ deferred2_0 = ptr1;
789
+ deferred2_1 = len1;
790
+ return getStringFromWasm0(ptr1, len1);
791
+ } finally {
792
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
793
+ }
794
+ }
755
795
  /**
756
796
  * Detect small features (faces below an area threshold).
757
797
  *
@@ -4342,18 +4382,18 @@ export class JsVec3 {
4342
4382
  }
4343
4383
  }
4344
4384
  if (Symbol.dispose) JsVec3.prototype[Symbol.dispose] = JsVec3.prototype.free;
4345
- export function __wbg_Error_2e59b1b37a9a34c3(arg0, arg1) {
4385
+ export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
4346
4386
  const ret = Error(getStringFromWasm0(arg0, arg1));
4347
4387
  return ret;
4348
4388
  }
4349
- export function __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57(arg0, arg1) {
4389
+ export function __wbg___wbindgen_debug_string_ab4b34d23d6778bd(arg0, arg1) {
4350
4390
  const ret = debugString(arg1);
4351
4391
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4352
4392
  const len1 = WASM_VECTOR_LEN;
4353
4393
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4354
4394
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4355
4395
  }
4356
- export function __wbg___wbindgen_throw_81fc77679af83bc6(arg0, arg1) {
4396
+ export function __wbg___wbindgen_throw_6b64449b9b9ed33c(arg0, arg1) {
4357
4397
  throw new Error(getStringFromWasm0(arg0, arg1));
4358
4398
  }
4359
4399
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
Binary file
@@ -754,6 +754,46 @@ class BrepKernel {
754
754
  }
755
755
  return ret[0] >>> 0;
756
756
  }
757
+ /**
758
+ * Detect surface-level coincident face pairs between two solids
759
+ * without performing a boolean operation.
760
+ *
761
+ * Useful for warning users about same-domain configurations
762
+ * (face stacks, coaxial cylinders, concentric spheres) before a
763
+ * boolean. Returns a JSON array string of objects:
764
+ * `[{"faceA": <u32>, "faceB": <u32>, "sameOrientation": <bool>, "aabbOverlap": <bool>}, ...]`.
765
+ *
766
+ * `sameOrientation` is `true` when the surface normals point the
767
+ * same way at corresponding parametric points (e.g., two coplanar
768
+ * faces with the same `+z` normal). `aabbOverlap` filters pairs
769
+ * that are same-domain on the surface but geometrically disjoint.
770
+ *
771
+ * # Errors
772
+ *
773
+ * Returns an error if either solid handle is invalid or any face /
774
+ * edge / vertex lookup fails internally.
775
+ * @param {number} a
776
+ * @param {number} b
777
+ * @returns {string}
778
+ */
779
+ detectCoincidentFaces(a, b) {
780
+ let deferred2_0;
781
+ let deferred2_1;
782
+ try {
783
+ const ret = wasm.brepkernel_detectCoincidentFaces(this.__wbg_ptr, a, b);
784
+ var ptr1 = ret[0];
785
+ var len1 = ret[1];
786
+ if (ret[3]) {
787
+ ptr1 = 0; len1 = 0;
788
+ throw takeFromExternrefTable0(ret[2]);
789
+ }
790
+ deferred2_0 = ptr1;
791
+ deferred2_1 = len1;
792
+ return getStringFromWasm0(ptr1, len1);
793
+ } finally {
794
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
795
+ }
796
+ }
757
797
  /**
758
798
  * Detect small features (faces below an area threshold).
759
799
  *
@@ -4349,22 +4389,21 @@ class JsVec3 {
4349
4389
  }
4350
4390
  if (Symbol.dispose) JsVec3.prototype[Symbol.dispose] = JsVec3.prototype.free;
4351
4391
  exports.JsVec3 = JsVec3;
4352
-
4353
4392
  function __wbg_get_imports() {
4354
4393
  const import0 = {
4355
4394
  __proto__: null,
4356
- __wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
4395
+ __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
4357
4396
  const ret = Error(getStringFromWasm0(arg0, arg1));
4358
4397
  return ret;
4359
4398
  },
4360
- __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
4399
+ __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
4361
4400
  const ret = debugString(arg1);
4362
4401
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4363
4402
  const len1 = WASM_VECTOR_LEN;
4364
4403
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4365
4404
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4366
4405
  },
4367
- __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
4406
+ __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
4368
4407
  throw new Error(getStringFromWasm0(arg0, arg1));
4369
4408
  },
4370
4409
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
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.43.9",
5
+ "version": "2.44.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",