brepkit-wasm 4.6.30 → 4.7.1

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
@@ -575,6 +575,18 @@ export class BrepKernel {
575
575
  * Returns an error if the solid handle is invalid or export fails.
576
576
  */
577
577
  exportStl(solid: number, deflection: number): Uint8Array;
578
+ /**
579
+ * Extrude an open wire along a direction vector into an open shell.
580
+ *
581
+ * Returns a shell handle (`u32`).
582
+ *
583
+ * # Errors
584
+ *
585
+ * Returns an error if an input is non-finite, the wire handle is invalid,
586
+ * the extrusion has no length, the wire is closed, meets itself or breaks,
587
+ * or a line runs along the extrusion.
588
+ */
589
+ extrudeWire(wire: number, dir_x: number, dir_y: number, dir_z: number, distance: number): number;
578
590
  /**
579
591
  * Extrude a planar face along a direction vector to create a solid.
580
592
  *
@@ -1192,6 +1204,18 @@ export class BrepKernel {
1192
1204
  * different vertex counts, or surface fitting fails.
1193
1205
  */
1194
1206
  loftSmooth(faces: Uint32Array): number;
1207
+ /**
1208
+ * Loft two or more open wires of equal edge counts into an open shell.
1209
+ *
1210
+ * Returns a shell handle (`u32`).
1211
+ *
1212
+ * # Errors
1213
+ *
1214
+ * Returns an error if a handle is invalid, fewer than two wires are given,
1215
+ * their edge counts differ, a wire is closed, meets itself or breaks, two
1216
+ * wires touch where they would be joined, or two lines cross or fold over.
1217
+ */
1218
+ loftWires(wires: Uint32Array): number;
1195
1219
  /**
1196
1220
  * Loft profiles with options for start/end points and ruled mode.
1197
1221
  *
@@ -1815,6 +1839,21 @@ export class BrepKernel {
1815
1839
  * Returns an error if the handle is neither a valid face nor edge.
1816
1840
  */
1817
1841
  reverseShape(id: number): number;
1842
+ /**
1843
+ * Revolve an open wire around an axis into an open shell.
1844
+ *
1845
+ * The axis is defined by an origin point `(ox, oy, oz)` and a direction
1846
+ * `(dx, dy, dz)`. The angle is in degrees and must be in (0, 360].
1847
+ *
1848
+ * Returns a shell handle (`u32`).
1849
+ *
1850
+ * # Errors
1851
+ *
1852
+ * Returns an error if an input is non-finite, the wire handle is invalid,
1853
+ * the axis has no length, the wire lies along the axis, an edge crosses the
1854
+ * axis, or the wire is closed, meets itself or breaks.
1855
+ */
1856
+ revolveWire(wire: number, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, angle_degrees: number): number;
1818
1857
  /**
1819
1858
  * Revolve a planar face around an axis to create a solid of revolution.
1820
1859
  *
@@ -1993,6 +2032,20 @@ export class BrepKernel {
1993
2032
  * Returns an error if the face or path is invalid, or surface fitting fails.
1994
2033
  */
1995
2034
  sweepSmooth(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
2035
+ /**
2036
+ * Sweep an open wire along a chain of path edges into an open shell.
2037
+ *
2038
+ * A straight path extrudes the wire and one circle or arc revolves it;
2039
+ * any other open, kink-free chain sweeps a NURBS face per wire edge.
2040
+ *
2041
+ * Returns a shell handle (`u32`).
2042
+ *
2043
+ * # Errors
2044
+ *
2045
+ * Returns an error if a handle is invalid, the chain has no edges, breaks,
2046
+ * closes or has a kink, or the wire is closed.
2047
+ */
2048
+ sweepWire(wire: number, path_edges: Uint32Array): number;
1996
2049
  /**
1997
2050
  * Sweep a face along a NURBS path with advanced options.
1998
2051
  *
@@ -1296,6 +1296,30 @@ export class BrepKernel {
1296
1296
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1297
1297
  return v1;
1298
1298
  }
1299
+ /**
1300
+ * Extrude an open wire along a direction vector into an open shell.
1301
+ *
1302
+ * Returns a shell handle (`u32`).
1303
+ *
1304
+ * # Errors
1305
+ *
1306
+ * Returns an error if an input is non-finite, the wire handle is invalid,
1307
+ * the extrusion has no length, the wire is closed, meets itself or breaks,
1308
+ * or a line runs along the extrusion.
1309
+ * @param {number} wire
1310
+ * @param {number} dir_x
1311
+ * @param {number} dir_y
1312
+ * @param {number} dir_z
1313
+ * @param {number} distance
1314
+ * @returns {number}
1315
+ */
1316
+ extrudeWire(wire, dir_x, dir_y, dir_z, distance) {
1317
+ const ret = wasm.brepkernel_extrudeWire(this.__wbg_ptr, wire, dir_x, dir_y, dir_z, distance);
1318
+ if (ret[2]) {
1319
+ throw takeFromExternrefTable0(ret[1]);
1320
+ }
1321
+ return ret[0] >>> 0;
1322
+ }
1299
1323
  /**
1300
1324
  * Extrude a planar face along a direction vector to create a solid.
1301
1325
  *
@@ -2684,6 +2708,28 @@ export class BrepKernel {
2684
2708
  }
2685
2709
  return ret[0] >>> 0;
2686
2710
  }
2711
+ /**
2712
+ * Loft two or more open wires of equal edge counts into an open shell.
2713
+ *
2714
+ * Returns a shell handle (`u32`).
2715
+ *
2716
+ * # Errors
2717
+ *
2718
+ * Returns an error if a handle is invalid, fewer than two wires are given,
2719
+ * their edge counts differ, a wire is closed, meets itself or breaks, two
2720
+ * wires touch where they would be joined, or two lines cross or fold over.
2721
+ * @param {Uint32Array} wires
2722
+ * @returns {number}
2723
+ */
2724
+ loftWires(wires) {
2725
+ const ptr0 = passArray32ToWasm0(wires, wasm.__wbindgen_malloc);
2726
+ const len0 = WASM_VECTOR_LEN;
2727
+ const ret = wasm.brepkernel_loftWires(this.__wbg_ptr, ptr0, len0);
2728
+ if (ret[2]) {
2729
+ throw takeFromExternrefTable0(ret[1]);
2730
+ }
2731
+ return ret[0] >>> 0;
2732
+ }
2687
2733
  /**
2688
2734
  * Loft profiles with options for start/end points and ruled mode.
2689
2735
  *
@@ -4060,6 +4106,36 @@ export class BrepKernel {
4060
4106
  }
4061
4107
  return ret[0] >>> 0;
4062
4108
  }
4109
+ /**
4110
+ * Revolve an open wire around an axis into an open shell.
4111
+ *
4112
+ * The axis is defined by an origin point `(ox, oy, oz)` and a direction
4113
+ * `(dx, dy, dz)`. The angle is in degrees and must be in (0, 360].
4114
+ *
4115
+ * Returns a shell handle (`u32`).
4116
+ *
4117
+ * # Errors
4118
+ *
4119
+ * Returns an error if an input is non-finite, the wire handle is invalid,
4120
+ * the axis has no length, the wire lies along the axis, an edge crosses the
4121
+ * axis, or the wire is closed, meets itself or breaks.
4122
+ * @param {number} wire
4123
+ * @param {number} ox
4124
+ * @param {number} oy
4125
+ * @param {number} oz
4126
+ * @param {number} dx
4127
+ * @param {number} dy
4128
+ * @param {number} dz
4129
+ * @param {number} angle_degrees
4130
+ * @returns {number}
4131
+ */
4132
+ revolveWire(wire, ox, oy, oz, dx, dy, dz, angle_degrees) {
4133
+ const ret = wasm.brepkernel_revolveWire(this.__wbg_ptr, wire, ox, oy, oz, dx, dy, dz, angle_degrees);
4134
+ if (ret[2]) {
4135
+ throw takeFromExternrefTable0(ret[1]);
4136
+ }
4137
+ return ret[0] >>> 0;
4138
+ }
4063
4139
  /**
4064
4140
  * Revolve a planar face around an axis to create a solid of revolution.
4065
4141
  *
@@ -4471,6 +4547,31 @@ export class BrepKernel {
4471
4547
  }
4472
4548
  return ret[0] >>> 0;
4473
4549
  }
4550
+ /**
4551
+ * Sweep an open wire along a chain of path edges into an open shell.
4552
+ *
4553
+ * A straight path extrudes the wire and one circle or arc revolves it;
4554
+ * any other open, kink-free chain sweeps a NURBS face per wire edge.
4555
+ *
4556
+ * Returns a shell handle (`u32`).
4557
+ *
4558
+ * # Errors
4559
+ *
4560
+ * Returns an error if a handle is invalid, the chain has no edges, breaks,
4561
+ * closes or has a kink, or the wire is closed.
4562
+ * @param {number} wire
4563
+ * @param {Uint32Array} path_edges
4564
+ * @returns {number}
4565
+ */
4566
+ sweepWire(wire, path_edges) {
4567
+ const ptr0 = passArray32ToWasm0(path_edges, wasm.__wbindgen_malloc);
4568
+ const len0 = WASM_VECTOR_LEN;
4569
+ const ret = wasm.brepkernel_sweepWire(this.__wbg_ptr, wire, ptr0, len0);
4570
+ if (ret[2]) {
4571
+ throw takeFromExternrefTable0(ret[1]);
4572
+ }
4573
+ return ret[0] >>> 0;
4574
+ }
4474
4575
  /**
4475
4576
  * Sweep a face along a NURBS path with advanced options.
4476
4577
  *
@@ -5377,16 +5478,16 @@ export function __wbg___wbindgen_debug_string_4687d8d8c2017d52(arg0, arg1) {
5377
5478
  export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
5378
5479
  throw new Error(getStringFromWasm0(arg0, arg1));
5379
5480
  }
5380
- export function __wbg_error_2bb24ecdc4be6079(arg0, arg1) {
5481
+ export function __wbg_error_4a20274256028d35(arg0, arg1) {
5381
5482
  console.error(getStringFromWasm0(arg0, arg1));
5382
5483
  }
5383
5484
  export function __wbg_getRandomValues_436a51d0629d84e1() { return handleError(function (arg0, arg1) {
5384
5485
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
5385
5486
  }, arguments); }
5386
- export function __wbg_log_83fd8f58be00b574(arg0, arg1) {
5487
+ export function __wbg_log_5f26cd9bba971d84(arg0, arg1) {
5387
5488
  console.log(getStringFromWasm0(arg0, arg1));
5388
5489
  }
5389
- export function __wbg_warn_591c200c581c22fb(arg0, arg1) {
5490
+ export function __wbg_warn_81c30321dcc40fc6(arg0, arg1) {
5390
5491
  console.warn(getStringFromWasm0(arg0, arg1));
5391
5492
  }
5392
5493
  export function __wbindgen_generic_0000000000000001(arg0, arg1) {
Binary file
@@ -1298,6 +1298,30 @@ class BrepKernel {
1298
1298
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1299
1299
  return v1;
1300
1300
  }
1301
+ /**
1302
+ * Extrude an open wire along a direction vector into an open shell.
1303
+ *
1304
+ * Returns a shell handle (`u32`).
1305
+ *
1306
+ * # Errors
1307
+ *
1308
+ * Returns an error if an input is non-finite, the wire handle is invalid,
1309
+ * the extrusion has no length, the wire is closed, meets itself or breaks,
1310
+ * or a line runs along the extrusion.
1311
+ * @param {number} wire
1312
+ * @param {number} dir_x
1313
+ * @param {number} dir_y
1314
+ * @param {number} dir_z
1315
+ * @param {number} distance
1316
+ * @returns {number}
1317
+ */
1318
+ extrudeWire(wire, dir_x, dir_y, dir_z, distance) {
1319
+ const ret = wasm.brepkernel_extrudeWire(this.__wbg_ptr, wire, dir_x, dir_y, dir_z, distance);
1320
+ if (ret[2]) {
1321
+ throw takeFromExternrefTable0(ret[1]);
1322
+ }
1323
+ return ret[0] >>> 0;
1324
+ }
1301
1325
  /**
1302
1326
  * Extrude a planar face along a direction vector to create a solid.
1303
1327
  *
@@ -2686,6 +2710,28 @@ class BrepKernel {
2686
2710
  }
2687
2711
  return ret[0] >>> 0;
2688
2712
  }
2713
+ /**
2714
+ * Loft two or more open wires of equal edge counts into an open shell.
2715
+ *
2716
+ * Returns a shell handle (`u32`).
2717
+ *
2718
+ * # Errors
2719
+ *
2720
+ * Returns an error if a handle is invalid, fewer than two wires are given,
2721
+ * their edge counts differ, a wire is closed, meets itself or breaks, two
2722
+ * wires touch where they would be joined, or two lines cross or fold over.
2723
+ * @param {Uint32Array} wires
2724
+ * @returns {number}
2725
+ */
2726
+ loftWires(wires) {
2727
+ const ptr0 = passArray32ToWasm0(wires, wasm.__wbindgen_malloc);
2728
+ const len0 = WASM_VECTOR_LEN;
2729
+ const ret = wasm.brepkernel_loftWires(this.__wbg_ptr, ptr0, len0);
2730
+ if (ret[2]) {
2731
+ throw takeFromExternrefTable0(ret[1]);
2732
+ }
2733
+ return ret[0] >>> 0;
2734
+ }
2689
2735
  /**
2690
2736
  * Loft profiles with options for start/end points and ruled mode.
2691
2737
  *
@@ -4062,6 +4108,36 @@ class BrepKernel {
4062
4108
  }
4063
4109
  return ret[0] >>> 0;
4064
4110
  }
4111
+ /**
4112
+ * Revolve an open wire around an axis into an open shell.
4113
+ *
4114
+ * The axis is defined by an origin point `(ox, oy, oz)` and a direction
4115
+ * `(dx, dy, dz)`. The angle is in degrees and must be in (0, 360].
4116
+ *
4117
+ * Returns a shell handle (`u32`).
4118
+ *
4119
+ * # Errors
4120
+ *
4121
+ * Returns an error if an input is non-finite, the wire handle is invalid,
4122
+ * the axis has no length, the wire lies along the axis, an edge crosses the
4123
+ * axis, or the wire is closed, meets itself or breaks.
4124
+ * @param {number} wire
4125
+ * @param {number} ox
4126
+ * @param {number} oy
4127
+ * @param {number} oz
4128
+ * @param {number} dx
4129
+ * @param {number} dy
4130
+ * @param {number} dz
4131
+ * @param {number} angle_degrees
4132
+ * @returns {number}
4133
+ */
4134
+ revolveWire(wire, ox, oy, oz, dx, dy, dz, angle_degrees) {
4135
+ const ret = wasm.brepkernel_revolveWire(this.__wbg_ptr, wire, ox, oy, oz, dx, dy, dz, angle_degrees);
4136
+ if (ret[2]) {
4137
+ throw takeFromExternrefTable0(ret[1]);
4138
+ }
4139
+ return ret[0] >>> 0;
4140
+ }
4065
4141
  /**
4066
4142
  * Revolve a planar face around an axis to create a solid of revolution.
4067
4143
  *
@@ -4473,6 +4549,31 @@ class BrepKernel {
4473
4549
  }
4474
4550
  return ret[0] >>> 0;
4475
4551
  }
4552
+ /**
4553
+ * Sweep an open wire along a chain of path edges into an open shell.
4554
+ *
4555
+ * A straight path extrudes the wire and one circle or arc revolves it;
4556
+ * any other open, kink-free chain sweeps a NURBS face per wire edge.
4557
+ *
4558
+ * Returns a shell handle (`u32`).
4559
+ *
4560
+ * # Errors
4561
+ *
4562
+ * Returns an error if a handle is invalid, the chain has no edges, breaks,
4563
+ * closes or has a kink, or the wire is closed.
4564
+ * @param {number} wire
4565
+ * @param {Uint32Array} path_edges
4566
+ * @returns {number}
4567
+ */
4568
+ sweepWire(wire, path_edges) {
4569
+ const ptr0 = passArray32ToWasm0(path_edges, wasm.__wbindgen_malloc);
4570
+ const len0 = WASM_VECTOR_LEN;
4571
+ const ret = wasm.brepkernel_sweepWire(this.__wbg_ptr, wire, ptr0, len0);
4572
+ if (ret[2]) {
4573
+ throw takeFromExternrefTable0(ret[1]);
4574
+ }
4575
+ return ret[0] >>> 0;
4576
+ }
4476
4577
  /**
4477
4578
  * Sweep a face along a NURBS path with advanced options.
4478
4579
  *
@@ -5391,16 +5492,16 @@ function __wbg_get_imports() {
5391
5492
  __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
5392
5493
  throw new Error(getStringFromWasm0(arg0, arg1));
5393
5494
  },
5394
- __wbg_error_2bb24ecdc4be6079: function(arg0, arg1) {
5495
+ __wbg_error_4a20274256028d35: function(arg0, arg1) {
5395
5496
  console.error(getStringFromWasm0(arg0, arg1));
5396
5497
  },
5397
5498
  __wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
5398
5499
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
5399
5500
  }, arguments); },
5400
- __wbg_log_83fd8f58be00b574: function(arg0, arg1) {
5501
+ __wbg_log_5f26cd9bba971d84: function(arg0, arg1) {
5401
5502
  console.log(getStringFromWasm0(arg0, arg1));
5402
5503
  },
5403
- __wbg_warn_591c200c581c22fb: function(arg0, arg1) {
5504
+ __wbg_warn_81c30321dcc40fc6: function(arg0, arg1) {
5404
5505
  console.warn(getStringFromWasm0(arg0, arg1));
5405
5506
  },
5406
5507
  __wbindgen_generic_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": "4.6.30",
5
+ "version": "4.7.1",
6
6
  "license": "AGPL-3.0-only",
7
7
  "repository": {
8
8
  "type": "git",