brepkit-wasm 2.19.0 → 2.21.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
@@ -172,6 +172,28 @@ export class BrepKernel {
172
172
  * Returns a flat array of the chamfered polygon coordinates.
173
173
  */
174
174
  chamfer2d(coords: Float64Array, distance: number): Float64Array;
175
+ /**
176
+ * Chamfer edges with distance and angle using the v2 blend engine.
177
+ *
178
+ * Returns a new solid handle.
179
+ *
180
+ * # Errors
181
+ *
182
+ * Returns an error if the solid or edge handles are invalid, or the
183
+ * blend computation fails.
184
+ */
185
+ chamferDistanceAngle(solid: number, edge_handles: Uint32Array, distance: number, angle: number): number;
186
+ /**
187
+ * Chamfer edges with two distances using the v2 blend engine.
188
+ *
189
+ * Returns a new solid handle.
190
+ *
191
+ * # Errors
192
+ *
193
+ * Returns an error if the solid or edge handles are invalid, or the
194
+ * blend computation fails.
195
+ */
196
+ chamferV2(solid: number, edge_handles: Uint32Array, d1: number, d2: number): number;
175
197
  /**
176
198
  * Save a snapshot of the current kernel state.
177
199
  *
@@ -560,6 +582,17 @@ export class BrepKernel {
560
582
  * Returns a flat array of the filleted polygon coordinates.
561
583
  */
562
584
  fillet2d(coords: Float64Array, radius: number): Float64Array;
585
+ /**
586
+ * Fillet edges using the v2 walking-based blend engine.
587
+ *
588
+ * Returns a new solid handle.
589
+ *
590
+ * # Errors
591
+ *
592
+ * Returns an error if the solid or edge handles are invalid, or the
593
+ * blend computation fails.
594
+ */
595
+ filletV2(solid: number, edge_handles: Uint32Array, radius: number): number;
563
596
  /**
564
597
  * Apply variable-radius fillets to edges.
565
598
  *
@@ -327,6 +327,54 @@ export class BrepKernel {
327
327
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
328
328
  return v2;
329
329
  }
330
+ /**
331
+ * Chamfer edges with distance and angle using the v2 blend engine.
332
+ *
333
+ * Returns a new solid handle.
334
+ *
335
+ * # Errors
336
+ *
337
+ * Returns an error if the solid or edge handles are invalid, or the
338
+ * blend computation fails.
339
+ * @param {number} solid
340
+ * @param {Uint32Array} edge_handles
341
+ * @param {number} distance
342
+ * @param {number} angle
343
+ * @returns {number}
344
+ */
345
+ chamferDistanceAngle(solid, edge_handles, distance, angle) {
346
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ const ret = wasm.brepkernel_chamferDistanceAngle(this.__wbg_ptr, solid, ptr0, len0, distance, angle);
349
+ if (ret[2]) {
350
+ throw takeFromExternrefTable0(ret[1]);
351
+ }
352
+ return ret[0] >>> 0;
353
+ }
354
+ /**
355
+ * Chamfer edges with two distances using the v2 blend engine.
356
+ *
357
+ * Returns a new solid handle.
358
+ *
359
+ * # Errors
360
+ *
361
+ * Returns an error if the solid or edge handles are invalid, or the
362
+ * blend computation fails.
363
+ * @param {number} solid
364
+ * @param {Uint32Array} edge_handles
365
+ * @param {number} d1
366
+ * @param {number} d2
367
+ * @returns {number}
368
+ */
369
+ chamferV2(solid, edge_handles, d1, d2) {
370
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
371
+ const len0 = WASM_VECTOR_LEN;
372
+ const ret = wasm.brepkernel_chamferV2(this.__wbg_ptr, solid, ptr0, len0, d1, d2);
373
+ if (ret[2]) {
374
+ throw takeFromExternrefTable0(ret[1]);
375
+ }
376
+ return ret[0] >>> 0;
377
+ }
330
378
  /**
331
379
  * Save a snapshot of the current kernel state.
332
380
  *
@@ -1238,6 +1286,29 @@ export class BrepKernel {
1238
1286
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
1239
1287
  return v2;
1240
1288
  }
1289
+ /**
1290
+ * Fillet edges using the v2 walking-based blend engine.
1291
+ *
1292
+ * Returns a new solid handle.
1293
+ *
1294
+ * # Errors
1295
+ *
1296
+ * Returns an error if the solid or edge handles are invalid, or the
1297
+ * blend computation fails.
1298
+ * @param {number} solid
1299
+ * @param {Uint32Array} edge_handles
1300
+ * @param {number} radius
1301
+ * @returns {number}
1302
+ */
1303
+ filletV2(solid, edge_handles, radius) {
1304
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
1305
+ const len0 = WASM_VECTOR_LEN;
1306
+ const ret = wasm.brepkernel_filletV2(this.__wbg_ptr, solid, ptr0, len0, radius);
1307
+ if (ret[2]) {
1308
+ throw takeFromExternrefTable0(ret[1]);
1309
+ }
1310
+ return ret[0] >>> 0;
1311
+ }
1241
1312
  /**
1242
1313
  * Apply variable-radius fillets to edges.
1243
1314
  *
Binary file
@@ -329,6 +329,54 @@ class BrepKernel {
329
329
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
330
330
  return v2;
331
331
  }
332
+ /**
333
+ * Chamfer edges with distance and angle using the v2 blend engine.
334
+ *
335
+ * Returns a new solid handle.
336
+ *
337
+ * # Errors
338
+ *
339
+ * Returns an error if the solid or edge handles are invalid, or the
340
+ * blend computation fails.
341
+ * @param {number} solid
342
+ * @param {Uint32Array} edge_handles
343
+ * @param {number} distance
344
+ * @param {number} angle
345
+ * @returns {number}
346
+ */
347
+ chamferDistanceAngle(solid, edge_handles, distance, angle) {
348
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
349
+ const len0 = WASM_VECTOR_LEN;
350
+ const ret = wasm.brepkernel_chamferDistanceAngle(this.__wbg_ptr, solid, ptr0, len0, distance, angle);
351
+ if (ret[2]) {
352
+ throw takeFromExternrefTable0(ret[1]);
353
+ }
354
+ return ret[0] >>> 0;
355
+ }
356
+ /**
357
+ * Chamfer edges with two distances using the v2 blend engine.
358
+ *
359
+ * Returns a new solid handle.
360
+ *
361
+ * # Errors
362
+ *
363
+ * Returns an error if the solid or edge handles are invalid, or the
364
+ * blend computation fails.
365
+ * @param {number} solid
366
+ * @param {Uint32Array} edge_handles
367
+ * @param {number} d1
368
+ * @param {number} d2
369
+ * @returns {number}
370
+ */
371
+ chamferV2(solid, edge_handles, d1, d2) {
372
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
373
+ const len0 = WASM_VECTOR_LEN;
374
+ const ret = wasm.brepkernel_chamferV2(this.__wbg_ptr, solid, ptr0, len0, d1, d2);
375
+ if (ret[2]) {
376
+ throw takeFromExternrefTable0(ret[1]);
377
+ }
378
+ return ret[0] >>> 0;
379
+ }
332
380
  /**
333
381
  * Save a snapshot of the current kernel state.
334
382
  *
@@ -1240,6 +1288,29 @@ class BrepKernel {
1240
1288
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
1241
1289
  return v2;
1242
1290
  }
1291
+ /**
1292
+ * Fillet edges using the v2 walking-based blend engine.
1293
+ *
1294
+ * Returns a new solid handle.
1295
+ *
1296
+ * # Errors
1297
+ *
1298
+ * Returns an error if the solid or edge handles are invalid, or the
1299
+ * blend computation fails.
1300
+ * @param {number} solid
1301
+ * @param {Uint32Array} edge_handles
1302
+ * @param {number} radius
1303
+ * @returns {number}
1304
+ */
1305
+ filletV2(solid, edge_handles, radius) {
1306
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
1307
+ const len0 = WASM_VECTOR_LEN;
1308
+ const ret = wasm.brepkernel_filletV2(this.__wbg_ptr, solid, ptr0, len0, radius);
1309
+ if (ret[2]) {
1310
+ throw takeFromExternrefTable0(ret[1]);
1311
+ }
1312
+ return ret[0] >>> 0;
1313
+ }
1243
1314
  /**
1244
1315
  * Apply variable-radius fillets to edges.
1245
1316
  *
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.19.0",
5
+ "version": "2.21.0",
6
6
  "license": "AGPL-3.0-only",
7
7
  "repository": {
8
8
  "type": "git",