okgeometry-api 0.5.7 → 0.5.9

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.
@@ -179,13 +179,36 @@ export function mesh_boolean_intersection(vertex_count_a: number, buffer_a: Floa
179
179
  */
180
180
  export function mesh_boolean_operation(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
181
181
 
182
+ /**
183
+ * Debug helper: perform boolean operation with explicit backend and return a
184
+ * textual status, including kernel error reason on failure.
185
+ */
186
+ export function mesh_boolean_operation_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, backend: string): string;
187
+
182
188
  /**
183
189
  * Perform boolean operation and return stage-level profiling data followed by
184
190
  * the result mesh buffer.
185
191
  *
186
192
  * Output format:
187
- * [profile_len(=9), broadphase_ms, segments_ms, split_ms, classify_ms,
188
- * extract_ms, cleanup_ms, pair_accepted, pair_rejected, pair_degenerate,
193
+ * [profile_len(=53), broadphase_ms, segments_ms, split_ms, classify_ms,
194
+ * classify_seed_ms, classify_strict_ms, classify_open_component_ms,
195
+ * extract_ms, extract_primary_ms, extract_fallback_ms,
196
+ * cleanup_ms, finalize_ms, finalize_cap_ms, finalize_recap_ms, finalize_stitch_ms,
197
+ * pair_accepted, pair_rejected, pair_degenerate,
198
+ * core_passes, core_total_ms, conservative_runs, conservative_ms, nudge_runs, nudge_ms,
199
+ * recompose_runs, recompose_ms, repair_runs, repair_ms,
200
+ * repair_loops, repair_loops_capped, repair_loop_vertices, repair_loop_max_vertices,
201
+ * arrangement_adj_attempts, arrangement_adj_fast_hits, arrangement_adj_disabled_split_limit,
202
+ * arrangement_adj_fallback_no_half_edges, arrangement_adj_fallback_collect_failed,
203
+ * arrangement_adj_fallback_non_manifold, arrangement_adj_fallback_loop_mismatch,
204
+ * arrangement_adj_fallback_twin_mismatch, arrangement_adj_fallback_invalid_face_index,
205
+ * arrangement_adj_non_manifold_edges_total, arrangement_adj_non_manifold_limit_total,
206
+ * arrangement_adj_non_manifold_tolerated_attempts,
207
+ * arrangement_adj_fallback_non_manifold_excess_total,
208
+ * subtraction_ultra_cases, subtraction_ultra_component_fallback_runs,
209
+ * subtraction_ultra_open_bounds_total, subtraction_ultra_open_bounds_max,
210
+ * subtraction_ultra_best_boundary_total, subtraction_ultra_best_non_manifold_total,
211
+ * subtraction_ultra_scoped_faces_total, subtraction_ultra_scoped_faces_max,
189
212
  * mesh_buffer...]
190
213
  */
191
214
  export function mesh_boolean_operation_profiled(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
@@ -598,6 +621,7 @@ export interface InitOutput {
598
621
  readonly mesh_apply_matrix: (a: number, b: number, c: number, d: number, e: number) => [number, number];
599
622
  readonly mesh_boolean_intersection: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
600
623
  readonly mesh_boolean_operation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
624
+ readonly mesh_boolean_operation_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
601
625
  readonly mesh_boolean_operation_profiled: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
602
626
  readonly mesh_boolean_operation_profiled_with_backend: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
603
627
  readonly mesh_boolean_operation_with_backend: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
@@ -502,13 +502,62 @@ export function mesh_boolean_operation(vertex_count_a, buffer_a, vertex_count_b,
502
502
  return v4;
503
503
  }
504
504
 
505
+ /**
506
+ * Debug helper: perform boolean operation with explicit backend and return a
507
+ * textual status, including kernel error reason on failure.
508
+ * @param {number} vertex_count_a
509
+ * @param {Float64Array} buffer_a
510
+ * @param {number} vertex_count_b
511
+ * @param {Float64Array} buffer_b
512
+ * @param {string} operation
513
+ * @param {string} backend
514
+ * @returns {string}
515
+ */
516
+ export function mesh_boolean_operation_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, backend) {
517
+ let deferred5_0;
518
+ let deferred5_1;
519
+ try {
520
+ const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
521
+ const len0 = WASM_VECTOR_LEN;
522
+ const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
523
+ const len1 = WASM_VECTOR_LEN;
524
+ const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
525
+ const len2 = WASM_VECTOR_LEN;
526
+ const ptr3 = passStringToWasm0(backend, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
527
+ const len3 = WASM_VECTOR_LEN;
528
+ const ret = wasm.mesh_boolean_operation_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, ptr3, len3);
529
+ deferred5_0 = ret[0];
530
+ deferred5_1 = ret[1];
531
+ return getStringFromWasm0(ret[0], ret[1]);
532
+ } finally {
533
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
534
+ }
535
+ }
536
+
505
537
  /**
506
538
  * Perform boolean operation and return stage-level profiling data followed by
507
539
  * the result mesh buffer.
508
540
  *
509
541
  * Output format:
510
- * [profile_len(=9), broadphase_ms, segments_ms, split_ms, classify_ms,
511
- * extract_ms, cleanup_ms, pair_accepted, pair_rejected, pair_degenerate,
542
+ * [profile_len(=53), broadphase_ms, segments_ms, split_ms, classify_ms,
543
+ * classify_seed_ms, classify_strict_ms, classify_open_component_ms,
544
+ * extract_ms, extract_primary_ms, extract_fallback_ms,
545
+ * cleanup_ms, finalize_ms, finalize_cap_ms, finalize_recap_ms, finalize_stitch_ms,
546
+ * pair_accepted, pair_rejected, pair_degenerate,
547
+ * core_passes, core_total_ms, conservative_runs, conservative_ms, nudge_runs, nudge_ms,
548
+ * recompose_runs, recompose_ms, repair_runs, repair_ms,
549
+ * repair_loops, repair_loops_capped, repair_loop_vertices, repair_loop_max_vertices,
550
+ * arrangement_adj_attempts, arrangement_adj_fast_hits, arrangement_adj_disabled_split_limit,
551
+ * arrangement_adj_fallback_no_half_edges, arrangement_adj_fallback_collect_failed,
552
+ * arrangement_adj_fallback_non_manifold, arrangement_adj_fallback_loop_mismatch,
553
+ * arrangement_adj_fallback_twin_mismatch, arrangement_adj_fallback_invalid_face_index,
554
+ * arrangement_adj_non_manifold_edges_total, arrangement_adj_non_manifold_limit_total,
555
+ * arrangement_adj_non_manifold_tolerated_attempts,
556
+ * arrangement_adj_fallback_non_manifold_excess_total,
557
+ * subtraction_ultra_cases, subtraction_ultra_component_fallback_runs,
558
+ * subtraction_ultra_open_bounds_total, subtraction_ultra_open_bounds_max,
559
+ * subtraction_ultra_best_boundary_total, subtraction_ultra_best_non_manifold_total,
560
+ * subtraction_ultra_scoped_faces_total, subtraction_ultra_scoped_faces_max,
512
561
  * mesh_buffer...]
513
562
  * @param {number} vertex_count_a
514
563
  * @param {Float64Array} buffer_a
Binary file
@@ -27,6 +27,7 @@ export const make_nurbs_curves_compatible: (a: number, b: number) => [number, nu
27
27
  export const mesh_apply_matrix: (a: number, b: number, c: number, d: number, e: number) => [number, number];
28
28
  export const mesh_boolean_intersection: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
29
29
  export const mesh_boolean_operation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
30
+ export const mesh_boolean_operation_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
30
31
  export const mesh_boolean_operation_profiled: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
31
32
  export const mesh_boolean_operation_profiled_with_backend: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
32
33
  export const mesh_boolean_operation_with_backend: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];