mirror of https://github.com/CGAL/cgal
fixed regularization in the polyhedron demo
This commit is contained in:
parent
afb138478d
commit
b7e0e37ba3
|
|
@ -19,7 +19,7 @@
|
||||||
#include <CGAL/Real_timer.h>
|
#include <CGAL/Real_timer.h>
|
||||||
|
|
||||||
#include <CGAL/Shape_detection.h>
|
#include <CGAL/Shape_detection.h>
|
||||||
#include <CGAL/Regularization.h>
|
#include <CGAL/Shape_regularization/regularize_planes.h>
|
||||||
#include <CGAL/Delaunay_triangulation_2.h>
|
#include <CGAL/Delaunay_triangulation_2.h>
|
||||||
#include <CGAL/Alpha_shape_2.h>
|
#include <CGAL/Alpha_shape_2.h>
|
||||||
#include <CGAL/Alpha_shape_face_base_2.h>
|
#include <CGAL/Alpha_shape_face_base_2.h>
|
||||||
|
|
@ -373,15 +373,19 @@ private:
|
||||||
if (dialog.regularize()) {
|
if (dialog.regularize()) {
|
||||||
|
|
||||||
std::cerr << "Regularization of planes... " << std::endl;
|
std::cerr << "Regularization of planes... " << std::endl;
|
||||||
CGAL::regularize_planes(
|
CGAL::Shape_regularization::Planes::regularize_planes(
|
||||||
*points,
|
|
||||||
points->point_map(),
|
|
||||||
planes,
|
planes,
|
||||||
CGAL::Identity_property_map<Plane_3>(),
|
CGAL::Identity_property_map<Plane_3>(),
|
||||||
CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions),
|
*points,
|
||||||
true, true, true, true,
|
points->point_map(),
|
||||||
max_accepted_angle,
|
CGAL::parameters::plane_index_map(
|
||||||
max_distance_to_plane);
|
CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions)).
|
||||||
|
regularize_parallelism(true).
|
||||||
|
regularize_orthogonality(true).
|
||||||
|
regularize_coplanarity(true).
|
||||||
|
regularize_axis_symmetry(true).
|
||||||
|
max_angle(max_accepted_angle).
|
||||||
|
max_offset(max_distance_to_plane));
|
||||||
|
|
||||||
std::cerr << "done" << std::endl;
|
std::cerr << "done" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
@ -654,13 +658,19 @@ private:
|
||||||
{
|
{
|
||||||
std::cerr << "Regularization of planes... " << std::endl;
|
std::cerr << "Regularization of planes... " << std::endl;
|
||||||
typename Ransac::Plane_range planes = ransac.planes();
|
typename Ransac::Plane_range planes = ransac.planes();
|
||||||
CGAL::regularize_planes (*points,
|
CGAL::Shape_regularization::Planes::regularize_planes(
|
||||||
points->point_map(),
|
planes,
|
||||||
planes,
|
CGAL::Shape_detection::Plane_map<Traits>(),
|
||||||
CGAL::Shape_detection::Plane_map<Traits>(),
|
*points,
|
||||||
CGAL::Shape_detection::Point_to_shape_index_map<Traits>(*points, planes),
|
points->point_map(),
|
||||||
true, true, true, true,
|
CGAL::parameters::plane_index_map(
|
||||||
op.normal_threshold, op.epsilon);
|
CGAL::Shape_detection::Point_to_shape_index_map<Traits>(*points, planes)).
|
||||||
|
regularize_parallelism(true).
|
||||||
|
regularize_orthogonality(true).
|
||||||
|
regularize_coplanarity(true).
|
||||||
|
regularize_axis_symmetry(true).
|
||||||
|
max_angle(dialog.normal_tolerance()).
|
||||||
|
max_offset(op.epsilon));
|
||||||
|
|
||||||
std::cerr << "done" << std::endl;
|
std::cerr << "done" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,3 @@ Solver_interface
|
||||||
Spatial_searching
|
Spatial_searching
|
||||||
Stream_support
|
Stream_support
|
||||||
Surface_mesh
|
Surface_mesh
|
||||||
Shape_regularization
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue