@@ -55,7 +55,7 @@ namespace wildmeshing_binding
55
55
Tetrahedralizer (
56
56
double stop_quality, int max_its, int stage, int stop_p,
57
57
double epsilon, double edge_length_r,
58
- bool skip_simplify) : skip_simplify(skip_simplify)
58
+ bool skip_simplify, bool coarsen ) : skip_simplify(skip_simplify)
59
59
{
60
60
wildmeshing_binding::init_globals ();
61
61
@@ -69,6 +69,8 @@ namespace wildmeshing_binding
69
69
params.stage = stage;
70
70
params.stop_p = stop_p;
71
71
72
+ params.coarsen = coarsen;
73
+
72
74
params.eps_rel = epsilon;
73
75
params.ideal_edge_length_rel = edge_length_r;
74
76
@@ -601,15 +603,15 @@ namespace wildmeshing_binding
601
603
.def (py::init<
602
604
double , int , int , int ,
603
605
double , double ,
604
- bool >(),
606
+ bool , bool >(),
605
607
py::arg (" stop_quality" ) = 10 , // "Specify max AMIPS energy for stopping mesh optimization"
606
608
py::arg (" max_its" ) = 80 , // "Max number of mesh optimization iterations"
607
609
py::arg (" stage" ) = 2 , // "Specify envelope stage"
608
610
py::arg (" stop_p" ) = -1 , //
609
611
py::arg (" epsilon" ) = 1e-3 , // "relative envelope epsilon_r. Absolute epsilonn = epsilon_r * diagonal_of_bbox"
610
612
py::arg (" edge_length_r" ) = 1 . / 20 ., // "Relative target edge length l_r. Absolute l = l_r * diagonal_of_bbox"
611
- py::arg (" skip_simplify" ) = false //
612
- )
613
+ py::arg (" skip_simplify" ) = false , //
614
+ py::arg ( " coarsen " ) = true )
613
615
614
616
.def (
615
617
" set_log_level" , [](Tetrahedralizer &t, int level) { t.set_log_level (level); }, " sets log level, valid value between 0 (all logs) and 6 (no logs)" , py::arg (" level" ))
@@ -667,7 +669,7 @@ namespace wildmeshing_binding
667
669
tetra.doc () = " Wildmeshing tetrahedralizer" ;
668
670
669
671
m.def (
670
- " tetrahedralize" , [](const std::string &input, const std::string &output, double stop_quality, int max_its, int stage, int stop_p, double epsilon, double edge_length_r, bool mute_log, bool skip_simplify, bool smooth_open_boundary, bool floodfill, bool use_input_for_wn, bool manifold_surface, bool correct_surface_orientation, bool all_mesh, bool binary) {
672
+ " tetrahedralize" , [](const std::string &input, const std::string &output, double stop_quality, int max_its, int stage, int stop_p, double epsilon, double edge_length_r, bool mute_log, bool skip_simplify, bool coarsen, bool smooth_open_boundary, bool floodfill, bool use_input_for_wn, bool manifold_surface, bool correct_surface_orientation, bool all_mesh, bool binary) {
671
673
wildmeshing_binding::init_globals ();
672
674
673
675
static bool initialized = false ;
@@ -677,7 +679,7 @@ namespace wildmeshing_binding
677
679
initialized = true ;
678
680
}
679
681
680
- Tetrahedralizer tetra (stop_quality, max_its, stage, stop_p, epsilon, edge_length_r, skip_simplify);
682
+ Tetrahedralizer tetra (stop_quality, max_its, stage, stop_p, epsilon, edge_length_r, skip_simplify, coarsen );
681
683
if (!tetra.load_mesh (input))
682
684
return false ;
683
685
@@ -698,10 +700,10 @@ namespace wildmeshing_binding
698
700
py::arg (" edge_length_r" ) = 1 . / 20 ., // "Relative target edge length l_r. Absolute l = l_r * diagonal_of_bbox"
699
701
py::arg (" mute_log" ) = false , // "Mute prints");
700
702
py::arg (" skip_simplify" ) = false , //
701
- py::arg (" smooth_open_boundary" ) = false , py::arg (" floodfill" ) = false , py::arg (" manifold_surface" ) = false , py::arg (" use_input_for_wn" ) = false , py::arg (" correct_surface_orientation" ) = false , py::arg (" all_mesh" ) = false , py::arg (" binary" ) = true );
703
+ py::arg (" coarsen " ) = true , py::arg ( " smooth_open_boundary" ) = false , py::arg (" floodfill" ) = false , py::arg (" manifold_surface" ) = false , py::arg (" use_input_for_wn" ) = false , py::arg (" correct_surface_orientation" ) = false , py::arg (" all_mesh" ) = false , py::arg (" binary" ) = true );
702
704
703
705
m.def (
704
- " boolean_operation" , [](const py::object &json, const std::string &output, double stop_quality, int max_its, int stage, int stop_p, double epsilon, double edge_length_r, bool mute_log, bool skip_simplify, bool manifold_surface, bool use_input_for_wn, bool correct_surface_orientation, bool all_mesh, bool binary) {
706
+ " boolean_operation" , [](const py::object &json, const std::string &output, double stop_quality, int max_its, int stage, int stop_p, double epsilon, double edge_length_r, bool mute_log, bool skip_simplify, bool coarsen, bool manifold_surface, bool use_input_for_wn, bool correct_surface_orientation, bool all_mesh, bool binary) {
705
707
wildmeshing_binding::init_globals ();
706
708
707
709
static bool initialized = false ;
@@ -711,7 +713,7 @@ namespace wildmeshing_binding
711
713
initialized = true ;
712
714
}
713
715
714
- Tetrahedralizer tetra (stop_quality, max_its, stage, stop_p, epsilon, edge_length_r, skip_simplify);
716
+ Tetrahedralizer tetra (stop_quality, max_its, stage, stop_p, epsilon, edge_length_r, skip_simplify, coarsen );
715
717
716
718
const std::string tmp = py::str (json);
717
719
@@ -735,6 +737,6 @@ namespace wildmeshing_binding
735
737
py::arg (" edge_length_r" ) = 1 . / 20 ., // "Relative target edge length l_r. Absolute l = l_r * diagonal_of_bbox"
736
738
py::arg (" mute_log" ) = false , // "Mute prints");
737
739
py::arg (" skip_simplify" ) = false , //
738
- py::arg (" manifold_surface" ) = false , py::arg (" use_input_for_wn" ) = false , py::arg (" correct_surface_orientation" ) = false , py::arg (" all_mesh" ) = false , py::arg (" binary" ) = true );
740
+ py::arg (" coarsen " ) = true , py::arg ( " manifold_surface" ) = false , py::arg (" use_input_for_wn" ) = false , py::arg (" correct_surface_orientation" ) = false , py::arg (" all_mesh" ) = false , py::arg (" binary" ) = true );
739
741
}
740
742
} // namespace wildmeshing_binding
0 commit comments