okgeometry-api 1.1.19 → 1.1.21
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/dist/Mesh.d.ts.map +1 -1
- package/dist/Mesh.js +48 -6
- package/dist/Mesh.js.map +1 -1
- package/dist/wasm-base64.d.ts +1 -1
- package/dist/wasm-base64.d.ts.map +1 -1
- package/dist/wasm-base64.js +1 -1
- package/dist/wasm-base64.js.map +1 -1
- package/dist/wasm-bindings.d.ts +160 -98
- package/dist/wasm-bindings.d.ts.map +1 -1
- package/dist/wasm-bindings.js +480 -162
- package/dist/wasm-bindings.js.map +1 -1
- package/package.json +5 -10
- package/src/Mesh.ts +84 -48
- package/src/wasm-base64.ts +1 -1
- package/src/wasm-bindings.d.ts +78 -91
- package/src/wasm-bindings.js +476 -162
package/dist/wasm-bindings.js
CHANGED
|
@@ -427,6 +427,26 @@ export function mesh_apply_matrix(vertex_count, buffer, matrix) {
|
|
|
427
427
|
return v3;
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
|
+
* Perform boolean intersection on two meshes
|
|
431
|
+
* @param {number} vertex_count_a
|
|
432
|
+
* @param {Float64Array} buffer_a
|
|
433
|
+
* @param {number} vertex_count_b
|
|
434
|
+
* @param {Float64Array} buffer_b
|
|
435
|
+
* @returns {Float64Array}
|
|
436
|
+
*/
|
|
437
|
+
export function mesh_boolean_intersection(vertex_count_a, buffer_a, vertex_count_b, buffer_b) {
|
|
438
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
439
|
+
const len0 = WASM_VECTOR_LEN;
|
|
440
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
441
|
+
const len1 = WASM_VECTOR_LEN;
|
|
442
|
+
const ret = wasm.mesh_boolean_intersection(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1);
|
|
443
|
+
var v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
444
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
445
|
+
return v3;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Debug helper: run the live kernel-mesh boolean entrypoint and surface the
|
|
449
|
+
* exact error instead of collapsing it into an empty output buffer.
|
|
430
450
|
* @param {number} vertex_count_a
|
|
431
451
|
* @param {Float64Array} buffer_a
|
|
432
452
|
* @param {number} vertex_count_b
|
|
@@ -434,7 +454,7 @@ export function mesh_apply_matrix(vertex_count, buffer, matrix) {
|
|
|
434
454
|
* @param {string} operation
|
|
435
455
|
* @returns {string}
|
|
436
456
|
*/
|
|
437
|
-
export function
|
|
457
|
+
export function mesh_boolean_kernel_mesh_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
438
458
|
let deferred4_0;
|
|
439
459
|
let deferred4_1;
|
|
440
460
|
try {
|
|
@@ -444,7 +464,7 @@ export function mesh_boolean_finalize_stage_summary_debug(vertex_count_a, buffer
|
|
|
444
464
|
const len1 = WASM_VECTOR_LEN;
|
|
445
465
|
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
446
466
|
const len2 = WASM_VECTOR_LEN;
|
|
447
|
-
const ret = wasm.
|
|
467
|
+
const ret = wasm.mesh_boolean_kernel_mesh_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
448
468
|
deferred4_0 = ret[0];
|
|
449
469
|
deferred4_1 = ret[1];
|
|
450
470
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -454,29 +474,69 @@ export function mesh_boolean_finalize_stage_summary_debug(vertex_count_a, buffer
|
|
|
454
474
|
}
|
|
455
475
|
}
|
|
456
476
|
/**
|
|
457
|
-
*
|
|
477
|
+
* @returns {number}
|
|
478
|
+
*/
|
|
479
|
+
export function mesh_boolean_last_debug_marker() {
|
|
480
|
+
const ret = wasm.mesh_boolean_last_debug_marker();
|
|
481
|
+
return ret >>> 0;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
458
484
|
* @param {number} vertex_count_a
|
|
459
485
|
* @param {Float64Array} buffer_a
|
|
460
486
|
* @param {number} vertex_count_b
|
|
461
487
|
* @param {Float64Array} buffer_b
|
|
462
|
-
* @
|
|
488
|
+
* @param {string} operation
|
|
489
|
+
* @param {string} cleanup_stage
|
|
490
|
+
* @returns {string}
|
|
463
491
|
*/
|
|
464
|
-
export function
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
492
|
+
export function mesh_boolean_manifold_port_cleanup_triangle_dump(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, cleanup_stage) {
|
|
493
|
+
let deferred5_0;
|
|
494
|
+
let deferred5_1;
|
|
495
|
+
try {
|
|
496
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
498
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
499
|
+
const len1 = WASM_VECTOR_LEN;
|
|
500
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
501
|
+
const len2 = WASM_VECTOR_LEN;
|
|
502
|
+
const ptr3 = passStringToWasm0(cleanup_stage, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
503
|
+
const len3 = WASM_VECTOR_LEN;
|
|
504
|
+
const ret = wasm.mesh_boolean_manifold_port_cleanup_triangle_dump(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
505
|
+
deferred5_0 = ret[0];
|
|
506
|
+
deferred5_1 = ret[1];
|
|
507
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
508
|
+
}
|
|
509
|
+
finally {
|
|
510
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
511
|
+
}
|
|
473
512
|
}
|
|
474
513
|
/**
|
|
475
|
-
* @
|
|
514
|
+
* @param {number} vertex_count_a
|
|
515
|
+
* @param {Float64Array} buffer_a
|
|
516
|
+
* @param {number} vertex_count_b
|
|
517
|
+
* @param {Float64Array} buffer_b
|
|
518
|
+
* @param {string} operation
|
|
519
|
+
* @param {number} face_index
|
|
520
|
+
* @returns {string}
|
|
476
521
|
*/
|
|
477
|
-
export function
|
|
478
|
-
|
|
479
|
-
|
|
522
|
+
export function mesh_boolean_manifold_port_face2tri_face_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, face_index) {
|
|
523
|
+
let deferred4_0;
|
|
524
|
+
let deferred4_1;
|
|
525
|
+
try {
|
|
526
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
527
|
+
const len0 = WASM_VECTOR_LEN;
|
|
528
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
529
|
+
const len1 = WASM_VECTOR_LEN;
|
|
530
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
531
|
+
const len2 = WASM_VECTOR_LEN;
|
|
532
|
+
const ret = wasm.mesh_boolean_manifold_port_face2tri_face_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, face_index);
|
|
533
|
+
deferred4_0 = ret[0];
|
|
534
|
+
deferred4_1 = ret[1];
|
|
535
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
536
|
+
}
|
|
537
|
+
finally {
|
|
538
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
539
|
+
}
|
|
480
540
|
}
|
|
481
541
|
/**
|
|
482
542
|
* @param {number} vertex_count_a
|
|
@@ -484,23 +544,31 @@ export function mesh_boolean_last_debug_marker() {
|
|
|
484
544
|
* @param {number} vertex_count_b
|
|
485
545
|
* @param {Float64Array} buffer_b
|
|
486
546
|
* @param {string} operation
|
|
487
|
-
* @
|
|
547
|
+
* @param {number} face_index
|
|
548
|
+
* @param {number} rotate_offset
|
|
549
|
+
* @param {boolean} reverse
|
|
550
|
+
* @returns {string}
|
|
488
551
|
*/
|
|
489
|
-
export function
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
552
|
+
export function mesh_boolean_manifold_port_face2tri_face_transform_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, face_index, rotate_offset, reverse) {
|
|
553
|
+
let deferred4_0;
|
|
554
|
+
let deferred4_1;
|
|
555
|
+
try {
|
|
556
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
557
|
+
const len0 = WASM_VECTOR_LEN;
|
|
558
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
559
|
+
const len1 = WASM_VECTOR_LEN;
|
|
560
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
561
|
+
const len2 = WASM_VECTOR_LEN;
|
|
562
|
+
const ret = wasm.mesh_boolean_manifold_port_face2tri_face_transform_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, face_index, rotate_offset, reverse);
|
|
563
|
+
deferred4_0 = ret[0];
|
|
564
|
+
deferred4_1 = ret[1];
|
|
565
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
566
|
+
}
|
|
567
|
+
finally {
|
|
568
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
569
|
+
}
|
|
500
570
|
}
|
|
501
571
|
/**
|
|
502
|
-
* Debug helper: perform boolean operation and return a textual status,
|
|
503
|
-
* including kernel error reason on failure.
|
|
504
572
|
* @param {number} vertex_count_a
|
|
505
573
|
* @param {Float64Array} buffer_a
|
|
506
574
|
* @param {number} vertex_count_b
|
|
@@ -508,7 +576,7 @@ export function mesh_boolean_operation(vertex_count_a, buffer_a, vertex_count_b,
|
|
|
508
576
|
* @param {string} operation
|
|
509
577
|
* @returns {string}
|
|
510
578
|
*/
|
|
511
|
-
export function
|
|
579
|
+
export function mesh_boolean_manifold_port_final_triangle_dump(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
512
580
|
let deferred4_0;
|
|
513
581
|
let deferred4_1;
|
|
514
582
|
try {
|
|
@@ -518,7 +586,7 @@ export function mesh_boolean_operation_debug(vertex_count_a, buffer_a, vertex_co
|
|
|
518
586
|
const len1 = WASM_VECTOR_LEN;
|
|
519
587
|
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
520
588
|
const len2 = WASM_VECTOR_LEN;
|
|
521
|
-
const ret = wasm.
|
|
589
|
+
const ret = wasm.mesh_boolean_manifold_port_final_triangle_dump(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
522
590
|
deferred4_0 = ret[0];
|
|
523
591
|
deferred4_1 = ret[1];
|
|
524
592
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -528,98 +596,31 @@ export function mesh_boolean_operation_debug(vertex_count_a, buffer_a, vertex_co
|
|
|
528
596
|
}
|
|
529
597
|
}
|
|
530
598
|
/**
|
|
531
|
-
* Perform boolean operation and return stage-level profiling data followed by
|
|
532
|
-
* the result mesh buffer.
|
|
533
|
-
*
|
|
534
|
-
* Output format:
|
|
535
|
-
* [profile_len(=95), broadphase_ms, segments_ms, split_ms,
|
|
536
|
-
* split_touched_faces_a, split_source_faces_a, split_touched_faces_b, split_source_faces_b,
|
|
537
|
-
* classify_ms, classify_seed_ms, classify_strict_ms, classify_open_component_ms,
|
|
538
|
-
* extract_ms, extract_primary_ms, extract_fallback_ms,
|
|
539
|
-
* cleanup_ms, finalize_ms, finalize_cap_ms, finalize_recap_ms, finalize_stitch_ms,
|
|
540
|
-
* pair_accepted, pair_rejected, pair_degenerate,
|
|
541
|
-
* core_passes, core_total_ms, conservative_runs, conservative_ms, nudge_runs, nudge_ms,
|
|
542
|
-
* recompose_runs, recompose_ms, repair_runs, repair_ms,
|
|
543
|
-
* repair_loops, repair_loops_capped, repair_loop_vertices, repair_loop_max_vertices,
|
|
544
|
-
* arrangement_adj_attempts, arrangement_adj_fast_hits, arrangement_adj_disabled_split_limit,
|
|
545
|
-
* arrangement_adj_fallback_no_half_edges, arrangement_adj_fallback_collect_failed,
|
|
546
|
-
* arrangement_adj_fallback_non_manifold, arrangement_adj_fallback_loop_mismatch,
|
|
547
|
-
* arrangement_adj_fallback_twin_mismatch, arrangement_adj_fallback_invalid_face_index,
|
|
548
|
-
* arrangement_adj_non_manifold_edges_total, arrangement_adj_non_manifold_limit_total,
|
|
549
|
-
* arrangement_adj_non_manifold_tolerated_attempts,
|
|
550
|
-
* arrangement_adj_fallback_non_manifold_excess_total,
|
|
551
|
-
* subtraction_ultra_cases, subtraction_ultra_component_fallback_runs,
|
|
552
|
-
* subtraction_ultra_open_bounds_total, subtraction_ultra_open_bounds_max,
|
|
553
|
-
* subtraction_ultra_best_boundary_total, subtraction_ultra_best_non_manifold_total,
|
|
554
|
-
* subtraction_ultra_scoped_faces_total, subtraction_ultra_scoped_faces_max,
|
|
555
|
-
* subtraction_ultra_scoped_strict_evals_total, subtraction_ultra_scoped_strict_evals_max,
|
|
556
|
-
* finalize_stitch_rebuild_ms, finalize_stitch_recap_ms,
|
|
557
|
-
* finalize_stitch_attempts, finalize_stitch_kept,
|
|
558
|
-
* finalize_stitch_rebuild_collect_ms, finalize_stitch_rebuild_weld_ms,
|
|
559
|
-
* finalize_stitch_rebuild_commit_ms, finalize_stitch_rebuild_faces_in,
|
|
560
|
-
* finalize_stitch_rebuild_faces_out,
|
|
561
|
-
* whole_partial_attempts, whole_partial_accepts,
|
|
562
|
-
* whole_partial_total_ms, whole_partial_split_ms,
|
|
563
|
-
* whole_partial_boundary_build_ms,
|
|
564
|
-
* whole_partial_split_triangle_fast_faces,
|
|
565
|
-
* whole_partial_split_cdt_faces,
|
|
566
|
-
* whole_partial_split_cdt_points_total,
|
|
567
|
-
* whole_partial_split_cdt_constraints_total,
|
|
568
|
-
* whole_partial_split_cdt_segment_constraints_total,
|
|
569
|
-
* whole_partial_split_cdt_triangles_total,
|
|
570
|
-
* whole_partial_triangle_cdt_single_segment_faces,
|
|
571
|
-
* whole_partial_triangle_cdt_two_segment_faces,
|
|
572
|
-
* whole_partial_triangle_cdt_three_plus_segment_faces,
|
|
573
|
-
* whole_partial_triangle_cdt_all_boundary_segment_faces,
|
|
574
|
-
* whole_partial_triangle_cdt_mixed_boundary_segment_faces,
|
|
575
|
-
* whole_partial_triangle_cdt_any_interior_segment_faces,
|
|
576
|
-
* whole_partial_classify_source_ms, whole_partial_classify_touched_ms,
|
|
577
|
-
* whole_partial_extract_ms, whole_partial_extract_untouched_ms,
|
|
578
|
-
* whole_partial_extract_interface_ms, whole_partial_extract_touched_ms,
|
|
579
|
-
* whole_partial_finalize_ms,
|
|
580
|
-
* whole_partial_interface_faces_total,
|
|
581
|
-
* whole_partial_interface_faces_emitted,
|
|
582
|
-
* whole_partial_interface_boundary_edge_hits,
|
|
583
|
-
* whole_partial_interface_raw_edge_fallbacks,
|
|
584
|
-
* whole_partial_touched_faces_total,
|
|
585
|
-
* whole_partial_touched_faces_emitted,
|
|
586
|
-
* whole_partial_touched_patch_attempts,
|
|
587
|
-
* whole_partial_touched_patch_direct_regions,
|
|
588
|
-
* whole_partial_touched_patch_triangulated_faces,
|
|
589
|
-
* whole_partial_touched_fallback_faces,
|
|
590
|
-
* whole_partial_touched_lineage_vertices,
|
|
591
|
-
* whole_partial_touched_welded_vertices,
|
|
592
|
-
* whole_partial_raw_boundary_untouched_edges,
|
|
593
|
-
* whole_partial_raw_boundary_interface_edges,
|
|
594
|
-
* whole_partial_raw_boundary_touched_edges,
|
|
595
|
-
* whole_partial_raw_boundary_mixed_edges,
|
|
596
|
-
* whole_partial_raw_non_manifold_untouched_edges,
|
|
597
|
-
* whole_partial_raw_non_manifold_interface_edges,
|
|
598
|
-
* whole_partial_raw_non_manifold_touched_edges,
|
|
599
|
-
* whole_partial_raw_non_manifold_mixed_edges,
|
|
600
|
-
* whole_partial_boundary_edges_total,
|
|
601
|
-
* whole_partial_non_manifold_edges_total,
|
|
602
|
-
* whole_partial_face_ratio_vs_a_total,
|
|
603
|
-
* whole_partial_loop_plausible_total,
|
|
604
|
-
* mesh_buffer...]
|
|
605
599
|
* @param {number} vertex_count_a
|
|
606
600
|
* @param {Float64Array} buffer_a
|
|
607
601
|
* @param {number} vertex_count_b
|
|
608
602
|
* @param {Float64Array} buffer_b
|
|
609
603
|
* @param {string} operation
|
|
610
|
-
* @returns {
|
|
604
|
+
* @returns {string}
|
|
611
605
|
*/
|
|
612
|
-
export function
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
606
|
+
export function mesh_boolean_manifold_port_flag_edge_attempts_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
607
|
+
let deferred4_0;
|
|
608
|
+
let deferred4_1;
|
|
609
|
+
try {
|
|
610
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
611
|
+
const len0 = WASM_VECTOR_LEN;
|
|
612
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
613
|
+
const len1 = WASM_VECTOR_LEN;
|
|
614
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
615
|
+
const len2 = WASM_VECTOR_LEN;
|
|
616
|
+
const ret = wasm.mesh_boolean_manifold_port_flag_edge_attempts_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
617
|
+
deferred4_0 = ret[0];
|
|
618
|
+
deferred4_1 = ret[1];
|
|
619
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
620
|
+
}
|
|
621
|
+
finally {
|
|
622
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
623
|
+
}
|
|
623
624
|
}
|
|
624
625
|
/**
|
|
625
626
|
* @param {number} vertex_count_a
|
|
@@ -629,7 +630,7 @@ export function mesh_boolean_operation_profiled(vertex_count_a, buffer_a, vertex
|
|
|
629
630
|
* @param {string} operation
|
|
630
631
|
* @returns {string}
|
|
631
632
|
*/
|
|
632
|
-
export function
|
|
633
|
+
export function mesh_boolean_manifold_port_intersections_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
633
634
|
let deferred4_0;
|
|
634
635
|
let deferred4_1;
|
|
635
636
|
try {
|
|
@@ -639,7 +640,7 @@ export function mesh_boolean_primary_output_summary_debug(vertex_count_a, buffer
|
|
|
639
640
|
const len1 = WASM_VECTOR_LEN;
|
|
640
641
|
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
641
642
|
const len2 = WASM_VECTOR_LEN;
|
|
642
|
-
const ret = wasm.
|
|
643
|
+
const ret = wasm.mesh_boolean_manifold_port_intersections_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
643
644
|
deferred4_0 = ret[0];
|
|
644
645
|
deferred4_1 = ret[1];
|
|
645
646
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -649,40 +650,235 @@ export function mesh_boolean_primary_output_summary_debug(vertex_count_a, buffer
|
|
|
649
650
|
}
|
|
650
651
|
}
|
|
651
652
|
/**
|
|
652
|
-
* Perform boolean subtraction on two meshes (A - B)
|
|
653
653
|
* @param {number} vertex_count_a
|
|
654
654
|
* @param {Float64Array} buffer_a
|
|
655
655
|
* @param {number} vertex_count_b
|
|
656
656
|
* @param {Float64Array} buffer_b
|
|
657
|
-
* @
|
|
657
|
+
* @param {string} operation
|
|
658
|
+
* @param {number} face_p
|
|
659
|
+
* @param {number} face_q
|
|
660
|
+
* @returns {string}
|
|
658
661
|
*/
|
|
659
|
-
export function
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
662
|
+
export function mesh_boolean_manifold_port_new_edge_bucket_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, face_p, face_q) {
|
|
663
|
+
let deferred4_0;
|
|
664
|
+
let deferred4_1;
|
|
665
|
+
try {
|
|
666
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
667
|
+
const len0 = WASM_VECTOR_LEN;
|
|
668
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
669
|
+
const len1 = WASM_VECTOR_LEN;
|
|
670
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
671
|
+
const len2 = WASM_VECTOR_LEN;
|
|
672
|
+
const ret = wasm.mesh_boolean_manifold_port_new_edge_bucket_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, face_p, face_q);
|
|
673
|
+
deferred4_0 = ret[0];
|
|
674
|
+
deferred4_1 = ret[1];
|
|
675
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
676
|
+
}
|
|
677
|
+
finally {
|
|
678
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* @param {string} cleanup_stage
|
|
683
|
+
* @returns {string}
|
|
684
|
+
*/
|
|
685
|
+
export function mesh_boolean_manifold_port_overlap_boxes_cleanup_triangle_dump(cleanup_stage) {
|
|
686
|
+
let deferred2_0;
|
|
687
|
+
let deferred2_1;
|
|
688
|
+
try {
|
|
689
|
+
const ptr0 = passStringToWasm0(cleanup_stage, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
690
|
+
const len0 = WASM_VECTOR_LEN;
|
|
691
|
+
const ret = wasm.mesh_boolean_manifold_port_overlap_boxes_cleanup_triangle_dump(ptr0, len0);
|
|
692
|
+
deferred2_0 = ret[0];
|
|
693
|
+
deferred2_1 = ret[1];
|
|
694
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
695
|
+
}
|
|
696
|
+
finally {
|
|
697
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* @param {number} face_index
|
|
702
|
+
* @returns {string}
|
|
703
|
+
*/
|
|
704
|
+
export function mesh_boolean_manifold_port_overlap_boxes_face2tri_face_debug(face_index) {
|
|
705
|
+
let deferred1_0;
|
|
706
|
+
let deferred1_1;
|
|
707
|
+
try {
|
|
708
|
+
const ret = wasm.mesh_boolean_manifold_port_overlap_boxes_face2tri_face_debug(face_index);
|
|
709
|
+
deferred1_0 = ret[0];
|
|
710
|
+
deferred1_1 = ret[1];
|
|
711
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
712
|
+
}
|
|
713
|
+
finally {
|
|
714
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
715
|
+
}
|
|
668
716
|
}
|
|
669
717
|
/**
|
|
670
|
-
* Perform boolean union on two meshes
|
|
671
718
|
* @param {number} vertex_count_a
|
|
672
719
|
* @param {Float64Array} buffer_a
|
|
673
720
|
* @param {number} vertex_count_b
|
|
674
721
|
* @param {Float64Array} buffer_b
|
|
675
|
-
* @
|
|
722
|
+
* @param {string} operation
|
|
723
|
+
* @param {number} face_index
|
|
724
|
+
* @returns {string}
|
|
676
725
|
*/
|
|
677
|
-
export function
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
726
|
+
export function mesh_boolean_manifold_port_raw_face_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, face_index) {
|
|
727
|
+
let deferred4_0;
|
|
728
|
+
let deferred4_1;
|
|
729
|
+
try {
|
|
730
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
731
|
+
const len0 = WASM_VECTOR_LEN;
|
|
732
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
733
|
+
const len1 = WASM_VECTOR_LEN;
|
|
734
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
735
|
+
const len2 = WASM_VECTOR_LEN;
|
|
736
|
+
const ret = wasm.mesh_boolean_manifold_port_raw_face_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, face_index);
|
|
737
|
+
deferred4_0 = ret[0];
|
|
738
|
+
deferred4_1 = ret[1];
|
|
739
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
740
|
+
}
|
|
741
|
+
finally {
|
|
742
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* @param {number} vertex_count_a
|
|
747
|
+
* @param {Float64Array} buffer_a
|
|
748
|
+
* @param {number} vertex_count_b
|
|
749
|
+
* @param {Float64Array} buffer_b
|
|
750
|
+
* @param {string} operation
|
|
751
|
+
* @returns {string}
|
|
752
|
+
*/
|
|
753
|
+
export function mesh_boolean_manifold_port_short_edge_attempts_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
754
|
+
let deferred4_0;
|
|
755
|
+
let deferred4_1;
|
|
756
|
+
try {
|
|
757
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
758
|
+
const len0 = WASM_VECTOR_LEN;
|
|
759
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
760
|
+
const len1 = WASM_VECTOR_LEN;
|
|
761
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
762
|
+
const len2 = WASM_VECTOR_LEN;
|
|
763
|
+
const ret = wasm.mesh_boolean_manifold_port_short_edge_attempts_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
764
|
+
deferred4_0 = ret[0];
|
|
765
|
+
deferred4_1 = ret[1];
|
|
766
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
767
|
+
}
|
|
768
|
+
finally {
|
|
769
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @param {number} vertex_count_a
|
|
774
|
+
* @param {Float64Array} buffer_a
|
|
775
|
+
* @param {number} vertex_count_b
|
|
776
|
+
* @param {Float64Array} buffer_b
|
|
777
|
+
* @param {string} operation
|
|
778
|
+
* @param {number} edge
|
|
779
|
+
* @returns {string}
|
|
780
|
+
*/
|
|
781
|
+
export function mesh_boolean_manifold_port_single_swap_triangle_dump(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation, edge) {
|
|
782
|
+
let deferred4_0;
|
|
783
|
+
let deferred4_1;
|
|
784
|
+
try {
|
|
785
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
786
|
+
const len0 = WASM_VECTOR_LEN;
|
|
787
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
788
|
+
const len1 = WASM_VECTOR_LEN;
|
|
789
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
790
|
+
const len2 = WASM_VECTOR_LEN;
|
|
791
|
+
const ret = wasm.mesh_boolean_manifold_port_single_swap_triangle_dump(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2, edge);
|
|
792
|
+
deferred4_0 = ret[0];
|
|
793
|
+
deferred4_1 = ret[1];
|
|
794
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
795
|
+
}
|
|
796
|
+
finally {
|
|
797
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Debug helper: run the isolated direct-port pipeline and surface stage counts
|
|
802
|
+
* so we can see where geometry diverges without involving legacy routing.
|
|
803
|
+
* @param {number} vertex_count_a
|
|
804
|
+
* @param {Float64Array} buffer_a
|
|
805
|
+
* @param {number} vertex_count_b
|
|
806
|
+
* @param {Float64Array} buffer_b
|
|
807
|
+
* @param {string} operation
|
|
808
|
+
* @returns {string}
|
|
809
|
+
*/
|
|
810
|
+
export function mesh_boolean_manifold_port_stage_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
811
|
+
let deferred4_0;
|
|
812
|
+
let deferred4_1;
|
|
813
|
+
try {
|
|
814
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
815
|
+
const len0 = WASM_VECTOR_LEN;
|
|
816
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
817
|
+
const len1 = WASM_VECTOR_LEN;
|
|
818
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
|
+
const len2 = WASM_VECTOR_LEN;
|
|
820
|
+
const ret = wasm.mesh_boolean_manifold_port_stage_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
821
|
+
deferred4_0 = ret[0];
|
|
822
|
+
deferred4_1 = ret[1];
|
|
823
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
824
|
+
}
|
|
825
|
+
finally {
|
|
826
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* @param {number} vertex_count_a
|
|
831
|
+
* @param {Float64Array} buffer_a
|
|
832
|
+
* @param {number} vertex_count_b
|
|
833
|
+
* @param {Float64Array} buffer_b
|
|
834
|
+
* @param {string} operation
|
|
835
|
+
* @returns {string}
|
|
836
|
+
*/
|
|
837
|
+
export function mesh_boolean_manifold_port_swappable_edges_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
838
|
+
let deferred4_0;
|
|
839
|
+
let deferred4_1;
|
|
840
|
+
try {
|
|
841
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
842
|
+
const len0 = WASM_VECTOR_LEN;
|
|
843
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
844
|
+
const len1 = WASM_VECTOR_LEN;
|
|
845
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
846
|
+
const len2 = WASM_VECTOR_LEN;
|
|
847
|
+
const ret = wasm.mesh_boolean_manifold_port_swappable_edges_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
848
|
+
deferred4_0 = ret[0];
|
|
849
|
+
deferred4_1 = ret[1];
|
|
850
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
851
|
+
}
|
|
852
|
+
finally {
|
|
853
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* @param {number} vertex_count_a
|
|
858
|
+
* @param {Float64Array} buffer_a
|
|
859
|
+
* @param {number} vertex_count_b
|
|
860
|
+
* @param {Float64Array} buffer_b
|
|
861
|
+
* @param {string} operation
|
|
862
|
+
* @returns {string}
|
|
863
|
+
*/
|
|
864
|
+
export function mesh_boolean_manifold_port_triangulated_triangle_dump(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
865
|
+
let deferred4_0;
|
|
866
|
+
let deferred4_1;
|
|
867
|
+
try {
|
|
868
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
869
|
+
const len0 = WASM_VECTOR_LEN;
|
|
870
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
871
|
+
const len1 = WASM_VECTOR_LEN;
|
|
872
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
873
|
+
const len2 = WASM_VECTOR_LEN;
|
|
874
|
+
const ret = wasm.mesh_boolean_manifold_port_triangulated_triangle_dump(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
875
|
+
deferred4_0 = ret[0];
|
|
876
|
+
deferred4_1 = ret[1];
|
|
877
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
878
|
+
}
|
|
879
|
+
finally {
|
|
880
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
881
|
+
}
|
|
686
882
|
}
|
|
687
883
|
/**
|
|
688
884
|
* @param {number} vertex_count_a
|
|
@@ -692,57 +888,117 @@ export function mesh_boolean_union(vertex_count_a, buffer_a, vertex_count_b, buf
|
|
|
692
888
|
* @param {string} operation
|
|
693
889
|
* @returns {Float64Array}
|
|
694
890
|
*/
|
|
695
|
-
export function
|
|
891
|
+
export function mesh_boolean_operation(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
696
892
|
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
697
893
|
const len0 = WASM_VECTOR_LEN;
|
|
698
894
|
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
699
895
|
const len1 = WASM_VECTOR_LEN;
|
|
700
896
|
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
897
|
const len2 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.
|
|
898
|
+
const ret = wasm.mesh_boolean_operation(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
703
899
|
var v4 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
704
900
|
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
705
901
|
return v4;
|
|
706
902
|
}
|
|
707
903
|
/**
|
|
904
|
+
* Debug helper: perform boolean operation and return a textual status,
|
|
905
|
+
* including kernel error reason on failure.
|
|
708
906
|
* @param {number} vertex_count_a
|
|
709
907
|
* @param {Float64Array} buffer_a
|
|
710
908
|
* @param {number} vertex_count_b
|
|
711
909
|
* @param {Float64Array} buffer_b
|
|
712
910
|
* @param {string} operation
|
|
911
|
+
* @returns {string}
|
|
912
|
+
*/
|
|
913
|
+
export function mesh_boolean_operation_debug(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
914
|
+
let deferred4_0;
|
|
915
|
+
let deferred4_1;
|
|
916
|
+
try {
|
|
917
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
918
|
+
const len0 = WASM_VECTOR_LEN;
|
|
919
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
920
|
+
const len1 = WASM_VECTOR_LEN;
|
|
921
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
922
|
+
const len2 = WASM_VECTOR_LEN;
|
|
923
|
+
const ret = wasm.mesh_boolean_operation_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
924
|
+
deferred4_0 = ret[0];
|
|
925
|
+
deferred4_1 = ret[1];
|
|
926
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
927
|
+
}
|
|
928
|
+
finally {
|
|
929
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* @param {number} vertex_count_a
|
|
934
|
+
* @param {Float64Array} buffer_a
|
|
935
|
+
* @param {number} vertex_count_b
|
|
936
|
+
* @param {Float64Array} buffer_b
|
|
937
|
+
* @param {string} operation
|
|
938
|
+
* @returns {string}
|
|
939
|
+
*/
|
|
940
|
+
export function mesh_boolean_port_triangle_dump(vertex_count_a, buffer_a, vertex_count_b, buffer_b, operation) {
|
|
941
|
+
let deferred4_0;
|
|
942
|
+
let deferred4_1;
|
|
943
|
+
try {
|
|
944
|
+
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
945
|
+
const len0 = WASM_VECTOR_LEN;
|
|
946
|
+
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
947
|
+
const len1 = WASM_VECTOR_LEN;
|
|
948
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
949
|
+
const len2 = WASM_VECTOR_LEN;
|
|
950
|
+
const ret = wasm.mesh_boolean_port_triangle_dump(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
951
|
+
deferred4_0 = ret[0];
|
|
952
|
+
deferred4_1 = ret[1];
|
|
953
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
954
|
+
}
|
|
955
|
+
finally {
|
|
956
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Perform boolean subtraction on two meshes (A - B)
|
|
961
|
+
* @param {number} vertex_count_a
|
|
962
|
+
* @param {Float64Array} buffer_a
|
|
963
|
+
* @param {number} vertex_count_b
|
|
964
|
+
* @param {Float64Array} buffer_b
|
|
713
965
|
* @returns {Float64Array}
|
|
714
966
|
*/
|
|
715
|
-
export function
|
|
967
|
+
export function mesh_boolean_subtraction(vertex_count_a, buffer_a, vertex_count_b, buffer_b) {
|
|
716
968
|
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
717
969
|
const len0 = WASM_VECTOR_LEN;
|
|
718
970
|
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
719
971
|
const len1 = WASM_VECTOR_LEN;
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const ret = wasm.mesh_boolean_whole_partial_candidate_debug(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
723
|
-
var v4 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
972
|
+
const ret = wasm.mesh_boolean_subtraction(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1);
|
|
973
|
+
var v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
724
974
|
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
725
|
-
return
|
|
975
|
+
return v3;
|
|
726
976
|
}
|
|
727
977
|
/**
|
|
978
|
+
* Perform boolean operation and return stage-level profiling data followed by
|
|
979
|
+
* the result mesh buffer.
|
|
980
|
+
*
|
|
981
|
+
* Output format:
|
|
982
|
+
* [profile_len(=95), broadphase_ms, segments_ms, split_ms,
|
|
983
|
+
* split_touched_faces_a, split_source_faces_a, split_touched_faces_b, split_source_faces_b,
|
|
984
|
+
* classify_ms, classify_seed_ms, classify_strict_ms, classify_open_component_ms,
|
|
985
|
+
* extract_ms, extract_primary_ms, extract_fallback_ms,
|
|
986
|
+
* Perform boolean union on two meshes
|
|
728
987
|
* @param {number} vertex_count_a
|
|
729
988
|
* @param {Float64Array} buffer_a
|
|
730
989
|
* @param {number} vertex_count_b
|
|
731
990
|
* @param {Float64Array} buffer_b
|
|
732
|
-
* @param {string} operation
|
|
733
991
|
* @returns {Float64Array}
|
|
734
992
|
*/
|
|
735
|
-
export function
|
|
993
|
+
export function mesh_boolean_union(vertex_count_a, buffer_a, vertex_count_b, buffer_b) {
|
|
736
994
|
const ptr0 = passArrayF64ToWasm0(buffer_a, wasm.__wbindgen_malloc);
|
|
737
995
|
const len0 = WASM_VECTOR_LEN;
|
|
738
996
|
const ptr1 = passArrayF64ToWasm0(buffer_b, wasm.__wbindgen_malloc);
|
|
739
997
|
const len1 = WASM_VECTOR_LEN;
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
const ret = wasm.mesh_boolean_whole_partial_candidate_debug_full(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1, ptr2, len2);
|
|
743
|
-
var v4 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
998
|
+
const ret = wasm.mesh_boolean_union(vertex_count_a, ptr0, len0, vertex_count_b, ptr1, len1);
|
|
999
|
+
var v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
744
1000
|
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
745
|
-
return
|
|
1001
|
+
return v3;
|
|
746
1002
|
}
|
|
747
1003
|
/**
|
|
748
1004
|
* Extract boundary (perimeter) edges from a mesh as polylines.
|
|
@@ -1179,6 +1435,72 @@ export function mesh_is_closed_volume(vertex_count, buffer) {
|
|
|
1179
1435
|
const ret = wasm.mesh_is_closed_volume(vertex_count, ptr0, len0);
|
|
1180
1436
|
return ret !== 0;
|
|
1181
1437
|
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Debug helper: run only the isolated direct-port `MeshGL -> Impl -> MeshGL`
|
|
1440
|
+
* normalization owner and return a JSON dump. This is for source-stage
|
|
1441
|
+
* comparison against official manifold-3d import/export, not legacy routing.
|
|
1442
|
+
* @param {number} vertex_count
|
|
1443
|
+
* @param {Float64Array} buffer
|
|
1444
|
+
* @param {boolean} trusted_input
|
|
1445
|
+
* @returns {string}
|
|
1446
|
+
*/
|
|
1447
|
+
export function mesh_manifold_port_import_roundtrip_debug(vertex_count, buffer, trusted_input) {
|
|
1448
|
+
let deferred2_0;
|
|
1449
|
+
let deferred2_1;
|
|
1450
|
+
try {
|
|
1451
|
+
const ptr0 = passArrayF64ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
1452
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1453
|
+
const ret = wasm.mesh_manifold_port_import_roundtrip_debug(vertex_count, ptr0, len0, trusted_input);
|
|
1454
|
+
deferred2_0 = ret[0];
|
|
1455
|
+
deferred2_1 = ret[1];
|
|
1456
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1457
|
+
}
|
|
1458
|
+
finally {
|
|
1459
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* @param {number} vertex_count
|
|
1464
|
+
* @param {Float64Array} buffer
|
|
1465
|
+
* @param {boolean} trusted_input
|
|
1466
|
+
* @returns {string}
|
|
1467
|
+
*/
|
|
1468
|
+
export function mesh_manifold_port_import_stage_hashes_debug(vertex_count, buffer, trusted_input) {
|
|
1469
|
+
let deferred2_0;
|
|
1470
|
+
let deferred2_1;
|
|
1471
|
+
try {
|
|
1472
|
+
const ptr0 = passArrayF64ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
1473
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1474
|
+
const ret = wasm.mesh_manifold_port_import_stage_hashes_debug(vertex_count, ptr0, len0, trusted_input);
|
|
1475
|
+
deferred2_0 = ret[0];
|
|
1476
|
+
deferred2_1 = ret[1];
|
|
1477
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1478
|
+
}
|
|
1479
|
+
finally {
|
|
1480
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* @param {Float64Array} data
|
|
1485
|
+
* @param {number} epsilon
|
|
1486
|
+
* @param {boolean} allow_convex
|
|
1487
|
+
* @returns {string}
|
|
1488
|
+
*/
|
|
1489
|
+
export function mesh_manifold_port_triangulate_projected_polygon_debug(data, epsilon, allow_convex) {
|
|
1490
|
+
let deferred2_0;
|
|
1491
|
+
let deferred2_1;
|
|
1492
|
+
try {
|
|
1493
|
+
const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1494
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1495
|
+
const ret = wasm.mesh_manifold_port_triangulate_projected_polygon_debug(ptr0, len0, epsilon, allow_convex);
|
|
1496
|
+
deferred2_0 = ret[0];
|
|
1497
|
+
deferred2_1 = ret[1];
|
|
1498
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1499
|
+
}
|
|
1500
|
+
finally {
|
|
1501
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1182
1504
|
/**
|
|
1183
1505
|
* Merge multiple mesh buffers while preserving per-mesh vertex order and index remapping.
|
|
1184
1506
|
* Input format: [mesh_count, len1, mesh1..., len2, mesh2..., ...]
|
|
@@ -1761,10 +2083,6 @@ export function version() {
|
|
|
1761
2083
|
function __wbg_get_imports() {
|
|
1762
2084
|
const import0 = {
|
|
1763
2085
|
__proto__: null,
|
|
1764
|
-
__wbg___okgeometry_boolean_should_cancel_e9cae7a8bf9ae3e0: function () {
|
|
1765
|
-
const ret = globalThis.__okgeometry_boolean_should_cancel();
|
|
1766
|
-
return ret;
|
|
1767
|
-
},
|
|
1768
2086
|
__wbg___wbindgen_throw_be289d5034ed271b: function (arg0, arg1) {
|
|
1769
2087
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1770
2088
|
},
|