brepkit-wasm 2.105.2 → 2.107.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
@@ -651,6 +651,21 @@ export class BrepKernel {
651
651
  * Returns a new solid handle.
652
652
  */
653
653
  filletVariable(solid: number, json: string): number;
654
+ /**
655
+ * Apply a constant-radius fillet and return face-evolution tracking data.
656
+ *
657
+ * Returns a JSON string `{"solid": <u32>, "evolution": {modified,
658
+ * generated, deleted}}` — the same shape as `fuseWithEvolution`. Blend
659
+ * faces appear under `generated` and surviving faces under `modified`.
660
+ * Provenance is matched geometrically (face normal + centroid), so it is
661
+ * unaffected by how the fillet renumbers faces.
662
+ *
663
+ * # Errors
664
+ *
665
+ * Returns an error if a handle is invalid, the radius is non-positive, or
666
+ * the fillet fails.
667
+ */
668
+ filletWithEvolution(solid: number, edge_handles: Uint32Array, radius: number): any;
654
669
  /**
655
670
  * Fix face orientations to ensure consistent outward normals.
656
671
  *
@@ -1452,6 +1467,22 @@ export class BrepKernel {
1452
1467
  * Returns an error if the solid handle is invalid or the normal is zero.
1453
1468
  */
1454
1469
  mirror(solid: number, px: number, py: number, pz: number, nx: number, ny: number, nz: number): number;
1470
+ /**
1471
+ * Sweep through multiple section profiles along a spine, lofting the
1472
+ * rotation-minimizing-frame-placed profiles.
1473
+ *
1474
+ * `face_handles` and `params` are parallel arrays: each planar profile and
1475
+ * its parameter in `[0, 1]` along the spine (given as raw NURBS data).
1476
+ * `ruled` selects ruled (planar bands) vs smooth (NURBS) lofted sides.
1477
+ *
1478
+ * Returns a solid handle (`u32`).
1479
+ *
1480
+ * # Errors
1481
+ *
1482
+ * Returns an error for fewer than two sections, mismatched array lengths, a
1483
+ * non-finite or out-of-range value, a non-planar profile, or loft failure.
1484
+ */
1485
+ multiSectionSweep(face_handles: Uint32Array, params: Float64Array, spine_degree: number, spine_knots: Float64Array, spine_control_points: Float64Array, spine_weights: Float64Array, ruled: boolean): number;
1455
1486
  /**
1456
1487
  * Create a new, empty kernel.
1457
1488
  */
@@ -1410,6 +1410,33 @@ export class BrepKernel {
1410
1410
  }
1411
1411
  return ret[0] >>> 0;
1412
1412
  }
1413
+ /**
1414
+ * Apply a constant-radius fillet and return face-evolution tracking data.
1415
+ *
1416
+ * Returns a JSON string `{"solid": <u32>, "evolution": {modified,
1417
+ * generated, deleted}}` — the same shape as `fuseWithEvolution`. Blend
1418
+ * faces appear under `generated` and surviving faces under `modified`.
1419
+ * Provenance is matched geometrically (face normal + centroid), so it is
1420
+ * unaffected by how the fillet renumbers faces.
1421
+ *
1422
+ * # Errors
1423
+ *
1424
+ * Returns an error if a handle is invalid, the radius is non-positive, or
1425
+ * the fillet fails.
1426
+ * @param {number} solid
1427
+ * @param {Uint32Array} edge_handles
1428
+ * @param {number} radius
1429
+ * @returns {any}
1430
+ */
1431
+ filletWithEvolution(solid, edge_handles, radius) {
1432
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
1433
+ const len0 = WASM_VECTOR_LEN;
1434
+ const ret = wasm.brepkernel_filletWithEvolution(this.__wbg_ptr, solid, ptr0, len0, radius);
1435
+ if (ret[2]) {
1436
+ throw takeFromExternrefTable0(ret[1]);
1437
+ }
1438
+ return takeFromExternrefTable0(ret[0]);
1439
+ }
1413
1440
  /**
1414
1441
  * Fix face orientations to ensure consistent outward normals.
1415
1442
  *
@@ -3218,6 +3245,46 @@ export class BrepKernel {
3218
3245
  }
3219
3246
  return ret[0] >>> 0;
3220
3247
  }
3248
+ /**
3249
+ * Sweep through multiple section profiles along a spine, lofting the
3250
+ * rotation-minimizing-frame-placed profiles.
3251
+ *
3252
+ * `face_handles` and `params` are parallel arrays: each planar profile and
3253
+ * its parameter in `[0, 1]` along the spine (given as raw NURBS data).
3254
+ * `ruled` selects ruled (planar bands) vs smooth (NURBS) lofted sides.
3255
+ *
3256
+ * Returns a solid handle (`u32`).
3257
+ *
3258
+ * # Errors
3259
+ *
3260
+ * Returns an error for fewer than two sections, mismatched array lengths, a
3261
+ * non-finite or out-of-range value, a non-planar profile, or loft failure.
3262
+ * @param {Uint32Array} face_handles
3263
+ * @param {Float64Array} params
3264
+ * @param {number} spine_degree
3265
+ * @param {Float64Array} spine_knots
3266
+ * @param {Float64Array} spine_control_points
3267
+ * @param {Float64Array} spine_weights
3268
+ * @param {boolean} ruled
3269
+ * @returns {number}
3270
+ */
3271
+ multiSectionSweep(face_handles, params, spine_degree, spine_knots, spine_control_points, spine_weights, ruled) {
3272
+ const ptr0 = passArray32ToWasm0(face_handles, wasm.__wbindgen_malloc);
3273
+ const len0 = WASM_VECTOR_LEN;
3274
+ const ptr1 = passArrayF64ToWasm0(params, wasm.__wbindgen_malloc);
3275
+ const len1 = WASM_VECTOR_LEN;
3276
+ const ptr2 = passArrayF64ToWasm0(spine_knots, wasm.__wbindgen_malloc);
3277
+ const len2 = WASM_VECTOR_LEN;
3278
+ const ptr3 = passArrayF64ToWasm0(spine_control_points, wasm.__wbindgen_malloc);
3279
+ const len3 = WASM_VECTOR_LEN;
3280
+ const ptr4 = passArrayF64ToWasm0(spine_weights, wasm.__wbindgen_malloc);
3281
+ const len4 = WASM_VECTOR_LEN;
3282
+ const ret = wasm.brepkernel_multiSectionSweep(this.__wbg_ptr, ptr0, len0, ptr1, len1, spine_degree, ptr2, len2, ptr3, len3, ptr4, len4, ruled);
3283
+ if (ret[2]) {
3284
+ throw takeFromExternrefTable0(ret[1]);
3285
+ }
3286
+ return ret[0] >>> 0;
3287
+ }
3221
3288
  /**
3222
3289
  * Create a new, empty kernel.
3223
3290
  */
@@ -4898,13 +4965,13 @@ export function __wbg___wbindgen_debug_string_0accd80f45e5faa2(arg0, arg1) {
4898
4965
  export function __wbg___wbindgen_throw_1506f2235d1bdba0(arg0, arg1) {
4899
4966
  throw new Error(getStringFromWasm0(arg0, arg1));
4900
4967
  }
4901
- export function __wbg_error_3d91780f499437f3(arg0, arg1) {
4968
+ export function __wbg_error_7dea289e6e83cdf7(arg0, arg1) {
4902
4969
  console.error(getStringFromWasm0(arg0, arg1));
4903
4970
  }
4904
- export function __wbg_log_fcb2a43ed5e93ab0(arg0, arg1) {
4971
+ export function __wbg_log_e5ff6852bee07cc4(arg0, arg1) {
4905
4972
  console.log(getStringFromWasm0(arg0, arg1));
4906
4973
  }
4907
- export function __wbg_warn_c5e8454e7410d1ba(arg0, arg1) {
4974
+ export function __wbg_warn_5089fa8b44e22e7b(arg0, arg1) {
4908
4975
  console.warn(getStringFromWasm0(arg0, arg1));
4909
4976
  }
4910
4977
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
Binary file
@@ -1412,6 +1412,33 @@ class BrepKernel {
1412
1412
  }
1413
1413
  return ret[0] >>> 0;
1414
1414
  }
1415
+ /**
1416
+ * Apply a constant-radius fillet and return face-evolution tracking data.
1417
+ *
1418
+ * Returns a JSON string `{"solid": <u32>, "evolution": {modified,
1419
+ * generated, deleted}}` — the same shape as `fuseWithEvolution`. Blend
1420
+ * faces appear under `generated` and surviving faces under `modified`.
1421
+ * Provenance is matched geometrically (face normal + centroid), so it is
1422
+ * unaffected by how the fillet renumbers faces.
1423
+ *
1424
+ * # Errors
1425
+ *
1426
+ * Returns an error if a handle is invalid, the radius is non-positive, or
1427
+ * the fillet fails.
1428
+ * @param {number} solid
1429
+ * @param {Uint32Array} edge_handles
1430
+ * @param {number} radius
1431
+ * @returns {any}
1432
+ */
1433
+ filletWithEvolution(solid, edge_handles, radius) {
1434
+ const ptr0 = passArray32ToWasm0(edge_handles, wasm.__wbindgen_malloc);
1435
+ const len0 = WASM_VECTOR_LEN;
1436
+ const ret = wasm.brepkernel_filletWithEvolution(this.__wbg_ptr, solid, ptr0, len0, radius);
1437
+ if (ret[2]) {
1438
+ throw takeFromExternrefTable0(ret[1]);
1439
+ }
1440
+ return takeFromExternrefTable0(ret[0]);
1441
+ }
1415
1442
  /**
1416
1443
  * Fix face orientations to ensure consistent outward normals.
1417
1444
  *
@@ -3220,6 +3247,46 @@ class BrepKernel {
3220
3247
  }
3221
3248
  return ret[0] >>> 0;
3222
3249
  }
3250
+ /**
3251
+ * Sweep through multiple section profiles along a spine, lofting the
3252
+ * rotation-minimizing-frame-placed profiles.
3253
+ *
3254
+ * `face_handles` and `params` are parallel arrays: each planar profile and
3255
+ * its parameter in `[0, 1]` along the spine (given as raw NURBS data).
3256
+ * `ruled` selects ruled (planar bands) vs smooth (NURBS) lofted sides.
3257
+ *
3258
+ * Returns a solid handle (`u32`).
3259
+ *
3260
+ * # Errors
3261
+ *
3262
+ * Returns an error for fewer than two sections, mismatched array lengths, a
3263
+ * non-finite or out-of-range value, a non-planar profile, or loft failure.
3264
+ * @param {Uint32Array} face_handles
3265
+ * @param {Float64Array} params
3266
+ * @param {number} spine_degree
3267
+ * @param {Float64Array} spine_knots
3268
+ * @param {Float64Array} spine_control_points
3269
+ * @param {Float64Array} spine_weights
3270
+ * @param {boolean} ruled
3271
+ * @returns {number}
3272
+ */
3273
+ multiSectionSweep(face_handles, params, spine_degree, spine_knots, spine_control_points, spine_weights, ruled) {
3274
+ const ptr0 = passArray32ToWasm0(face_handles, wasm.__wbindgen_malloc);
3275
+ const len0 = WASM_VECTOR_LEN;
3276
+ const ptr1 = passArrayF64ToWasm0(params, wasm.__wbindgen_malloc);
3277
+ const len1 = WASM_VECTOR_LEN;
3278
+ const ptr2 = passArrayF64ToWasm0(spine_knots, wasm.__wbindgen_malloc);
3279
+ const len2 = WASM_VECTOR_LEN;
3280
+ const ptr3 = passArrayF64ToWasm0(spine_control_points, wasm.__wbindgen_malloc);
3281
+ const len3 = WASM_VECTOR_LEN;
3282
+ const ptr4 = passArrayF64ToWasm0(spine_weights, wasm.__wbindgen_malloc);
3283
+ const len4 = WASM_VECTOR_LEN;
3284
+ const ret = wasm.brepkernel_multiSectionSweep(this.__wbg_ptr, ptr0, len0, ptr1, len1, spine_degree, ptr2, len2, ptr3, len3, ptr4, len4, ruled);
3285
+ if (ret[2]) {
3286
+ throw takeFromExternrefTable0(ret[1]);
3287
+ }
3288
+ return ret[0] >>> 0;
3289
+ }
3223
3290
  /**
3224
3291
  * Create a new, empty kernel.
3225
3292
  */
@@ -4910,13 +4977,13 @@ function __wbg_get_imports() {
4910
4977
  __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
4911
4978
  throw new Error(getStringFromWasm0(arg0, arg1));
4912
4979
  },
4913
- __wbg_error_3d91780f499437f3: function(arg0, arg1) {
4980
+ __wbg_error_7dea289e6e83cdf7: function(arg0, arg1) {
4914
4981
  console.error(getStringFromWasm0(arg0, arg1));
4915
4982
  },
4916
- __wbg_log_fcb2a43ed5e93ab0: function(arg0, arg1) {
4983
+ __wbg_log_e5ff6852bee07cc4: function(arg0, arg1) {
4917
4984
  console.log(getStringFromWasm0(arg0, arg1));
4918
4985
  },
4919
- __wbg_warn_c5e8454e7410d1ba: function(arg0, arg1) {
4986
+ __wbg_warn_5089fa8b44e22e7b: function(arg0, arg1) {
4920
4987
  console.warn(getStringFromWasm0(arg0, arg1));
4921
4988
  },
4922
4989
  __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.105.2",
5
+ "version": "2.107.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",