CGAL 6.2 - Shape Regularization

Loading...
Searching...
No Matches
Shape_regularization/regularize_contour.cpp
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Shape_regularization/regularize_contours.h>
using Kernel = CGAL::Simple_cartesian<double>;
using Point_2 = typename Kernel::Point_2;
int main() {
// Create input contour.
const std::vector<Point_2> contour = {
Point_2(0.00, 0.00),
Point_2(0.50, -0.05),
Point_2(1.00, 0.00),
Point_2(1.05, 0.50),
Point_2(1.00, 1.00),
Point_2(0.00, 1.00)
};
// Regularize this contour.
std::vector<Point_2> regularized;
CGAL::Shape_regularization::Contours::
regularize_closed_contour(contour, std::back_inserter(regularized));
}
Kernel::Point_2
CGAL::Shape_regularization::Contours::regularize_closed_contour
OutIterator regularize_closed_contour(const InputRange &input_range, const ContDirections &directions, OutIterator contour, const NamedParameters &np=parameters::default_values())
regularizes closed contours.
Definition: regularize_contours.h:119
Kernel
regularize_contours.h
This header includes all classes for regularizing contours.
CGAL::Simple_cartesian