okgeometry-api 1.9.0 → 1.10.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.
@@ -649,6 +649,15 @@ export function mesh_rotate(vertex_count: number, buffer: Float64Array, ax: numb
649
649
  */
650
650
  export function mesh_scale(vertex_count: number, buffer: Float64Array, sx: number, sy: number, sz: number): Float64Array;
651
651
 
652
+ /**
653
+ * Split a closed solid (mesh A) by a surface (mesh B) into BOTH capped solids.
654
+ * `outside` = the solid on the negative side of the surface, `inside` = the
655
+ * positive side; each is capped by the portion of the surface inside the
656
+ * solid, welded into a watertight result. Same packed layout as the other
657
+ * split exports.
658
+ */
659
+ export function mesh_solid_split_by_surface(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
660
+
652
661
  export function mesh_solid_split_plane(vertex_count: number, buffer: Float64Array, nx: number, ny: number, nz: number, d: number, operation: string): Float64Array;
653
662
 
654
663
  /**
@@ -1048,6 +1057,7 @@ export interface InitOutput {
1048
1057
  readonly mesh_raycast_many: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
1049
1058
  readonly mesh_rotate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
1050
1059
  readonly mesh_scale: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
1060
+ readonly mesh_solid_split_by_surface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
1051
1061
  readonly mesh_solid_split_plane: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
1052
1062
  readonly mesh_surface_difference_all: (a: number, b: number, c: number, d: number) => [number, number];
1053
1063
  readonly mesh_surface_split: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
@@ -2272,6 +2272,32 @@ export function mesh_scale(vertex_count, buffer, sx, sy, sz) {
2272
2272
  return v2;
2273
2273
  }
2274
2274
 
2275
+ /**
2276
+ * Split a closed solid (mesh A) by a surface (mesh B) into BOTH capped solids.
2277
+ * `outside` = the solid on the negative side of the surface, `inside` = the
2278
+ * positive side; each is capped by the portion of the surface inside the
2279
+ * solid, welded into a watertight result. Same packed layout as the other
2280
+ * split exports.
2281
+ * @param {number} vertex_count_a
2282
+ * @param {Float64Array} buffer_a
2283
+ * @param {number} vertex_count_b
2284
+ * @param {Float64Array} buffer_b
2285
+ * @param {string} operation
2286
+ * @returns {Float64Array}
2287
+ */
2288
+ export function mesh_solid_split_by_surface(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
2289
+ const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
2290
+ const len0 = WASM_VECTOR_LEN;
2291
+ const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
2292
+ const len1 = WASM_VECTOR_LEN;
2293
+ const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2294
+ const len2 = WASM_VECTOR_LEN;
2295
+ const ret = wasm.mesh_solid_split_by_surface(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
2296
+ var v4 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
2297
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
2298
+ return v4;
2299
+ }
2300
+
2275
2301
  /**
2276
2302
  * @param {number} vertex_count
2277
2303
  * @param {Float64Array} buffer