brepkit-wasm 2.108.0 → 2.109.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
@@ -1643,6 +1643,20 @@ export class BrepKernel {
1643
1643
  * or if any edges cross.
1644
1644
  */
1645
1645
  polygonsIntersect2d(coords_a: Float64Array, coords_b: Float64Array): boolean;
1646
+ /**
1647
+ * Project a solid's edges onto a view plane with hidden-line removal.
1648
+ *
1649
+ * Viewed along `dir` (orthographic) through `origin`, with in-plane x-axis
1650
+ * `x_axis`. Returns a JSON string `{"visible": [[x,y,…]], "hidden": [[…]]}`
1651
+ * — flat 2D polylines in view coordinates. `hidden_lines = false` drops the
1652
+ * hidden set. Occlusion is an exact point-in-solid test.
1653
+ *
1654
+ * # Errors
1655
+ *
1656
+ * Returns an error for an invalid handle, a non-positive `deflection`, or a
1657
+ * degenerate `dir`/`x_axis`.
1658
+ */
1659
+ projectEdges(solid: number, origin_x: number, origin_y: number, origin_z: number, dir_x: number, dir_y: number, dir_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, hidden_lines: boolean, deflection: number): any;
1646
1660
  /**
1647
1661
  * Project a 3D point onto a face surface using Newton iteration.
1648
1662
  *
@@ -3644,6 +3644,39 @@ export class BrepKernel {
3644
3644
  }
3645
3645
  return ret[0] !== 0;
3646
3646
  }
3647
+ /**
3648
+ * Project a solid's edges onto a view plane with hidden-line removal.
3649
+ *
3650
+ * Viewed along `dir` (orthographic) through `origin`, with in-plane x-axis
3651
+ * `x_axis`. Returns a JSON string `{"visible": [[x,y,…]], "hidden": [[…]]}`
3652
+ * — flat 2D polylines in view coordinates. `hidden_lines = false` drops the
3653
+ * hidden set. Occlusion is an exact point-in-solid test.
3654
+ *
3655
+ * # Errors
3656
+ *
3657
+ * Returns an error for an invalid handle, a non-positive `deflection`, or a
3658
+ * degenerate `dir`/`x_axis`.
3659
+ * @param {number} solid
3660
+ * @param {number} origin_x
3661
+ * @param {number} origin_y
3662
+ * @param {number} origin_z
3663
+ * @param {number} dir_x
3664
+ * @param {number} dir_y
3665
+ * @param {number} dir_z
3666
+ * @param {number} x_axis_x
3667
+ * @param {number} x_axis_y
3668
+ * @param {number} x_axis_z
3669
+ * @param {boolean} hidden_lines
3670
+ * @param {number} deflection
3671
+ * @returns {any}
3672
+ */
3673
+ projectEdges(solid, origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, x_axis_x, x_axis_y, x_axis_z, hidden_lines, deflection) {
3674
+ const ret = wasm.brepkernel_projectEdges(this.__wbg_ptr, solid, origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, x_axis_x, x_axis_y, x_axis_z, hidden_lines, deflection);
3675
+ if (ret[2]) {
3676
+ throw takeFromExternrefTable0(ret[1]);
3677
+ }
3678
+ return takeFromExternrefTable0(ret[0]);
3679
+ }
3647
3680
  /**
3648
3681
  * Project a 3D point onto a face surface using Newton iteration.
3649
3682
  *
@@ -5028,13 +5061,13 @@ export function __wbg___wbindgen_debug_string_0accd80f45e5faa2(arg0, arg1) {
5028
5061
  export function __wbg___wbindgen_throw_1506f2235d1bdba0(arg0, arg1) {
5029
5062
  throw new Error(getStringFromWasm0(arg0, arg1));
5030
5063
  }
5031
- export function __wbg_error_466a5db4a220c274(arg0, arg1) {
5064
+ export function __wbg_error_b90644cfaa2e7810(arg0, arg1) {
5032
5065
  console.error(getStringFromWasm0(arg0, arg1));
5033
5066
  }
5034
- export function __wbg_log_6dbd295f9b944582(arg0, arg1) {
5067
+ export function __wbg_log_09b8ace0eff11254(arg0, arg1) {
5035
5068
  console.log(getStringFromWasm0(arg0, arg1));
5036
5069
  }
5037
- export function __wbg_warn_e4246fa70a08e9a6(arg0, arg1) {
5070
+ export function __wbg_warn_60c69ccb1a8dba56(arg0, arg1) {
5038
5071
  console.warn(getStringFromWasm0(arg0, arg1));
5039
5072
  }
5040
5073
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
Binary file
@@ -3646,6 +3646,39 @@ class BrepKernel {
3646
3646
  }
3647
3647
  return ret[0] !== 0;
3648
3648
  }
3649
+ /**
3650
+ * Project a solid's edges onto a view plane with hidden-line removal.
3651
+ *
3652
+ * Viewed along `dir` (orthographic) through `origin`, with in-plane x-axis
3653
+ * `x_axis`. Returns a JSON string `{"visible": [[x,y,…]], "hidden": [[…]]}`
3654
+ * — flat 2D polylines in view coordinates. `hidden_lines = false` drops the
3655
+ * hidden set. Occlusion is an exact point-in-solid test.
3656
+ *
3657
+ * # Errors
3658
+ *
3659
+ * Returns an error for an invalid handle, a non-positive `deflection`, or a
3660
+ * degenerate `dir`/`x_axis`.
3661
+ * @param {number} solid
3662
+ * @param {number} origin_x
3663
+ * @param {number} origin_y
3664
+ * @param {number} origin_z
3665
+ * @param {number} dir_x
3666
+ * @param {number} dir_y
3667
+ * @param {number} dir_z
3668
+ * @param {number} x_axis_x
3669
+ * @param {number} x_axis_y
3670
+ * @param {number} x_axis_z
3671
+ * @param {boolean} hidden_lines
3672
+ * @param {number} deflection
3673
+ * @returns {any}
3674
+ */
3675
+ projectEdges(solid, origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, x_axis_x, x_axis_y, x_axis_z, hidden_lines, deflection) {
3676
+ const ret = wasm.brepkernel_projectEdges(this.__wbg_ptr, solid, origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, x_axis_x, x_axis_y, x_axis_z, hidden_lines, deflection);
3677
+ if (ret[2]) {
3678
+ throw takeFromExternrefTable0(ret[1]);
3679
+ }
3680
+ return takeFromExternrefTable0(ret[0]);
3681
+ }
3649
3682
  /**
3650
3683
  * Project a 3D point onto a face surface using Newton iteration.
3651
3684
  *
@@ -5040,13 +5073,13 @@ function __wbg_get_imports() {
5040
5073
  __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
5041
5074
  throw new Error(getStringFromWasm0(arg0, arg1));
5042
5075
  },
5043
- __wbg_error_466a5db4a220c274: function(arg0, arg1) {
5076
+ __wbg_error_b90644cfaa2e7810: function(arg0, arg1) {
5044
5077
  console.error(getStringFromWasm0(arg0, arg1));
5045
5078
  },
5046
- __wbg_log_6dbd295f9b944582: function(arg0, arg1) {
5079
+ __wbg_log_09b8ace0eff11254: function(arg0, arg1) {
5047
5080
  console.log(getStringFromWasm0(arg0, arg1));
5048
5081
  },
5049
- __wbg_warn_e4246fa70a08e9a6: function(arg0, arg1) {
5082
+ __wbg_warn_60c69ccb1a8dba56: function(arg0, arg1) {
5050
5083
  console.warn(getStringFromWasm0(arg0, arg1));
5051
5084
  },
5052
5085
  __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.108.0",
5
+ "version": "2.109.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",