brepkit-wasm 2.100.0 → 2.101.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
@@ -1487,6 +1487,26 @@ export class BrepKernel {
1487
1487
  * Returns a new wire handle.
1488
1488
  */
1489
1489
  offsetWire(face: number, distance: number): number;
1490
+ /**
1491
+ * Offset a planar wire directly by a distance with a specific join type.
1492
+ *
1493
+ * Builds a planar face from the wire internally, then offsets it with
1494
+ * the requested corner join. This is the wire-based counterpart to
1495
+ * [`offset_wire_with_join_type`](Self::offset_wire_with_join_type),
1496
+ * which requires a face handle. Consumers that only hold a wire (such
1497
+ * as 2D sketch offsets) can route a join type through this entry point
1498
+ * without first constructing a face.
1499
+ *
1500
+ * `join_type` must be one of `"intersection"`, `"arc"`, or `"chamfer"`.
1501
+ * Returns a new wire handle.
1502
+ *
1503
+ * # Errors
1504
+ *
1505
+ * Returns an error if the wire handle is invalid, the wire is not
1506
+ * planar, the join type string is unrecognized, or the offset
1507
+ * operation fails.
1508
+ */
1509
+ offsetWire2DWithJoin(wire: number, distance: number, join_type: string): number;
1490
1510
  /**
1491
1511
  * Offset a wire on a planar face with a specific join type.
1492
1512
  *
@@ -3299,6 +3299,38 @@ export class BrepKernel {
3299
3299
  }
3300
3300
  return ret[0] >>> 0;
3301
3301
  }
3302
+ /**
3303
+ * Offset a planar wire directly by a distance with a specific join type.
3304
+ *
3305
+ * Builds a planar face from the wire internally, then offsets it with
3306
+ * the requested corner join. This is the wire-based counterpart to
3307
+ * [`offset_wire_with_join_type`](Self::offset_wire_with_join_type),
3308
+ * which requires a face handle. Consumers that only hold a wire (such
3309
+ * as 2D sketch offsets) can route a join type through this entry point
3310
+ * without first constructing a face.
3311
+ *
3312
+ * `join_type` must be one of `"intersection"`, `"arc"`, or `"chamfer"`.
3313
+ * Returns a new wire handle.
3314
+ *
3315
+ * # Errors
3316
+ *
3317
+ * Returns an error if the wire handle is invalid, the wire is not
3318
+ * planar, the join type string is unrecognized, or the offset
3319
+ * operation fails.
3320
+ * @param {number} wire
3321
+ * @param {number} distance
3322
+ * @param {string} join_type
3323
+ * @returns {number}
3324
+ */
3325
+ offsetWire2DWithJoin(wire, distance, join_type) {
3326
+ const ptr0 = passStringToWasm0(join_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3327
+ const len0 = WASM_VECTOR_LEN;
3328
+ const ret = wasm.brepkernel_offsetWire2DWithJoin(this.__wbg_ptr, wire, distance, ptr0, len0);
3329
+ if (ret[2]) {
3330
+ throw takeFromExternrefTable0(ret[1]);
3331
+ }
3332
+ return ret[0] >>> 0;
3333
+ }
3302
3334
  /**
3303
3335
  * Offset a wire on a planar face with a specific join type.
3304
3336
  *
@@ -4746,13 +4778,13 @@ export function __wbg___wbindgen_debug_string_edece8177ad01481(arg0, arg1) {
4746
4778
  export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
4747
4779
  throw new Error(getStringFromWasm0(arg0, arg1));
4748
4780
  }
4749
- export function __wbg_error_3993245e93912188(arg0, arg1) {
4781
+ export function __wbg_error_b9eb833f50f08666(arg0, arg1) {
4750
4782
  console.error(getStringFromWasm0(arg0, arg1));
4751
4783
  }
4752
- export function __wbg_log_dd3109e21780f5a5(arg0, arg1) {
4784
+ export function __wbg_log_514e8d13f9b2d14f(arg0, arg1) {
4753
4785
  console.log(getStringFromWasm0(arg0, arg1));
4754
4786
  }
4755
- export function __wbg_warn_6d8deb96e1629b5d(arg0, arg1) {
4787
+ export function __wbg_warn_28bd82e4b953b6f1(arg0, arg1) {
4756
4788
  console.warn(getStringFromWasm0(arg0, arg1));
4757
4789
  }
4758
4790
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
Binary file
@@ -3301,6 +3301,38 @@ class BrepKernel {
3301
3301
  }
3302
3302
  return ret[0] >>> 0;
3303
3303
  }
3304
+ /**
3305
+ * Offset a planar wire directly by a distance with a specific join type.
3306
+ *
3307
+ * Builds a planar face from the wire internally, then offsets it with
3308
+ * the requested corner join. This is the wire-based counterpart to
3309
+ * [`offset_wire_with_join_type`](Self::offset_wire_with_join_type),
3310
+ * which requires a face handle. Consumers that only hold a wire (such
3311
+ * as 2D sketch offsets) can route a join type through this entry point
3312
+ * without first constructing a face.
3313
+ *
3314
+ * `join_type` must be one of `"intersection"`, `"arc"`, or `"chamfer"`.
3315
+ * Returns a new wire handle.
3316
+ *
3317
+ * # Errors
3318
+ *
3319
+ * Returns an error if the wire handle is invalid, the wire is not
3320
+ * planar, the join type string is unrecognized, or the offset
3321
+ * operation fails.
3322
+ * @param {number} wire
3323
+ * @param {number} distance
3324
+ * @param {string} join_type
3325
+ * @returns {number}
3326
+ */
3327
+ offsetWire2DWithJoin(wire, distance, join_type) {
3328
+ const ptr0 = passStringToWasm0(join_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3329
+ const len0 = WASM_VECTOR_LEN;
3330
+ const ret = wasm.brepkernel_offsetWire2DWithJoin(this.__wbg_ptr, wire, distance, ptr0, len0);
3331
+ if (ret[2]) {
3332
+ throw takeFromExternrefTable0(ret[1]);
3333
+ }
3334
+ return ret[0] >>> 0;
3335
+ }
3304
3336
  /**
3305
3337
  * Offset a wire on a planar face with a specific join type.
3306
3338
  *
@@ -4757,13 +4789,13 @@ function __wbg_get_imports() {
4757
4789
  __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
4758
4790
  throw new Error(getStringFromWasm0(arg0, arg1));
4759
4791
  },
4760
- __wbg_error_3993245e93912188: function(arg0, arg1) {
4792
+ __wbg_error_b9eb833f50f08666: function(arg0, arg1) {
4761
4793
  console.error(getStringFromWasm0(arg0, arg1));
4762
4794
  },
4763
- __wbg_log_dd3109e21780f5a5: function(arg0, arg1) {
4795
+ __wbg_log_514e8d13f9b2d14f: function(arg0, arg1) {
4764
4796
  console.log(getStringFromWasm0(arg0, arg1));
4765
4797
  },
4766
- __wbg_warn_6d8deb96e1629b5d: function(arg0, arg1) {
4798
+ __wbg_warn_28bd82e4b953b6f1: function(arg0, arg1) {
4767
4799
  console.warn(getStringFromWasm0(arg0, arg1));
4768
4800
  },
4769
4801
  __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.100.0",
5
+ "version": "2.101.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",