okgeometry-api 1.23.0 → 1.25.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.
@@ -795,6 +795,17 @@ export function mesh_extrude_face(vertex_count: number, buffer: Float64Array, fa
795
795
  */
796
796
  export function mesh_extrude_planar_curve(coords: Float64Array, nx: number, ny: number, nz: number, height: number, closed: boolean): Float64Array;
797
797
 
798
+ /**
799
+ * Feature-edge chains of a mesh for chamfer highlighting: every connected
800
+ * chain of edges separating the same two smooth face groups — the exact
801
+ * grouping `mesh_chamfer_edges` expands picks to, so highlighting a chain
802
+ * shows precisely what one pick will chamfer. Packed as
803
+ * `[chainCount, (closed, pointCount, x,y,z ...)...]`; closed chains omit the
804
+ * duplicate seam point. A mesh with no feature edges returns `[0]`; an
805
+ * invalid mesh returns an empty buffer (see `geometry_last_error`).
806
+ */
807
+ export function mesh_feature_edge_chains(vertex_count: number, buffer: Float64Array): Float64Array;
808
+
798
809
  /**
799
810
  * Find the best matching coplanar connected face group by normal and optional near-point.
800
811
  * Output format: [centroidX, centroidY, centroidZ, normalX, normalY, normalZ] or [].
@@ -1678,6 +1689,7 @@ export interface InitOutput {
1678
1689
  readonly mesh_export_stl_binary: (a: number, b: number, c: number) => [number, number];
1679
1690
  readonly mesh_extrude_face: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1680
1691
  readonly mesh_extrude_planar_curve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
1692
+ readonly mesh_feature_edge_chains: (a: number, b: number, c: number) => [number, number];
1681
1693
  readonly mesh_find_face_group_by_normal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
1682
1694
  readonly mesh_find_face_group_by_triangle_index: (a: number, b: number, c: number, d: number) => [number, number];
1683
1695
  readonly mesh_get_bounds: (a: number, b: number, c: number) => [number, number];
@@ -2438,6 +2438,27 @@ export function mesh_extrude_planar_curve(coords, nx, ny, nz, height, closed) {
2438
2438
  return v2;
2439
2439
  }
2440
2440
 
2441
+ /**
2442
+ * Feature-edge chains of a mesh for chamfer highlighting: every connected
2443
+ * chain of edges separating the same two smooth face groups — the exact
2444
+ * grouping `mesh_chamfer_edges` expands picks to, so highlighting a chain
2445
+ * shows precisely what one pick will chamfer. Packed as
2446
+ * `[chainCount, (closed, pointCount, x,y,z ...)...]`; closed chains omit the
2447
+ * duplicate seam point. A mesh with no feature edges returns `[0]`; an
2448
+ * invalid mesh returns an empty buffer (see `geometry_last_error`).
2449
+ * @param {number} vertex_count
2450
+ * @param {Float64Array} buffer
2451
+ * @returns {Float64Array}
2452
+ */
2453
+ export function mesh_feature_edge_chains(vertex_count, buffer) {
2454
+ const ptr0 = passArrayF64ToWasm0(buffer, wasm.__wbindgen_malloc);
2455
+ const len0 = WASM_VECTOR_LEN;
2456
+ const ret = wasm.mesh_feature_edge_chains(vertex_count, ptr0, len0);
2457
+ var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
2458
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
2459
+ return v2;
2460
+ }
2461
+
2441
2462
  /**
2442
2463
  * Find the best matching coplanar connected face group by normal and optional near-point.
2443
2464
  * Output format: [centroidX, centroidY, centroidZ, normalX, normalY, normalZ] or [].