brepkit-wasm 2.99.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
@@ -309,6 +309,17 @@ export class BrepKernel {
309
309
  * have 16 elements, or the matrix is singular.
310
310
  */
311
311
  copyAndTransformSolid(solid: number, matrix: Float64Array): number;
312
+ /**
313
+ * Deep copy a face, returning a new independent face handle.
314
+ *
315
+ * The copy shares no sub-entities with the original, so translating it
316
+ * (to form a pocket or boss profile) does not mutate the donor solid.
317
+ *
318
+ * # Errors
319
+ *
320
+ * Returns an error if the face handle is invalid.
321
+ */
322
+ copyFace(face: number): number;
312
323
  /**
313
324
  * Deep copy a solid, returning a new independent solid handle.
314
325
  *
@@ -1476,6 +1487,26 @@ export class BrepKernel {
1476
1487
  * Returns a new wire handle.
1477
1488
  */
1478
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;
1479
1510
  /**
1480
1511
  * Offset a wire on a planar face with a specific join type.
1481
1512
  *
@@ -645,6 +645,25 @@ export class BrepKernel {
645
645
  }
646
646
  return ret[0] >>> 0;
647
647
  }
648
+ /**
649
+ * Deep copy a face, returning a new independent face handle.
650
+ *
651
+ * The copy shares no sub-entities with the original, so translating it
652
+ * (to form a pocket or boss profile) does not mutate the donor solid.
653
+ *
654
+ * # Errors
655
+ *
656
+ * Returns an error if the face handle is invalid.
657
+ * @param {number} face
658
+ * @returns {number}
659
+ */
660
+ copyFace(face) {
661
+ const ret = wasm.brepkernel_copyFace(this.__wbg_ptr, face);
662
+ if (ret[2]) {
663
+ throw takeFromExternrefTable0(ret[1]);
664
+ }
665
+ return ret[0] >>> 0;
666
+ }
648
667
  /**
649
668
  * Deep copy a solid, returning a new independent solid handle.
650
669
  *
@@ -3280,6 +3299,38 @@ export class BrepKernel {
3280
3299
  }
3281
3300
  return ret[0] >>> 0;
3282
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
+ }
3283
3334
  /**
3284
3335
  * Offset a wire on a planar face with a specific join type.
3285
3336
  *
@@ -4727,13 +4778,13 @@ export function __wbg___wbindgen_debug_string_edece8177ad01481(arg0, arg1) {
4727
4778
  export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
4728
4779
  throw new Error(getStringFromWasm0(arg0, arg1));
4729
4780
  }
4730
- export function __wbg_error_9ba772860c65247a(arg0, arg1) {
4781
+ export function __wbg_error_b9eb833f50f08666(arg0, arg1) {
4731
4782
  console.error(getStringFromWasm0(arg0, arg1));
4732
4783
  }
4733
- export function __wbg_log_234d206c6b3856a1(arg0, arg1) {
4784
+ export function __wbg_log_514e8d13f9b2d14f(arg0, arg1) {
4734
4785
  console.log(getStringFromWasm0(arg0, arg1));
4735
4786
  }
4736
- export function __wbg_warn_6fd54fe402b279b0(arg0, arg1) {
4787
+ export function __wbg_warn_28bd82e4b953b6f1(arg0, arg1) {
4737
4788
  console.warn(getStringFromWasm0(arg0, arg1));
4738
4789
  }
4739
4790
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
Binary file
@@ -647,6 +647,25 @@ class BrepKernel {
647
647
  }
648
648
  return ret[0] >>> 0;
649
649
  }
650
+ /**
651
+ * Deep copy a face, returning a new independent face handle.
652
+ *
653
+ * The copy shares no sub-entities with the original, so translating it
654
+ * (to form a pocket or boss profile) does not mutate the donor solid.
655
+ *
656
+ * # Errors
657
+ *
658
+ * Returns an error if the face handle is invalid.
659
+ * @param {number} face
660
+ * @returns {number}
661
+ */
662
+ copyFace(face) {
663
+ const ret = wasm.brepkernel_copyFace(this.__wbg_ptr, face);
664
+ if (ret[2]) {
665
+ throw takeFromExternrefTable0(ret[1]);
666
+ }
667
+ return ret[0] >>> 0;
668
+ }
650
669
  /**
651
670
  * Deep copy a solid, returning a new independent solid handle.
652
671
  *
@@ -3282,6 +3301,38 @@ class BrepKernel {
3282
3301
  }
3283
3302
  return ret[0] >>> 0;
3284
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
+ }
3285
3336
  /**
3286
3337
  * Offset a wire on a planar face with a specific join type.
3287
3338
  *
@@ -4738,13 +4789,13 @@ function __wbg_get_imports() {
4738
4789
  __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
4739
4790
  throw new Error(getStringFromWasm0(arg0, arg1));
4740
4791
  },
4741
- __wbg_error_9ba772860c65247a: function(arg0, arg1) {
4792
+ __wbg_error_b9eb833f50f08666: function(arg0, arg1) {
4742
4793
  console.error(getStringFromWasm0(arg0, arg1));
4743
4794
  },
4744
- __wbg_log_234d206c6b3856a1: function(arg0, arg1) {
4795
+ __wbg_log_514e8d13f9b2d14f: function(arg0, arg1) {
4745
4796
  console.log(getStringFromWasm0(arg0, arg1));
4746
4797
  },
4747
- __wbg_warn_6fd54fe402b279b0: function(arg0, arg1) {
4798
+ __wbg_warn_28bd82e4b953b6f1: function(arg0, arg1) {
4748
4799
  console.warn(getStringFromWasm0(arg0, arg1));
4749
4800
  },
4750
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.99.0",
5
+ "version": "2.101.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",