#include "include/utils.h"
#include "include/Saver.h"
#include <CGAL/Simple_cartesian.h>
using Segments = std::vector<Segment_2>;
using Neighbor_query =
using Angle_regularization =
int main(int argc, char *argv[]) {
std::string path = "";
if (argc > 1) path = argv[1];
Saver<Kernel> saver;
std::vector<Segment_2> segments;
create_example_angles(segments);
if (path != "") {
const std::string full_path = path + "regularize_100_segments_angles_before";
saver.export_eps_segments(segments, full_path, FT(1));
}
const FT max_angle_2 = FT(40);
Neighbor_query neighbor_query(segments);
Angle_regularization angle_regularization(
segments, CGAL::parameters::maximum_angle(max_angle_2));
segments, neighbor_query, angle_regularization);
std::cout << "* number of modified segments = " <<
angle_regularization.number_of_modified_segments() << std::endl;
if (path != "") {
const std::string full_path = path + "regularize_100_segments_angles_after";
saver.export_eps_segments(segments, full_path, FT(1));
}
}