brepkit-wasm 2.12.0 → 2.13.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
@@ -119,6 +119,21 @@ export class BrepKernel {
119
119
  * Create a new empty assembly. Returns an assembly index.
120
120
  */
121
121
  assemblyNew(name: string): number;
122
+ /**
123
+ * Boolean operation using the OCCT-style parameter-space pipeline (v2).
124
+ *
125
+ * Supports all surface types (plane, cylinder, cone, sphere, torus, NURBS).
126
+ * Preserves analytic surface types on output faces.
127
+ *
128
+ * `op` accepts `"fuse"` / `"union"`, `"cut"` / `"difference"`,
129
+ * `"intersect"` / `"intersection"`.
130
+ *
131
+ * # Errors
132
+ *
133
+ * Returns an error if either handle is invalid, `op` is unrecognized,
134
+ * or the operation fails.
135
+ */
136
+ booleanV2(op: string, a: number, b: number): number;
122
137
  /**
123
138
  * Compute the axis-aligned bounding box of a solid.
124
139
  *
@@ -216,6 +216,33 @@ export class BrepKernel {
216
216
  const ret = wasm.brepkernel_assemblyNew(this.__wbg_ptr, ptr0, len0);
217
217
  return ret >>> 0;
218
218
  }
219
+ /**
220
+ * Boolean operation using the OCCT-style parameter-space pipeline (v2).
221
+ *
222
+ * Supports all surface types (plane, cylinder, cone, sphere, torus, NURBS).
223
+ * Preserves analytic surface types on output faces.
224
+ *
225
+ * `op` accepts `"fuse"` / `"union"`, `"cut"` / `"difference"`,
226
+ * `"intersect"` / `"intersection"`.
227
+ *
228
+ * # Errors
229
+ *
230
+ * Returns an error if either handle is invalid, `op` is unrecognized,
231
+ * or the operation fails.
232
+ * @param {string} op
233
+ * @param {number} a
234
+ * @param {number} b
235
+ * @returns {number}
236
+ */
237
+ booleanV2(op, a, b) {
238
+ const ptr0 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
239
+ const len0 = WASM_VECTOR_LEN;
240
+ const ret = wasm.brepkernel_booleanV2(this.__wbg_ptr, ptr0, len0, a, b);
241
+ if (ret[2]) {
242
+ throw takeFromExternrefTable0(ret[1]);
243
+ }
244
+ return ret[0] >>> 0;
245
+ }
219
246
  /**
220
247
  * Compute the axis-aligned bounding box of a solid.
221
248
  *
Binary file
@@ -218,6 +218,33 @@ class BrepKernel {
218
218
  const ret = wasm.brepkernel_assemblyNew(this.__wbg_ptr, ptr0, len0);
219
219
  return ret >>> 0;
220
220
  }
221
+ /**
222
+ * Boolean operation using the OCCT-style parameter-space pipeline (v2).
223
+ *
224
+ * Supports all surface types (plane, cylinder, cone, sphere, torus, NURBS).
225
+ * Preserves analytic surface types on output faces.
226
+ *
227
+ * `op` accepts `"fuse"` / `"union"`, `"cut"` / `"difference"`,
228
+ * `"intersect"` / `"intersection"`.
229
+ *
230
+ * # Errors
231
+ *
232
+ * Returns an error if either handle is invalid, `op` is unrecognized,
233
+ * or the operation fails.
234
+ * @param {string} op
235
+ * @param {number} a
236
+ * @param {number} b
237
+ * @returns {number}
238
+ */
239
+ booleanV2(op, a, b) {
240
+ const ptr0 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
241
+ const len0 = WASM_VECTOR_LEN;
242
+ const ret = wasm.brepkernel_booleanV2(this.__wbg_ptr, ptr0, len0, a, b);
243
+ if (ret[2]) {
244
+ throw takeFromExternrefTable0(ret[1]);
245
+ }
246
+ return ret[0] >>> 0;
247
+ }
221
248
  /**
222
249
  * Compute the axis-aligned bounding box of a solid.
223
250
  *
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.12.0",
5
+ "version": "2.13.0",
6
6
  "license": "AGPL-3.0-only",
7
7
  "repository": {
8
8
  "type": "git",