brepkit-wasm 2.43.10 → 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 +20 -0
- package/brepkit_wasm_bg.js +40 -0
- package/brepkit_wasm_bg.wasm +0 -0
- package/brepkit_wasm_node.cjs +40 -0
- package/package.json +1 -1
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_bg.js
CHANGED
|
@@ -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
|
*
|
package/brepkit_wasm_bg.wasm
CHANGED
|
Binary file
|
package/brepkit_wasm_node.cjs
CHANGED
|
@@ -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
|
*
|
package/package.json
CHANGED