mirror of https://github.com/CGAL/cgal
Update AW3 examples
This commit is contained in:
parent
9fbfd9ac39
commit
fd471ebb5c
|
|
@ -75,7 +75,7 @@ int main(int argc, char** argv)
|
|||
std::cerr << "Invalid point set input: " << ps_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
std::cout << ps_points.size() << " points (Point Set)" << std::endl;
|
||||
std::cout << ps_points.size() << " points (point set)" << std::endl;
|
||||
|
||||
const double relative_alpha = (argc > 4) ? std::stod(argv[4]) : 15.;
|
||||
const double relative_offset = (argc > 5) ? std::stod(argv[5]) : 450.;
|
||||
|
|
@ -93,9 +93,9 @@ int main(int argc, char** argv)
|
|||
CGAL::Real_timer t;
|
||||
t.start();
|
||||
|
||||
using TS_Oracle = CGAL::Alpha_wraps_3::internal::Triangle_soup_oracle<Points, Faces>;
|
||||
using SS_Oracle = CGAL::Alpha_wraps_3::internal::Segment_soup_oracle<Segments, CGAL::Default /*GT*/, TS_Oracle>;
|
||||
using Oracle = CGAL::Alpha_wraps_3::internal::Point_set_oracle<Points, CGAL::Default /*GT*/, SS_Oracle>;
|
||||
using TS_Oracle = CGAL::Alpha_wraps_3::internal::Triangle_soup_oracle<K>;
|
||||
using SS_Oracle = CGAL::Alpha_wraps_3::internal::Segment_soup_oracle<K, TS_Oracle>;
|
||||
using Oracle = CGAL::Alpha_wraps_3::internal::Point_set_oracle<K, SS_Oracle>;
|
||||
|
||||
TS_Oracle ts_oracle(K{});
|
||||
SS_Oracle ss_oracle(ts_oracle);
|
||||
|
|
@ -124,6 +124,7 @@ int main(int argc, char** argv)
|
|||
ps_name = ps_name.substr(0, ps_name.find_last_of("."));
|
||||
std::string output_name = ts_name + "_" + ss_name + "_" + ps_name + "_" + std::to_string(static_cast<int>(relative_alpha))
|
||||
+ "_" + std::to_string(static_cast<int>(relative_offset)) + ".off";
|
||||
std::cout << "Writing to " << output_name << std::endl;
|
||||
CGAL::IO::write_polygon_mesh(output_name, output_mesh, CGAL::parameters::stream_precision(17));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ int main(int argc, char** argv)
|
|||
input_name = input_name.substr(0, input_name.find_last_of("."));
|
||||
std::string output_name = input_name + "_" + std::to_string(static_cast<int>(relative_alpha))
|
||||
+ "_" + std::to_string(static_cast<int>(relative_offset)) + ".off";
|
||||
std::cout << "Writing to " << output_name << std::endl;
|
||||
CGAL::IO::write_polygon_mesh(output_name, wrap, CGAL::parameters::stream_precision(17));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ int main(int argc, char** argv)
|
|||
std::string output_name = input_name
|
||||
+ "_" + std::to_string(static_cast<int>(relative_alpha))
|
||||
+ "_" + std::to_string(static_cast<int>(relative_offset)) + ".off";
|
||||
std::cout << "Writing to " << output_name << std::endl;
|
||||
CGAL::IO::write_polygon_mesh(output_name, wrap, CGAL::parameters::stream_precision(17));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int main(int argc, char** argv)
|
|||
const double offset = diag_length / relative_offset;
|
||||
|
||||
// Construct the wrap
|
||||
using Oracle = CGAL::Alpha_wraps_3::internal::Triangle_mesh_oracle<Mesh>;
|
||||
using Oracle = CGAL::Alpha_wraps_3::internal::Triangle_mesh_oracle<K>;
|
||||
Oracle oracle;
|
||||
oracle.add_triangle_mesh(input);
|
||||
|
||||
|
|
@ -78,6 +78,7 @@ int main(int argc, char** argv)
|
|||
input_name = input_name.substr(0, input_name.find_last_of("."));
|
||||
std::string output_name = input_name + "_cavity_" + std::to_string(static_cast<int>(relative_alpha))
|
||||
+ "_" + std::to_string(static_cast<int>(relative_offset)) + ".off";
|
||||
std::cout << "Writing to " << output_name << std::endl;
|
||||
CGAL::IO::write_polygon_mesh(output_name, wrap, CGAL::parameters::stream_precision(17));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue