From 278a26d93f764648d405faabe4202550a2193390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 18 May 2020 18:01:56 +0200 Subject: [PATCH 001/149] document the internal function used to compute an interior point --- .../dual/halfspace_intersection_3.h | 2 +- ...fspace_intersection_with_constructions_3.h | 2 +- Convex_hull_3/doc/Convex_hull_3/Doxyfile.in | 1 + .../doc/Convex_hull_3/PackageDescription.txt | 5 ++- .../dual/halfspace_intersection_3.h | 16 +++----- ...halfspace_intersection_interior_point_3.h} | 41 +++++++++++++++++-- ...fspace_intersection_with_constructions_3.h | 27 +++++------- 7 files changed, 61 insertions(+), 33 deletions(-) rename Convex_hull_3/include/CGAL/Convex_hull_3/dual/{interior_polyhedron_3.h => halfspace_intersection_interior_point_3.h} (80%) diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index b2d24cbe9ba..18a91a0a502 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -4,7 +4,7 @@ namespace CGAL { \ingroup PkgConvexHull3Functions \brief computes robustly the intersection of the halfspaces defined by the planes contained in the range [`begin`, `end`) without constructing the dual points. The result is stored in the polyhedron `pm`. -If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using a linear program and thus is slower. +If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using the function `halfspace_intersection_interior_point_3()` based on solving a linear program and thus is slower. This version does not construct the dual points explicitely but uses a special traits class for the function `CGAL::convex_hull_3()` to handle predicates on dual points without constructing them. diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 0ea3d4c0145..4d2913acf34 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -4,7 +4,7 @@ namespace CGAL { \ingroup PkgConvexHull3Functions \brief computes the intersection of the halfspaces defined by the planes contained in the range [`begin`, `end`). The result is stored in the polyhedron `pm`. -If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using a linear program and thus is slower. +If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using the function `halfspace_intersection_interior_point_3()` based on solving a linear program and thus is slower. This version constructs explicitly the dual points using the convex hull algorithm parametrized with the given traits class. \attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . diff --git a/Convex_hull_3/doc/Convex_hull_3/Doxyfile.in b/Convex_hull_3/doc/Convex_hull_3/Doxyfile.in index 860593ed992..e3f3d19a4d0 100644 --- a/Convex_hull_3/doc/Convex_hull_3/Doxyfile.in +++ b/Convex_hull_3/doc/Convex_hull_3/Doxyfile.in @@ -1,6 +1,7 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Convex Hulls" +INPUT += ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h \# macros to be used inside the code ALIASES += "cgalNamedParamsBegin=
Named Parameters
" diff --git a/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt b/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt index e206b537859..ca5dc521c8e 100644 --- a/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt +++ b/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt @@ -84,7 +84,8 @@ defining `CGAL_CH_CHECK_EXPENSIVE`. \cgalCRPSection{Halfspace Intersection Functions} -- `CGAL::halfspace_intersection_3` -- `CGAL::halfspace_intersection_with_constructions_3` +- `CGAL::halfspace_intersection_3()` +- `CGAL::halfspace_intersection_with_constructions_3()` +- `CGAL::halfspace_intersection_interior_point()` */ diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 0d5776aff28..e1b988ad78c 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -26,7 +26,7 @@ #include #include // For interior_polyhedron_3 -#include +#include #include #include @@ -241,16 +241,12 @@ namespace CGAL // if a point inside is not provided find one using linear programming if (!origin) { - // choose exact integral type - typedef typename internal::Exact_field_selector::Type ET; - // find a point inside the intersection - typedef Interior_polyhedron_3 Interior_polyhedron; - Interior_polyhedron interior; - CGAL_assertion_code(bool interior_point_found = ) - interior.find(begin, end); - CGAL_assertion_msg(interior_point_found, "halfspace_intersection_3: problem when determing a point inside the intersection"); - origin = boost::make_optional(interior.inside_point()); + origin = halfspace_intersection_interior_point_3(begin, end); + + CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_3: problem when determing a point inside the intersection"); + if (origin==boost::none) + return; } // make sure the origin is on the negative side of all the planes diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h similarity index 80% rename from Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h rename to Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h index d0e3a0891ff..28123c632be 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h @@ -12,8 +12,8 @@ // Pierre Alliez // -#ifndef CGAL_CH3_INTERIOR_POLYHEDRON_3_H -#define CGAL_CH3_INTERIOR_POLYHEDRON_3_H +#ifndef CGAL_CH3_DUAL_HALFSPACE_INTERIOR_POINT_3_H +#define CGAL_CH3_DUAL_HALFSPACE_INTERIOR_POINT_3_H #include @@ -54,6 +54,9 @@ // the point [x1,x2,x3] as inside point. namespace CGAL { + +namespace internal { + template class Interior_polyhedron_3 { // 3D @@ -155,9 +158,41 @@ class Interior_polyhedron_3 { } }; +} // end of internal namespace + +/*! +\ingroup PkgConvexHull3Functions + +computes a point belonging to the intersection of the halfspaces defined by the planes contained in the range `[begin, end)`. +If the intersection is empty, `boost::none` is returned. + +\attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation +is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . + +\tparam PlaneIterator must be an input iterator with the value type being a `Plane_3` object from \cgal Kernel + +*/ +template +boost::optional::value_type>::Kernel::Point_3> +halfspace_intersection_interior_point_3(PlaneIterator begin, PlaneIterator end) +{ + // Types + typedef typename Kernel_traits::value_type>::Kernel K; + + // choose exact integral type + typedef typename internal::Exact_field_selector::Type ET; + + // find a point inside the intersection + internal::Interior_polyhedron_3 interior; + if (!interior.find(begin, end)) + return boost::none; + + return boost::make_optional(interior.inside_point()); +} + } // namespace CGAL #include -#endif // CGAL_CH3_INTERIOR_POLYHEDRON_3_H +#endif // CGAL_CH3_DUAL_HALFSPACE_INTERIOR_POINT_3_H diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 0c7746e1292..b9ccf6014f1 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -23,7 +23,7 @@ #include // For interior_polyhedron_3 -#include +#include #include #include @@ -90,29 +90,24 @@ namespace CGAL void halfspace_intersection_with_constructions_3(PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> const& origin, + boost::optional::value_type>::Kernel::Point_3> origin, const Traits & ch_traits) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point; typedef typename K::Plane_3 Plane; - Point p_origin; - - if (origin) { - p_origin = boost::get(origin); - } else { - // choose exact integral type - typedef typename internal::Exact_field_selector::Type ET; - + // if a point inside is not provided find one using linear programming + if (!origin) { // find a point inside the intersection - typedef Interior_polyhedron_3 Interior_polyhedron; - Interior_polyhedron interior; - CGAL_assertion_code(bool res = ) - interior.find(pbegin, pend); - CGAL_assertion_msg(res, "halfspace_intersection_with_constructions_3: problem when determing a point inside"); - p_origin = interior.inside_point(); + origin = halfspace_intersection_interior_point_3(pbegin, pend); + + CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_with_constructions_3: problem when determing a point inside the intersection"); + if (origin==boost::none) + return; } + const Point p_origin = *origin; + // construct dual points to apply the convex hull std::vector dual_points; for (PlaneIterator p = pbegin; p != pend; ++p) { From 1819a0ed5506ad84309bc75e4d529a601a38b0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 18 May 2020 18:19:40 +0200 Subject: [PATCH 002/149] uniform indentation in the file --- .../halfspace_intersection_interior_point_3.h | 161 +++++++++--------- 1 file changed, 80 insertions(+), 81 deletions(-) diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h index 28123c632be..8037b2f38fc 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h @@ -59,103 +59,103 @@ namespace internal { template class Interior_polyhedron_3 { - // 3D - typedef typename Kernel::FT FT; - typedef typename Kernel::Plane_3 Plane; - typedef typename Kernel::Point_3 Point; + // 3D + typedef typename Kernel::FT FT; + typedef typename Kernel::Plane_3 Plane; + typedef typename Kernel::Point_3 Point; - // program and solution types - typedef CGAL::Quadratic_program LP; - typedef typename CGAL::Quadratic_program_solution Solution; - typedef typename Solution::Variable_value_iterator Variable_value_iterator; - typedef CGAL::Real_embeddable_traits RE_traits; - typename RE_traits::To_double to_double; - Solution m_solution; - Point m_inside_point; - Point m_optimal_point; + // program and solution types + typedef CGAL::Quadratic_program LP; + typedef typename CGAL::Quadratic_program_solution Solution; + typedef typename Solution::Variable_value_iterator Variable_value_iterator; + typedef CGAL::Real_embeddable_traits RE_traits; + typename RE_traits::To_double to_double; + Solution m_solution; + Point m_inside_point; + Point m_optimal_point; - public: - Point& inside_point() { return m_inside_point; } - const Point& inside_point() const { return m_inside_point; } - Point& optimal_point() { return m_optimal_point; } - const Point& optimal_point() const { return m_optimal_point; } +public: + Point& inside_point() { return m_inside_point; } + const Point& inside_point() const { return m_inside_point; } + Point& optimal_point() { return m_optimal_point; } + const Point& optimal_point() const { return m_optimal_point; } - // Determines if a value is infinite or not - template - inline bool isinf(T value) { - return value == std::numeric_limits::infinity(); - } + // Determines if a value is infinite or not + template + inline bool isinf(T value) { + return value == std::numeric_limits::infinity(); + } - // Find a point inside the polyhedron defined by a list of planes - // InputIterator::value_type = Plane - template < class InputIterator > - bool find(InputIterator begin, InputIterator end) { - // solve linear program - LP lp(CGAL::LARGER,false); // with constraints Ax >= b + // Find a point inside the polyhedron defined by a list of planes + // InputIterator::value_type = Plane + template < class InputIterator > + bool find(InputIterator begin, InputIterator end) { + // solve linear program + LP lp(CGAL::LARGER,false); // with constraints Ax >= b - // column indices - const int index_x1 = 0; - const int index_x2 = 1; - const int index_x3 = 2; - const int index_x4 = 3; + // column indices + const int index_x1 = 0; + const int index_x2 = 1; + const int index_x3 = 2; + const int index_x4 = 3; - // assemble linear program - int j = 0; // row index - // iterate over segments - InputIterator it; - for(it = begin; it != end; ++it, j++) { - const Plane& plane = *it; - const double aj = CGAL::to_double(plane.a()); - const double bj = CGAL::to_double(plane.b()); - const double cj = CGAL::to_double(plane.c()); - const double dj = CGAL::to_double(plane.d()); + // assemble linear program + int j = 0; // row index + // iterate over segments + InputIterator it; + for(it = begin; it != end; ++it, j++) { + const Plane& plane = *it; + const double aj = CGAL::to_double(plane.a()); + const double bj = CGAL::to_double(plane.b()); + const double cj = CGAL::to_double(plane.c()); + const double dj = CGAL::to_double(plane.d()); - CGAL_assertion(!isinf(aj)); - CGAL_assertion(!isinf(bj)); - CGAL_assertion(!isinf(cj)); - CGAL_assertion(!isinf(dj)); + CGAL_assertion(!isinf(aj)); + CGAL_assertion(!isinf(bj)); + CGAL_assertion(!isinf(cj)); + CGAL_assertion(!isinf(dj)); - // plane defined the halfspace: aj * x1 + bj * x2 + cj * x3 + dj <= 0 - // <=> - (aj * x1 + bj * x2 + cj * x3 + dj) >= 0 - // j^th constraint: -(aj * x1 + bj * x2 + cj * x3 + x4) >= dj - lp.set_a(index_x1, j, -aj); - lp.set_a(index_x2, j, -bj); - lp.set_a(index_x3, j, -cj); - lp.set_a(index_x4, j, -1.0); + // plane defined the halfspace: aj * x1 + bj * x2 + cj * x3 + dj <= 0 + // <=> - (aj * x1 + bj * x2 + cj * x3 + dj) >= 0 + // j^th constraint: -(aj * x1 + bj * x2 + cj * x3 + x4) >= dj + lp.set_a(index_x1, j, -aj); + lp.set_a(index_x2, j, -bj); + lp.set_a(index_x3, j, -cj); + lp.set_a(index_x4, j, -1.0); - // right hand side - lp.set_b(j, dj); - } + // right hand side + lp.set_b(j, dj); + } - // objective function -> max x4 (negative sign set because - // the lp solver always minimizes an objective function) - lp.set_c(index_x4,-1.0); + // objective function -> max x4 (negative sign set because + // the lp solver always minimizes an objective function) + lp.set_c(index_x4,-1.0); - // solve the linear program - m_solution = CGAL::solve_linear_program(lp, ET()); + // solve the linear program + m_solution = CGAL::solve_linear_program(lp, ET()); - if(m_solution.is_infeasible()) - return false; + if(m_solution.is_infeasible()) + return false; - if(!m_solution.is_optimal()) - return false; + if(!m_solution.is_optimal()) + return false; - // get variables - Variable_value_iterator X = m_solution.variable_values_begin(); + // get variables + Variable_value_iterator X = m_solution.variable_values_begin(); - // solution if x4 > 0 - double x4 = to_double(X[index_x4]); - if(x4 <= 0.0) - return false; + // solution if x4 > 0 + double x4 = to_double(X[index_x4]); + if(x4 <= 0.0) + return false; - // define inside point as (x1;x2;x3) - double x1 = to_double(X[index_x1]); - double x2 = to_double(X[index_x2]); - double x3 = to_double(X[index_x3]); - m_inside_point = Point(x1,x2,x3); + // define inside point as (x1;x2;x3) + double x1 = to_double(X[index_x1]); + double x2 = to_double(X[index_x2]); + double x3 = to_double(X[index_x3]); + m_inside_point = Point(x1,x2,x3); - return true; - } + return true; + } }; } // end of internal namespace @@ -170,7 +170,6 @@ If the intersection is empty, `boost::none` is returned. is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . \tparam PlaneIterator must be an input iterator with the value type being a `Plane_3` object from \cgal Kernel - */ template boost::optional::value_type>::Kernel::Point_3> From 0fb8df6d527aed06a2603f64bb7ed0b85908a4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 May 2020 09:24:48 +0200 Subject: [PATCH 003/149] typo --- Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt b/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt index ca5dc521c8e..cfe86e65064 100644 --- a/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt +++ b/Convex_hull_3/doc/Convex_hull_3/PackageDescription.txt @@ -86,6 +86,6 @@ defining `CGAL_CH_CHECK_EXPENSIVE`. - `CGAL::halfspace_intersection_3()` - `CGAL::halfspace_intersection_with_constructions_3()` -- `CGAL::halfspace_intersection_interior_point()` +- `CGAL::halfspace_intersection_interior_point_3()` */ From e43221ae8bcc56fa5b94e68d1335a05c25e11fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jun 2020 15:15:48 +0200 Subject: [PATCH 004/149] add an option to not refine one of the two meshes --- .../CGAL/boost/graph/parameters_interface.h | 1 + BGL/test/BGL/test_cgal_bgl_named_params.cpp | 3 +++ .../CGAL/Polygon_mesh_processing/corefinement.h | 15 ++++++++++++++- .../internal/Corefinement/Visitor.h | 7 ++++++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 0ca726f6e31..ba367732370 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -101,6 +101,7 @@ CGAL_add_named_parameter(area_threshold_t, area_threshold, area_threshold) CGAL_add_named_parameter(halfedges_keeper_t, halfedges_keeper, halfedges_keeper) CGAL_add_named_parameter(volume_threshold_t, volume_threshold, volume_threshold) CGAL_add_named_parameter(dry_run_t, dry_run, dry_run) +CGAL_add_named_parameter(do_not_modify_t, do_not_modify, do_not_modify) // List of named parameters that we use in the package 'Surface Mesh Simplification' CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost) diff --git a/BGL/test/BGL/test_cgal_bgl_named_params.cpp b/BGL/test/BGL/test_cgal_bgl_named_params.cpp index 1d65c3cd1c2..f2669e50313 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -97,6 +97,7 @@ void test(const NamedParameters& np) assert(get_parameter(np, CGAL::internal_np::do_lock_mesh).v == 61); assert(get_parameter(np, CGAL::internal_np::halfedges_keeper).v == 62); assert(get_parameter(np, CGAL::internal_np::do_simplify_border).v == 64); + assert(get_parameter(np, CGAL::internal_np::do_not_modify).v == 65); assert(get_parameter(np, CGAL::internal_np::maximum_number_of_faces).v == 78910); // Named parameters that we use in the package 'Surface Mesh Simplification' @@ -184,6 +185,7 @@ void test(const NamedParameters& np) check_same_type<54>(get_parameter(np, CGAL::internal_np::use_area_smoothing)); check_same_type<55>(get_parameter(np, CGAL::internal_np::use_Delaunay_flips)); check_same_type<56>(get_parameter(np, CGAL::internal_np::use_safety_constraints)); + check_same_type<65>(get_parameter(np, CGAL::internal_np::do_not_modify)); check_same_type<12340>(get_parameter(np, CGAL::internal_np::do_self_intersection_tests)); check_same_type<12341>(get_parameter(np, CGAL::internal_np::do_orientation_tests)); @@ -353,6 +355,7 @@ int main() .halfedges_keeper(A<62>(62)) .use_convex_hull(A<63>(63)) .do_simplify_border(A<64>(64)) + .do_not_modify(A<65>(65)) .point_map(A<9000>(9000)) .query_point_map(A<9001>(9001)) .normal_map(A<9002>(9002)) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index e0e8c27de2f..85c02424b55 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -626,6 +626,9 @@ corefine_and_compute_difference( TriangleMesh& tm1, * checked for self-intersection and `CGAL::Polygon_mesh_processing::Corefinement::Self_intersection_exception` * will be thrown if at least one is found (`np1` only). * \cgalParamEnd + * \cgalParamBegin{do_not_modify} if `true`, the corresponding mesh will not be updated. The default value is `false`. + * Obviously if this parameter is set to `true` for both meshes nothing will be done. + * \cgalParamEnd * \cgalNamedParamsEnd * */ @@ -641,9 +644,19 @@ corefine( TriangleMesh& tm1, using parameters::choose_parameter; using parameters::get_parameter; + if (choose_parameter(get_parameter(np1, internal_np::do_not_modify), false)) + { + if (choose_parameter(get_parameter(np2, internal_np::do_not_modify), false)) + return; + return corefine(tm2,tm1, np2, np1); + } + const bool throw_on_self_intersection = choose_parameter(get_parameter(np1, internal_np::throw_on_self_intersection), false); + const bool modify_tm2 = + !choose_parameter(get_parameter(np2, internal_np::do_not_modify), false); + // Vertex point maps typedef typename GetVertexPointMap::type Vpm; @@ -700,7 +713,7 @@ corefine( TriangleMesh& tm1, Ob ob; Ecm ecm(tm1,tm2,ecm1,ecm2); Corefinement::Intersection_of_triangle_meshes - functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm)); + functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm,modify_tm2)); functor(CGAL::Emptyset_iterator(), throw_on_self_intersection, true); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index d668782b25c..e81be0cfa60 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -170,6 +170,7 @@ private: OutputBuilder& output_builder; EdgeMarkMapBind marks_on_edges; bool input_with_coplanar_faces; + bool refine_tm2; template void call_put(Ecm_bind& ecm, @@ -200,12 +201,13 @@ private: // visitor public functions public: Surface_intersection_visitor_for_corefinement( - UserVisitor& uv, OutputBuilder& o, const EdgeMarkMapBind& emm) + UserVisitor& uv, OutputBuilder& o, const EdgeMarkMapBind& emm, bool refine_tm2=true) : number_coplanar_vertices(0) , user_visitor(uv) , output_builder(o) , marks_on_edges(emm) , input_with_coplanar_faces(false) + , refine_tm2(refine_tm2) {} template @@ -624,6 +626,7 @@ public: ++it) { TriangleMesh& tm=*it->first; + if (!refine_tm2 && tm2_ptr==&tm) continue; // Face_boundaries& face_boundaries=mesh_to_face_boundaries[&tm]; Node_to_target_of_hedge_map& nodes_to_hedge=it->second; @@ -693,6 +696,7 @@ public: it=on_edge.begin(); it!=on_edge.end(); ++it) { TriangleMesh& tm=*it->first; + if (!refine_tm2 && tm2_ptr==&tm) continue; const VertexPointMap& vpm=vpms[&tm]; On_edge_map& on_edge_map=it->second; On_face_map& on_face_map=on_face[&tm]; @@ -788,6 +792,7 @@ public: it=on_face.begin(); it!=on_face.end(); ++it) { TriangleMesh& tm=*it->first; + if (!refine_tm2 && tm2_ptr==&tm) continue; const VertexPointMap& vpm=vpms[&tm]; On_face_map& on_face_map=it->second; Face_boundaries& face_boundaries=mesh_to_face_boundaries[&tm]; From 9eb7a9da85171349703cb5d768226b6c726fb465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jun 2020 15:25:42 +0200 Subject: [PATCH 005/149] avoid filling the maps --- .../Polygon_mesh_processing/corefinement.h | 11 ++-- .../internal/Corefinement/Visitor.h | 65 ++++++++++--------- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 85c02424b55..53c8703f8c7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -644,19 +644,20 @@ corefine( TriangleMesh& tm1, using parameters::choose_parameter; using parameters::get_parameter; + TriangleMesh* const_mesh_ptr=nullptr; if (choose_parameter(get_parameter(np1, internal_np::do_not_modify), false)) { if (choose_parameter(get_parameter(np2, internal_np::do_not_modify), false)) return; - return corefine(tm2,tm1, np2, np1); + const_mesh_ptr=&tm1; } + else + if (choose_parameter(get_parameter(np2, internal_np::do_not_modify), false)) + const_mesh_ptr=&tm2; const bool throw_on_self_intersection = choose_parameter(get_parameter(np1, internal_np::throw_on_self_intersection), false); - const bool modify_tm2 = - !choose_parameter(get_parameter(np2, internal_np::do_not_modify), false); - // Vertex point maps typedef typename GetVertexPointMap::type Vpm; @@ -713,7 +714,7 @@ corefine( TriangleMesh& tm1, Ob ob; Ecm ecm(tm1,tm2,ecm1,ecm2); Corefinement::Intersection_of_triangle_meshes - functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm,modify_tm2)); + functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm,const_mesh_ptr)); functor(CGAL::Emptyset_iterator(), throw_on_self_intersection, true); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index e81be0cfa60..0f71e8df6f9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -170,7 +170,7 @@ private: OutputBuilder& output_builder; EdgeMarkMapBind marks_on_edges; bool input_with_coplanar_faces; - bool refine_tm2; + TriangleMesh* const_mesh_ptr; template void call_put(Ecm_bind& ecm, @@ -201,13 +201,13 @@ private: // visitor public functions public: Surface_intersection_visitor_for_corefinement( - UserVisitor& uv, OutputBuilder& o, const EdgeMarkMapBind& emm, bool refine_tm2=true) + UserVisitor& uv, OutputBuilder& o, const EdgeMarkMapBind& emm, TriangleMesh* const_mesh_ptr=nullptr) : number_coplanar_vertices(0) , user_visitor(uv) , output_builder(o) , marks_on_edges(emm) , input_with_coplanar_faces(false) - , refine_tm2(refine_tm2) + , const_mesh_ptr(const_mesh_ptr) {} template @@ -334,33 +334,36 @@ public: //forward to the visitor // user_visitor.new_node_added(node_id, type, h_1, h_2, is_target_coplanar, is_source_coplanar); // NODE_VISITOR_TAG - switch(type) - { - case ON_FACE: //Face intersected by an edge - on_face[tm2_ptr][face(h_2,tm2)].push_back(node_id); - break; - case ON_EDGE: //Edge intersected by an edge + if (tm2_ptr!=const_mesh_ptr) + switch(type) { - on_edge[tm2_ptr][edge(h_2,tm2)].push_back(node_id); - // check_node_on_non_manifold_edge(node_id,h_2,tm2); + case ON_FACE: //Face intersected by an edge + on_face[tm2_ptr][face(h_2,tm2)].push_back(node_id); + break; + case ON_EDGE: //Edge intersected by an edge + { + on_edge[tm2_ptr][edge(h_2,tm2)].push_back(node_id); + // check_node_on_non_manifold_edge(node_id,h_2,tm2); + } + break; + case ON_VERTEX: + { + //grab original vertex that is on commom intersection + mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); + Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; + if (node_id_to_vertex.size()<=node_id) + node_id_to_vertex.resize(node_id+1,Graph_traits::null_vertex()); + node_id_to_vertex[node_id]=target(h_2,tm2); + all_incident_faces_got_a_node_as_vertex(h_2,node_id,*tm2_ptr); + // check_node_on_non_manifold_vertex(node_id,h_2,tm2); + output_builder.set_vertex_id(target(h_2, tm2), node_id, tm2); + } + break; + default: + return; } - break; - case ON_VERTEX: - { - //grab original vertex that is on commom intersection - mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); - Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; - if (node_id_to_vertex.size()<=node_id) - node_id_to_vertex.resize(node_id+1,Graph_traits::null_vertex()); - node_id_to_vertex[node_id]=target(h_2,tm2); - all_incident_faces_got_a_node_as_vertex(h_2,node_id,*tm2_ptr); - // check_node_on_non_manifold_vertex(node_id,h_2,tm2); - output_builder.set_vertex_id(target(h_2, tm2), node_id, tm2); - } - break; - default: - return; - } + + if (tm1_ptr==const_mesh_ptr) return; CGAL_assertion(!is_target_coplanar || !is_source_coplanar); //coplanar edge are not forwarded @@ -626,7 +629,7 @@ public: ++it) { TriangleMesh& tm=*it->first; - if (!refine_tm2 && tm2_ptr==&tm) continue; + CGAL_assertion(&tm!=const_mesh_ptr); // Face_boundaries& face_boundaries=mesh_to_face_boundaries[&tm]; Node_to_target_of_hedge_map& nodes_to_hedge=it->second; @@ -696,7 +699,7 @@ public: it=on_edge.begin(); it!=on_edge.end(); ++it) { TriangleMesh& tm=*it->first; - if (!refine_tm2 && tm2_ptr==&tm) continue; + CGAL_assertion(&tm!=const_mesh_ptr); const VertexPointMap& vpm=vpms[&tm]; On_edge_map& on_edge_map=it->second; On_face_map& on_face_map=on_face[&tm]; @@ -792,7 +795,7 @@ public: it=on_face.begin(); it!=on_face.end(); ++it) { TriangleMesh& tm=*it->first; - if (!refine_tm2 && tm2_ptr==&tm) continue; + CGAL_assertion(&tm!=const_mesh_ptr); const VertexPointMap& vpm=vpms[&tm]; On_face_map& on_face_map=it->second; Face_boundaries& face_boundaries=mesh_to_face_boundaries[&tm]; From fd72d53d5f037b5fa43816bd462ab88aa56c47de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jun 2020 16:15:09 +0200 Subject: [PATCH 006/149] test do_not_modify --- .../Polygon_mesh_processing/test_corefine.cpp | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp index 5804b67a88f..5c7ca780315 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp @@ -71,11 +71,71 @@ void test(const char* f1, const char* f2) assert(P.is_valid()); assert(Q.is_valid()); } + +void test_no_modifications(const char* f1, const char* f2) +{ + std::cout << "Corefining " << f1 + << " and " << f2 << "\n"; + + std::cout << " with Surface_mesh\n"; + Surface_mesh sm1, sm2; + std::ifstream input(f1); + assert(input); + input >> sm1; + input.close(); + input.open(f2); + assert(input); + input >> sm2; + input.close(); + My_visitor sm_v; + + std::size_t nb_v_before1 = vertices(sm1).size(); + std::size_t nb_v_before2 = vertices(sm2).size(); + + CGAL::Polygon_mesh_processing::corefine(sm1, sm2, + CGAL::parameters::visitor(sm_v), + CGAL::parameters::do_not_modify(true)); + + std::size_t nb_v_after1 = vertices(sm1).size(); + std::size_t nb_v_after2 = vertices(sm2).size(); + + assert(sm1.is_valid()); + assert(sm2.is_valid()); + assert(nb_v_after2==nb_v_before2); + + assert((*(sm_v.i) != 0) == (nb_v_before1!=nb_v_after1)); + + std::cout << " with Polyhedron_3\n"; + Polyhedron_3 P, Q; + input.open(f1); + assert(input); + input >> P; + input.close(); + input.open(f2); + assert(input); + input >> Q; + My_visitor sm_p; + + nb_v_before1 = vertices(P).size(); + nb_v_before2 = vertices(Q).size(); + CGAL::Polygon_mesh_processing::corefine(P, Q, + CGAL::parameters::visitor(sm_p).do_not_modify(true)); + nb_v_after1 = vertices(P).size(); + nb_v_after2 = vertices(Q).size(); + + assert(nb_v_after1==nb_v_before1); + assert((*(sm_p.i) != 0) == (nb_v_before2!=nb_v_after2)); + + assert(P.is_valid()); + assert(Q.is_valid()); +} + int main(int argc, char** argv) { for(int i=0; i< (argc-1)/2;++i) { test(argv[2*i+1], argv[2*(i+1)]); test(argv[2*(i+1)], argv[2*i+1]); + test_no_modifications(argv[2*(i+1)], argv[2*i+1]); } } From 50591915347fed2ef405f99ce2279486561c874d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jun 2020 16:30:02 +0200 Subject: [PATCH 007/149] remove tabs + update doc --- BGL/test/BGL/test_cgal_bgl_named_params.cpp | 2 +- .../Polygon_mesh_processing/corefinement.h | 2 + .../internal/Corefinement/Visitor.h | 48 +++++++++---------- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/BGL/test/BGL/test_cgal_bgl_named_params.cpp b/BGL/test/BGL/test_cgal_bgl_named_params.cpp index f2669e50313..04fcec337e6 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -355,7 +355,7 @@ int main() .halfedges_keeper(A<62>(62)) .use_convex_hull(A<63>(63)) .do_simplify_border(A<64>(64)) - .do_not_modify(A<65>(65)) + .do_not_modify(A<65>(65)) .point_map(A<9000>(9000)) .query_point_map(A<9001>(9001)) .normal_map(A<9002>(9002)) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 53c8703f8c7..568187c2dcc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -628,6 +628,8 @@ corefine_and_compute_difference( TriangleMesh& tm1, * \cgalParamEnd * \cgalParamBegin{do_not_modify} if `true`, the corresponding mesh will not be updated. The default value is `false`. * Obviously if this parameter is set to `true` for both meshes nothing will be done. + * An interesting property of this option is that it removes the self-intersection free + * pre-condition on the other mesh that is modified. * \cgalParamEnd * \cgalNamedParamsEnd * diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index 0f71e8df6f9..f52022861ac 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -337,30 +337,30 @@ public: if (tm2_ptr!=const_mesh_ptr) switch(type) { - case ON_FACE: //Face intersected by an edge - on_face[tm2_ptr][face(h_2,tm2)].push_back(node_id); - break; - case ON_EDGE: //Edge intersected by an edge - { - on_edge[tm2_ptr][edge(h_2,tm2)].push_back(node_id); - // check_node_on_non_manifold_edge(node_id,h_2,tm2); - } - break; - case ON_VERTEX: - { - //grab original vertex that is on commom intersection - mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); - Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; - if (node_id_to_vertex.size()<=node_id) - node_id_to_vertex.resize(node_id+1,Graph_traits::null_vertex()); - node_id_to_vertex[node_id]=target(h_2,tm2); - all_incident_faces_got_a_node_as_vertex(h_2,node_id,*tm2_ptr); - // check_node_on_non_manifold_vertex(node_id,h_2,tm2); - output_builder.set_vertex_id(target(h_2, tm2), node_id, tm2); - } - break; - default: - return; + case ON_FACE: //Face intersected by an edge + on_face[tm2_ptr][face(h_2,tm2)].push_back(node_id); + break; + case ON_EDGE: //Edge intersected by an edge + { + on_edge[tm2_ptr][edge(h_2,tm2)].push_back(node_id); + // check_node_on_non_manifold_edge(node_id,h_2,tm2); + } + break; + case ON_VERTEX: + { + //grab original vertex that is on commom intersection + mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); + Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; + if (node_id_to_vertex.size()<=node_id) + node_id_to_vertex.resize(node_id+1,Graph_traits::null_vertex()); + node_id_to_vertex[node_id]=target(h_2,tm2); + all_incident_faces_got_a_node_as_vertex(h_2,node_id,*tm2_ptr); + // check_node_on_non_manifold_vertex(node_id,h_2,tm2); + output_builder.set_vertex_id(target(h_2, tm2), node_id, tm2); + } + break; + default: + return; } if (tm1_ptr==const_mesh_ptr) return; From b9a12bf901729484c2575987ad2599dff32384d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jun 2020 16:36:10 +0200 Subject: [PATCH 008/149] update doc --- .../include/CGAL/Polygon_mesh_processing/corefinement.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 568187c2dcc..2a138d88bbc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -628,8 +628,8 @@ corefine_and_compute_difference( TriangleMesh& tm1, * \cgalParamEnd * \cgalParamBegin{do_not_modify} if `true`, the corresponding mesh will not be updated. The default value is `false`. * Obviously if this parameter is set to `true` for both meshes nothing will be done. - * An interesting property of this option is that it removes the self-intersection free - * pre-condition on the other mesh that is modified. + * An interesting property of this option is that if set to `true` for one mesh, + * it removes the self-intersection free pre-condition on the other mesh that is modified. * \cgalParamEnd * \cgalNamedParamsEnd * From 802fa469d55dd7de706c532564c50a68403ec568 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Wed, 17 Jun 2020 08:10:32 +0200 Subject: [PATCH 009/149] Apply suggestions from code review Co-authored-by: Mael --- .../include/CGAL/Polygon_mesh_processing/corefinement.h | 6 ++++-- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 2a138d88bbc..209f6eaf2b4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -628,8 +628,8 @@ corefine_and_compute_difference( TriangleMesh& tm1, * \cgalParamEnd * \cgalParamBegin{do_not_modify} if `true`, the corresponding mesh will not be updated. The default value is `false`. * Obviously if this parameter is set to `true` for both meshes nothing will be done. - * An interesting property of this option is that if set to `true` for one mesh, - * it removes the self-intersection free pre-condition on the other mesh that is modified. + * An interesting property of this option is that when set to `true` for one mesh, + * the other mesh is no longer required to be without self-intersection. * \cgalParamEnd * \cgalNamedParamsEnd * @@ -654,8 +654,10 @@ corefine( TriangleMesh& tm1, const_mesh_ptr=&tm1; } else + { if (choose_parameter(get_parameter(np2, internal_np::do_not_modify), false)) const_mesh_ptr=&tm2; + } const bool throw_on_self_intersection = choose_parameter(get_parameter(np1, internal_np::throw_on_self_intersection), false); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index f52022861ac..62a021acfbd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -335,6 +335,7 @@ public: //forward to the visitor // user_visitor.new_node_added(node_id, type, h_1, h_2, is_target_coplanar, is_source_coplanar); // NODE_VISITOR_TAG if (tm2_ptr!=const_mesh_ptr) + { switch(type) { case ON_FACE: //Face intersected by an edge @@ -362,6 +363,7 @@ public: default: return; } + } if (tm1_ptr==const_mesh_ptr) return; From ab12e31bec16ddfb923ffbacf668d04a908cccdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 17 Jun 2020 08:33:50 +0200 Subject: [PATCH 010/149] please doc --- .../doc/Polygon_mesh_processing/NamedParameters.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt index 5fe5a41c38f..6b8001b1025 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt @@ -369,6 +369,13 @@ and make the operation impossible with the current version of the code. Default: `false` \cgalNPEnd +\cgalNPBegin{do_not_modify} \anchor PMP_do_not_modify +Parameter used in `corefine()` function to prevent the refinement of one of the two input meshes. +\n +Type: `bool` \n +Default: `false` +\cgalNPEnd + \cgalNPBegin{clip_volume} \anchor PMP_clip_volume Parameter used in `clip()` functions to clip a volume rather than a surface. \n From 035b8786b9574c6f4d8cdfd97b8e206a7141a674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 22 Jun 2020 09:53:13 +0200 Subject: [PATCH 011/149] remove tws --- .../test/Polygon_mesh_processing/test_corefine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp index 5c7ca780315..10dd9ff76d7 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp @@ -91,7 +91,7 @@ void test_no_modifications(const char* f1, const char* f2) std::size_t nb_v_before1 = vertices(sm1).size(); std::size_t nb_v_before2 = vertices(sm2).size(); - + CGAL::Polygon_mesh_processing::corefine(sm1, sm2, CGAL::parameters::visitor(sm_v), CGAL::parameters::do_not_modify(true)); @@ -102,7 +102,7 @@ void test_no_modifications(const char* f1, const char* f2) assert(sm1.is_valid()); assert(sm2.is_valid()); assert(nb_v_after2==nb_v_before2); - + assert((*(sm_v.i) != 0) == (nb_v_before1!=nb_v_after1)); std::cout << " with Polyhedron_3\n"; From fd875cf71a1d25dcfc546662f7b0765b1aede504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 1 Jul 2020 16:07:09 +0200 Subject: [PATCH 012/149] add do_no_modify option to split --- .../include/CGAL/Polygon_mesh_processing/clip.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index d059c3eb33d..1b054befbf0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -432,19 +432,19 @@ void split_along_edges(TriangleMesh& tm, * \cgalParamBegin{face_index_map} * a property map containing a unique index for each face of `tm` (`clipper`). * \cgalParamEnd - * \cgalParamBegin{visitor} a class model of `PMPCorefinementVisitor` + * \cgalParamBegin{visitor} (`np_tm` only) a class model of `PMPCorefinementVisitor` * that is used to track the creation of new faces. * \cgalParamEnd - * \cgalParamBegin{throw_on_self_intersection} if `true`, + * \cgalParamBegin{throw_on_self_intersection} (`np_tm` only) if `true`, * the set of triangles closed to the intersection of `tm` and `clipper` will be * checked for self-intersections and `CGAL::Polygon_mesh_processing::Corefinement::Self_intersection_exception` * will be thrown if at least one is found. Default value is `false`. * \cgalParamEnd - * \cgalParamBegin{clip_volume} if `true` and `tm` is closed, the clipping will be done on + * \cgalParamBegin{clip_volume} (`np_tm` only) if `true` and `tm` is closed, the clipping will be done on * the volume \link coref_def_subsec bounded \endlink by `tm` rather than on its surface * (i.e., `tm` will be kept closed). Default value is `false`. * \cgalParamEnd - * \cgalParamBegin{use_compact_clipper} if `false`, the parts of `tm` coplanar with `clipper` + * \cgalParamBegin{use_compact_clipper} (`np_tm` only) if `false`, the parts of `tm` coplanar with `clipper` * will not be part of the output. Default value is `true`. * \cgalParamEnd * \cgalNamedParamsEnd @@ -638,6 +638,10 @@ bool clip(TriangleMesh& tm, * checked for self-intersections and `CGAL::Polygon_mesh_processing::Corefinement::Self_intersection_exception` * will be thrown if at least one is found. * \cgalParamEnd + * \cgalParamBegin{do_not_modify} (`np_s` only) if `true`, `splitter` will not be modified. The default value is `false`. + * An interesting property of this option is that when set to `true`, + * `tm` is no longer required to be without self-intersection. + * \cgalParamEnd * \cgalNamedParamsEnd */ template Date: Wed, 1 Jul 2020 21:03:31 +0200 Subject: [PATCH 013/149] remove useless test (done in the main call) --- .../Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h index 2c81aa7c824..e282e092fa1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h @@ -75,13 +75,6 @@ public: { typename Traits::Bounding_box bbox = m_helper.get_tree_bbox(tree); - if( point.x() < bbox.xmin() || point.x() > bbox.xmax() - || point.y() < bbox.ymin() || point.y() > bbox.ymax() - || point.z() < bbox.zmin() || point.z() > bbox.zmax() ) - { - return ON_UNBOUNDED_SIDE; - } - //the direction of the vertical ray depends on the position of the point in the bbox //in order to limit the expected number of nodes visited. Ray query = ray_functor(point, vector_functor(0,0,(2*point.z() < bbox.zmax()+bbox.zmin()?-1:1))); From d64faf31995d4ea4558f07960ff56696865a8407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 1 Jul 2020 21:03:55 +0200 Subject: [PATCH 014/149] add non-documented operator to do queries using points from another kernel --- .../Ray_3_Triangle_3_traversal_traits.h | 54 +++++++++++++ .../include/CGAL/Side_of_triangle_mesh.h | 75 +++++++++++++++++++ 2 files changed, 129 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h index 285017791a5..130c2732ea1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h @@ -216,6 +216,60 @@ public: } }; +//special case when ray query is from another Kernel K1 is the kernel compatible with the AABB-tree +template +class K2_Ray_3_K1_Triangle_3_traversal_traits +{ + //the status indicates whether the query point is strictly inside the polyhedron, and the number of intersected triangles if yes + std::pair& m_status; + bool m_stop; + const AABBTraits& m_aabb_traits; + typedef typename AABBTraits::Primitive Primitive; + typedef CGAL::AABB_node Node; + Helper m_helper; + CGAL::Cartesian_converter to_K2; + +public: + K2_Ray_3_K1_Triangle_3_traversal_traits(std::pair& status, + const AABBTraits& aabb_traits, + const Helper& h) + :m_status(status), m_stop(false), m_aabb_traits(aabb_traits), m_helper(h) + {m_status.first=true;} + + bool go_further() const { return !m_stop; } + + template + void intersection(const Query& query, const Primitive& primitive) + { + Intersections::internal::r3t3_do_intersect_endpoint_position_visitor visitor; + std::pair res= + Intersections::internal::do_intersect(to_K2(m_helper.get_primitive_datum(primitive, m_aabb_traits)), + query, K2(), visitor); + + if (res.first){ + switch (res.second){ + case Intersections::internal::R3T3_intersection::CROSS_FACET: + ++m_status.second; + break; + case Intersections::internal::R3T3_intersection::ENDPOINT_IN_TRIANGLE: + m_status.first=false; + m_stop=true; + break; + default: + m_status.first=boost::logic::indeterminate; + m_stop=true; + } + } + } + + template + bool do_intersect(const Query& query, const Node& node) const + { + return CGAL::do_intersect(query, m_helper.get_node_bbox(node)); + } +}; + + }// namespace internal }// namespace CGAL diff --git a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h index 20ec968d50a..f0c23942f60 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -242,6 +242,81 @@ public: } } +#ifndef DOXYGEN_RUNNING + template + Bounded_side operator()(const typename K2::Point_3& point, const K2& k2) const + { + if(point.x() < box.xmin() + || point.x() > box.xmax() + || point.y() < box.ymin() + || point.y() > box.ymax() + || point.z() < box.zmin() + || point.z() > box.zmax()) + { + return CGAL::ON_UNBOUNDED_SIDE; + } + +#ifdef CGAL_HAS_THREADS + AABB_tree_* tree_ptr = + const_cast(atomic_tree_ptr.load(std::memory_order_acquire)); +#endif + // Lazily build the tree only when needed + if (tree_ptr==nullptr) + { +#ifdef CGAL_HAS_THREADS + CGAL_SCOPED_LOCK(tree_mutex); + tree_ptr = const_cast(atomic_tree_ptr.load(std::memory_order_relaxed)); +#endif + CGAL_assertion(tm_ptr != nullptr && opt_vpm!=boost::none); + if (tree_ptr==nullptr) + { + tree_ptr = new AABB_tree(faces(*tm_ptr).first, + faces(*tm_ptr).second, + *tm_ptr, *opt_vpm); + const_cast(tree_ptr)->build(); +#ifdef CGAL_HAS_THREADS + atomic_tree_ptr.store(tree_ptr, std::memory_order_release); +#endif + } + } + + typedef typename Kernel_traits::Kernel K1; + typedef typename AABB_tree::AABB_traits AABB_traits; + typedef internal::Default_tree_helper Helper; + Helper helper; + typename AABB_traits::Bounding_box bbox = helper.get_tree_bbox(*tree_ptr); + + static const unsigned int seed = 1340818006; + CGAL::Random rg(seed); // seed some value for make it easy to debug + Random_points_on_sphere_3 random_point(1.,rg); + + typename K2::Construct_ray_3 ray = k2.construct_ray_3_object(); + typename K2::Construct_vector_3 vector = k2.construct_vector_3_object(); + + do { //retry with a random ray + typename K2::Ray_3 query = ray(point, vector(CGAL::ORIGIN,*random_point++)); + + std::pair + status( boost::logic::tribool(boost::logic::indeterminate), 0); + + internal::K2_Ray_3_K1_Triangle_3_traversal_traits + traversal_traits(status, tree_ptr->traits(), helper); + + tree_ptr->traversal(query, traversal_traits); + + if ( !boost::logic::indeterminate(status.first) ) + { + if (status.first) + return (status.second&1) == 1 ? ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE; + //otherwise the point is on the facet + return ON_BOUNDARY; + } + } while (true); + return ON_BOUNDARY; // should never be reached + } + +#endif + }; } // namespace CGAL From 1246e9e375dc8e1dd6f2739f9d85038405cf4fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 1 Jul 2020 21:04:52 +0200 Subject: [PATCH 015/149] add a generic clip version that handles self-intersections --- .../CGAL/Polygon_mesh_processing/clip.h | 110 +++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 1b054befbf0..ad1201317fe 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -400,6 +401,97 @@ void split_along_edges(TriangleMesh& tm, CGAL_assertion(is_valid_polygon_mesh(tm)); } +template +void +generic_clip_impl( + TriangleMesh& tm1, + TriangleMesh& tm2, + const NamedParameters1& np1, + const NamedParameters2& np2) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + +// Vertex point maps + //for input meshes + typedef typename GetVertexPointMap::type Vpm; + typedef typename GetVertexPointMap::type Vpm2; + CGAL_USE_TYPE(Vpm2); + CGAL_assertion_code( + static const bool same_vpm = (boost::is_same::value); ) + CGAL_static_assertion(same_vpm); + + Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), + get_property_map(boost::vertex_point, tm1)); + + Vpm vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), + get_property_map(boost::vertex_point, tm2)); + + if (&tm1==&tm2) + { + // TODO mark all edges + return; + } + + // handle case of empty meshes (isolated vertices are ignored) + if (faces(tm1).empty()) + return; + +// Edge is-constrained maps + //for input meshes + typedef typename internal_np::Lookup_named_param_def < + internal_np::edge_is_constrained_t, + NamedParameters1, + Corefinement::No_mark//default + > ::type User_ecm1; + + // User and internal edge is-constrained map + typedef typename boost::template property_map >::type Algo_ecm1; + typedef Corefinement::No_mark Ecm2; + typedef OR_property_map Ecm1; + typedef Corefinement::Ecm_bind Ecm_in; + + Algo_ecm1 algo_ecm1 = get(CGAL::dynamic_edge_property_t(), tm1); + Ecm1 ecm1 = Ecm1(algo_ecm1, choose_parameter(get_parameter(np1, internal_np::edge_is_constrained))); + Ecm2 ecm2; + + // Face index point maps + typedef typename CGAL::GetInitializedFaceIndexMap::type FaceIndexMap1; + FaceIndexMap1 fid_map1 = get_initialized_face_index_map(tm1, np1); + + const bool use_compact_clipper = + choose_parameter(get_parameter(np1, internal_np::use_compact_clipper), true); + + + // User visitor + typedef typename internal_np::Lookup_named_param_def < + internal_np::graph_visitor_t, + NamedParameters1, + Corefinement::Default_visitor//default + > ::type User_visitor; + User_visitor uv(choose_parameter(get_parameter(np1, internal_np::graph_visitor))); + + // surface intersection algorithm call + typedef Corefinement::Generic_clip_output_builder Ob; + + typedef Corefinement::Surface_intersection_visitor_for_corefinement< + TriangleMesh, Vpm, Ob, Ecm_in, User_visitor> Algo_visitor; + Ecm_in ecm_in(tm1,tm2,ecm1,ecm2); + Ob ob(tm1, tm2, vpm1, vpm2, algo_ecm1, fid_map1, use_compact_clipper); + + Corefinement::Intersection_of_triangle_meshes + functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm_in,&tm2)); + functor(CGAL::Emptyset_iterator(), false, true); +} + } // end of internal namespace /** @@ -447,6 +539,12 @@ void split_along_edges(TriangleMesh& tm, * \cgalParamBegin{use_compact_clipper} (`np_tm` only) if `false`, the parts of `tm` coplanar with `clipper` * will not be part of the output. Default value is `true`. * \cgalParamEnd + * \cgalParamBegin{do_not_modify} (`np_c` only) if `true`, `clipper` will not be modified. The default value is `false`. + * An interesting property of this option is that when set to `true`, + * `tm` is no longer required to be without self-intersection. + * Setting this option to `true` will automatically set `throw_on_self_intersection` to `false` + * and `clip_volume` to `false`. + * \cgalParamEnd * \cgalNamedParamsEnd * * @return `true` if the output surface mesh is manifold. @@ -461,6 +559,14 @@ clip(TriangleMesh& tm, const NamedParameters1& np_tm, const NamedParameters2& np_c) { + if (parameters::choose_parameter(parameters::get_parameter(np_c, internal_np::do_not_modify), false)) + { + CGAL_assertion(is_closed(clipper)); + + internal::generic_clip_impl(tm, clipper, np_tm, np_c); + return true; + } + const bool clip_volume = parameters::choose_parameter(parameters::get_parameter(np_tm, internal_np::clip_volume), false); @@ -630,10 +736,10 @@ bool clip(TriangleMesh& tm, * If this parameter is omitted, an internal property map for * `CGAL::vertex_point_t` must be available in `TriangleMesh` * \cgalParamEnd - * \cgalParamBegin{visitor} a class model of `PMPCorefinementVisitor` + * \cgalParamBegin{visitor} (`np_s` only) a class model of `PMPCorefinementVisitor` * that is used to track the creation of new faces. * \cgalParamEnd - * \cgalParamBegin{throw_on_self_intersection} if `true`, + * \cgalParamBegin{throw_on_self_intersection} (`np_s` only) if `true`, * the set of triangles closed to the intersection of `tm` and `splitter` will be * checked for self-intersections and `CGAL::Polygon_mesh_processing::Corefinement::Self_intersection_exception` * will be thrown if at least one is found. From d4122d945ad05de650e5b7fe575417be22c9d07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 2 Jul 2020 10:36:29 +0200 Subject: [PATCH 016/149] better include the new header :( --- .../Generic_clip_output_builder.h | 241 ++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h new file mode 100644 index 00000000000..f391696cb3a --- /dev/null +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h @@ -0,0 +1,241 @@ +// Copyright (c) 2020 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot + +#ifndef CGAL_POLYGON_MESH_PROCESSING_INTERNAL_GENERIC_CLIP_OUTPUT_BUILDER_H +#define CGAL_POLYGON_MESH_PROCESSING_INTERNAL_GENERIC_CLIP_OUTPUT_BUILDER_H + +#include + + +#include + +#include +#include +#include + +#include +#include + +#include + + +namespace CGAL { +namespace Polygon_mesh_processing { +namespace Corefinement { + + +namespace PMP=Polygon_mesh_processing; +namespace params=PMP::parameters; + +template +class Generic_clip_output_builder +{ +//Default typedefs + typedef typename Default::Get< + Kernel_, + typename Kernel_traits< + typename boost::property_traits::value_type + >::Kernel >::type Kernel; + +// graph_traits typedefs + typedef TriangleMesh TM; + typedef boost::graph_traits GT; + typedef typename GT::edge_descriptor edge_descriptor; + typedef typename GT::face_descriptor face_descriptor; + typedef typename GT::halfedge_descriptor halfedge_descriptor; + typedef typename GT::vertex_descriptor vertex_descriptor; +// Internal typedefs + typedef std::size_t Node_id; + typedef std::pair Node_id_pair; + // to maintain a halfedge on each polyline per TriangleMesh + pair + // with first = "is the key (pair) was reversed?" and + // second is the number of edges -1 in the polyline + typedef std::map< Node_id_pair, + std::pair< std::map, + std::pair > > + An_edge_per_polyline_map; + + typedef boost::unordered_map Node_id_map; + typedef boost::unordered_map Edge_map; +//Data members + TriangleMesh &tm1, &tm2; + // property maps of input meshes + const VertexPointMap vpm1; + const VertexPointMap vpm2; + Ecm1 ecm1; + FaceIdMap1 fids1; + bool use_compact_clipper; + + // mapping vertex to node id + Node_id_map vertex_to_node_id1; + + // orientation of input surface meshes + bool is_tm2_inside_out; + // constants + const Node_id NID; + + typename An_edge_per_polyline_map::iterator last_polyline; + + Node_id get_node_id(vertex_descriptor v, + const Node_id_map& node_ids) + { + typename Node_id_map::const_iterator it = node_ids.find(v); + if (it == node_ids.end()) + return NID; + return it->second; + } + +public: + + Generic_clip_output_builder(TriangleMesh& tm1, + TriangleMesh& tm2, + const VertexPointMap vpm1, + const VertexPointMap vpm2, + const Ecm1& ecm1, + FaceIdMap1 fids1, + bool use_compact_clipper) + : tm1(tm1), tm2(tm2) + , vpm1(vpm1), vpm2(vpm2) + , ecm1(ecm1) + , fids1(fids1) + , use_compact_clipper(use_compact_clipper) + , is_tm2_inside_out( !PMP::is_outward_oriented(tm2, parameters::vertex_point_map(vpm2)) ) + , NID((std::numeric_limits::max)()) + {} + +// functions called by the intersection visitor + void start_new_polyline(Node_id, Node_id) {} + void add_node_to_polyline(Node_id) {} + void set_edge_per_polyline(TriangleMesh&, Node_id_pair, halfedge_descriptor){} + + void set_vertex_id(vertex_descriptor v, Node_id node_id, const TriangleMesh& tm) + { + CGAL_assertion(&tm == &tm1); + vertex_to_node_id1.insert( std::make_pair(v, node_id) ); + } + + template + void operator()( + const Nodes_vector& nodes, + bool /* input_have_coplanar_faces */, + const boost::dynamic_bitset<>& /* is_node_of_degree_one */, + const Mesh_to_map_node&) + { + // The property map must be either writable or well-initialized + if( CGAL::internal::Is_writable_property_map::value && + !BGL::internal::is_index_map_valid(fids1, num_faces(tm1), faces(tm1)) ) + { + BGL::internal::initialize_face_index_map(fids1, tm1); + } + CGAL_assertion(BGL::internal::is_index_map_valid(fids1, num_faces(tm1), faces(tm1))); + + // (1) Assign a patch id to each face indicating in which connected + // component limited by intersection edges of the surface they are. + std::vector tm1_patch_ids( num_faces(tm1),NID ); + + std::size_t nb_patches_tm1 = + PMP::connected_components(tm1, + bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])), + params::edge_is_constrained_map(ecm1) + .face_index_map(fids1)); + + std::vector tm1_patch_sizes(nb_patches_tm1, 0); + for(std::size_t i : tm1_patch_ids) + if(i!=NID) + ++tm1_patch_sizes[i]; + + // Use the class Side_of_triangle_mesh to classify each patch + boost::dynamic_bitset<> patch_status_not_set_tm1(nb_patches_tm1); + patch_status_not_set_tm1.set(); + + typedef Side_of_triangle_mesh Inside_poly_test; + + CGAL::Bounded_side in_tm2 = is_tm2_inside_out + ? ON_UNBOUNDED_SIDE : ON_BOUNDED_SIDE; + + Inside_poly_test inside_tm2(tm2, vpm2); + std::size_t nb_classified=0; + std::vector cc_to_keep; + for(face_descriptor f : faces(tm1)) + { + const std::size_t f_id = get(fids1, f); + const std::size_t patch_id = tm1_patch_ids[ f_id ]; + if ( patch_status_not_set_tm1.test( patch_id ) ) + { + patch_status_not_set_tm1.reset( patch_id ); + halfedge_descriptor h = halfedge(f, tm1); + Node_id index_p1 = get_node_id(target(h, tm1), vertex_to_node_id1); + std::array fnids = { index_p1, index_p1, index_p1 }; + if (index_p1 != NID) + { + h=next(h, tm1); + index_p1 = get_node_id(target(h, tm1), vertex_to_node_id1); + fnids[1]=index_p1; + if (index_p1 != NID) + { + h=next(h, tm1); + index_p1 = get_node_id(target(h, tm1), vertex_to_node_id1); + fnids[2]=index_p1; + } + } + if (index_p1 != NID) + { + typename Nodes_vector::Exact_kernel ek; + typedef typename Nodes_vector::Exact_kernel::Point_3 Exact_point_3; + Exact_point_3 e_centroid = centroid(nodes.exact_node(fnids[0]), + nodes.exact_node(fnids[1]), + nodes.exact_node(fnids[2])); + + Bounded_side position = inside_tm2(e_centroid, ek); + if ( position==ON_BOUNDARY ) + { + if (use_compact_clipper) + { + cc_to_keep.push_back(patch_id); + } + } + else + if ( position == in_tm2 ) + { + cc_to_keep.push_back(patch_id); + } + } + else + { + Bounded_side position = inside_tm2( get(vpm1, target(h, tm1))); + CGAL_assertion( position != ON_BOUNDARY); + if ( position == in_tm2 ) + { + cc_to_keep.push_back(patch_id); + } + } + if ( ++nb_classified==nb_patches_tm1) break; + } + } + + PMP::keep_connected_components(tm1, cc_to_keep, bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0]))); + } +}; + + +} } } // CGAL::Polygon_mesh_processing::Corefinement + +#undef CGAL_COREF_FUNCTION_CALL +#endif // CGAL_POLYGON_MESH_PROCESSING_INTERNAL_GENERIC_CLIP_OUTPUT_BUILDER_H From d6e39a16dc62d49c72426cff12b04be1e4efd008 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 2 Jul 2020 23:49:42 +0200 Subject: [PATCH 017/149] Special case the circumcenter computation for few points --- .../NewKernel_d/function_objects_cartesian.h | 129 +++++++++++------- 1 file changed, 78 insertions(+), 51 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index 5f534070db2..38935fd42b0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -616,7 +616,36 @@ template struct Construct_circumcenter : Store_kernel { Point const& p0=*f; int d = pd(p0); - if (d+1 == std::distance(f,e)) + int k = static_cast(std::distance(f,e)); + if(k==1) return p0; + if(k==2){ + typename Get_functor::type mid(this->kernel()); + return mid(p0, *++f); + } + if(k==3){ + // Same equations as in the general case, but solved by hand (Cramer) + // (c-r).(p-r)=(p-r)²/2 + // (c-r).(q-r)=(q-r)²/2 + typedef typename Get_type::type Vector; + typename Get_functor::type sl(this->kernel()); + typename Get_functor::type sp(this->kernel()); + typename Get_functor::type sv(this->kernel()); + typename Get_functor::type dp(this->kernel()); + typename Get_functor::type tp(this->kernel()); + Iter f2=f; + Point const& q=*++f2; + Point const& r=*++f2; + Vector u = dp(p0, r); + Vector v = dp(q, r); + FT uv = sp(u, v); + FT u2 = sl(u); + FT v2 = sl(v); + FT den = 2 * (u2 * v2 - CGAL::square(uv)); + FT a = (u2 - uv) * v2 / den; + FT b = (v2 - uv) * u2 / den; + return tp(tp(r, sv(u, a)), sv(v, b)); + } + if (k == d+1) { // 2*(x-y).c == x^2-y^2 typedef typename LA::Square_matrix Matrix; @@ -641,61 +670,59 @@ template struct Construct_circumcenter : Store_kernel { //std::cout << "Sol: " << res << std::endl; return cp(d,LA::vector_begin(res),LA::vector_end(res)); } - else - { - /* - * Matrix P=(p1, p2, ...) (each point as a column) - * Matrix Q=2*t(p2-p1,p3-p1, ...) (each vector as a line) - * Matrix M: QP, adding a line of 1 at the top - * Vector B: (1, p2^2-p1^2, p3^2-p1^2, ...) - * Solve ML=B, the center of the sphere is PL - * - * It would likely be faster to write P then transpose, multiply, - * etc instead of doing it by hand. - */ - // TODO: check for degenerate cases? - typedef typename R_::Max_ambient_dimension D2; - typedef typename R_::LA::template Rebind_dimension::Other LAd; - typedef typename LAd::Square_matrix Matrix; - typedef typename LAd::Vector Vec; - typename Get_functor::type sp(this->kernel()); - int k=static_cast(std::distance(f,e)); - Matrix m(k,k); - Vec b(k); - Vec l(k); - int j,i=0; - // We are doing a quadratic number of *f, which can be costly with transforming_iterator. - for(Iter f2=f;f2!=e;++f2,++i){ - Point const& p2=*f2; - b(i)=m(i,i)=sdo(p2); - j=0; - for(Iter f3=f;f3!=e;++f3,++j){ - m(j,i)=m(i,j)=sp(p2,*f3); - } - } - for(i=1;i::Other LAd; + typedef typename LAd::Square_matrix Matrix; + typedef typename LAd::Vector Vec; + typename Get_functor::type sp(this->kernel()); + Matrix m(k,k); + Vec b(k); + Vec l(k); + int j,i=0; + // We are doing a quadratic number of *f, which can be costly with transforming_iterator. + for(Iter f2=f;f2!=e;++f2,++i){ + Point const& p2=*f2; + b(i)=m(i,i)=sdo(p2); j=0; - for(Iter f2=f;f2!=e;++f2,++j){ - for(i=0;i Date: Mon, 6 Jul 2020 22:54:38 +0200 Subject: [PATCH 018/149] More circumcenter tests --- .../NewKernel_d/function_objects_cartesian.h | 1 + NewKernel_d/test/NewKernel_d/Epick_d.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index 38935fd42b0..b6568308226 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -617,6 +617,7 @@ template struct Construct_circumcenter : Store_kernel { Point const& p0=*f; int d = pd(p0); int k = static_cast(std::distance(f,e)); + CGAL_assume(k>=1); if(k==1) return p0; if(k==2){ typename Get_functor::type mid(this->kernel()); diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index 21c64288380..c72d5d207e6 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -712,6 +712,22 @@ void test3(){ std::ostringstream sv1; sv1 << v1; assert(sv1.str()=="3 3 2 1"); std::istringstream sv2("3 4 5 6"); sv2 >> v1; assert(v1[0]==4&&v1[1]==5); } +template +void test4(){ + typedef typename Ker::Point_d P; + typedef typename Ker::Construct_circumcenter_d CCc; + typedef typename Ker::Equal_d E; + Ker k(4); + CCc ccc Kinit(construct_circumcenter_d_object); + E ed Kinit(equal_d_object); + auto mkpt=[](auto...x){double l[]{(double)x...};return P(std::begin(l), std::end(l));}; + P tab1[]={mkpt(15,20,40,80),mkpt(10,23,36,80),mkpt(10,20,40,85),mkpt(10,15,40,80),mkpt(13,20,40,76)}; + assert(ed(ccc(tab1+0, tab1+5),mkpt(10,20,40,80))); + P tab2[]={mkpt(15,20,40,80),mkpt(13,24,40,80),mkpt(10,25,40,80),mkpt(10,20,43,84)}; + assert(ed(ccc(tab2+0, tab2+4),mkpt(10,20,40,80))); + P tab3[]={mkpt(15,20,35,80),mkpt(10,25,40,75),mkpt(13,24,37,76)}; + assert(ed(ccc(tab3+0, tab3+3),mkpt(10,20,40,80))); +} template struct CGAL::Epick_d >; template struct CGAL::Epick_d >; template struct CGAL::Epick_d; @@ -733,6 +749,7 @@ int main(){ test2>>(); test3>>(); test3>(); + test4>(); #endif } From 22e8b9cc224c7591006020f4142bec67424fe79a Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 7 Jul 2020 13:46:48 +0200 Subject: [PATCH 019/149] Rewrite general case of circumcenter --- .../NewKernel_d/function_objects_cartesian.h | 102 +++++++----------- 1 file changed, 41 insertions(+), 61 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index b6568308226..d56fe9f632d 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -603,31 +603,28 @@ namespace CartesianDKernelFunctors { template struct Construct_circumcenter : Store_kernel { CGAL_FUNCTOR_INIT_STORE(Construct_circumcenter) typedef typename Get_type::type Point; + typedef typename Get_type::type Vector; typedef Point result_type; typedef typename Get_type::type FT; template result_type operator()(Iter f, Iter e)const{ - typedef typename Get_type::type Point; - typedef typename R_::LA LA; - typename Get_functor::type c(this->kernel()); - typename Get_functor >::type cp(this->kernel()); typename Get_functor::type pd(this->kernel()); - typename Get_functor::type sdo(this->kernel()); Point const& p0=*f; int d = pd(p0); int k = static_cast(std::distance(f,e)); + // Sorted from fastest to slowest, whether the dimension is 2, 3 or 4. It may be worth checking at some point. CGAL_assume(k>=1); if(k==1) return p0; if(k==2){ typename Get_functor::type mid(this->kernel()); return mid(p0, *++f); } + // TODO: check for degenerate cases in all the following cases? if(k==3){ // Same equations as in the general case, but solved by hand (Cramer) // (c-r).(p-r)=(p-r)²/2 // (c-r).(q-r)=(q-r)²/2 - typedef typename Get_type::type Vector; typename Get_functor::type sl(this->kernel()); typename Get_functor::type sp(this->kernel()); typename Get_functor::type sv(this->kernel()); @@ -644,14 +641,19 @@ template struct Construct_circumcenter : Store_kernel { FT den = 2 * (u2 * v2 - CGAL::square(uv)); FT a = (u2 - uv) * v2 / den; FT b = (v2 - uv) * u2 / den; + // Wasteful if we only want the radius return tp(tp(r, sv(u, a)), sv(v, b)); } if (k == d+1) { // 2*(x-y).c == x^2-y^2 + typedef typename R_::LA LA; typedef typename LA::Square_matrix Matrix; typedef typename LA::Vector Vec; typedef typename LA::Construct_vector CVec; + typename Get_functor::type c(this->kernel()); + typename Get_functor >::type cp(this->kernel()); + typename Get_functor::type sdo(this->kernel()); FT const& n0 = sdo(p0); Matrix m(d,d); Vec b = typename CVec::Dimension()(d); @@ -665,70 +667,48 @@ template struct Construct_circumcenter : Store_kernel { b[i] = sdo(p) - n0; } CGAL_assertion (i == d); - Vec res = typename CVec::Dimension()(d);; - //std::cout << "Mat: " << m << "\n Vec: " << one << std::endl; - LA::solve(res, std::move(m), std::move(b)); - //std::cout << "Sol: " << res << std::endl; + //Vec res = typename CVec::Dimension()(d);; + //LA::solve(res, std::move(m), std::move(b)); + // We already assume Eigen below... + Vec res=m.partialPivLu().solve(b); return cp(d,LA::vector_begin(res),LA::vector_end(res)); } - /* The general case - * - * Matrix P=(p1, p2, ...) (each point as a column) - * Matrix Q=2*t(p2-p1,p3-p1, ...) (each vector as a line) - * Matrix M: QP, adding a line of 1 at the top - * Vector B: (1, p2^2-p1^2, p3^2-p1^2, ...) - * Solve ML=B, the center of the sphere is PL - * - * It would likely be faster to write P then transpose, multiply, - * etc instead of doing it by hand. - */ - // TODO: check for degenerate cases? - - typedef typename R_::Max_ambient_dimension D2; - typedef typename R_::LA::template Rebind_dimension::Other LAd; - typedef typename LAd::Square_matrix Matrix; - typedef typename LAd::Vector Vec; - typename Get_functor::type sp(this->kernel()); - Matrix m(k,k); - Vec b(k); - Vec l(k); - int j,i=0; - // We are doing a quadratic number of *f, which can be costly with transforming_iterator. - for(Iter f2=f;f2!=e;++f2,++i){ - Point const& p2=*f2; - b(i)=m(i,i)=sdo(p2); - j=0; - for(Iter f3=f;f3!=e;++f3,++j){ - m(j,i)=m(i,j)=sp(p2,*f3); + { + // The general case. ui=p(i+1)-p0, center-p0=c=sum ai*ui, c.ui=ui²/2, M*a=b with M symmetric + typedef typename Increment_dimension::type D2; + typedef typename R_::LA::template Rebind_dimension::Other LA; + typedef typename LA::Square_matrix Matrix; + typedef typename LA::Vector Vec; + typedef typename LA::Construct_vector CVec; + typename Get_functor::type tp(this->kernel()); + typename Get_functor::type sv(this->kernel()); + typename Get_functor::type dp(this->kernel()); + typename Get_functor::type sp(this->kernel()); + Matrix m(k-1,k-1); + Vec b = typename CVec::Dimension()(k-1); + std::vector vecs; vecs.reserve(k-1); + while(++f!=e) + vecs.emplace_back(dp(*f,p0)); + // Only need to fill the lower half + for(int i=0;i),(Point_tag),(Construct_ttag,Compute_point_cartesian_coordinate_tag,Scalar_product_tag,Squared_distance_to_origin_tag,Point_dimension_tag)); +CGAL_KD_DEFAULT_FUNCTOR(Construct_circumcenter_tag,(CartesianDKernelFunctors::Construct_circumcenter),(Point_tag,Vector_tag),(Construct_ttag,Compute_point_cartesian_coordinate_tag,Scalar_product_tag,Squared_distance_to_origin_tag,Point_dimension_tag,Translated_point_tag,Scaled_vector_tag,Difference_of_points_tag,Squared_length_tag)); namespace CartesianDKernelFunctors { template struct Squared_circumradius : Store_kernel { From e0513c243258e2f23231bb89fb439089f4c75e61 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 7 Jul 2020 16:54:04 +0200 Subject: [PATCH 020/149] Implement Eigen::NumTraits::highest Older versions of LDLT use it --- Number_types/include/CGAL/Interval_nt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index ca77127d6e0..eb09e9ae3fd 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -1573,6 +1573,8 @@ namespace Eigen { static inline Real epsilon() { return 0; } static inline Real dummy_precision() { return 0; } + static inline Real highest() { return Real((std::numeric_limits::max)(), std::numeric_limits::infinity()); } + static inline Real lowest() { return Real(-std::numeric_limits::infinity(), std::numeric_limits::lowest()); } // Costs could depend on b. enum { From 00efb5ebef69e3de24fd24f46bdcde23e1dad11e Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 7 Jul 2020 17:51:29 +0200 Subject: [PATCH 021/149] Remove TAB --- .../CGAL/NewKernel_d/function_objects_cartesian.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index d56fe9f632d..e1b1f6e32ae 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -689,19 +689,19 @@ template struct Construct_circumcenter : Store_kernel { Vec b = typename CVec::Dimension()(k-1); std::vector vecs; vecs.reserve(k-1); while(++f!=e) - vecs.emplace_back(dp(*f,p0)); + vecs.emplace_back(dp(*f,p0)); // Only need to fill the lower half for(int i=0;i Date: Tue, 7 Jul 2020 22:06:51 +0200 Subject: [PATCH 022/149] Rewrite Power_center_d. --- .../CGAL/NewKernel_d/Cartesian_LA_functors.h | 1 + .../CGAL/NewKernel_d/Types/Weighted_point.h | 109 +++++++++--------- NewKernel_d/test/NewKernel_d/Epick_d.cpp | 16 +++ 3 files changed, 69 insertions(+), 57 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h index a379cee7ed9..b717a80bac4 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h @@ -224,6 +224,7 @@ template struct Scalar_product { }; template struct Squared_distance_to_origin_stored { + // What about weighted points, should they store sdo-w? CGAL_FUNCTOR_INIT_IGNORE(Squared_distance_to_origin_stored) typedef R_ R; typedef typename R::LA_vector LA; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h b/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h index 8dfe875b8c8..e83af0db167 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h @@ -149,6 +149,7 @@ template struct Power_center : Store_kernel { typedef typename Get_type::type WPoint; typedef WPoint result_type; typedef typename Get_type::type Point; + typedef typename Get_type::type Vector; typedef typename Get_type::type FT; template result_type operator()(Iter f, Iter e)const{ @@ -168,11 +169,26 @@ template struct Power_center : Store_kernel { WPoint const& wp0 = *f; Point const& p0 = pdw(wp0); + FT const& w0 = pw(wp0); int d = pd(p0); int k = static_cast(std::distance(f,e)); - if (d+1 == k) - { - FT const& n0 = sdo(p0) - pw(wp0); + if (k == 1) return cwp(p0, -w0); + // TODO: check for degenerate cases? + if (k == 2) { + typename Get_functor::type dp(this->kernel()); + typename Get_functor::type sl(this->kernel()); + typename Get_functor::type tp(this->kernel()); + typename Get_functor::type sv(this->kernel()); + WPoint const& wp1 = *++f; + Point const& p1 = pdw(wp1); + FT const& w1 = pw(wp1); + Vector v01 = dp(p1, p0); + FT l01 = sl(v01); + FT coef = ((w0 - w1) / l01 + 1) / 2; + return cwp(tp(p0, sv(v01, coef)), CGAL::square(coef) * l01 - w0); + } + if (d+1 == k) { + FT const& n0 = sdo(p0) - w0; Matrix m(d,d); Vec b = typename CVec::Dimension()(d); // Write the point coordinates in lines. @@ -194,64 +210,43 @@ template struct Power_center : Store_kernel { FT const& r2 = pdp (wp0, center); return cwp(std::move(center), r2); } - else + { - /* - * Matrix P=(p1, p2, ...) (each point as a column) - * Matrix Q=2*t(p2-p1,p3-p1, ...) (each vector as a line) - * Matrix M: QP, adding a line of 1 at the top - * Vector B: (1, p2^2-p1^2, p3^2-p1^2, ...) plus weights - * Solve ML=B, the center of the sphere is PL - * - * It would likely be faster to write P then transpose, multiply, - * etc instead of doing it by hand. - */ - // TODO: check for degenerate cases? - - typedef typename R_::Max_ambient_dimension D2; - typedef typename R_::LA::template Rebind_dimension::Other LAd; - typedef typename LAd::Square_matrix Matrix; - typedef typename LAd::Vector Vec; + // The general case. ui=p(i+1)-p0, center-p0=c=sum ai*ui, c.2ui=ui²+w-w, M*a=b with M symmetric + typedef typename Increment_dimension::type D2; + typedef typename R_::LA::template Rebind_dimension::Other LA; + typedef typename LA::Square_matrix Matrix; + typedef typename LA::Vector Vec; + typedef typename LA::Construct_vector CVec; + typename Get_functor::type tp(this->kernel()); + typename Get_functor::type sv(this->kernel()); + typename Get_functor::type dp(this->kernel()); typename Get_functor::type sp(this->kernel()); - Matrix m(k,k); - Vec b(k); - Vec l(k); - int j,i=0; - for(Iter f2=f; f2!=e; ++f2,++i){ - WPoint const& wp = *f2; + typename Get_functor::type pv(this->kernel()); + typename Get_functor::type sl(this->kernel()); + + Matrix m(k-1,k-1); + Vec b = typename CVec::Dimension()(k-1); + std::vector vecs; vecs.reserve(k-1); + for(int i=0; ++f!=e; ++i) { + WPoint const& wp = *f; Point const& p = pdw(wp); - b(i) = m(i,i) = sdo(p) - pw(wp); - j=0; - for(Iter f3=f; f3!=e; ++f3,++j){ - // FIXME: scalar product of points ??? - m(j,i) = m(i,j) = sp(p,pdw(*f3)); - } + vecs.emplace_back(dp(p, p0)); + b[i] = w0 - pw(wp); } - for(i=1;i),(Weighted_point_tag),(In_flat_power_side_of_power_sphere_raw_tag,Point_drop_weight_tag,Point_weight_tag)); CGAL_KD_DEFAULT_FUNCTOR(Power_distance_tag,(CartesianDKernelFunctors::Power_distance),(Weighted_point_tag,Point_tag),(Squared_distance_tag,Point_drop_weight_tag,Point_weight_tag)); CGAL_KD_DEFAULT_FUNCTOR(Power_distance_to_point_tag,(CartesianDKernelFunctors::Power_distance_to_point),(Weighted_point_tag,Point_tag),(Squared_distance_tag,Point_drop_weight_tag,Point_weight_tag)); -CGAL_KD_DEFAULT_FUNCTOR(Power_center_tag,(CartesianDKernelFunctors::Power_center),(Weighted_point_tag,Point_tag),(Compute_point_cartesian_coordinate_tag,Construct_ttag,Construct_ttag,Point_dimension_tag,Squared_distance_to_origin_tag,Point_drop_weight_tag,Point_weight_tag,Power_distance_to_point_tag)); +CGAL_KD_DEFAULT_FUNCTOR(Power_center_tag,(CartesianDKernelFunctors::Power_center),(Weighted_point_tag,Point_tag,Vector_tag),(Compute_point_cartesian_coordinate_tag,Construct_ttag,Construct_ttag,Point_dimension_tag,Squared_distance_to_origin_tag,Point_drop_weight_tag,Point_weight_tag,Power_distance_to_point_tag,Translated_point_tag,Scaled_vector_tag,Difference_of_points_tag,Scalar_product_tag,Sum_of_vectors_tag,Squared_length_tag)); CGAL_KD_DEFAULT_FUNCTOR(Power_side_of_bounded_power_circumsphere_tag,(CartesianDKernelFunctors::Power_side_of_bounded_power_circumsphere),(Weighted_point_tag),(Power_distance_tag,Power_center_tag)); } // namespace CGAL #endif diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index c72d5d207e6..3a3b150432f 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -715,11 +715,18 @@ void test3(){ template void test4(){ typedef typename Ker::Point_d P; + typedef typename Ker::Weighted_point_d WP; typedef typename Ker::Construct_circumcenter_d CCc; typedef typename Ker::Equal_d E; + typedef typename Ker::Power_center_d PC; + typedef typename Ker::Power_distance_d PoD; + typedef typename Ker::Affine_rank_d AR; Ker k(4); CCc ccc Kinit(construct_circumcenter_d_object); E ed Kinit(equal_d_object); + PC pc Kinit(power_center_d_object); + PoD pod Kinit(power_distance_d_object); + AR ar Kinit(affine_rank_d_object); auto mkpt=[](auto...x){double l[]{(double)x...};return P(std::begin(l), std::end(l));}; P tab1[]={mkpt(15,20,40,80),mkpt(10,23,36,80),mkpt(10,20,40,85),mkpt(10,15,40,80),mkpt(13,20,40,76)}; assert(ed(ccc(tab1+0, tab1+5),mkpt(10,20,40,80))); @@ -727,6 +734,15 @@ void test4(){ assert(ed(ccc(tab2+0, tab2+4),mkpt(10,20,40,80))); P tab3[]={mkpt(15,20,35,80),mkpt(10,25,40,75),mkpt(13,24,37,76)}; assert(ed(ccc(tab3+0, tab3+3),mkpt(10,20,40,80))); + auto mkwpt=[](auto...x){double l[]{(double)x...};auto last=std::prev(std::end(l));return WP(P(std::begin(l), last),*last);}; + WP tab4[]={mkwpt(89,17,29,97,14),mkwpt(86,99,64,26,44),mkwpt(40,9,13,91,20),mkwpt(41,30,93,13,10),mkwpt(45,6,98,9,0),mkwpt(0,0,0,0,0)}; + for(int i=5;i>=1;--i){ + tab4[i]=pc(tab4+0, tab4+i); + for(int j=0;j >; template struct CGAL::Epick_d >; From b1c09a58598a7340e32c274fcbba7530c8f93824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 20 Jul 2020 16:52:24 +0200 Subject: [PATCH 023/149] workaround to make it work with EPICK --- Nef_3/include/CGAL/Nef_3/Bounding_box_3.h | 8 +-- Nef_3/include/CGAL/Nef_3/SNC_constructor.h | 7 ++- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 72 +++++++++++++++++----- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h b/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h index 50fe5ed0a48..cf295b5b8e2 100644 --- a/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h +++ b/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h @@ -73,17 +73,13 @@ public: } void extend(const Point_3& p) { - FT q[3]; - q[0] = p.x(); - q[1] = p.y(); - q[2] = p.z(); + FT q[3] = { p.x(), p.y(), p.z() }; if(initialized) Base::extend(q); else { initialized = true; - std::copy( q, q + 3, Base::lo ); - std::copy( q, q + 3, Base::hi ); + *this = Bounding_box_3(q); } } }; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h index 9f33a0991df..f93e584549d 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h @@ -229,9 +229,10 @@ public: Vertex_handle v = this->sncp()->new_vertex(p , boundary); CGAL_NEF_TRACEN( v->point()); SM_decorator SD(&*v); - Sphere_point sp[] = { Sphere_point(NT(-x), 0, 0), - Sphere_point(0, NT(-y), 0), - Sphere_point(0, 0, NT(-z)) }; + const NT zero(0); + Sphere_point sp[] = { Sphere_point(NT(-x), zero, zero), + Sphere_point(zero, NT(-y), zero), + Sphere_point(zero, zero, NT(-z)) }; /* create box vertices */ SVertex_handle sv[3]; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h index 835afa81e99..5eee7528ee7 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -56,7 +56,8 @@ namespace Nef_3_internal{ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_Exact_kernel,Exact_kernel,false) -template ::value, class FT = typename R::RT, class Kernel_tag=typename R::Kernel_tag> +template ::value && + !std::is_floating_point::value, class FT = typename R::RT, class Kernel_tag=typename R::Kernel_tag> struct Type_converter{ typedef const CGAL::Point_3& Point_3; typedef const CGAL::Vector_3& Vector_3; @@ -670,8 +671,9 @@ template class Geometry_io; template class Geometry_io { public: - template static - typename EK::Point_3 read_point(std::istream& in) { + + template static + typename EK::Point_3 read_point_impl(std::istream& in, Compose_) { typedef Fraction_traits FracTraits; typename FracTraits::Type hx, hy, hz, hw; typename FracTraits::Numerator_type num; @@ -688,8 +690,8 @@ class Geometry_io { return typename EK::Point_3(hx,hy,hz,hw); } - template static - typename EK::Plane_3 read_plane(std::istream& in) { + template static + typename EK::Plane_3 read_plane_impl(std::istream& in, Compose_) { typedef Fraction_traits FracTraits; typename FracTraits::Type a, b, c, d; typename FracTraits::Numerator_type num; @@ -706,8 +708,32 @@ class Geometry_io { return typename EK::Plane_3(a,b,c,d); } - template static - void print_point_impl(std::ostream& out, const CGAL::Point_3 p) { + template static + typename EK::Point_3 read_point_impl(std::istream& in, Null_functor) { + typename K::FT hx, hy, hz, hw; + in >> hx >> hy >> hz >> hw; + return typename EK::Point_3(hx,hy,hz,hw); + } + + template static + typename EK::Plane_3 read_plane_impl(std::istream& in, Null_functor) { + typename K::FT a, b, c, d; + in >> a >> b >> c >> d; + return typename EK::Plane_3(a,b,c,d); + } + + template static + typename EK::Point_3 read_point(std::istream& in) { + return read_point_impl(in, typename Fraction_traits::Compose()); + } + + template static + typename EK::Plane_3 read_plane(std::istream& in) { + return read_plane_impl(in, typename Fraction_traits::Compose()); + } + + template static + void print_point_impl(std::ostream& out, const CGAL::Point_3 p, Decompose_) { typedef Fraction_traits FracTraits; typedef std::vector NV; @@ -737,8 +763,8 @@ class Geometry_io { << vec[2] << " " << vec[3]; } - template static - void print_vector_impl(std::ostream& out, const CGAL::Vector_3 p) { + template static + void print_vector_impl(std::ostream& out, const CGAL::Vector_3 p, Decompose_) { typedef Fraction_traits FracTraits; typedef typename FracTraits::Numerator_type NumType; typedef std::vector NV; @@ -766,8 +792,8 @@ class Geometry_io { << vec[2] << " " << NumType(1); } - template static - void print_plane_impl(std::ostream& out, const CGAL::Plane_3 p) { + template static + void print_plane_impl(std::ostream& out, const CGAL::Plane_3 p, Decompose_) { typedef Fraction_traits FracTraits; typedef std::vector NV; @@ -803,19 +829,37 @@ class Geometry_io { << vec[2] << " " << vec[3]; } + template static + void print_point_impl(std::ostream& out, const CGAL::Point_3 p, Null_functor) + { + out << p.x() << " " << p.y() << " " << p.z() << " " << 1; + } + + template static + void print_vector_impl(std::ostream& out, const CGAL::Vector_3 v, Null_functor) + { + out << v.x() << " " << v.y() << " " << v.z() << " " << 1; + } + + template static + void print_plane_impl(std::ostream& out, const CGAL::Plane_3 p, Null_functor) + { + out << p.a() << " " << p.b() << " " << p.c() << " " << p.d(); + } + template static void print_point(std::ostream& out, const CGAL::Point_3& p) { - print_point_impl(out, Nef_3_internal::get_point(p) ); + print_point_impl(out, Nef_3_internal::get_point(p), typename Fraction_traits::Decompose() ); } template static void print_vector(std::ostream& out, const CGAL::Vector_3& v) { - print_vector_impl(out, Nef_3_internal::get_vector(v) ); + print_vector_impl(out, Nef_3_internal::get_vector(v), typename Fraction_traits::Decompose() ); } template static void print_plane(std::ostream& out, const CGAL::Plane_3& p) { - print_plane_impl(out, Nef_3_internal::get_plane(p) ); + print_plane_impl(out, Nef_3_internal::get_plane(p), typename Fraction_traits::Decompose() ); } }; From 427298c9ba55b29955dc3d7ba2174d6df25aed9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 20 Jul 2020 17:01:34 +0200 Subject: [PATCH 024/149] add a test for EPIC IO --- Nef_3/test/Nef_3/CMakeLists.txt | 1 + Nef_3/test/Nef_3/test_nef_3_io_EPIC.cpp | 57 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Nef_3/test/Nef_3/test_nef_3_io_EPIC.cpp diff --git a/Nef_3/test/Nef_3/CMakeLists.txt b/Nef_3/test/Nef_3/CMakeLists.txt index 2b8b1921f41..3bfee8a90ce 100644 --- a/Nef_3/test/Nef_3/CMakeLists.txt +++ b/Nef_3/test/Nef_3/CMakeLists.txt @@ -24,6 +24,7 @@ if ( CGAL_FOUND ) execution___of__test_nef_3_io_Cartesian execution___of__test_nef_3_io_Cartesian_Lazy execution___of__test_nef_3_io_EPEC + execution___of__test_nef_3_io_EPIC execution___of__test_nef_3_io_Homogeneous execution___of__test_nef_3_io_Homogenoeus_Lazy execution___of__test_with_extended_homogeneous diff --git a/Nef_3/test/Nef_3/test_nef_3_io_EPIC.cpp b/Nef_3/test/Nef_3/test_nef_3_io_EPIC.cpp new file mode 100644 index 00000000000..a5b68f14d17 --- /dev/null +++ b/Nef_3/test/Nef_3/test_nef_3_io_EPIC.cpp @@ -0,0 +1,57 @@ +#include + +#include +#include +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel EPEC; + +template +void test_write_read() +{ + typedef CGAL::Nef_polyhedron_3< Kernel > Nef_polyhedron; + typedef CGAL::Polyhedron_3< Kernel > Polyhedron; + typedef typename Kernel::Point_3 Point; + + typename Kernel::RT n, d; + std::istringstream str_n("5"); + str_n >> n; + std::istringstream str_d("1"); + str_d >> d; + + Point p(n, 0, 0, d); + Point q(0, n, 0, d); + Point r(0, 0, n, d); + Point s(0, 0, 0, 1); + + std::cout << " build...\n"; + Polyhedron P; + P.make_tetrahedron( p, q, r, s); + Nef_polyhedron nef_1( P ); + + std::cout << " write...\n"; + std::ofstream out ("temp.nef"); + out << std::setprecision(17) << nef_1; + out.close(); + + std::cout << " read...\n"; + std::ifstream in ("temp.nef"); + Nef_polyhedron nef_2; + in >> nef_2; + in.close(); + + std::cout << " check...\n"; + assert( nef_1 == nef_2); +} + +int main() +{ + std::cout << "Testing Exact_predicates_inexact_constructions_kernel\n"; + test_write_read(); + std::cout << "Testing Simple_cartesian\n"; + test_write_read>(); + + return 0; +} From 4ee8f532b7065e19e10d417591581df8f354c642 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 21 Jul 2020 09:53:53 +0200 Subject: [PATCH 025/149] Early intersection ending with bbox --- .../include/CGAL/Arr_segment_traits_2.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index a671a741f80..69ea3c7b6d3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -711,6 +711,10 @@ public: typedef boost::variant Intersection_result; + // Early ending with Bbox overlapping test + if (!CGAL::do_overlap(cv1.bbox(), cv2.bbox())) + return oi; + // Intersect the two supporting lines. const Kernel& kernel = m_traits; auto res = kernel.intersect_2_object()(cv1.line(), cv2.line()); @@ -1068,8 +1072,9 @@ public: Bbox_2 bbox() const { Kernel kernel; - Segment_2 seg = kernel.construct_segment_2_object()(this->m_ps, this->m_pt); - return (kernel.construct_bbox_2_object()(seg)); + typename Kernel::Construct_bbox_2 + construct_bbox = kernel.construct_bbox_2_object(); + return construct_bbox(this->m_ps) + construct_bbox(this->m_pt); } /*! Obtain the segment source. From a43b9944251db8a5cf62b270aa7306f1e346947a Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 21 Jul 2020 10:11:05 +0200 Subject: [PATCH 026/149] Use specialized do_intersect + early ending --- .../include/CGAL/Arr_segment_traits_2.h | 66 +++++++++++++++++-- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 69ea3c7b6d3..925d4f654a8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -715,12 +715,14 @@ public: if (!CGAL::do_overlap(cv1.bbox(), cv2.bbox())) return oi; - // Intersect the two supporting lines. + // Early ending with specialized do_intersect const Kernel& kernel = m_traits; - auto res = kernel.intersect_2_object()(cv1.line(), cv2.line()); + if (!do_intersect (cv1.left(), cv1.right(), cv2.left(), cv2.right(), kernel)) + return oi; - // The supporting line are parallel lines and do not intersect: - if (! res) return oi; + // Intersect the two supporting lines. + auto res = kernel.intersect_2_object()(cv1.line(), cv2.line()); + CGAL_assertion(res); // Check if we have a single intersection point. const Point_2* ip = boost::get(&*res); @@ -787,6 +789,62 @@ public: return oi; } + + // Specialized do_intersect with many tests skipped because at + // this point, we already know which point is left / right for + // both segments + bool do_intersect (const Point_2 &A1, + const Point_2 &A2, + const Point_2 &B1, + const Point_2 &B2, + const Kernel& k) const + { + typename Kernel::Less_xy_2 less_xy; + typename Kernel::Compare_xy_2 compare_xy; + + switch(make_certain(compare_xy(A1,B1))) { + case SMALLER: + switch(make_certain(compare_xy(A2,B1))) { + case SMALLER: + return false; + case EQUAL: + return true; + default: // LARGER + switch(make_certain(compare_xy(A2,B2))) { + case SMALLER: + return CGAL::Intersections::internal + ::seg_seg_do_intersect_crossing(A1,A2,B1,B2, k); + case EQUAL: + return true; + default: // LARGER + return CGAL::Intersections::internal + ::seg_seg_do_intersect_contained(A1,A2,B1,B2, k); + } + } + case EQUAL: + return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A1))) { + case SMALLER: + return false; + case EQUAL: + return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A2))) { + case SMALLER: + return CGAL::Intersections::internal + ::seg_seg_do_intersect_crossing(B1,B2,A1,A2, k); + case EQUAL: + return true; + default: // LARGER + return CGAL::Intersections::internal + ::seg_seg_do_intersect_contained(B1,B2,A1,A2, k); + } + } + } + CGAL_assertion(false); + return false; + } }; /*! Obtain an Intersect_2 functor object. */ From 94155bd89e152f4dcde43e1443f7e02f425e15da Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 21 Jul 2020 11:23:24 +0200 Subject: [PATCH 027/149] Fix assertion with explicit boolean conversion --- Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 925d4f654a8..e62c6028a24 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -722,7 +722,7 @@ public: // Intersect the two supporting lines. auto res = kernel.intersect_2_object()(cv1.line(), cv2.line()); - CGAL_assertion(res); + CGAL_assertion(bool(res)); // Check if we have a single intersection point. const Point_2* ip = boost::get(&*res); From becb663e3936d398713936d22e0a425b2d9fc5f2 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 21 Jul 2020 11:46:25 +0200 Subject: [PATCH 028/149] Use fast pool allocator --- Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h | 3 ++- .../include/CGAL/Arrangement_on_surface_2.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index 5a93384baa6..16befc318ee 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -34,6 +34,7 @@ #include #include +#include namespace CGAL { @@ -876,7 +877,7 @@ public: * The arrangement DCEL class. */ template + class Allocator = boost::fast_pool_allocator > class Arr_dcel_base { public: // Define the vertex, halfedge and face types. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index ddcc1c6229b..5c1c5b36013 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -46,6 +46,8 @@ #include #include +#include + namespace CGAL { /*! \class Arrangement_on_surface_2 @@ -64,7 +66,7 @@ class Arrangement_on_surface_2 { public: typedef GeomTraits_ Geometry_traits_2; typedef TopTraits_ Topology_traits; - typedef CGAL_ALLOCATOR(int) Allocator; + typedef boost::fast_pool_allocator Allocator; // first define adaptor ... typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; From fe87eeb8ac7df9479edcec985d330d36cde2c31b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 21 Jul 2020 16:37:10 +0200 Subject: [PATCH 029/149] change macro from DEBUG to VERBOSE --- Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 333a36ead0e..64b7522dc43 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -232,12 +232,10 @@ void tetrahedral_isotropic_remeshing( std::size_t nb_extra_iterations = 3; remesher.remesh(max_it, nb_extra_iterations); -#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE const double angle_bound = 5.0; Tetrahedral_remeshing::debug::dump_cells_with_small_dihedral_angle(tr, angle_bound, cell_select, "bad_cells.mesh"); -#endif -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE Tetrahedral_remeshing::internal::compute_statistics(tr, cell_select, "statistics_end.txt"); #endif @@ -428,7 +426,7 @@ void tetrahedral_isotropic_remeshing( std::size_t nb_extra_iterations = 3; remesher.remesh(max_it, nb_extra_iterations); -#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE const double angle_bound = 5.0; Tetrahedral_remeshing::debug::dump_cells_with_small_dihedral_angle( c3t3.triangulation(), From 92d3754d02b57eb4f2c6e3418ab7d7881a62826c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 21 Jul 2020 16:38:34 +0200 Subject: [PATCH 030/149] fix peeling condition sliver, blade, cap... should be peelable a condition on area of boundary facets compared to internal facets is valid --- .../tetrahedral_adaptive_remeshing_impl.h | 28 +++++------ .../internal/tetrahedral_remeshing_helpers.h | 49 ++++++++++++++++--- 2 files changed, 56 insertions(+), 21 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 438c8ecf167..c4f6be162b7 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -286,7 +286,7 @@ public: } //peel off slivers - std::size_t postprocess(const double sliver_angle = 0.1) + std::size_t postprocess(const double sliver_angle = 2.) { if (m_protect_boundaries) return 0; @@ -298,35 +298,33 @@ public: std::size_t nb_slivers_peel = 0; std::vector > > peelable_cells; +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + double mindh = 180.; +#endif for (Cell_handle cit : tr().finite_cell_handles()) { std::array facets_on_surface; - short count = 0; - if(m_c3t3.is_in_complex(cit) && min_dihedral_angle(tr(), cit) < sliver_angle) + if (m_c3t3.is_in_complex(cit)) { - for (int i = 0; i < 4; ++i) - { - if (!m_c3t3.is_in_complex(cit->neighbor(i))) - { - facets_on_surface[i] = true; - ++count; - } - else - facets_on_surface[i] = false; - } - if(count > 1) + const double dh = min_dihedral_angle(tr(), cit); + if(dh < sliver_angle && is_peelable(m_c3t3, cit, facets_on_surface)) peelable_cells.push_back(std::make_pair(cit, facets_on_surface)); + +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + mindh = (std::min)(dh, mindh); +#endif } } #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + std::cout << "Min dihedral angle : " << mindh << std::endl; std::cout << "Peelable cells : " << peelable_cells.size() << std::endl; #endif for (auto c_i : peelable_cells) { Cell_handle c = c_i.first; - std::array f_on_surface = c_i.second; + const std::array& f_on_surface = c_i.second; boost::optional patch; for (int i = 0; i < 4; ++i) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index eb7b52bc237..2c99833b158 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -137,6 +137,41 @@ typename Tr::Geom_traits::FT min_dihedral_angle(const Tr& tr, c->vertex(3)); } +template +bool is_peelable(const C3t3& c3t3, + const typename C3t3::Cell_handle ch, + std::array& facets_on_surface) +{ + typedef typename C3t3::Triangulation::Geom_traits::FT FT; + typedef typename C3t3::Facet Facet; + + if(!c3t3.is_in_complex(ch)) + return false; + + bool on_surface = false; + for (int i = 0; i < 4; ++i) + { + facets_on_surface[i] = !c3t3.is_in_complex(ch->neighbor(i)); + on_surface = on_surface || facets_on_surface[i]; + } + if(!on_surface) + return false; + + FT area_on_surface = 0.; + FT area_inside = 0.; + for (int i = 0; i < 4; ++i) + { + Facet f(ch, i); + const FT facet_area = CGAL::approximate_sqrt(c3t3.triangulation().triangle(f).squared_area()); + if(facets_on_surface[i]) + area_on_surface += facet_area; + else + area_inside += facet_area; + } + + return (area_inside < 1.5 * area_on_surface); +} + template typename Tr::Geom_traits::Vector_3 facet_normal(const Tr& tr, const typename Tr::Facet& f) @@ -1334,17 +1369,19 @@ void dump_cells_with_small_dihedral_angle(const Tr& tr, cit != tr.finite_cells_end(); ++cit) { Cell_handle c = cit; - if ( c->subdomain_index() != Subdomain_index() - && cell_select(c) - && min_dihedral_angle(tr, c) < angle_bound) + if (c->subdomain_index() != Subdomain_index() && cell_select(c)) { - - cells.push_back(c); - indices.push_back(c->subdomain_index()); + double dh = min_dihedral_angle(tr, c); + if (dh < angle_bound) + { + cells.push_back(c); + indices.push_back(c->subdomain_index()); + } } } std::cout << "bad cells : " << cells.size() << std::endl; dump_cells(cells, indices, filename); + dump_cells_off(cells, tr, "bad_cells.off"); } template From a5e193e7363755768e0b1c4e405a53c1efa21c12 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Wed, 22 Jul 2020 13:18:41 +0200 Subject: [PATCH 031/149] check inversion before moving for smoothing along features --- .../Tetrahedral_remeshing/internal/smooth_vertices.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index 947123166e0..b98136676be 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -513,9 +513,9 @@ public: #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_surf << "2 " << current_pos << " " << final_position << std::endl, #endif - // move vertex - v->set_point(typename Tr::Point( - final_position.x(), final_position.y(), final_position.z())); + // move vertex + typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); + check_inversion_and_move(v, new_pos, inc_cells[vid], tr); } else if (neighbors[vid] > 0) { @@ -546,9 +546,9 @@ public: #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_surf << "2 " << current_pos << " " << final_position << std::endl, #endif - // move vertex - v->set_point( - typename Tr::Point(final_position.x(), final_position.y(), final_position.z())); + // move vertex + typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); + check_inversion_and_move(v, new_pos, inc_cells[vid], tr); } } #endif //CGAL_TETRAHEDRAL_REMESHING_SMOOTH_SHARP_EDGES From 42b272d8ca8a70e5d19532f7ba432d8b3a3d11e4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 23 Jul 2020 12:19:58 +0200 Subject: [PATCH 032/149] reintroduce smoothing along polyline features introduce named parameter smooth_constrained_edges --- .../CGAL/boost/graph/parameters_interface.h | 1 + .../Tetrahedral_remeshing/NamedParameters.txt | 18 ++++++++++++++++++ .../internal/smooth_vertices.h | 17 ++++++++++------- .../tetrahedral_adaptive_remeshing_impl.h | 6 ++++-- .../include/CGAL/tetrahedral_remeshing.h | 13 +++++++++++++ 5 files changed, 46 insertions(+), 9 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 0ca726f6e31..5086319451b 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -172,6 +172,7 @@ CGAL_add_named_parameter(remesh_boundaries_t, remesh_boundaries, remesh_boundari CGAL_add_named_parameter(cell_selector_t, cell_selector, cell_selector) CGAL_add_named_parameter(facet_is_constrained_t, facet_is_constrained, facet_is_constrained_map) CGAL_add_named_parameter(remeshing_visitor_t, remeshing_visitor, remeshing_visitor) +CGAL_add_named_parameter(smooth_constrained_edges_t, smooth_constrained_edges, smooth_constrained_edges) // output parameters CGAL_add_named_parameter(face_proxy_map_t, face_proxy_map, face_proxy_map) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/NamedParameters.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/NamedParameters.txt index 953042d5f33..3da63ce94f1 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/NamedParameters.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/NamedParameters.txt @@ -95,6 +95,24 @@ It must be default constructible.\n (i.e. with a non-zero `Subdomain_index`) are selected. \cgalNPEnd +\cgalNPBegin{smooth_constrained_edges} +\anchor Remeshing_smooth_constrained_edges +enables the smoothing step in `tetrahedral_isotropic_remeshing()` +to be performed on vertices that are endpoints of constraints listed +by \ref Remeshing_edge_is_constrained_map "edge_is_constrained_map", +and edges incident to at least three subdomains. +The vertices move along the constrained polylines they belong to. +Corners (i.e. vertices incident to more than 2 constraints) are not allowed +to move at all.\n +Note that activating the smoothing step on polyline constraints tends to reduce +the quality of the minimal dihedral angle in the mesh.\n +If \ref Remeshing_remesh_boundaries "remesh_boundaries" is +set to `false`, this parameter is ignored.\n +Type: `bool` \n +Default: `false` +\cgalNPEnd + + \cgalNPTableEnd */ diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index b98136676be..87c940da023 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -51,10 +51,13 @@ private: typedef CGAL::Tetrahedral_remeshing::internal::FMLS FMLS; std::vector subdomain_FMLS; boost::unordered_map subdomain_FMLS_indices; + bool m_smooth_constrained_edges; public: template - void init(const C3t3& c3t3, const CellSelector& cell_selector) + void init(const C3t3& c3t3, + const CellSelector& cell_selector, + const bool smooth_constrained_edges) { //collect a map of vertices surface indices boost::unordered_map > vertices_surface_indices; @@ -71,6 +74,8 @@ public: vertices_normals, vertices_surface_indices, c3t3); + + m_smooth_constrained_edges = smooth_constrained_edges; } private: @@ -404,11 +409,11 @@ public: Tr& tr = c3t3.triangulation(); -#ifdef CGAL_TETRAHEDRAL_REMESHING_SMOOTH_SHARP_EDGES //collect a map of vertices surface indices boost::unordered_map > vertices_surface_indices; - collect_vertices_surface_indices(c3t3, vertices_surface_indices); -#endif + if(m_smooth_constrained_edges) + collect_vertices_surface_indices(c3t3, vertices_surface_indices); + //collect a map of normals at surface vertices boost::unordered_map > vertices_normals; @@ -439,9 +444,8 @@ public: } } - if (!protect_boundaries) + if (!protect_boundaries && m_smooth_constrained_edges) { -#ifdef CGAL_TETRAHEDRAL_REMESHING_SMOOTH_SHARP_EDGES /////////////// EDGES IN COMPLEX ////////////////// //collect neighbors for (const Edge& e : tr.finite_edges()) @@ -551,7 +555,6 @@ public: check_inversion_and_move(v, new_pos, inc_cells[vid], tr); } } -#endif //CGAL_TETRAHEDRAL_REMESHING_SMOOTH_SHARP_EDGES smoothed_positions.assign(nbv, CGAL::NULL_VECTOR); neighbors.assign(nbv, -1); diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 438c8ecf167..8e360971492 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -126,6 +126,7 @@ public: , const bool protect_boundaries , EdgeIsConstrainedMap ecmap , FacetIsConstrainedMap fcmap + , bool smooth_constrained_edges , CellSelector cell_selector , Visitor& visitor ) @@ -140,7 +141,7 @@ public: m_c3t3.triangulation().swap(tr); init_c3t3(ecmap, fcmap); - m_vertex_smoother.init(m_c3t3, m_cell_selector); + m_vertex_smoother.init(m_c3t3, m_cell_selector, smooth_constrained_edges); #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "00-init"); @@ -154,6 +155,7 @@ public: , const bool protect_boundaries , EdgeIsConstrainedMap ecmap , FacetIsConstrainedMap fcmap + , bool smooth_constrained_edges , CellSelector cell_selector , Visitor& visitor ) @@ -168,7 +170,7 @@ public: m_c3t3.swap(c3t3); init_c3t3(ecmap, fcmap); - m_vertex_smoother.init(m_c3t3, m_cell_selector); + m_vertex_smoother.init(m_c3t3, m_cell_selector, smooth_constrained_edges); #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "00-init"); diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 333a36ead0e..c617d9c9fcc 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -108,6 +108,10 @@ namespace CGAL * modified) by remeshing. * By default, all cells with a non-zero `Subdomain_index` are selected. * \cgalParamEnd +* \cgalParamBegin{smooth_constrained_edges} If `true`, the end vertices of the edges set as +* constrained in `edge_is_constrained_map` move along the +* constrained polylines they belong to. +* \cgalParamEnd * \cgalNamedParamsEnd * * \sa `CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3` @@ -166,6 +170,9 @@ void tetrahedral_isotropic_remeshing( // false); std::size_t max_it = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 1); + bool smooth_constrained_edges + = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), + false); typedef typename internal_np::Lookup_named_param_def < internal_np::cell_selector_t, @@ -219,6 +226,7 @@ void tetrahedral_isotropic_remeshing( Tr, SizingFunction, ECMap, FCMap, SelectionFunctor, Visitor> Remesher; Remesher remesher(tr, sizing, protect , ecmap, fcmap + , smooth_constrained_edges , cell_select , visitor); @@ -359,6 +367,10 @@ void tetrahedral_isotropic_remeshing( bool protect = !remesh_surfaces; std::size_t max_it = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 1); + bool smooth_constrained_edges + = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), + false); + typedef typename internal_np::Lookup_named_param_def < internal_np::cell_selector_t, NamedParameters, @@ -414,6 +426,7 @@ void tetrahedral_isotropic_remeshing( > Remesher; Remesher remesher(c3t3, sizing, protect , ecmap, fcmap + , smooth_constrained_edges , cell_select , visitor); From 966af02610718296d9cf9c070f659a624064f186 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 23 Jul 2020 12:21:11 +0200 Subject: [PATCH 033/149] add option for smoothing along polyline features in the plugin --- .../Tetrahedral_remeshing_dialog.ui | 72 +++++++++++-------- .../Tetrahedral_remeshing_plugin.cpp | 8 ++- 2 files changed, 48 insertions(+), 32 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_dialog.ui index 351de08c508..0dbb51005b3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_dialog.ui @@ -43,17 +43,7 @@ Tetrahedral remeshing - - - - - Protect boundaries - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + @@ -70,13 +60,26 @@ - + Protect boundaries false + + + + Number of Main iterations + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + nbIterations_spinbox + + + @@ -93,16 +96,19 @@ - - - - Number of Main iterations + + + + + 110 + 0 + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 1000.000000000000000 - - nbIterations_spinbox + + 0.100000000000000 @@ -119,19 +125,23 @@ - - - - - 110 - 0 - + + + + - - 1000.000000000000000 + + Smooth constrained edges - - 0.100000000000000 + + + + + + Options : + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp index bbf5dc24de6..74f52aee62d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp @@ -99,6 +99,7 @@ public Q_SLOTS: double target_length = ui.edgeLength_dspinbox->value(); unsigned int nb_iter = ui.nbIterations_spinbox->value(); bool protect = ui.protect_checkbox->isChecked(); + bool smooth_edges = ui.smoothEdges_checkBox->isChecked(); // wait cursor QApplication::setOverrideCursor(Qt::WaitCursor); @@ -110,7 +111,8 @@ public Q_SLOTS: c3t3_item->c3t3(), target_length, CGAL::parameters::remesh_boundaries(!protect) - .number_of_iterations(nb_iter)); + .number_of_iterations(nb_iter) + .smooth_constrained_edges(smooth_edges)); std::cout << "Remeshing done (" << time.elapsed() << " ms)" << std::endl; @@ -204,6 +206,10 @@ private: ui.nbIterations_spinbox->setValue(1); ui.protect_checkbox->setChecked(false); + ui.smoothEdges_checkBox->setChecked(false); + + connect(ui.protect_checkbox, SIGNAL(toggled(bool)), + ui.smoothEdges_checkBox, SLOT(setDisabled(bool))); return ui; } From 382e0daf972a4f7c8db07693f8d3e9a3f3024ea2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 23 Jul 2020 14:57:24 +0200 Subject: [PATCH 034/149] add new parameter in the tests --- .../test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp index 9500e15b54c..890a018d2fb 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp @@ -57,7 +57,8 @@ int main() //Remeshing : coarsen double target_edge_length = 15.; CGAL::tetrahedral_isotropic_remeshing(t3, target_edge_length, - CGAL::parameters::number_of_iterations(2)); + CGAL::parameters::number_of_iterations(2) + .smooth_constrained_edges(true)); std::cout << "Remeshing 1 done." << std::endl; From 1ec3f5154443303fc27f0d133d5e195e6f93ac2f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 23 Jul 2020 16:26:47 +0200 Subject: [PATCH 035/149] fix typo in debug code --- .../CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index 87c940da023..ad609fe56e8 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -515,7 +515,7 @@ public: final_position = smoothed_position; #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - os_surf << "2 " << current_pos << " " << final_position << std::endl, + os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif // move vertex typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); @@ -548,7 +548,7 @@ public: final_position = current_pos; #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - os_surf << "2 " << current_pos << " " << final_position << std::endl, + os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif // move vertex typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); From f3699e96256148e1fc484101496c24424caefc17 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 23 Jul 2020 17:23:03 +0200 Subject: [PATCH 036/149] use new named parameters API for doc of smooth_constrained_edges --- .../include/CGAL/tetrahedral_remeshing.h | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index d727403e2da..156a4dceb22 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -97,7 +97,7 @@ namespace CGAL * Otherwise, the topology is preserved, but atomic operations * can be performed on the surfaces, and along feature polylines, * such that boundaries are remeshed.} -* \cgalParamType{Boolean} +* \cgalParamType{`bool`} * \cgalParamDefault{`true`} * \cgalParamExtra{Boundaries are between the exterior and the interior, * between two subdomains, between the areas selected or not for remeshing @@ -135,11 +135,24 @@ namespace CGAL * \cgalParamExtra{During the meshing process, the set of selected cells evolves consistently with * the atomic operations that are performed, so the property map must be writable.} * \cgalParamNEnd -* \cgalParamBegin{smooth_constrained_edges} If `true`, the end vertices of the edges set as -* constrained in `edge_is_constrained_map` move along the -* constrained polylines they belong to. -* \cgalParamEnd -* \cgalNamedParamsEnd +* +* \cgalParamNBegin{smooth_constrained_edges} +* \cgalParamDescription{If `true`, the end vertices of the edges set as +* constrained in `edge_is_constrained_map` move along the +* constrained polylines they belong to.} +* \cgalParamType{`bool`} +* \cgalParamDefault{`false`} +* \cgalParamExtra{The endvertices of constraints listed +* by `edge_is_constrained_map`, and edges incident to at least three subdomains +* are made eligible to one dimensional smoothing, along the constrained polylines they belong to. +* Corners (i.e. vertices incident to more than 2 constrained edges) are not allowed +* to move at all.\n +* Note that activating the smoothing step on polyline constraints tends to reduce +* the quality of the minimal dihedral angle in the mesh.\n +* If `remesh_boundaries` is set to `false`, this parameter is ignored.} +* \cgalParamNEnd +* +* \cgalNamedParamsEnd * * \sa `CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3` * From 1ffbd834805f828497821cdf02f1547cf0b2adca Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 23 Jul 2020 18:24:06 +0200 Subject: [PATCH 037/149] Fix a bug ``` == CMake setup == CMake Warning (dev) at Installation/lib/cmake/CGAL/CGALConfigVersion.cmake:6 (set): Cannot set "CGAL_MAJOR_VERSION": current scope has no parent. Call Stack (most recent call first): CGALConfigVersion.cmake:1 (include) CMakeLists.txt:13 (include) This warning is for project developers. Use -Wno-dev to suppress it. ``` --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 1 + Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index bb1a0c43c6f..92f6a884000 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -150,6 +150,7 @@ foreach(cgal_lib ${CGAL_LIBRARIES}) endif() endforeach() +include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake) # # diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 5b2fade66df..a4851a51e1d 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -2,12 +2,6 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 1) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -if(NOT CMAKE_SCRIPT_MODE_FILE) - set(CGAL_MAJOR_VERSION ${CGAL_MAJOR_VERSION} PARENT_SCOPE) - set(CGAL_MINOR_VERSION ${CGAL_MINOR_VERSION} PARENT_SCOPE) - set(CGAL_BUGFIX_VERSION ${CGAL_BUGFIX_VERSION} PARENT_SCOPE) - set(CGAL_BUILD_VERSION ${CGAL_BUILD_VERSION} PARENT_SCOPE) -endif() set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1-beta2") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") From 702976d24279775a13e5cf53203fdf835abf181c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 24 Jul 2020 10:49:56 +0200 Subject: [PATCH 038/149] separate smoothing of feature vertices (dim 1) and surface vertices (dim 2) --- .../Tetrahedral_remeshing/internal/smooth_vertices.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index ad609fe56e8..7bb58a0338b 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -555,11 +555,14 @@ public: check_inversion_and_move(v, new_pos, inc_cells[vid], tr); } } + } - smoothed_positions.assign(nbv, CGAL::NULL_VECTOR); - neighbors.assign(nbv, -1); + smoothed_positions.assign(nbv, CGAL::NULL_VECTOR); + neighbors.assign(nbv, -1); - /////////////// EDGES ON SURFACE, BUT NOT IN COMPLEX ////////////////// + /////////////// EDGES ON SURFACE, BUT NOT IN COMPLEX ////////////////// + if (!protect_boundaries) + { for (const Edge& e : tr.finite_edges()) { if (is_boundary(c3t3, e, cell_selector) && !c3t3.is_in_complex(e)) From 5698056d6c894105bac1bbac397f7b9207c48a6d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 24 Jul 2020 11:19:51 +0200 Subject: [PATCH 039/149] fix counting of vertices moves --- .../internal/smooth_vertices.h | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index 7bb58a0338b..fc9cf93d1dc 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -325,7 +325,7 @@ private: } template - void check_inversion_and_move(const typename Tr::Vertex_handle v, + bool check_inversion_and_move(const typename Tr::Vertex_handle v, const typename Tr::Point& final_pos, const CellRange& inc_cells, const Tr& /* tr */) @@ -362,6 +362,8 @@ private: if (!valid_orientation) //move failed v->set_point(backup); + + return valid_orientation; } void collect_vertices_surface_indices( @@ -404,8 +406,8 @@ public: #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE std::cout << "Smooth vertices..."; std::cout.flush(); - std::size_t nb_done = 0; #endif + std::size_t nb_done = 0; Tr& tr = c3t3.triangulation(); @@ -518,8 +520,9 @@ public: os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif // move vertex - typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); - check_inversion_and_move(v, new_pos, inc_cells[vid], tr); + const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr)) + nb_done++; } else if (neighbors[vid] > 0) { @@ -551,8 +554,9 @@ public: os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif // move vertex - typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); - check_inversion_and_move(v, new_pos, inc_cells[vid], tr); + const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr)) + nb_done++; } } } @@ -621,12 +625,11 @@ public: final_position = smoothed_position; #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - os_surf << "2 " << current_pos << " " << final_position << std::endl, + os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif - check_inversion_and_move(v, typename Tr::Point( - final_position.x(), final_position.y(), final_position.z()), - inc_cells[vid], - tr); + const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr)) + nb_done++; } else if (neighbors[vid] > 0) { @@ -638,7 +641,8 @@ public: if (boost::optional mls_projection = project(si, current_pos)) { const typename Tr::Point new_pos(CGAL::ORIGIN + *mls_projection); - check_inversion_and_move(v, new_pos, inc_cells[vid], tr); + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr)) + nb_done++; #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_surf0 << "2 " << current_pos << " " << new_pos << std::endl; @@ -684,14 +688,13 @@ public: const std::size_t& vid = vertex_id.at(v); if (c3t3.in_dimension(v) == 3 && neighbors[vid] > 1) { -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - ++nb_done; -#endif #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_vol << "2 " << point(v->point()); #endif const Vector_3 p = smoothed_positions[vid] / static_cast(neighbors[vid]); - check_inversion_and_move(v, typename Tr::Point(p.x(), p.y(), p.z()), inc_cells[vid], tr); + typename Tr::Point new_pos(p.x(), p.y(), p.z()); + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr)) + nb_done++; #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_vol << " " << point(v->point()) << std::endl; From 38add289a13ebbb9bdaca29594446d4de664f653 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 24 Jul 2020 11:58:03 +0200 Subject: [PATCH 040/149] remove commented macro which does not exist anymore --- .../Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp index 74f52aee62d..05875d4e6ca 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Tetrahedral_remeshing/Tetrahedral_remeshing_plugin.cpp @@ -3,7 +3,6 @@ //#define CGAL_TETRAHEDRAL_REMESHING_DEBUG //#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE_PROGRESS //#define CGAL_TETRAHEDRAL_REMESHING_PROFILE -//#define CGAL_TETRAHEDRAL_REMESHING_SMOOTH_SHARP_EDGES #include From 213221e5cb5d32ab384c1ede0fcd0601e03fd646 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 24 Jul 2020 14:02:40 +0200 Subject: [PATCH 041/149] Initialize eor to silent wranings --- Nef_3/include/CGAL/Nef_3/SNC_point_locator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h index 20a223759fe..259911242c5 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h @@ -563,7 +563,7 @@ public: Partial_facet pf; #endif bool hit = false; - Point_3 eor; // 'end of ray', the latest ray's hit point + Point_3 eor = CGAL::ORIGIN; // 'end of ray', the latest ray's hit point Objects_along_ray objects = candidate_provider->objects_along_ray(ray); Objects_along_ray_iterator objects_iterator = objects.begin(); while( !hit && objects_iterator != objects.end()) { From 9e82356213431b50f0cd0994059f128c856a51ba Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 24 Jul 2020 16:54:29 +0200 Subject: [PATCH 042/149] fix compare_subdomains compared std::vector were not made unique! always different in presence of different numbers of incident cells --- .../internal/tetrahedral_remeshing_helpers.h | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 2c99833b158..f1b095d3dcc 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -25,6 +25,8 @@ #include +#include + namespace CGAL { namespace Tetrahedral_remeshing @@ -761,20 +763,20 @@ Subdomain_relation compare_subdomains(const typename C3t3::Vertex_handle v0, { typedef typename C3t3::Subdomain_index Subdomain_index; - std::vector subdomains_v0; - incident_subdomains(v0, c3t3, std::back_inserter(subdomains_v0)); - std::sort(subdomains_v0.begin(), subdomains_v0.end()); + boost::container::flat_set subdomains_v0; + incident_subdomains(v0, c3t3, + std::inserter(subdomains_v0, subdomains_v0.begin())); - std::vector subdomains_v1; - incident_subdomains(v1, c3t3, std::back_inserter(subdomains_v1)); - std::sort(subdomains_v1.begin(), subdomains_v1.end()); + boost::container::flat_set subdomains_v1; + incident_subdomains(v1, c3t3, + std::inserter(subdomains_v1, subdomains_v1.begin())); if (subdomains_v0.size() == subdomains_v1.size()) { - for (unsigned int i = 0; i < subdomains_v0.size(); i++) - if (subdomains_v0[i] != subdomains_v1[i]) - return DIFFERENT; - return EQUAL; + if(std::equal(subdomains_v0.begin(), subdomains_v0.end(), subdomains_v1.begin())) + return EQUAL; + else + return DIFFERENT; } else { From d89ab5ef7c9d50b2d1eb35f6a1cb0c4e89ffb28b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 27 Jul 2020 08:44:48 +0100 Subject: [PATCH 043/149] polish --- .../CGAL/Convex_hull_3/dual/halfspace_intersection_3.h | 4 ++-- .../dual/halfspace_intersection_with_constructions_3.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 18a91a0a502..92f1b7711ce 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -8,8 +8,8 @@ If `origin` is given then it must be a point strictly inside the polyhedron. If This version does not construct the dual points explicitely but uses a special traits class for the function `CGAL::convex_hull_3()` to handle predicates on dual points without constructing them. -\attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . -\attention +Halfspaces are considered as lower halfspaces, that is if the plane equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . + \pre The point type of `origin` and the point type of the vertices of `PolygonMesh` must come from the same \cgal %Kernel.\pre if provided, `origin` is inside the intersection of halfspaces defined by the range `[begin, end)`. \pre The computed intersection must be a bounded convex polyhedron. diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 4d2913acf34..a234d1905ca 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -7,7 +7,7 @@ namespace CGAL { If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using the function `halfspace_intersection_interior_point_3()` based on solving a linear program and thus is slower. This version constructs explicitly the dual points using the convex hull algorithm parametrized with the given traits class. -\attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . +Halfspaces are considered as lower halfspaces, that is if the plane equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . \pre The value type of `PlaneIterator` and the point type of `origin` must come from the same \cgal Kernel. \pre if provided, `origin` is inside the intersection of halfspaces defined by the range `[begin, end)`. From 7e1ca9b9dfd38a01763ddd534db1ddbf487fec09 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 27 Jul 2020 12:18:27 +0200 Subject: [PATCH 044/149] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 5204d588c2a..bc9df8cdfa9 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -29,7 +29,7 @@ LC_CTYPE=en_US.UTF-8 # from branch 5.0 0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 -0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.14-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.14-branch.git $HOME/CGAL/branches/empty-dir --public --do-it || echo ERROR +0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.14-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.14-branch.git --public --do-it || echo ERROR ## Older stuff # from branch 4.13 From 5a6fc8949596fa519e605fa252b28d709325cad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 28 Jul 2020 09:54:47 +0200 Subject: [PATCH 045/149] Fix and simplify polygon soup repairing subfunction "simplify_polygon" --- .../repair_polygon_soup.h | 40 +++++-------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index b6df34136cb..005eb344e3d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -126,43 +126,21 @@ bool simplify_polygon(PointRange& points, { const std::size_t ini_polygon_size = polygon.size(); - // Start at the last since if two points are identical, the second one gets removed. - // By starting at 'last', we ensure that 'to_remove' is ordered from closest to .begin() - // to closest to .end() - std::size_t last = ini_polygon_size - 1, i = last; - bool stop = false; - std::vector to_remove; - - do + for(std::size_t i=0; i(points, polygons); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 0 && polygons.back().size() == 3); // ------ @@ -305,6 +315,7 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 1); // ------ @@ -313,6 +324,7 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 1); // ------ @@ -321,8 +333,18 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 2); + // ------ + polygon.clear(); + polygon.push_back(0); polygon.push_back(2); polygon.push_back(0); polygon.push_back(4); + polygons.push_back(polygon); + + res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; + assert(res == 0 && polygons.back().size() == 4); + // ------ // Now with the same geometric positions, but different combinatorial information polygon.clear(); @@ -330,6 +352,7 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 3); // ------ @@ -338,6 +361,7 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 2); // ------ @@ -346,6 +370,7 @@ void test_simplify_polygons(const bool /*verbose*/ = false) polygons.push_back(polygon); res = PMP::internal::simplify_polygons_in_polygon_soup(points, polygons, K()); + std::cout << "res: " << res << " / size: " << polygons.back().size() << std::endl; assert(res == 1 && polygons.back().size() == 3); } From 993e4b599ae13f31e76594248043f06c993ec894 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 28 Jul 2020 10:34:10 +0200 Subject: [PATCH 047/149] Use a small_vector as the third template arguments of the flat_set That will avoid the memory allocation at each call of the function. --- .../internal/tetrahedral_remeshing_helpers.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index f1b095d3dcc..fa58069e499 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -26,6 +27,7 @@ #include #include +#include namespace CGAL { @@ -762,12 +764,15 @@ Subdomain_relation compare_subdomains(const typename C3t3::Vertex_handle v0, const C3t3& c3t3) { typedef typename C3t3::Subdomain_index Subdomain_index; + typedef boost::container::flat_set, + boost::container::small_vector > Set_of_subdomains; - boost::container::flat_set subdomains_v0; + Set_of_subdomains subdomains_v0; incident_subdomains(v0, c3t3, std::inserter(subdomains_v0, subdomains_v0.begin())); - boost::container::flat_set subdomains_v1; + Set_of_subdomains subdomains_v1; incident_subdomains(v1, c3t3, std::inserter(subdomains_v1, subdomains_v1.begin())); @@ -780,13 +785,14 @@ Subdomain_relation compare_subdomains(const typename C3t3::Vertex_handle v0, } else { - std::vector - intersection((std::min)(subdomains_v0.size(), subdomains_v1.size()), -1); - typename std::vector::iterator + boost::container::small_vector + intersection((std::min)(subdomains_v0.size(), subdomains_v1.size()), -1); + typename boost::container::small_vector::iterator end_it = std::set_intersection(subdomains_v0.begin(), subdomains_v0.end(), subdomains_v1.begin(), subdomains_v1.end(), intersection.begin()); - std::ptrdiff_t intersection_size = (end_it - intersection.begin()); + std::ptrdiff_t intersection_size = + std::distance(intersection.begin(), end_it); if (subdomains_v0.size() > subdomains_v1.size() && intersection_size == std::ptrdiff_t(subdomains_v1.size())) From a8ed7408c39e46eab4ef67d88519d10cd23b6758 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 28 Jul 2020 11:24:19 +0200 Subject: [PATCH 048/149] Prepare for a beta3 and let's hope it will not be needed --- Installation/include/CGAL/version.h | 2 +- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 2 +- .../public_release/announcement/mailing-beta.eml | 13 +++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 26a92686edd..c9484b891d1 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,7 +17,7 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.1-beta2 +#define CGAL_VERSION 5.1-beta3 #define CGAL_GIT_HASH abcdef #endif #define CGAL_VERSION_NR 1050100000 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index a4851a51e1d..62b7f345e81 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -2,7 +2,7 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 1) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1-beta2") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1-beta3") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) diff --git a/Maintenance/public_release/announcement/mailing-beta.eml b/Maintenance/public_release/announcement/mailing-beta.eml index 9234c02b647..578addc45a6 100644 --- a/Maintenance/public_release/announcement/mailing-beta.eml +++ b/Maintenance/public_release/announcement/mailing-beta.eml @@ -1,14 +1,14 @@ -Subject: CGAL 5.1 Beta 1 Released, Computational Geometry Algorithms Library +Subject: CGAL 5.1 Beta 2 Released, Computational Geometry Algorithms Library Content-Type: text/plain; charset="utf-8" Body: -The CGAL Open Source Project is pleased to announce the release 5.1 Beta 1 +The CGAL Open Source Project is pleased to announce the release 5.1 Beta 2 of CGAL, the Computational Geometry Algorithms Library. -CGAL version 5.1 Beta 1 is a public testing release. It should provide a +CGAL version 5.1 Beta 2 is a public testing release. It should provide a solid ground to report bugs that need to be tackled before the release -of the final version of CGAL 5.1 in July. +of the final version of CGAL 5.1 in September. Besides fixes and general enhancement to existing packages, the following @@ -45,6 +45,11 @@ Optimal Bounding Box (new package) See also the associated blog entry: https://www.cgal.org/2020/04/20/Optimal_bounding_box/ +Installation + +- The CGAL_Core library no longer requires Boost.Thread, even if the + g++ compiler is used. + Tutorials - Two new, detailed tutorials have been added: From a87c66af2ce3428c6fa0a64b7ee32854a34d7990 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 28 Jul 2020 11:45:08 +0200 Subject: [PATCH 049/149] I forgot to update the URL --- Maintenance/public_release/announcement/mailing-beta.eml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/public_release/announcement/mailing-beta.eml b/Maintenance/public_release/announcement/mailing-beta.eml index 578addc45a6..e77d4236929 100644 --- a/Maintenance/public_release/announcement/mailing-beta.eml +++ b/Maintenance/public_release/announcement/mailing-beta.eml @@ -123,7 +123,7 @@ CGAL and the Boost Graph Library (BGL) uses this alpha expansion graphcut to regularize the borders of a selected faces on a triangle mesh. -See https://www.cgal.org/2020/06/09/cgal51-beta1/ for a complete list of +See https://www.cgal.org/2020/07/28/cgal51-beta2/ for a complete list of changes. From 38bb4542c1287a5198284e23d51c3001b7a4ce0e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 28 Jul 2020 12:18:29 +0200 Subject: [PATCH 050/149] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index bc9df8cdfa9..2600c39135e 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -23,9 +23,9 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --beta 2 --public || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --beta 3 --public || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it --beta 2 --public || echo ERROR +0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it --beta 3 --public || echo ERROR # from branch 5.0 0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 From 7efa1d8771ebc65add1de6083da633019a88a164 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 29 Jul 2020 15:04:53 +0200 Subject: [PATCH 051/149] use a ppa to get boost-1.73 --- .travis/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 507ecd0894e..09c436102f4 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -2,13 +2,15 @@ [ -n "$CGAL_DEBUG_TRAVIS" ] && set -x DONE=0 +sudo add-apt-repository ppa:mhier/libboost-latest sudo apt-get update + while [ $DONE = 0 ] do DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang zsh \ -flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev libboost-dev \ -libboost-system-dev libboost-program-options-dev libboost-thread-dev libboost-iostreams-dev \ +flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \ qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \ +libboost || DONE=0 && sudo apt-get update done exit 0 From 1ae35c9f589e9c23b8d29096714c6f808a156593 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 31 Jul 2020 10:00:55 +0200 Subject: [PATCH 052/149] Document that we require Boost 1.66 or later ... and let's face that 5.1 will only be officially published in September 2020, after the summer vacations. --- Documentation/doc/Documentation/Third_party.txt | 2 +- Installation/CHANGES.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 5b576b15ca2..6019c3057ae 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -56,7 +56,7 @@ or `h The \stl comes with the compiler, and as such no installation is required. \subsection thirdpartyBoost Boost -Version 1.62 or later +Version 1.66 or later The \sc{Boost} libraries are a set of portable C++ source libraries. Most of \sc{Boost} libraries are header-only, but a few of them need to be compiled or diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 4b3d72d2580..420781a827c 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -4,7 +4,7 @@ Release History [Release 5.1](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.1) ----------- -Release date: July 2020 +Release date: September 2020 ### [Tetrahedral Remeshing](https://doc.cgal.org/5.1/Manual/packages.html#PkgTetrahedralRemeshing) (new package) @@ -33,6 +33,7 @@ Release date: July 2020 ### Installation - The CGAL\_Core library no longer requires `Boost.Thread`, even if the g++ compiler is used. +- The minimal supported version of Boost is now 1.66.0. ### [Tutorials](https://doc.cgal.org/5.1/Manual/tutorials.html) From 7132b693f4652db6cb6ba473dc94b65cdb54b2cc Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 3 Aug 2020 09:54:47 +0200 Subject: [PATCH 053/149] Replace cpp11::array with std::array --- .../reconstruction_structured.cpp | 3 ++- .../reconstruction_surface_mesh.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp index d944cf985df..d2dda3af49c 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -36,7 +37,7 @@ typedef CGAL::Triangulation_data_structure_3 Tds; typedef CGAL::Delaunay_triangulation_3 Triangulation_3; typedef Triangulation_3::Vertex_handle Vertex_handle; -typedef CGAL::cpp11::array Facet; +typedef std::array Facet; // Functor to init the advancing front algorithm with indexed points diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp index 80bff330b4d..7fac0628770 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp @@ -1,10 +1,10 @@ #include #include #include +#include #include #include #include -#include #include typedef std::array Facet; From b94c11ec4cf74321f3063820b09911abf189c4f1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 3 Aug 2020 11:47:27 +0200 Subject: [PATCH 054/149] Update menu_version.js with newest versions --- Documentation/doc/resources/1.8.13/menu_version.js | 10 +++++----- Documentation/doc/resources/1.8.14/menu_version.js | 10 +++++----- Documentation/doc/resources/1.8.4/menu_version.js | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 780aefa1246..0a354874978 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -1,15 +1,15 @@ (function() { 'use strict'; - var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//; + var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//; var url_local = /.*\/doc_output\//; - var current_version_local = '5.1-beta1' + var current_version_local = '5.0.3' var all_versions = [ 'master', 'latest', - '5.1-beta1', - '5.0.2', - '4.14.3', + '5.1-beta2', + '5.0.3', + '4.14.2', '4.13.2', '4.12.2', '4.11.3', diff --git a/Documentation/doc/resources/1.8.14/menu_version.js b/Documentation/doc/resources/1.8.14/menu_version.js index 780aefa1246..0a354874978 100644 --- a/Documentation/doc/resources/1.8.14/menu_version.js +++ b/Documentation/doc/resources/1.8.14/menu_version.js @@ -1,15 +1,15 @@ (function() { 'use strict'; - var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//; + var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//; var url_local = /.*\/doc_output\//; - var current_version_local = '5.1-beta1' + var current_version_local = '5.0.3' var all_versions = [ 'master', 'latest', - '5.1-beta1', - '5.0.2', - '4.14.3', + '5.1-beta2', + '5.0.3', + '4.14.2', '4.13.2', '4.12.2', '4.11.3', diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index 780aefa1246..0a354874978 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -1,15 +1,15 @@ (function() { 'use strict'; - var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//; + var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//; var url_local = /.*\/doc_output\//; - var current_version_local = '5.1-beta1' + var current_version_local = '5.0.3' var all_versions = [ 'master', 'latest', - '5.1-beta1', - '5.0.2', - '4.14.3', + '5.1-beta2', + '5.0.3', + '4.14.2', '4.13.2', '4.12.2', '4.11.3', From 873fc83a44e66a2b3dc384a994b0419254777903 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 3 Aug 2020 12:25:09 +0200 Subject: [PATCH 055/149] This branch now targets 5.0.4 --- Installation/include/CGAL/version.h | 4 ++-- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index a4947725b45..15efa061539 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,10 +17,10 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.0.3 +#define CGAL_VERSION 5.0.4 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050031000 +#define CGAL_VERSION_NR 1050041000 #define CGAL_SVN_REVISION 99999 #define CGAL_RELEASE_DATE 20191108 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index ac125e9165a..695e8739631 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,7 +1,7 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 0) -set(CGAL_BUGFIX_VERSION 3) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.0.3") +set(CGAL_BUGFIX_VERSION 4) +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.0.4") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 0c35447ebc0d3e2578270e722ca70f862ef9505a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 30 Jul 2020 16:26:21 +0200 Subject: [PATCH 056/149] add ppa non-interractively --- .travis/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 09c436102f4..7eb7f9799af 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -2,7 +2,7 @@ [ -n "$CGAL_DEBUG_TRAVIS" ] && set -x DONE=0 -sudo add-apt-repository ppa:mhier/libboost-latest +sudo add-apt-repository ppa:mhier/libboost-latest -y sudo apt-get update while [ $DONE = 0 ] @@ -10,8 +10,7 @@ do DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang zsh \ flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \ qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \ -libboost -|| DONE=0 && sudo apt-get update +libboost1.73-dev || DONE=0 && sudo apt-get update done exit 0 From 09b52ce69f10ea14e64fe44df502f87f8f0a85a6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 3 Aug 2020 16:55:25 +0200 Subject: [PATCH 057/149] Add test/Kernel_23/test_approximate_dihedral_angle_3.cpp --- .../test_approximate_dihedral_angle_3.cpp | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Kernel_23/test/Kernel_23/test_approximate_dihedral_angle_3.cpp diff --git a/Kernel_23/test/Kernel_23/test_approximate_dihedral_angle_3.cpp b/Kernel_23/test/Kernel_23/test_approximate_dihedral_angle_3.cpp new file mode 100644 index 00000000000..233656236b2 --- /dev/null +++ b/Kernel_23/test/Kernel_23/test_approximate_dihedral_angle_3.cpp @@ -0,0 +1,36 @@ +#include +#include +#include +#include +using K = CGAL::Simple_cartesian; +using Point_3 = K::Point_3; + +struct query { + Point_3 p; + double expected_angle; +}; + +int main() { + Point_3 a = {0, 0, 0}; + Point_3 b = {0, 1, 0}; + Point_3 c = {1, 0, 0}; + + const query queries[] = { + { { 1, 0, 0}, 0.}, + { { 1, 0, 1}, 45.}, + { { 0, 0, 1}, 90.}, + { { -1, 0, 1}, 135.}, + { { -1, 0, 0}, 180.}, + { { -1, 0, -1}, -135.}, + { { 0, 0, -1}, -90.}, + { { 1, 0, -1}, -45.}, + }; + + for(auto query: queries) { + const auto& expected = query.expected_angle; + const auto& p = query.p; + auto approx = CGAL::approximate_dihedral_angle(a, b, c, p); + std::cout << approx << " -- " << expected << '\n'; + assert( std::abs(approx - expected) < 0.1 ); + } +}; From 1454dd6e245475d6b2e80ab0dc72939508210a02 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 3 Aug 2020 17:11:23 +0200 Subject: [PATCH 058/149] Fix typo --- .../internal/tetrahedral_remeshing_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index fa58069e499..c58bbd3f6ba 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -27,7 +27,7 @@ #include #include -#include +#include namespace CGAL { From 715aa45a2be281135d3e94513e7a14334d4973d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 4 Aug 2020 08:22:01 +0200 Subject: [PATCH 059/149] rephrase --- .../include/CGAL/Polygon_mesh_processing/clip.h | 2 +- .../include/CGAL/Polygon_mesh_processing/corefinement.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index ad1201317fe..24a8471edd5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -540,7 +540,7 @@ generic_clip_impl( * will not be part of the output. Default value is `true`. * \cgalParamEnd * \cgalParamBegin{do_not_modify} (`np_c` only) if `true`, `clipper` will not be modified. The default value is `false`. - * An interesting property of this option is that when set to `true`, + * If this option is set to `true`, * `tm` is no longer required to be without self-intersection. * Setting this option to `true` will automatically set `throw_on_self_intersection` to `false` * and `clip_volume` to `false`. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 209f6eaf2b4..a248d24b257 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -627,8 +627,8 @@ corefine_and_compute_difference( TriangleMesh& tm1, * will be thrown if at least one is found (`np1` only). * \cgalParamEnd * \cgalParamBegin{do_not_modify} if `true`, the corresponding mesh will not be updated. The default value is `false`. - * Obviously if this parameter is set to `true` for both meshes nothing will be done. - * An interesting property of this option is that when set to `true` for one mesh, + * If this parameter is set to `true` for both meshes nothing will be done. + * If this option is set to `true` for one mesh, * the other mesh is no longer required to be without self-intersection. * \cgalParamEnd * \cgalNamedParamsEnd From dac614bd02aec1eb3cae166e504445c757805c1f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 4 Aug 2020 10:12:58 +0200 Subject: [PATCH 060/149] Update to bionic and install and use clang-10 --- .travis.yml | 4 ++-- .travis/install.sh | 2 +- .travis/template.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c2fe62d3f4..f9e0528d35d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: cpp -dist: xenial +dist: bionic sudo: required git: depth: 3 @@ -58,7 +58,7 @@ install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - - export CXX=clang++ CC=clang; + - export CXX=clang++-10 CC=clang-10; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe - sudo mv doxygen_exe /usr/bin/doxygen diff --git a/.travis/install.sh b/.travis/install.sh index 7eb7f9799af..63a9ec329eb 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -7,7 +7,7 @@ sudo apt-get update while [ $DONE = 0 ] do - DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang zsh \ + DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-10 zsh \ flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \ qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \ libboost1.73-dev || DONE=0 && sudo apt-get update diff --git a/.travis/template.txt b/.travis/template.txt index 48d2facb8ce..3b99af1ff13 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -1,5 +1,5 @@ language: cpp -dist: xenial +dist: bionic sudo: required git: depth: 3 @@ -12,7 +12,7 @@ install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - - export CXX=clang++ CC=clang; + - export CXX=clang++-10 CC=clang-10; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe - sudo mv doxygen_exe /usr/bin/doxygen From ebe7168ece4cec7a2464b465af1c572178430f52 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 4 Aug 2020 14:19:17 +0200 Subject: [PATCH 061/149] Remove outdated precondition --- .../include/CGAL/edge_aware_upsample_point_set.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index c76c2ae065e..700248cff52 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -364,7 +364,6 @@ edge_aware_upsample_point_set( &&sharpness_angle <= 90); CGAL_point_set_processing_precondition(edge_sensitivity >= 0 &&edge_sensitivity <= 1); - CGAL_point_set_processing_precondition(neighbor_radius > 0); edge_sensitivity *= 10; // just project [0, 1] to [0, 10]. From 2780fa09eb9ac2b93629b1223c83b5b939d4298c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 5 Aug 2020 10:49:14 +0200 Subject: [PATCH 062/149] Restore PS_to_PM with array-based soups --- .../polygon_soup_to_polygon_mesh.h | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index f13ab6bf29e..3c4dc37a8a1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -37,13 +38,26 @@ namespace CGAL { namespace Polygon_mesh_processing { namespace internal { +template +PM_Point convert_to_pm_point(const PS_Point& p) +{ + CGAL_static_assertion((std::is_convertible::value)); + return PM_Point(p); +} + +// just for backward compatibility reasons +template +PM_Point convert_to_pm_point(const std::array& p) +{ + return PM_Point(p[0], p[1], p[2]); +} + template ::const_type> class PS_to_PM_converter { typedef typename boost::range_value::type Polygon; - typedef typename boost::property_traits::value_type Point; public: /** @@ -68,8 +82,6 @@ public: typedef typename boost::property_traits::value_type PM_Point; - CGAL_static_assertion((std::is_convertible::value)); - reserve(pmesh, static_cast::vertices_size_type>(m_points.size()), static_cast::edges_size_type>(2*m_polygons.size()), static_cast::faces_size_type>(m_polygons.size())); @@ -94,7 +106,7 @@ public: continue; vertices[i] = add_vertex(pmesh); - PM_Point pi(get(m_pm, m_points[i])); + PM_Point pi = convert_to_pm_point(get(m_pm, m_points[i])); put(vpm, vertices[i], pi); } From 2375fed008afecc4211266bf13e4429b619b9aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 5 Aug 2020 10:49:54 +0200 Subject: [PATCH 063/149] Enhance example to use custom traits (and test array-based PS_to_PM/repair_PS) --- .../repair_polygon_soup_example.cpp | 49 ++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp index 4d9003f0d6a..66b6e6b9286 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp @@ -5,30 +5,55 @@ #include #include +#include +#include #include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::FT FT; typedef K::Point_3 Point_3; -typedef std::vector CGAL_Polygon; typedef CGAL::Surface_mesh Mesh; +typedef std::array Custom_point; +typedef std::vector CGAL_Polygon; + namespace PMP = CGAL::Polygon_mesh_processing; +struct Array_traits +{ + struct Equal_3 + { + bool operator()(const Custom_point& p, const Custom_point& q) { + return (p == q); + } + }; + + struct Less_xyz_3 + { + bool operator()(const Custom_point& p, const Custom_point& q) { + return std::lexicographical_compare(p.begin(), p.end(), q.begin(), q.end()); + } + }; + + Equal_3 equal_3_object() const { return Equal_3(); } + Less_xyz_3 less_xyz_3_object() const { return Less_xyz_3(); } +}; + int main(int, char**) { // First, construct a polygon soup with some problems - std::vector points; + std::vector > points; std::vector polygons; - points.push_back(Point_3(0,0,0)); - points.push_back(Point_3(1,0,0)); - points.push_back(Point_3(0,1,0)); - points.push_back(Point_3(-1,0,0)); - points.push_back(Point_3(0,-1,0)); - points.push_back(Point_3(0,1,0)); // duplicate point - points.push_back(Point_3(0,-2,0)); // unused point + points.push_back(CGAL::make_array(0,0,0)); + points.push_back(CGAL::make_array(1,0,0)); + points.push_back(CGAL::make_array(0,1,0)); + points.push_back(CGAL::make_array(-1,0,0)); + points.push_back(CGAL::make_array(0,-1,0)); + points.push_back(CGAL::make_array(0,1,0)); // duplicate point + points.push_back(CGAL::make_array(0,-2,0)); // unused point CGAL_Polygon p; p.push_back(0); p.push_back(1); p.push_back(2); @@ -67,10 +92,12 @@ int main(int, char**) p.push_back(4); p.push_back(3); p.push_back(2); p.push_back(1); polygons.push_back(p); - PMP::repair_polygon_soup(points, polygons); - PMP::orient_polygon_soup(points, polygons); + std::cout << "Before reparation, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; + PMP::repair_polygon_soup(points, polygons, CGAL::parameters::geom_traits(Array_traits())); + std::cout << "After reparation, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; Mesh mesh; + PMP::orient_polygon_soup(points, polygons); PMP::polygon_soup_to_polygon_mesh(points, polygons, mesh); std::cout << "Mesh has " << num_vertices(mesh) << " vertices and " << num_faces(mesh) << " faces" << std::endl; From 1c53aea4e287b2c4163f2f88f854baa12efd941b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 6 Aug 2020 08:50:41 +0200 Subject: [PATCH 064/149] Add missing 'const' qualifiers --- .../Polygon_mesh_processing/repair_polygon_soup_example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp index 66b6e6b9286..484abcdefae 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp @@ -25,14 +25,14 @@ struct Array_traits { struct Equal_3 { - bool operator()(const Custom_point& p, const Custom_point& q) { + bool operator()(const Custom_point& p, const Custom_point& q) const { return (p == q); } }; struct Less_xyz_3 { - bool operator()(const Custom_point& p, const Custom_point& q) { + bool operator()(const Custom_point& p, const Custom_point& q) const { return std::lexicographical_compare(p.begin(), p.end(), q.begin(), q.end()); } }; From 4a1ad0c756cae6df7c904fce21285231faab825e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 6 Aug 2020 11:45:23 +0200 Subject: [PATCH 065/149] remove incorrect license include statement --- Stream_support/include/CGAL/IO/write_vtk.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Stream_support/include/CGAL/IO/write_vtk.h b/Stream_support/include/CGAL/IO/write_vtk.h index 892d86ace3e..2a036a9c7de 100644 --- a/Stream_support/include/CGAL/IO/write_vtk.h +++ b/Stream_support/include/CGAL/IO/write_vtk.h @@ -22,8 +22,6 @@ #ifndef CGAL_WRITE_VTK_IO_H #define CGAL_WRITE_VTK_IO_H -#include - #include #include template From 52d8238f3bd36994eb451b7416d4a195faa6f568 Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Thu, 6 Aug 2020 15:15:53 -0700 Subject: [PATCH 066/149] Fix dispatch do_intersect(Tetrahedron_3, Bbox_3) Moving do_intersect(Tetrahedron_3, Bbox_3) below do_intersect(Bbox_3, Tetrahedron_3) Before do_intersect(Tetrahedron_3, Bbox_3) called do_intersect(Iso_cuboid_3, Tetrahedron_3), which compiled due to implicit conversion. AFAIKT it even worked, up to instances with degenerated Bbox_3/Iso_cuboid_3 executed in debug mode. --- .../Tetrahedron_3_Bounded_3_do_intersect.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h index fa66162cafe..d61a9afd453 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h @@ -160,13 +160,6 @@ do_intersect(const typename K::Tetrahedron_3 &tet, return do_intersect_tetrahedron_bounded(sp, tet, tet[0], k); } -template -inline typename K::Boolean do_intersect(const typename K::Tetrahedron_3 &tet, - const CGAL::Bbox_3 &bb, const K &k) { - // Swap arguments. - return do_intersect(bb, tet, k); -} - // BBox_3 specific code since it is ok for BBox_3 to degenerate. template inline typename K::Boolean do_intersect(const CGAL::Bbox_3 &aabb, @@ -197,6 +190,14 @@ inline typename K::Boolean do_intersect(const CGAL::Bbox_3 &aabb, return result; } + +template +inline typename K::Boolean do_intersect(const typename K::Tetrahedron_3 &tet, + const CGAL::Bbox_3 &bb, const K &k) { + // Swap arguments. + return do_intersect(bb, tet, k); +} + } // namespace internal } // namespace Intersections } //namespace CGAL From a11b69e3193a29db7d5bcfc0ee61e22103bcdf77 Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Thu, 6 Aug 2020 08:16:54 -0700 Subject: [PATCH 067/149] Fix do_intersect for Tetrahedron_3 Tetrahedron_3 In Line 65 in function do_intersect_tetrahedron_bounded (tr,tet,p,k) we eval k.has_on_bounded_side_3_object()(tet, p), where tr=lh_tet and tet=rh_tet. Thus p must be generated from lh_tet, or L65 is always true. This is a flyby and has not been tested. --- .../internal/Tetrahedron_3_Bounded_3_do_intersect.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h index dbbfd64178e..bb85726ae6b 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h @@ -162,11 +162,11 @@ do_intersect(const typename K::Sphere_3 &sp, template inline typename K::Boolean -do_intersect(const typename K::Tetrahedron_3 &tet, - const typename K::Tetrahedron_3 &sp, +do_intersect(const typename K::Tetrahedron_3 &lh_tet, + const typename K::Tetrahedron_3 &rh_tet, const K & k) { - return do_intersect_tetrahedron_bounded(sp, tet, tet[0], k); + return do_intersect_tetrahedron_bounded(lh_tet, rh_tet, lh_tet[0], k); } template From 6d949cd14f6d4804eaa631ab7256853d0b262dbf Mon Sep 17 00:00:00 2001 From: Ahmed Essam Date: Sat, 8 Aug 2020 17:29:55 +0200 Subject: [PATCH 068/149] Fix bug with self intersecting bezier curves --- .../CGAL/Arr_geometry_traits/Bezier_cache.h | 20 +++++++++---------- CGAL_Core/include/CGAL/CORE/poly/Poly.tcc | 7 ++++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h index 62c7950a028..829f00d2a5f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h @@ -653,7 +653,7 @@ void _Bezier_cache::_self_intersection_params // II: Y(t) - Y(s) / (t - s) = 0 // Integer *coeffs; - int i, k; + int i; // Consruct the bivariate polynomial that corresponds to Equation I. // Note that we represent a bivariate polynomial as a vector of univariate @@ -667,12 +667,11 @@ void _Bezier_cache::_self_intersection_params coeffs = new Integer [degX]; for (i = 0; i < degX; i++) - { - for (k = i + 1; k < degX; k++) - coeffs[k - i - 1] = nt_traits.get_coefficient (polyX, k); + coeffs[i] = nt_traits.get_coefficient(polyX, i + 1); - coeffsX_st[i] = nt_traits.construct_polynomial (coeffs, degX - i - 1); - } + for (i = 0; i < degX; i++) + coeffsX_st[degX - i - 1] = + nt_traits.construct_polynomial(coeffs + i, degX - i - 1); delete[] coeffs; @@ -685,12 +684,11 @@ void _Bezier_cache::_self_intersection_params coeffs = new Integer [degY]; for (i = 0; i < degY; i++) - { - for (k = i + 1; k < degY; k++) - coeffs[k - i - 1] = nt_traits.get_coefficient (polyY, k); + coeffs[i] = nt_traits.get_coefficient(polyY, i + 1); - coeffsY_st[i] = nt_traits.construct_polynomial (coeffs, degY - i - 1); - } + for (i = 0; i < degY; i++) + coeffsY_st[degY - i - 1] = + nt_traits.construct_polynomial(coeffs + i, degY - i - 1); delete[] coeffs; diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc index 7c8ab59d2e3..325f64d528c 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc @@ -670,19 +670,20 @@ Polynomial Polynomial::pseudoRemainder ( contract(); // Let A = (*this). Contract A. Polynomial tmpB(B); tmpB.contract(); // local copy of B + int bTrueDegree = tmpB.degree; C = NT(1); // Initialized to C=1. - if (B.degree == -1) { + if (bTrueDegree == -1) { core_error("ERROR in Polynomial::pseudoRemainder :\n -- divide by zero polynomial", __FILE__, __LINE__, false); return Polynomial(0); // Unit Polynomial (arbitrary!) } - if (B.degree > degree) { + if (bTrueDegree > degree) { return Polynomial(); // Zero Polynomial // CHECK: 1*THIS = 0*B + THAT, deg(THAT) < deg(B) } Polynomial Quo; // accumulate the return polynomial, Quo Polynomial tmpQuo; - while (degree >= B.degree) { // INVARIANT: C*A = B*Quo + (*this) + while (degree >= bTrueDegree) { // INVARIANT: C*A = B*Quo + (*this) tmpQuo = reduceStep(tmpB); // Let (*this) be (*oldthis), which // is transformed into (*newthis). Then, // c*(*oldthis) = B*m + (*newthis) From fe11e704eb846e92e58bc9185467a57256af0cfd Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 9 Aug 2020 12:46:11 +0200 Subject: [PATCH 069/149] Representation of `__` in typewrite font versus code Seen the discussion with the doxygen pull request https://github.com/doxygen/doxygen/pull/7782 and the subsequent regression, I think it is better to signal the words like `__GNUC__` really as code by using back-ticks in the code. --- .../Developer_manual/Chapter_portability.txt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt index 02242af5846..3678991eb5f 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt @@ -101,70 +101,70 @@ the following table.
GNU 3.2.1 -__GNUC__ +`__GNUC__` 3
GNU 3.2.1 -__GNUC_MINOR__ +`__GNUC_MINOR__` 2
GNU 3.2.1 -__GNUC_PATCHLEVEL__ +`__GNUC_PATCHLEVEL__` 1
Microsoft VC7.1 -_MSC_VER +`_MSC_VER` 1310
Microsoft VC8.0 -_MSC_VER +`_MSC_VER` 1400
Intel 11.1 -__INTEL_COMPILER +`__INTEL_COMPILER` 1110
Clang 2.9 -__clang_major__ +`__clang_major__` 2
Clang 2.9 -__clang_minor__ +`__clang_minor__` 9
SUN 5.3 -__SUNPRO_CC +`__SUNPRO_CC` 0x530
SUN 5.10 -__SUNPRO_CC +`__SUNPRO_CC` 0x5100
@@ -178,17 +178,17 @@ There are also flags to identify the architecture. SGI -__sgi +`__sgi` SUN -__sun +`__sun` Linux -__linux +`__linux` From ff93e2b3bdc78ab74c0f5baa8076671ed86abd44 Mon Sep 17 00:00:00 2001 From: Ahmed Essam Date: Tue, 11 Aug 2020 13:18:30 +0200 Subject: [PATCH 070/149] Curve params "s" and "t" are interchangeable with self intersections --- .../CGAL/Arr_geometry_traits/Bezier_point_2.h | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h index 62312301940..feb5def190e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h @@ -1641,17 +1641,43 @@ void _Bezier_point_2_rep::_make_exact const Algebraic t_min = nt_traits.convert (orig2.point_bound().t_min); const Algebraic t_max = nt_traits.convert (orig2.point_bound().t_max); + bool self_intersecting = (org_it1->curve().id() == org_it2->curve().id()); + for (intr_it = intr_list.begin(); intr_it != intr_list.end(); ++intr_it) { - if (CGAL::compare (intr_it->s, s_min) != SMALLER && - CGAL::compare (intr_it->s, s_max) != LARGER && - CGAL::compare (intr_it->t, t_min) != SMALLER && - CGAL::compare (intr_it->t, t_max) != LARGER) + auto in_bounding_interval = + [](const auto& s_, const auto& s_min_, const auto& s_max_) -> bool { + return CGAL::compare(s_, s_min_) != SMALLER && + CGAL::compare(s_, s_max_) != LARGER; + }; + + bool st_in_st_range = in_bounding_interval(intr_it->s, s_min, s_max) && + in_bounding_interval(intr_it->t, t_min, t_max); + bool ts_in_st_range = false; + + if (st_in_st_range) { // Update the originators. - orig1.set_parameter (intr_it->s); - orig2.set_parameter (intr_it->t); + orig1.set_parameter(intr_it->s); + orig2.set_parameter(intr_it->t); + } + else if (self_intersecting) + { + // check whether s is in t range, and t is in s range + // s and t can be interchanged in case of self intersections + ts_in_st_range = in_bounding_interval(intr_it->t, s_min, s_max) && + in_bounding_interval(intr_it->s, t_min, t_max); + if (ts_in_st_range) + { + // Update the originators. + orig1.set_parameter(intr_it->t); + orig2.set_parameter(intr_it->s); + } + } + + if (st_in_st_range || ts_in_st_range) + { // Set the exact point coordinates. p_alg_x = new Algebraic (intr_it->x); p_alg_y = new Algebraic (intr_it->y); From 3dc2804b9eace2b340653d086ecf0b1438527f00 Mon Sep 17 00:00:00 2001 From: Ahmed Essam Date: Tue, 11 Aug 2020 13:23:08 +0200 Subject: [PATCH 071/149] Move _inc_to_right != cv._inc_to_right assertion to its right location --- .../include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index 5397a42062f..41594edcc2b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -1139,10 +1139,11 @@ _Bezier_x_monotone_2::compare_to_left Originator_iterator org = p.get_originator(_curve, _xid); CGAL_assertion(org != p.originators_end()); - CGAL_assertion(_inc_to_right != cv._inc_to_right); if (org->point_bound().type == Bez_point_bound::VERTICAL_TANGENCY_PT) { + CGAL_assertion(_inc_to_right != cv._inc_to_right); + if (! p.is_exact()) { // Comparison based on the control polygon of the bounded vertical From f4d6c6fd157c9bc878621961ea4015e8fcd2129a Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 11 Aug 2020 13:26:23 +0200 Subject: [PATCH 072/149] Layout on the bibliography page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When having a bit a long citation description, the description runs, in the HTML output on the bibliography page, into 3 or more lines where the 3rd and following lines continue underneath the citation number like: ``` [1] Eric Berberich, Arno Eigenwillig, Michael Hemmer, Susan Hert, Lutz Kettner, Kurt Mehlhorn, Joachim Reichel, Susanne Schmitt, Elmar Schömer, and Nicola Wolpert. Exacus: Efficient and exact algorithms for curves and surfaces. In Gerth S. Brodal and Stefano Leonardi, editors, 13th Annual European Symposium on Algorithms (ESA 2005), volume 3669 of Lecture Notes in Computer Science, pages 155–166, Palma de Mallorca, Spain, October 2005. European Association for Theoretical Computer Science (EATCS), Springer. ``` The example was found in e.g. https://doc.cgal.org/latest/Algebraic_foundations/citelist.html - corrected the "overflow" - made the citation number right aligned --- Documentation/doc/resources/1.8.14/stylesheet.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/doc/resources/1.8.14/stylesheet.css b/Documentation/doc/resources/1.8.14/stylesheet.css index 41df79908ef..6138660d112 100644 --- a/Documentation/doc/resources/1.8.14/stylesheet.css +++ b/Documentation/doc/resources/1.8.14/stylesheet.css @@ -1245,10 +1245,12 @@ dl.citelist dt { font-weight:bold; margin-right:10px; padding:5px; + text-align:right; + width:52px; } dl.citelist dd { - margin:2px 0; + margin:2px 0 2px 72px; padding:5px 0; } From 334f8ae105ccf1b335b711dc10f23bf906cb70e7 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 12 Aug 2020 07:40:09 +0200 Subject: [PATCH 073/149] Missing include --- .../include/CGAL/NewKernel_d/function_objects_cartesian.h | 1 + 1 file changed, 1 insertion(+) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index e1b1f6e32ae..3ca5fb3638e 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -27,6 +27,7 @@ #include #include #include +#include namespace CGAL { namespace CartesianDKernelFunctors { From df044c4fb2e657aa7a775839096d9fbdbea51558 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 13 Aug 2020 16:47:37 +0200 Subject: [PATCH 074/149] fix collapse of edges on surface with only one vertex on a feature --- .../internal/tetrahedral_remeshing_helpers.h | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index c58bbd3f6ba..ca81c66489d 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -849,15 +849,16 @@ void get_edge_info(const typename C3t3::Edge& edge, //feature edges and feature vertices if (dim0 < 2 || dim1 < 2) { + if (!topology_test(edge, c3t3, cell_selector)) + { +#ifdef CGAL_DEBUG_TET_REMESHING_IN_PLUGIN + nb_topology_test++; +#endif + return; + } + if (c3t3.is_in_complex(edge)) { - if (!topology_test(edge, c3t3, cell_selector)) - { -#ifdef CGAL_DEBUG_TET_REMESHING_IN_PLUGIN - nb_topology_test++; -#endif - return; - } const std::size_t nb_si_v0 = nb_incident_subdomains(v0, c3t3); const std::size_t nb_si_v1 = nb_incident_subdomains(v1, c3t3); @@ -876,6 +877,19 @@ void get_edge_info(const typename C3t3::Edge& edge, update_v1 = true; } } + else + { + if (dim0 == 2 && is_boundary_edge(v0, v1, c3t3, cell_selector)) + { + update_v0 = true; + return; + } + else if(dim1 == 2 && is_boundary_edge(v0, v1, c3t3, cell_selector)) + { + update_v1 = true; + return; + } + } return; } From 2aceb2eaf54846f5e2d57e1c63600742c7245e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 17 Aug 2020 08:49:05 +0200 Subject: [PATCH 075/149] remove merge conflict trash --- .../include/CGAL/Polygon_mesh_processing/clip.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 4d5f11f2bd9..42146523be3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -518,7 +518,6 @@ generic_clip_impl( * * * \cgalNamedParamsBegin -<<<<<<< HEAD * \cgalParamNBegin{vertex_point_map} * \cgalParamDescription{a property map associating points to the vertices of `tm` (resp. `clipper`)} * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` From 85caca92aa541c9bc633b8672b927b10d265c4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 17 Aug 2020 17:20:09 +0200 Subject: [PATCH 076/149] remove unused variable --- Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h index f0c23942f60..151f8d4e805 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -284,7 +284,6 @@ public: typedef typename AABB_tree::AABB_traits AABB_traits; typedef internal::Default_tree_helper Helper; Helper helper; - typename AABB_traits::Bounding_box bbox = helper.get_tree_bbox(*tree_ptr); static const unsigned int seed = 1340818006; CGAL::Random rg(seed); // seed some value for make it easy to debug From 5e3521a12fca272012980c321dd7414bbe45d889 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 10:29:55 +0200 Subject: [PATCH 077/149] remove useless include --- .../Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp index f9e52bfd7df..dc67ae6fa67 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp @@ -3,7 +3,6 @@ #include #include -#include #include "tetrahedral_remeshing_generate_input.h" #include From 0a7d8cfd259a66d73b63e8a64cd3e203d4208696 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 10:42:20 +0200 Subject: [PATCH 078/149] add an example with IO for a .mesh file --- Mesh_3/include/CGAL/IO/File_medit.h | 20 + .../Tetrahedral_remeshing/CMakeLists.txt | 1 + .../Tetrahedral_remeshing/data/sphere.mesh | 5046 +++++++++++++++++ .../tetrahedral_remeshing_from_mesh.cpp | 34 + 4 files changed, 5101 insertions(+) create mode 100644 Tetrahedral_remeshing/examples/Tetrahedral_remeshing/data/sphere.mesh create mode 100644 Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h index 42501a7fd63..a1ba012b2bc 100644 --- a/Mesh_3/include/CGAL/IO/File_medit.h +++ b/Mesh_3/include/CGAL/IO/File_medit.h @@ -893,6 +893,26 @@ output_to_medit(std::ostream& os, } } + +template +void +output_triangulation_to_medit(std::ostream& os, const T3& t3) +{ + CGAL::Mesh_complex_3_in_triangulation_3 c3t3; + c3t3.triangulation() = t3; + c3t3.rescan_after_load_of_triangulation(); + output_to_medit(os, c3t3); +} + +template +bool input_medit(std::istream& in, T3& t3) +{ +// in.open(fileinfo.filePath().toUtf8(), std::ios_base::in);//not binary + CGAL_assertion(!(!in)); + + return CGAL::build_triangulation_from_file(in, t3); +} + } // end namespace CGAL #endif // CGAL_IO_FILE_MEDIT_H diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index a84753fefd0..e14159f08e0 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -28,6 +28,7 @@ include(CGAL_Eigen_support) create_single_source_cgal_program( "tetrahedral_remeshing_example.cpp" ) create_single_source_cgal_program( "tetrahedral_remeshing_with_features.cpp") create_single_source_cgal_program( "tetrahedral_remeshing_of_one_subdomain.cpp") +create_single_source_cgal_program( "tetrahedral_remeshing_from_mesh.cpp") create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen_support) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/data/sphere.mesh b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/data/sphere.mesh new file mode 100644 index 00000000000..53df1d838df --- /dev/null +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/data/sphere.mesh @@ -0,0 +1,5046 @@ +MeshVersionFormatted 1 +Dimension 3 +Vertices +757 +-0.00017958008027845786 -0.29158438056560654 -0.3988195263311396 2 +0.33746273152274708 -0.35726277852053662 0.076905488424117915 2 +0.10190320305717479 -0.44537090218944148 0.19023485796529088 2 +-0.22291708884561526 0.24110089782764016 0.3698544290906931 2 +-0.015169005603949674 -0.4920502072817815 -0.053433473242467985 2 +-0.26605755950148613 0.34871795230918606 0.23040729539756138 2 +-0.030951975074221216 0.48125453898639275 -0.1043111632434163 2 +0.059997821745160003 -0.35306497158682226 0.34146470435235443 2 +-0.47842728941771906 -0.11383138831461681 -0.085210684090395519 2 +0.36358525568361316 0.21273180556147436 0.25617337548594726 2 +0.36725408516443148 0.13052845625068488 -0.30523087317317177 2 +-0.22325756200134647 0.14972356892330102 -0.41730303115077449 2 +-0.33402647635257132 -0.1744766427005035 0.31869283771003265 2 +0.093487696703693335 0.02119707361997069 0.48380505033599003 2 +-0.41062731925574825 0.25760949214328016 -0.10699221840973314 2 +0.49505762706510581 -0.028269043401154839 0.005588588618755724 2 +0.34186587730419771 -0.23615312879880351 -0.27171510437341651 2 +0.30887568698642764 0.38011138416438828 -0.055425037144192238 2 +0.081954497410480692 0.43221656346370257 0.23174479064232939 2 +0.080762763732273479 0.30645943468988468 -0.37895869522206083 2 +0.35704674384671609 -0.12142305171818887 0.32188881275214021 2 +-0.31466635484011551 -0.3761124021911264 0.049178927462616873 2 +-0.29949621897948708 -0.16366746550400973 -0.3559360399848972 2 +0.12477546186735991 -0.0009654011072460668 -0.48017447662099233 2 +-0.45489993093049341 0.089486639415368968 0.16934989437353176 2 +-0.21949385855586256 -0.38887603838234641 -0.21249580489705544 2 +-0.17554447746608282 -0.008967119829543662 0.46417052578394857 2 +-0.21596925005035716 0.36305807543520158 -0.25659442404768845 2 +0.21818581779788443 -0.42407361285115364 -0.14318551682223507 2 +0.029500307224903276 0.26282332358153948 0.4193318651156448 2 +-0.41140983700838274 0.055777199004947785 -0.26777152182208963 2 +-0.18318546651083045 -0.37360295143388589 0.26762502445563596 2 +-0.25403346126706278 0.42468917850563082 -0.0072330644157137559 2 +-0.11305983472243486 -0.060902778843192146 -0.47777514755888634 2 +0.44919653003104693 0.20594839867448833 0.031940926454485326 2 +-0.11066913845628298 -0.2262153965428356 0.42803075198822749 2 +-0.43545677914012793 -0.19909033271144083 0.11894257742861167 2 +0.1695993626242438 -0.17935343970708448 0.42607203736875154 2 +0.44458432799815872 -0.051677795976616092 -0.20786699465654979 2 +0.43234224599164228 -0.22486127018578264 -0.071274965547427127 2 +0.26639842732560048 0.32085642363039735 -0.26255407845880468 2 +0.26294920120495924 -0.31175710164257442 0.27584799753054995 2 +0.28532208912927193 0.068229649454114999 0.39636186284206176 2 +-0.34227612327536827 0.063789233931985129 0.35025252357992426 2 +0.13671557462523365 0.47582166858216723 0.029136645926506381 2 +0.30614427994747062 -0.058158535566455949 -0.38363836413890928 2 +0.27804667170978731 0.37888988049526307 0.15488894457208352 2 +-0.079983560189783809 0.47755425170528942 0.10219500715280494 2 +0.44814787431466785 0.027095935407346859 0.20340275687843323 2 +0.43643009646155334 -0.18171607702779971 0.13679244425007148 2 +-0.021047213889092184 0.14820686384301263 -0.46961700869255452 2 +0.03619253272475921 -0.42721740050619039 -0.24476932875897767 2 +-0.37955898467105353 -0.29024182965842682 -0.12706737614326807 2 +-0.40060756364504235 0.27265441281304659 0.096625520813105659 2 +-0.4854705637493073 0.083104466088603279 -0.032289989270033626 2 +0.18733664061540145 -0.21944745392631665 -0.39902475350724975 2 +0.20220985983165063 0.30550901002185649 0.32856225983545018 2 +-0.14260311796152336 -0.46277003604768613 0.095417085459266915 2 +-0.088536490739146129 0.37455894762711039 0.3096149430548682 2 +0.2094668074720448 0.16368187491205238 -0.41638280720002807 2 +0.15113456598618952 0.44235088220955404 -0.16250801345043558 2 +0.40486835137050703 0.24289072279009177 -0.15252766171211285 2 +-0.036177835783256007 0.4078011138562273 -0.27535546612298556 2 +-0.34296523108150667 0.2286131340909362 -0.27799669728182952 2 +-0.10719098758575357 0.28623761047718843 -0.38960924485531329 2 +0.19147451046242708 -0.45501523442130337 0.033189878304607082 2 +-0.17451656340254462 -0.2922859658076577 -0.35675496184109445 2 +-0.054032309386595652 0.11876440286815396 0.47910599326324754 2 +-0.36854633000359827 0.21078255760783893 0.26015365494222453 2 +-0.32895930270343821 -0.30492173388755761 0.20577000320862165 2 +0.47233660066064437 0.089962065069455227 -0.11598350628513786 2 +0.18279236780855426 -0.35559836146202833 -0.29576156364432438 2 +-0.30653064961140419 0.0030393921083115001 -0.39158959558808887 2 +-0.43175645289087117 -0.06856641898074925 0.2281241768759929 2 +-0.41664292297822403 -0.1125349496504639 -0.24369438759577611 2 +0.034215630841900949 -0.14316065841453818 -0.47150453356804722 2 +0.01741918812908615 -0.12866441808574386 0.47673458515849332 2 +-0.4855430365961404 -0.047209142857281922 0.071742419244237965 2 +-0.17664526043497175 -0.45607460135991063 -0.066898790386732021 2 +0.15896257150373266 0.16406638468588108 0.43749429982969956 2 +0.3413309978648793 -0.35180180232942027 -0.079355360895298654 2 +-0.050993390661918936 -0.44023303185605778 0.21930692567953947 2 +-0.1744764647710777 0.44331712473052226 -0.13489506049135713 2 +-0.3060405881569907 0.36310552047656275 -0.13515313949756735 2 +-0.31223156562504195 -0.28062263090874601 -0.26163375513939824 2 +-0.22970278795957924 -0.13870241858074583 0.41755645512950001 2 +0.0024393018078136446 -0.48492697824363451 0.091171312301450952 2 +-0.10287286315024358 -0.19966181605110775 -0.44059088195446339 2 +-0.096592995767797049 -0.39151818968827484 -0.28742421301965626 2 +-0.22843344125151183 -0.26611354901572115 0.35137427683212796 2 +0.38322648327275688 0.28370503187708462 0.13296338549842965 2 +0.23663146930518839 -0.40226297814535272 0.16806272118371773 2 +0.26057820529124903 -0.070791204074534875 0.41330127504314429 2 +-0.21136233974279531 0.43042319754635217 0.12802710612079471 2 +-0.47476981336899093 0.0097871739157582519 -0.15138890370937802 2 +-0.23333367583594972 0.11222027080473665 0.42394265074000254 2 +-0.44085548332912106 -0.22979962226592909 -0.017147875405908862 2 +-0.078239229460793286 -0.33884832180985031 0.35255427151172458 2 +-0.083108225197500205 -0.45674438476313062 -0.16738183558114764 2 +-0.29408537723534212 -0.38852555688047163 -0.085435314425446315 2 +0.48133564768818482 0.083381485363606622 0.083302443947374058 2 +0.14428498543762064 0.37758810641209212 -0.28194428393217741 2 +0.3671246210538302 -0.23121760625314156 0.24258442560276988 2 +0.021926538865993082 -0.25448244851283763 0.42640784569274537 2 +-0.44247951547367903 0.14036749361034515 -0.16673429414803598 2 +-0.23376468875393869 0.26504877262009335 -0.34821691711422748 2 +-0.35704052636532213 0.33794495130243385 -0.012949825968558894 2 +0.37906928942131157 0.011439036263529231 0.31801237398069648 2 +0.27641139205562737 0.19692195103917809 0.3576249551891042 2 +0.092299584758946646 -0.46848280891657568 -0.13014498287023957 2 +-0.10077498621597741 0.23174182723272241 0.42421701501864795 2 +-0.0066485172726347321 0.017976077671047648 -0.49685469073126953 2 +-0.12973470064512721 0.071108805185515739 -0.47051085686132765 2 +-0.045859962509014612 -0.013040570986989755 0.49188107961940719 2 +0.079555876774644596 0.35323065472379733 0.33735822117185454 2 +0.30027051670008725 -0.34103946911028737 -0.20394431470188995 2 +-0.24140984558607992 -0.40111697443685596 0.1541797787531235 2 +-0.12786542956347918 0.47578064354031468 -0.018312676486796277 2 +-0.33073847277519897 0.12310202367120916 -0.35116285886815279 2 +0.19933706144873503 -0.098980558450449771 -0.44274269538406724 2 +0.47513113190649536 -0.10584286330488513 -0.095171214369974694 2 +-0.46194239384718461 0.16413779819561203 0.064816441432120703 2 +0.29292266379811227 0.069478725123429091 -0.39043692971152011 2 +0.4200208818716501 -0.17627342566505305 -0.18940858505931396 2 +0.27141459182530936 -0.21104712412748511 0.35480982777696679 2 +0.16960402134421976 -0.28958411644868443 0.36076483378978291 2 +0.38912037422664431 0.0043887969041679778 -0.3087738216613114 2 +0.011497871488576249 0.49686191298521987 0.015154654283299826 2 +-0.31912896462267604 -0.059707423797282617 0.37238981914980496 2 +-0.22834353192806978 -0.089488394878762173 -0.431392095895892 2 +0.10244600457475248 0.12264851193906079 -0.46898522519895247 2 +-0.31732877963655171 0.36699254715931046 0.1030480292676519 2 +0.43307512121460301 0.17115163575065317 0.15968727323737264 2 +0.20016935386821505 0.27437903049128654 -0.35830063594519002 2 +-0.041789517959002119 0.44443177473295281 0.21678051623622563 2 +0.17151835385992589 0.44389799847661182 0.14506941487236816 2 +0.41566132168029968 -0.26488526360467146 0.045899390071247409 2 +0.37932345247717253 -0.11894828342860483 -0.29251072257759048 2 +0.43222030269315437 -0.094575414878469932 0.22599275674135835 2 +0.46904216524592113 -0.14992640959363651 0.021012576355346015 2 +0.3952129455499247 0.29237028550029098 -0.039039028322742399 2 +0.24880421219055254 0.42474901485888011 0.043448685018998956 2 +0.16091128374421571 -0.38054996657036488 0.27661235401976281 2 +-0.11188857008982331 -0.11203266446059854 0.46872664816830067 2 +0.47601719442122925 -0.055826239046367056 0.12100320850727279 2 +0.036473226508413531 0.48000758276333438 0.13140181756020897 2 +0.2575687962417475 0.38744266403728805 -0.1633963398793602 2 +0.2924747065742927 0.308550488374844 0.25036594764074926 2 +0.28955232447365836 -0.17346831825824974 -0.35852620068112112 2 +0.35057344068321522 0.23769120150981893 -0.25765117551066152 2 +0.038207711976355391 0.45161905671520203 -0.19507142457444865 2 +0.071294318064950041 -0.35796429223310122 -0.33311113633367473 2 +0.43261149596338622 0.074600055933304682 -0.22536433518471577 2 +0.19968372557432726 0.38413167365058842 0.24178225128604081 2 +0.082402113370849905 0.48067521037188088 -0.076219372780585271 2 +-0.42710351472239827 -0.18888456582417157 -0.15710660253181968 2 +0.082794585915315716 -0.48573281898067155 0.0078763594179726056 2 +0.34003460150602732 0.35462961771583879 0.052771194783181721 2 +-0.39194251064962948 -0.29224682205434288 0.066620318060341605 2 +0.21146250325321714 0.44101239252657731 -0.064342207106371507 2 +-0.41615443950919362 0.039237897917599171 0.26542474410989447 2 +-0.38719949065611015 -0.20757979990652833 0.22262834471167253 2 +-0.16531972398455036 0.40347241431094483 0.22951939058533671 2 +0.15690430646234238 -0.071378304166784812 0.46162512212067885 2 +0.35564617300046225 0.12242924091988611 0.32468958401881665 2 +-0.0060320878049794618 0.25341782719601502 -0.42951650890993065 2 +0.32833843158390147 -0.31993134286566782 0.18357902655304531 2 +0.058718163718817197 0.12869283620093092 0.47645626595297297 2 +0.28928152578976907 0.20184091716765834 -0.34578827410991531 2 +0.37948009693020479 -0.27624437622995857 -0.15659643437506138 2 +-0.30776469856566913 0.17092044148401719 0.34618439766473219 2 +-0.19171807981037964 0.33160932280601768 0.31212856210359446 2 +0.25245356334943464 -0.27407538282341692 -0.32669723598210432 2 +-0.12065350122228868 0.18725095194360497 -0.43877633407113148 2 +-0.37745787185773871 -0.0382140383301856 -0.31653800141977029 2 +0.19806397299681111 0.02999004881521776 0.45116075228027064 2 +-0.20568413631753474 -0.19724937765481759 -0.40208796797455137 2 +-0.22649260170964641 -0.43820598329127824 0.029158470237451224 2 +0.26096043287752402 -0.41666063080901283 -0.042482612613948825 2 +-0.42206584927238949 0.1930123558717774 0.16731138331459694 2 +-0.34913096406689792 0.29154108584899463 0.19029074976753513 2 +0.083482542589013012 -0.22935515302358866 -0.42817910407127691 2 +0.14066296993008021 -0.4182454383267602 -0.21834552190506698 2 +-0.019478350744578408 0.34101305701760021 -0.3585398694486942 2 +-0.43280484789178914 0.24358274269801217 -0.0022532636193535009 2 +-0.12477135431295031 0.36024492171819705 -0.31355846705091628 2 +0.45040719996150702 0.1861340898361179 -0.073577552235943366 2 +0.1346615486145373 0.26100651447537548 0.39883943153366519 2 +0.11972325147581214 0.22046309413202625 -0.42926431989465519 2 +0.22358187991859324 0.0050357451443411479 -0.43997309187748174 2 +-0.49347606480783912 -0.023059296478814308 -0.031645682797479362 2 +-0.48381106627964754 0.059240694033084892 0.071452086281896962 2 +-0.084385524716018762 0.45031338330530002 -0.19076516385437436 2 +0.3417736296918108 0.32719202506290757 -0.1410758629516356 2 +-0.36843273055519271 -0.3299393961900482 -0.029516851245006446 2 +-0.30678393175041857 0.31567131428080369 -0.22980892622700838 2 +-0.21503122188279383 0.01476232120403273 -0.44334634529176886 2 +-0.47362727421985362 -0.13617417912168595 0.017268332209693128 2 +-0.28942563338168964 0.26966264140311347 0.29454935861001885 2 +-0.10357320476016603 -0.48541613363165004 0.0014314713936747154 2 +-0.30619487146561236 -0.34275586595504343 -0.17858497629969106 2 +-0.26448962933874209 0.014398478534287336 0.4181714868137163 2 +-0.35906984920527363 -0.1906562517760223 -0.27691736545448375 2 +0.037568593306109448 -0.41524091088866422 0.26360868693250672 2 +-0.052051300777545648 0.3093965001589879 0.37924966574493602 2 +0.48113849982037626 0.107746899060504 -0.015838893941665894 2 +0.41638357000568371 0.11530672961586626 0.24322629330302123 2 +-0.45690946732483273 0.17272070723147723 -0.071277948485328785 2 +-0.1477355042464335 -0.42971918080443861 0.19106483854020784 2 +0.16751071157708736 -0.45977476800289391 -0.064198711623625643 2 +0.47961429128881028 -0.0097851515742015203 -0.12372263022700566 2 +-0.14598560906461117 0.085639494944031613 0.46255018063316672 2 +-0.47143984229194141 -0.0076156197959385248 0.1611981163195744 2 +0.0053565411416260453 0.39866517583218986 0.2905565413733302 2 +0.40942048554799781 0.16977242091374942 -0.2179739168280094 2 +-0.083206338889110512 -0.3281379252895808 -0.36122561072450982 2 +0.11969783099324528 -0.47225074378320681 0.097672505668078863 2 +0.14292055894772571 -0.29980614857725663 -0.36544303656835508 2 +-0.39655583689562229 0.15108355572292786 -0.25229011591254025 2 +-0.26185294212339283 -0.25222346318848121 -0.34014502099352856 2 +-0.45979899142386105 -0.10795554987359728 0.14349074920444599 2 +-0.30365720592299195 -0.26233229751469905 0.28962558083675682 2 +-0.23195364931286058 -0.32859076606665827 -0.28749347484194809 2 +0.051224430272876202 0.38202009786492297 -0.30719009190783275 2 +-0.39207220767833917 0.22819369686113644 -0.19600924853509294 2 +-0.37773388282905052 -0.09086954027691431 0.30368729032030672 2 +0.39467792270053165 -0.26759477350524591 0.13904345645079874 2 +-0.41191482597905649 0.12980389870405051 0.2420918813103799 2 +0.26047083115505809 -0.41041354526291379 0.077956591385467233 2 +0.11177459390251984 -0.092412636589793901 -0.47242915830433518 2 +-0.43591522475224886 -0.023732045318672498 -0.22800657623942089 2 +-0.022261713829573419 -0.072318172300016692 -0.48789704836361258 2 +0.0081395223289316282 -0.46592641407744073 -0.1665013453294038 2 +0.081093397331894718 -0.18798589403991434 0.44810321338320824 2 +-0.37558558819514476 -0.24574358317084224 -0.20636842014191564 2 +-0.096338626192954552 -0.39466883610146292 0.28334605052085349 2 +-0.17708873486102419 0.18311451377670129 0.42210576825870783 2 +-0.013860117340804824 -0.21508084368989178 -0.44509421826479573 2 +0.18239848147210697 0.084697118181986275 -0.45087205027424987 2 +-0.17078960076831395 -0.43897569675787684 -0.15534122833161501 2 +-0.18763982805866186 0.45459829368467236 0.045035969439469983 2 +-0.016291632660891162 -0.37370752214727754 -0.3228929421921421 2 +-0.45558439255106498 -0.086590584353522265 -0.16737299007582934 2 +-0.022718764127191621 0.19781133358246469 0.45152398259708748 2 +0.31848408868533651 -0.01256202942642962 0.378759664305091 2 +-0.13927052507890036 0.29328859855178979 0.37285965701252483 2 +-0.3884619298661216 -0.26700045674280587 0.1517506844967999 2 +0.01152504496571128 0.054784659426273849 0.49077140770710381 2 +0.39344564527600812 -0.29567500239123962 -0.034390428629941142 2 +-0.26081803292429601 -0.33226122531683966 0.25565533811438645 2 +0.22251341765848939 -0.38054017239093424 -0.22041067021106323 2 +-0.31713717236303129 -0.35857571029063873 0.1361112009692359 2 +-0.23659629671011739 0.39734206321507148 -0.17778362562216143 2 +-0.14584093702298123 -0.28664018419369452 0.37434403279067496 2 +0.40321686626675135 0.27922069737849553 0.047493421869457403 2 +-0.14134661646917412 0.40629626664699892 -0.24081507758184034 2 +0.035859571147540806 -0.044279065426086374 0.49067862158384645 2 +-0.32037001354706696 -0.079773173240901274 -0.36780943399441413 2 +-0.29237358412217507 0.20085567941458216 -0.34319618038352179 2 +-0.24601576240771028 0.41634162313809264 -0.093434007278415776 2 +0.23816018360973706 0.13983707246510318 0.4109407503558189 2 +-0.068273343569342407 -0.47092136149196839 0.13980209463711818 2 +0.018801598797916399 -0.46299859053497849 0.17334896426697666 2 +-0.03416076831939252 -0.19390981014461106 0.45259077825678906 2 +-0.1547331916875945 -0.13107618004040195 -0.44933330796862875 2 +-0.094438908877836236 -0.47640015231839816 -0.084018910988347975 2 +-0.35724359501005171 0.29868741054458459 -0.16074154128435605 2 +-0.13364638908971294 0.44598349918207303 0.16167096559856231 2 +-0.27408682777806986 0.082143784286755478 -0.40134550473258368 2 +0.087697484975903461 0.42291710705325825 -0.24992582746355946 2 +0.21454829343853296 0.38156282591278823 -0.23560767118701434 2 +0.12550167434991091 -0.24619716991715462 0.41321139943412383 2 +-0.15104938876688062 0.0014584089104602367 -0.47597596324174679 2 +0.33514719842099605 -0.11676342614616753 -0.35080058024630445 2 +0.34140929106701184 -0.17432465269026692 -0.31177814142542615 2 +-0.47990278250569951 -0.11339875697248844 0.079887112571497526 2 +-0.30962512834722744 0.38356950160675773 -0.058101849310527684 2 +0.03554689615386189 0.48034552633383665 -0.12991041112850576 2 +-0.02709267922225124 0.36247438890288292 0.34097725028864367 2 +0.20848291996620624 -0.11757687601054088 0.43634411921676908 2 +-0.42882400034908141 -0.14350399053844937 0.20590057102758208 2 +-0.090560564339627767 0.13105873777682209 -0.47143063834755128 2 +-0.11090040697797957 0.47505096341799569 -0.097021220812907455 2 +-0.35545535296641972 0.33196185443364101 -0.087854040926861526 2 +0.47105024097298787 -0.12774577332923742 0.094515479810394459 2 +-0.15460594550149334 0.13044361732060336 -0.45085209386903086 2 +-0.074848554765210656 -0.13177409721165256 -0.47382282861169434 2 +0.15101292400278854 -0.0080031878833149023 0.47521043462103896 2 +-0.35736564422440908 -0.12769543239265371 -0.3207034667651314 2 +0.094114109904528578 -0.11570906014409471 0.47388311860317556 2 +0.28535641736280803 0.0030412638087362431 -0.40863291386221512 2 +-0.039990091122710111 -0.48199468786047772 -0.12270610879185923 2 +-0.18853463770583434 -0.43952710870582812 0.1385927951163417 2 +0.13625350025545474 -0.25384962961629476 -0.40660051121768037 2 +0.076403828318303169 -0.29026739247135586 -0.39079336597955455 2 +0.13728432455485556 -0.19414197011251358 -0.43056334484244385 2 +0.42298765123118853 -0.11727360742662864 -0.23329534385311404 2 +0.30420797260019533 0.37562352479984207 -0.11993652420543416 2 +-0.3502334626941026 -0.25676834588920638 0.24429292962306959 2 +0.38807058492308766 -0.17506321357061666 -0.2516437757750114 2 +-0.4334710607829404 0.10192783216805726 -0.22248770476455654 2 +0.40914491750034232 -0.057003079574881294 -0.27052242425340334 2 +0.0091819319799406746 -0.49666255021107453 0.01737846001306019 2 +3.014162351272498e-05 -0.00022412216118153361 0.00023687663445681739 1 +0.052801989430259211 0.23970717573936154 0.056895539019464536 1 +0.14450234786464269 -0.19474901447604212 -0.069052969614780621 1 +-0.17916427332813784 0.025715782501462409 -0.17491934196076869 1 +-0.094315748745573691 -0.1049186313862833 0.20842808898403417 1 +0.2028455816993574 -0.032721226494168885 0.14467222002492844 1 +-0.11961709481342205 -0.20932670315450266 -0.068932502351132449 1 +0.18154163452546179 0.031730055037039656 -0.16932814806384502 1 +-0.19142561708366748 0.1138767024163574 0.11305167457083386 1 +-0.001473790868043362 0.18871183238848396 -0.17245421855316698 1 +0.028830209928174921 0.094933596521697028 0.24343604928426632 1 +0.00445678131695941 -0.10545364547208048 -0.23862990061537631 1 +0.083937504337175992 -0.22041685542625192 0.14318288917914965 1 +-0.26084484777752204 -0.084924861365920409 0.046567197308790775 1 +0.24072617665983023 0.13728163083605013 0.012659213366990968 1 +-0.18328211734473712 0.20703285866735111 -0.07286245033855264 1 +0.29050347659524578 -0.063745480233620366 -0.031980568377714735 1 +0.081285632368155863 -0.085380926800716406 0.28373794642767847 1 +-0.096583387241615679 -0.26654065258928961 0.10998932892936106 1 +-0.04719957583257596 0.062530421018024848 -0.30281668858126498 1 +0.19645413834244752 0.15931720652006937 0.19260664679725728 1 +-0.076079067615941798 0.23616026396562506 0.18857037620037154 1 +-0.30229839132862157 0.069289308586842888 -0.045123575222269438 1 +0.1746994390040173 0.22574465843704122 -0.13452130698459194 1 +0.018790113036324302 -0.31664520595790835 -0.020976598390514467 1 +-0.14425146477183853 0.054707135099594573 0.27736998815826319 1 +-0.17029299303790246 -0.14528482679334123 -0.22878116705187657 1 +0.24566480433886223 -0.19641479873476103 0.075925501417087884 1 +0.17748833700630379 -0.13286378257956177 -0.22983460624370367 1 +-0.047773565441192503 0.31415600317739373 -0.062623118520660589 1 +-0.0068340816863229417 -0.26949598878753778 -0.18529913609387003 1 +-0.29131727265500779 -0.091219267782148672 -0.12125383672688822 1 +0.10750821452013629 0.1282916389194351 -0.2864660752012067 1 +-0.27344320558630231 -0.014901787152823198 0.19765697923321177 1 +-0.15459676992893528 0.17817758116580687 -0.23261792930941644 1 +-0.18299147861248341 0.2794439735685183 0.073269565509758133 1 +-0.22576517276420693 -0.18779410440076966 0.16560020829646344 1 +0.0087367713580315202 -0.16014075378076173 0.014482767898634712 1 +0.02166937950933422 0.030821587360851471 -0.15569200149497292 1 +0.10416721025013662 0.090115232451198596 0.081606705957980669 1 +-0.067724231557979284 0.14324655796362867 0.016712147417071811 1 +-0.0068808023839113941 -0.22059458984402644 0.27372687504858612 1 +0.11043443124615403 -0.025263791341274933 -0.32449021017160729 1 +-0.15634747002974614 0.014235725496882193 -0.018800570528364813 1 +0.33273455404191438 0.032392020270790335 0.08489051290760373 1 +0.077557837652741934 0.26039794514439762 0.21064194760877653 1 +-0.24932450725818317 -0.23792265115648828 0.014355512766715366 1 +0.16779116883852999 0.044701666713052791 0.29548740805949181 1 +0.31575259435477893 0.09399522491339185 -0.11786154416048142 1 +0.051109009578189674 -0.066547638567894724 0.13185951628960896 1 +0.19280950303903735 0.28465046570209951 0.0077455433522710115 1 +0.20543592423973955 -0.16649638529616964 0.2222244118011279 1 +0.14147121840903676 -0.060593393920313841 0.0063129913528785359 1 +-0.066668144025147216 0.030475814304770879 0.1427894834947423 1 +-0.053342746902161536 -0.047652654695166191 0.34386322870563746 1 +0.08280059069911061 0.13129665268237911 -0.061652604676741274 1 +-0.080890803084922636 -0.071920152617245853 -0.1163127959139466 1 +0.15321807762093834 -0.31048652461961324 0.04527565972171714 1 +0.27730652027962055 -0.17358936258398658 -0.12934685199851487 1 +-0.29575415255273296 0.19811115028253887 0.02544424014218119 1 +-0.11594462289123944 -0.1003298772972976 0.063416305732725525 1 +-0.16453093569200922 -0.02467014850318244 -0.31165181888248822 1 +-0.32992845318152686 0.073441695008099939 0.097303171396798366 1 +-0.050590078854345299 0.33650480258096455 0.087263062342506803 1 +-0.27909076718019299 0.14205013356346963 -0.1681282101913823 1 +0.093643905047351469 0.33473719934111179 -0.084850635899742316 1 +0.1365239106386455 -0.26572413696193398 -0.19369272959981307 1 +0.30579586459250829 -0.039832176647313075 -0.17256885252520576 1 +-0.12107511502677282 -0.33847608452377875 -0.0099517616438331291 1 +0.28807479052278323 0.053966727407861501 0.21781336000382234 1 +-0.24325839346969885 -0.22340575839088872 -0.13616182431928803 1 +-0.19605855379734358 0.18006794204638638 0.2378006126850809 1 +0.24262572115639683 0.14439754208748706 -0.22653499049722928 1 +-0.21374383143570785 -0.1099605652536701 0.28141428517341038 1 +0.055838347132006666 -0.09165768297793575 -0.098981075271938807 1 +0.32536668354276843 -0.097853682623521454 0.1334779603578797 1 +-0.069607517133508434 -0.20161380987089875 -0.30588629293096281 1 +-0.037992256595614907 0.20068997990658471 -0.30550684354217372 1 +-0.069883019615067571 0.16656432158083861 0.30707360056768007 1 +0.020221814841485362 -0.33876987985287055 0.11463516103966132 1 +0.095112459804220423 0.25670232489504585 -0.24126307771534589 1 +-0.090351576153363491 0.29057069730420337 -0.1899468271782144 1 +-0.085771491224872862 0.10131329866839714 -0.11133497642330889 1 +-0.1356134596047664 -0.24931697767483774 0.24502582019785868 1 +-0.14014341150326934 -0.28056116803993503 -0.20137551252303879 1 +-0.043055607684475763 -0.060656661150435005 -0.35585010276686074 1 +-0.27898679140235272 0.035739763062450192 -0.26373725595802683 1 +0.12196930650670011 0.16964660742462959 0.30264007452684843 1 +0.081466052102798017 -0.19851378729903479 -0.29451536740227535 1 +0.18864200228449263 0.28147737267882583 0.14062997857195028 1 +0.23548246919943949 -0.0029127207663287996 -0.28566493689687922 1 +0.051510065226324356 0.032472449480436719 0.3583650570682278 1 +0.084047659205297276 0.36619489627271401 0.082345773170841685 1 +0.22057270245230437 -0.29979009662294809 -0.096890920350708759 1 +0.30651207484667292 0.17635977393943134 0.12082800154917915 1 +0.2935085375499632 0.21769740288806988 -0.077671326675799554 1 +-0.36431048669079091 -0.04414505302889548 -0.022970448508646157 1 +0.2490734023486208 -0.055997172011154006 0.27682372524595567 1 +-0.0027720154490750992 0.14722434378837171 0.12896792856686445 1 +0.38427923619976989 0.024627473125503771 -0.033608726736941097 1 +0.19618479811608763 -0.28022204855520977 0.16273309474366399 1 +-0.29217712036934773 0.18281679758375746 0.1528123312776547 1 +0.18941981895892393 -0.082062422506531035 -0.11068868674041099 1 +-0.34203047890473742 0.019961039355569699 -0.15491427763962118 1 +-0.17130406611996379 0.32870589590726007 -0.042170692256760595 1 +-0.1859801112964658 -0.10335399169545155 -0.053130397606924826 1 +0.20925354190654583 0.031039983537490969 -0.046713072711011647 1 +0.34316257935580979 -0.17305233972043019 0.00033628785594420896 1 +0.10585438212623531 -0.27068000967665412 0.25522470003309389 1 +0.10570601475333902 -0.34728880042335131 -0.10475567263392008 1 +-0.10737487496542224 -0.15785160692915554 0.32429126121625373 1 +-0.28942329711923143 0.098899368336733351 0.24387548669130543 1 +-0.18600538017573232 -0.0097165410864480765 0.11024835660358068 1 +-0.33700909228305376 -0.16440212684772157 -0.032615861308760478 1 +-0.35754796563725394 -0.045926152248843527 0.11272604512623377 1 +0.040439522622158219 0.052995831021695201 -0.38868361297404813 1 +-0.1627994660789196 0.097276470891627137 -0.3244017063735235 1 +-0.27503765461948215 -0.084196368023144799 -0.24192559305495548 1 +-0.026027040635067243 -0.16944540002448633 0.13087314993656254 1 +-0.20907905584250255 0.26967368522422452 -0.1738677949369267 1 +-0.054707311001315637 -0.35288645455937306 -0.11083771311146649 1 +-0.0079051269417109576 -0.019815464014738576 0.23551126727341776 1 +0.022414870924025512 0.33271787709186629 -0.1821910464244727 1 +0.35850841308377668 0.1399296416829249 -0.011329108742475343 1 +-0.32012272906753891 -0.17921166014651391 0.091689120891368547 1 +-0.081159267539283056 -0.02258826290625289 -0.22555567818167405 1 +0.10708411622202758 0.017795180136314259 0.19583537139940682 1 +-0.19308381251986259 -0.32740631883353943 -0.10485224870297609 1 +-0.069656435928420329 0.066957246422228889 0.37276360757684202 1 +0.15016047438977465 -0.13052573208833282 0.1021457130615888 1 +-0.21237097053697102 -0.29348949150614301 0.1127809144233278 1 +-0.042776646964407375 -0.31581483089999418 0.21259701644815598 1 +0.28174334907322024 -0.28288909613825791 0.0032659077871620146 1 +0.10038569069270485 -0.048618048372519103 -0.19958184701886453 1 +0.029291712945843311 -0.20652559834069623 -0.092156251936651362 1 +0.22805496052133986 0.077988805449757809 0.11357146320614143 1 +-0.29822637932689999 0.22674577075059674 -0.088682957886754801 1 +0.38538230783394484 -0.06920137199531573 0.036820948221615454 1 +0.012587257164439321 -0.14285071010234318 0.3586003143792359 1 +-0.069234065681228973 -0.17125441163822883 -0.17647764920933623 1 +0.15789088244738314 0.19268689578488629 0.072338732863710217 1 +-0.20601399684411509 0.11784763250974534 -0.0020719494738760252 1 +-0.01215928598363232 0.33268402163839006 0.19670344264770664 1 +0.096144947117105473 0.016204821808735136 -0.067923735806303481 1 +-0.0054554378407597054 0.20634708000879021 -0.05796204423258542 1 +0.12039083155079047 0.13017578933584079 -0.17129088773129522 1 +0.012747854871683756 0.24767855708034087 0.3057576437926483 1 +-0.30789349699463731 -0.12375268876932422 0.21577078494474838 1 +-0.16720437603028054 -0.03083908758531357 0.35123858918745399 1 +-0.18128081866335391 0.2830487056717238 0.1883784304214256 1 +-0.10436502357698049 0.12509187236227029 0.19585659946239731 1 +0.31901916410525533 0.058808598066358339 -0.22972424345691189 1 +0.027769095322753831 0.14464675957004966 0.36323507776810504 1 +0.13960116785223819 -0.17898415571113385 0.31534230524128104 1 +0.023568426965540581 0.38692355277584711 -0.011858440788303823 1 +0.23985837710368524 -0.22766093610137156 -0.22213533463966978 1 +0.15778991217941379 -0.12673816359074469 -0.34115248458186781 1 +0.29625857514519732 0.24566730561158784 0.031953158536357829 1 +0.080656448812452167 -0.16841296531297367 -0.18478003237880164 1 +0.16496489167827175 -0.052783274797780409 0.35116768097441575 1 +-0.036474157223670325 -0.39535327705576773 0.036384073815337016 1 +0.36371164785207277 -0.10708387179365877 -0.10454864078898034 1 +-0.087048809320665527 0.25316102697845128 0.022369237421085028 1 +0.20897227862757828 0.099018777264479663 -0.3229107295199839 1 +0.043871234042261342 0.16303775916229074 -0.37115051312375918 1 +0.10637190794209886 -0.20995542498124597 0.034538474900766614 1 +0.20987672192604165 0.12455653007105925 -0.10616667532416831 1 +0.050145833646477067 -0.11927746362871103 -0.36483038374168059 1 +-0.2569589135759463 0.011876919793466743 0.30339559661531923 1 +-0.14553415621357807 -0.12941862681585642 -0.33965282644394962 1 +-0.38045926172758571 0.13381294154801746 -0.0024935828596186829 1 +-0.14786565736419174 -0.20218619506824634 0.037078655502300446 1 +0.27185960596773107 0.24683992968871024 -0.18144502724386516 1 +0.10624225261503392 0.23598317618805897 -0.038815416384184613 1 +0.20207022106946587 0.32360756219858922 -0.094044676976052274 1 +0.27731456915564023 -0.10000774304333798 -0.2589370471696687 1 +0.23834487210314695 -0.15931874140263813 -0.026333756732376437 1 +0.050413814320079887 0.039243068358821825 -0.2604303190974549 1 +0.24065670405888243 0.12440863007856787 0.28530892422349785 1 +0.24131817164355052 -0.089363242825941602 0.060911262413372344 1 +-0.2364719245809476 -0.004270508769169068 -0.088600013049095899 1 +0.28515263160773274 -0.22023725186962631 0.1733951527718868 1 +0.34009321243624258 -0.039735948062104037 0.22243245385186622 1 +0.08984024346625695 0.15791205654876458 0.18182196119615981 1 +-0.24638507448744487 0.13757586356258628 -0.27002689226946663 1 +-0.16857571095821844 -0.02812365115043744 0.21418353376682697 1 +-0.1731917451426222 0.2364117398325114 -0.39729462373902957 2 +0.12336966796224377 -0.35454250264062137 0.13803251821307455 1 +-0.19775114308164371 0.10713396961444183 -0.10814111302044851 1 +0.19857233363919352 0.23634253201295671 -0.25847400182932251 1 +-0.11478742160567977 0.18739418423886112 0.10180484691975492 1 +-0.053611188785143718 -0.24671323997391675 0.014373748327959429 1 +0.006763757672023106 -0.27457303434908686 -0.29097458896782502 1 +0.13236190385685356 0.33815344006019898 -0.183870581840652 1 +-0.10242343439746388 0.087166834030478577 -0.21537745486588183 1 +-0.2583766411997464 0.021032172749625697 0.03875788400968589 1 +0.076945048663832172 -0.38384722380040015 0.037063846680694387 1 +-0.26113960503705214 0.29588945218951068 0.0035529301492612936 1 +0.041284901195559109 -0.15059551548257941 0.21046777203360834 1 +0.17819004744153116 0.25123110214993383 0.24124469073292951 1 +-0.21817168097492304 0.11711712038934805 0.3195954816265269 1 +-0.23396064679188577 -0.33983934322570641 -0.008348234341521682 1 +-0.096390153856920888 -0.37138062730386218 0.11998934286889619 1 +-0.089740354549113041 0.21183842613184775 -0.1204125200007857 1 +-0.1315348553333206 0.25354532785257095 0.27599901609419952 1 +-0.47309049000944725 0.083917611539784609 -0.11427548002999455 2 +-0.10232075630902869 0.021751408944293536 -0.3821508088222666 1 +0.14926503561707283 0.37861796383415519 -0.0077371296117765553 1 +-0.19306479566447415 -0.075852084128277375 -0.1538589796531375 1 +-0.26369421911518526 -0.19216976823655502 -0.23391148886092913 1 +0.12020736222706946 0.35044000592900432 0.17911686727626699 1 +0.3048115684889941 -0.13717734716591962 0.23313392161126517 1 +-0.1230622188165649 0.25876006525325701 -0.2904721485393742 1 +-0.093393508717123319 0.38020496232867673 0.0033071108055348006 1 +-0.36027962609956549 0.1449760584656708 -0.10362940598672385 1 +0.38469283098921392 0.02319611420450559 -0.14916372426046942 1 +0.13749184053910829 -0.092794069634492327 0.19742968657155993 1 +0.074797661013089226 0.25012545596594921 -0.1404934926198349 1 +-0.054477938391975539 -0.085628442065833837 -0.017799871366431477 1 +0.024806284611034665 0.098272052066470883 0.016645819433334985 1 +-0.022061313749070353 0.2946354401931443 -0.26676223580777092 1 +0.024946442360908885 0.0263042580677295 0.096367363640021172 1 +-0.12866014902766865 -0.17232468112762231 0.13566497641610362 1 +-0.28146278773699562 0.27081314138547607 0.10101636941299799 1 +0.36011527425244588 0.097685548130398842 0.15920693658319554 1 +0.066187236726057849 -0.34026801549245778 -0.19922030279276431 1 +0.07022159834384252 -0.063623002441841325 0.38885282067455429 1 +-0.11758927070462714 0.065467038838721014 0.06103679065767291 1 +-0.10199424288607814 0.37130749604407531 -0.12804351163479197 1 +-0.045794287223631047 -0.4324557833521423 -0.23687521773595907 2 +0.13954101029359572 0.087691825752021196 0.46423620151461575 2 +-0.39476624440822194 0.038136393518752726 0.027823555675558567 1 +0.042775402298076214 -0.40900634810064485 -0.054889459858675979 1 +-0.056154878290525095 0.1311062337485458 -0.37645110033906548 1 +0.32857963727660389 0.32088575127821412 0.1792588089484089 2 +0.27611524808374921 0.2192909383500975 0.20670216949263528 1 +-0.30793708451359386 -0.25493837901738242 -0.065728746169034485 1 +0.17340100444749926 0.025669119720247442 0.047186460674716942 1 +-0.36289506615087352 0.027981941147756248 0.18079850569588596 1 +-0.20657734755208726 0.063754151458302072 0.19893688931836873 1 +-0.34094180928632267 -0.14757967407118869 -0.18786326339274695 1 +-0.23553097831014172 -0.090399560703751214 0.14351157136500015 1 +-0.10738296764579104 0.34812174360645026 0.16914638577466848 1 +0.12295950646474089 0.21757928211552441 -0.32918054547200276 1 +0.012981378463993831 0.13186935449453266 -0.25361598352399589 1 +-0.18282846177641854 -0.23173302295590589 -0.2775513473831005 1 +0.0052481079377969496 0.19020502243444401 0.22426672589204605 1 +-0.39541077193317081 0.037156530734504901 -0.072147206050796608 1 +0.34431029335123825 -0.18967359339033504 0.098873723612798434 1 +-0.22440434312429891 -0.20757435375880903 0.26343757447756794 1 +0.17560792936664665 -0.36448846737671531 -0.035620747830156084 1 +-0.048532728179369017 -0.066526068312505363 0.12862283474273536 1 +-0.38032248306506256 -0.11517674900610347 0.044923628284516896 1 +0.14986287173910431 0.041731457075121423 -0.26282606340174863 1 +0.29507169567874758 0.055981517478235029 -0.0037521482767681157 1 +0.3099538909046799 -0.25775877376865519 -0.088388609139942564 1 +0.18306476248019357 0.36453429163376155 0.086802054568749953 1 +-0.070403421397669072 0.013740322100972452 -0.067869860279548375 1 +0.1791412793429773 -0.21367260721022319 -0.29899955568168235 1 +-0.36614232797971086 0.16937465922964734 0.088622907414423815 1 +-0.15448089410822588 -0.32615429828064552 0.18586659724105453 1 +0.052324108742054357 -0.038351248529848364 -0.48856124210133045 2 +0.27339126238480399 -0.28705305917821577 0.10218477312054483 1 +0.12554562290815949 0.096164566717367839 0.36751961870386074 1 +-0.021181431807494128 -0.10907330839819857 0.27324381903867717 1 +0.052550146099273894 -0.33695348472230824 0.20692692556226724 1 +-0.28494321772920805 0.27677228364487483 -0.29224974361019257 2 +0.10772611365430303 -0.27870879909125396 -0.035165389045932201 1 +-0.14856308449960456 0.37033969772799641 0.083357807780090915 1 +0.025831712627652915 -0.2515063025023635 0.071048621658933692 1 +0.073182083123299962 -0.29466437179154648 0.38780511575873033 2 +0.0080333500708874642 0.25411677277280265 0.14242338431531035 1 +-0.0017606887646237808 0.38831694465959848 -0.10592558893991103 1 +0.26398114212563917 -0.14381701618748871 0.39063091979078446 2 +-0.38326706137033695 -0.11875831278201833 -0.10508308432111768 1 +0.46034682268860305 0.15676767565379729 0.089581324608377158 2 +0.13578306781534899 0.056437373500978286 -0.37048711030225778 1 +-0.052966710537569503 -0.27929443321811831 0.40328721189090194 2 +0.192560991004216 0.063008277917616262 0.20350548147513242 1 +0.050258612180519122 -0.075186495631741901 0.03540413824808368 1 +0.10777834999410811 0.26611091895884736 0.30598558072669596 1 +-0.066278520399229893 -0.34290151563057464 -0.2064101834937612 1 +0.19685886776352077 0.2027080197434461 -0.043322649523488271 1 +0.0015847901613452037 0.080830144016209665 -0.075502012245031377 1 +0.26368489950477669 0.033773895863873762 0.30891554526250792 1 +-0.23299918759270005 -0.090432163829179152 -0.32846528987419321 1 +-0.088108143022930407 -0.11027631435176584 -0.26475408611063156 1 +0.38973726098737016 -0.019243022032469914 0.14264304566481822 1 +-0.01289473966910289 0.48606046903305394 0.08085761591040605 2 +0.33463968548109069 0.17827648066868423 -0.15894998183293146 1 +0.15134385076449164 0.10581068340528867 -5.9750900477974211e-05 1 +-0.17405379599508039 -0.36653139572584437 0.064489678375509452 1 +-0.048854911632127768 0.053711968379438257 0.2805493974584623 1 +0.21655805777292733 -0.049594875144037723 -0.20470694456379607 1 +-0.20231826270209063 0.20805349381289187 0.13341602539504827 1 +0.092366405386281519 -0.1059266853010145 -0.27518724745635098 1 +-0.16707682968160315 0.20164704292262747 0.020780910447402774 1 +0.19524860317316997 -0.24489588806719859 0.27517702750751011 1 +-0.3039111084610352 -0.27281812486539642 0.097065124694635241 1 +0.19626955570096213 -0.24183875140106834 -0.0045910103775962108 1 +0.19582217433086202 -0.042336659338486862 -0.36245467861757791 1 +0.1868752064317967 -0.18873558420146364 -0.15372957291117345 1 +-0.045633180489322724 -0.15147108696986303 -0.38255403163522023 1 +0.48770423858475598 0.0061209045436740276 0.075154425503095423 2 +0.47672175612571999 0.0094806422807550209 0.14315724795141693 2 +0.033436062702507333 0.29305660163602409 -0.018840324986662348 1 +0.26197014702976135 0.31243594682877091 0.089519958804874414 1 +-0.043673796350527663 -0.26494914974355055 -0.077875466162947674 1 +-0.16399744816910741 0.061074557863654004 0.3730679880969614 1 +-0.16874774479793608 -0.16542383351305237 -0.13655358726981978 1 +0.10558920218023279 -0.2883522675688806 -0.27973042458712222 1 +0.28759948121919943 0.0075922568669945789 -0.093321899493478105 1 +-0.29486701362731427 0.23302861539801364 -0.18637025878136035 1 +-0.3754764128643342 -0.0084805563105020514 0.32194621216299329 2 +-0.24651850149330784 -0.17519194055264725 -0.055562192344838009 1 +-0.22751710255401345 -0.16845076940402859 0.073697384148184594 1 +-0.24536469437509145 0.30414389962752025 -0.094414445157329593 1 +-0.23350857302408798 -0.28870963842640884 -0.20268635756650838 1 +0.33355094667626339 -0.12994863842172816 -0.19024905887558033 1 +-0.046583807889072994 -0.15241831865196193 -0.082961453490844869 1 +-0.074611879123396452 -0.017134658095282806 0.05376761501253928 1 +-0.26578688709696846 0.38360878439230706 0.159993866467324 2 +-0.06913794883377869 -0.19458616531484274 0.20951642194864953 1 +0.089498950171411212 -0.13494631779164529 -0.023959860311300797 1 +-0.18558142756911827 0.18711832187159916 -0.31964230522062342 1 +0.23634040692314512 -0.11916228796852599 0.14864364771349806 1 +-0.088210793990276731 -0.2879883344945246 -0.27781252700893333 1 +-0.26086854777577478 -0.017830342079347795 -0.1788234347614589 1 +-0.33787933076748999 0.089161001111497051 -0.21629255429682587 1 +-0.082238342689786859 -0.24671853062405819 0.32044664884209845 1 +-0.0054062426620777558 -0.32672003076719502 0.36865108381055367 2 +-0.0056290036019684894 -0.38106105636912002 0.31574290758864998 2 +0.22220628949086949 -0.13840275692162152 0.30851771391391392 1 +0.059753767986784327 -0.14859920887922184 0.090513805315648982 1 +-0.2667268431609312 0.25334447042736447 0.20660573212278818 1 +0.38480762928955115 0.10723688934594511 0.070832461234396973 1 +-0.15677184091914464 0.18482085016455907 0.33213232709257567 1 +-0.00064705198299440381 -0.25340022477919039 0.15936372413060598 1 +-0.11020620758406793 0.022836216030780593 0.48067896906982044 2 +-0.0032908640424136838 -0.19714476189659899 -0.242153776325925 1 +0.0093998308755075255 0.39201559930573759 0.12966967049431224 1 +-0.35410381558087078 -0.057697060927998811 -0.20288559066945844 1 +0.059673730534753888 -0.21897248874357986 0.33725101689325682 1 +-0.17838054976210899 -0.27075414553594135 -0.033985269742722632 1 +0.27111033575769367 0.29800247292168042 -0.039183813111945853 1 +0.037693459566387935 0.25035362521103288 -0.32050439627600708 1 +-0.26377566706920014 0.40474764330518331 0.097782864651467877 2 +-0.0022521275033995578 -0.057420856046653486 -0.16094826021995451 1 +-0.26724669473642121 -0.19316209606505375 0.36593332465911249 2 +0.085499007306107461 0.023008571003886057 0.022531195875965832 1 +0.098844449635862128 0.28069945194991636 0.12422379247805743 1 +0.31655333775702299 0.14012618136656779 0.22720581707510407 1 +-0.36004573663529021 0.12360063255151099 0.16730063077305124 1 +0.019555949360480052 -0.21128114961576963 -0.36029218479847658 1 +0.024318355975380859 -0.039456773514895682 -0.2982578166862066 1 +-0.053302970875965923 0.29993165832454888 0.27107195243223825 1 +0.11074740663859059 -0.0023209238812337309 0.10707812100084599 1 +-0.23369222637748979 0.026076224351167233 -0.34209863262360352 1 +-0.093658627887151527 -0.024119861366794414 0.26572354640586565 1 +0.033069219405781114 -0.037001826242540892 -0.39966811891681564 1 +0.062480776161146667 0.3415433860776525 0.24881093986055752 1 +-0.19006710051136508 -0.21182820767376392 0.40334880581212612 2 +-0.15117658436565384 -0.057729665999662422 -0.39529041860225311 1 +0.21096164409808271 0.2411647762236705 0.3779204346949695 2 +0.26151083986578794 0.26282880113491397 0.32980393996530022 2 +0.29009947850455003 -0.0095043136026206898 0.15308083393387206 1 +-0.3098285643626284 -0.22121496989046627 0.17135381975820951 1 +-0.0030745485663673938 -0.015807326101892019 0.41212024611049008 1 +-0.14172327018728048 0.28556847263614998 -0.11581586672608517 1 +-0.22499271278891853 -0.27147465929726566 0.199387037696865 1 +0.33344952423229235 -0.19635668104034432 0.30633731184840085 2 +-0.021396171792294139 0.26879464592372543 -0.13600674659771203 1 +0.41451092319956245 -0.059018811645844285 -0.047794195950891169 1 +0.11862227866704492 0.10064040959043494 0.24498147812342444 1 +0.086230367737865965 0.16375703761964155 0.022170312114837873 1 +0.17954953571185736 -0.02124783317111862 0.23179488813310006 1 +-0.33908504237729525 -0.23921603457248902 0.017026141102442993 1 +-0.1049325276446455 -0.045180241355882306 0.48040953182320123 2 +0.16385903817559577 -0.22218965562641499 0.10237333185805998 1 +-0.29305831491827128 -0.068099933139374097 0.28458839114693735 1 +-0.20092482262250835 0.10964844962442945 -0.19791334687654147 1 +0.068942202224407514 0.0029955069730034645 0.27555875309342848 1 +-0.16236711227235467 -0.15510138526654288 0.43923281716767948 2 +0.41976828002296784 -0.22321200687821596 -0.13898651814964413 2 +-0.26376459679853714 0.14801102106046626 -0.063514948655925496 1 +-0.043707734836280182 -0.087160102933500516 0.48560279250516092 2 +-0.15802654231952018 -0.16653664499584497 0.21988342840539676 1 +0.024331064489864926 -0.31125973494592851 -0.11271876604229143 1 +-0.11559571688941267 0.15387999526142576 0.45400156595678642 2 +-0.07167740472751119 0.20992098201559808 -0.22335335036418605 1 +-0.1491917475325466 -0.016357705696806901 -0.10224485743117828 1 +-0.2306497953749824 0.22228666588434001 -0.24723041022010697 1 +-0.13144693740742314 0.14002434622071488 -0.04541299504574707 1 +-0.28141787556258735 0.18558837696116509 0.26243372199734821 1 +0.13054785106683886 0.14479124561273679 -0.37983066967241486 1 +0.25769984113159344 -0.0023623980042580817 0.052061446411661758 1 +-0.26494850649782675 0.12426101634281547 0.064172013322501803 1 +0.12005227946995625 -0.1908756192412181 0.2188096871298075 1 +-0.27887316288322439 -0.06352253435650923 -0.037757109208955322 1 +-0.065960876300959509 -0.12031833421810569 0.39323461699135742 1 +-0.48122871014891949 -0.042584193588204991 -0.10092600199458213 2 +0.36491740070743223 0.1957270440341696 0.057139964805739601 1 +-0.024962087819082851 0.10339693677256825 -0.17566633837899109 1 +0.44619912765057934 0.12464786437614742 -0.17434519797785047 2 +-0.36430451916850232 -0.12690065910547679 0.14770022129768121 1 +0.054790863636619912 0.079625420499855021 0.16029551450519436 1 +-0.02776712276609326 0.20451529123961837 0.066410880598844022 1 +-0.19092551559039672 0.042667425444435254 -0.26085762257038858 1 +0.10833714071521103 0.30163084998123035 0.0271809783016701 1 +0.20541729434062569 -0.34740715594795879 0.10618042678623019 1 +0.2373618104996971 0.22434971528213393 0.094176968625838686 1 +0.32334197254079833 -0.024750104564432576 -0.25770646780151452 1 +0.17342445445381852 -0.33853545638595112 -0.16047221364995759 1 +-0.040852174876646268 0.080635219182546541 -0.48576716949190768 2 +-0.066215788508568144 0.027311811889385303 -0.15467671760363408 1 +-0.10575010161414924 0.2738638707643401 0.11489477718290128 1 +-0.25612470755483285 0.039226722898682218 0.13060064002721536 1 +0.39443774579235996 0.12024045120312925 -0.089008472404216388 1 +0.018961428251670451 -0.30418817632757017 0.28114984423349887 1 +-0.1481399319006777 -0.081857618651120068 0.14299434933456259 1 +-0.16588969726651318 0.34558034965027851 -0.18240870654409286 1 +0.23118384919793089 0.21683538121308274 -0.37893771963620582 2 +-0.26587874704060482 0.06032356944427035 -0.13978542303404215 1 +-0.39731996266264513 0.28851976009431118 -0.044378308977794788 2 +-0.18099553473653571 -0.059027555211072211 0.022079614876154771 1 +-0.096793182622928298 0.13922916786611267 -0.28536628352287036 1 +-0.42524424938196426 -0.23557187749304304 -0.093936862140836422 2 +-0.34981351324110294 -0.1984420378206895 -0.11746291563394778 1 +0.083518890584546424 0.20195189593146817 0.44228024589446685 2 +-0.35934001074403754 0.04370741166802089 -0.33503702749383063 2 +0.38112499666258443 -0.23380860756053309 -0.21304072467703439 2 +0.011336598332309364 -0.018148889418823255 -0.084319480306515843 1 +-0.11968030805226781 -0.28209895052106987 -0.11675099546023027 1 +-0.20458476828247013 0.18494194933765132 -0.15434296098837028 1 +0.21573732351322028 0.31334177075713721 -0.18160115611199051 1 +-0.072809298939057521 -0.40323032259712421 -0.042252898590777778 1 +0.16455498969273469 -0.14747803469444665 0.018095161482380974 1 +0.12845642537231569 0.013435188001823466 0.39404504012287489 1 +0.093422144597508638 -0.25888403351035577 -0.11855113815612503 1 +-0.19890103708578824 -0.043197668884905158 -0.23409956778195812 1 +-0.064668727888912508 0.48885627077083871 0.023828543054009343 2 +0.089472047390780046 0.4591033498031909 -0.15731063262053824 2 +-0.054289356976667952 0.36862767534947127 -0.20027274759484467 1 +-0.067122760381802288 -0.17129596311335374 0.0546918314881501 1 +-0.035150278326154444 0.085603549601096771 0.077659853514379512 1 +0.46415485128801681 -0.16255780555360716 -0.050651028921335488 2 +0.099192903888102618 0.048407584042190067 -0.18965444786829586 1 +-0.13000412853418764 -0.36299846990813228 -0.15178608549358752 1 +0.17459221562564242 -0.06392336467034504 -0.28165033671196693 1 +0.41129153200093671 -0.17107995715116933 0.21247928509905528 2 +0.41493340733122097 0.046065397327095713 0.26516695791897971 2 +0.31510700428231037 0.1330607061829582 -0.3584498307402415 2 +-0.39744303830165573 -0.035047204920095415 -0.11884051728647897 1 +-0.037935830376490232 0.25699347244871928 0.42226421765882671 2 +Triangles +694 +166 189 20 2 +138 300 297 2 +674 103 753 2 +264 104 234 2 +59 172 163 2 +151 278 7 2 +7 193 151 2 +122 55 192 2 +152 295 1 2 +268 241 48 2 +241 268 94 2 +70 222 250 2 +222 70 299 2 +231 95 301 2 +145 607 608 2 +94 650 625 2 +263 217 87 2 +131 60 189 2 +745 270 151 2 +42 674 125 2 +242 52 152 2 +234 264 77 2 +201 26 223 2 +71 211 206 2 +206 211 16 2 +533 233 52 2 +21 577 674 2 +225 219 105 2 +75 156 203 2 +156 235 203 2 +96 202 44 2 +29 116 251 2 +745 278 151 2 +131 239 60 2 +178 58 200 2 +10 91 133 2 +233 533 99 2 +99 292 233 2 +58 209 293 2 +249 137 40 2 +169 11 150 2 +120 230 24 2 +88 177 67 2 +269 73 197 2 +189 166 51 2 +51 131 189 2 +110 183 52 2 +164 176 93 2 +288 176 164 2 +128 155 45 2 +727 185 107 2 +160 298 18 2 +108 21 245 2 +17 116 173 2 +150 11 215 2 +54 180 122 2 +61 147 160 2 +157 110 5 2 +126 143 8 2 +82 635 236 2 +160 147 298 2 +135 146 19 2 +55 122 208 2 +233 110 52 2 +12 286 174 2 +247 299 70 2 +34 265 287 2 +255 141 35 2 +146 136 19 2 +220 85 203 2 +67 89 216 2 +217 92 66 2 +118 241 33 2 +109 165 10 2 +217 66 157 2 +117 209 32 2 +150 62 194 2 +251 72 173 2 +207 133 10 2 +534 261 176 2 +104 264 581 2 +37 97 159 2 +19 154 115 2 +262 200 58 2 +96 27 202 2 +252 22 117 2 +161 617 74 2 +303 157 5 2 +19 214 115 2 +237 4 246 2 +193 63 151 2 +175 75 289 2 +296 294 56 2 +165 754 108 2 +2 92 229 2 +37 162 281 2 +212 692 68 2 +267 15 225 2 +155 160 45 2 +146 592 48 2 +127 291 46 2 +248 168 14 2 +32 236 98 2 +110 29 183 2 +134 169 41 2 +117 178 22 2 +170 734 687 2 +91 538 10 2 +78 191 198 2 +169 150 41 2 +180 69 228 2 +187 707 71 2 +92 143 42 2 +146 45 136 2 +63 224 270 2 +144 689 264 2 +222 13 652 2 +141 62 187 2 +278 155 7 2 +7 155 128 2 +161 213 25 2 +128 45 146 2 +160 45 142 2 +81 249 170 2 +119 269 12 2 +155 61 160 2 +225 15 105 2 +23 289 203 2 +203 220 23 2 +72 173 218 2 +215 62 707 2 +263 82 204 2 +689 257 114 2 +184 166 20 2 +251 29 183 2 +181 69 180 2 +24 120 190 2 +100 240 26 2 +126 42 143 2 +216 67 88 2 +197 73 130 2 +240 266 99 2 +266 292 99 2 +96 44 171 2 +50 137 227 2 +4 172 246 2 +138 297 302 2 +41 150 194 2 +152 218 295 2 +215 11 153 2 +38 125 126 2 +126 272 38 2 +236 209 32 2 +102 20 134 2 +115 188 30 2 +109 165 43 2 +43 261 109 2 +191 9 198 2 +581 98 634 2 +192 213 78 2 +263 262 82 2 +83 118 283 2 +163 268 135 2 +107 284 277 2 +154 47 148 2 +136 45 142 2 +12 269 197 2 +4 96 171 2 +167 92 42 2 +120 56 296 2 +172 6 163 2 +84 284 267 2 +261 667 80 2 +194 62 141 2 +56 120 149 2 +91 255 35 2 +80 261 534 2 +251 72 183 2 +10 668 109 2 +159 22 195 2 +203 235 85 2 +652 222 90 2 +258 23 130 2 +276 221 78 2 +196 267 225 2 +210 110 157 2 +86 665 686 2 +165 108 43 2 +108 245 43 2 +608 101 49 2 +201 223 85 2 +141 187 35 2 +41 147 194 2 +201 100 53 2 +85 223 220 2 +33 277 260 2 +176 245 93 2 +166 174 65 2 +61 270 745 2 +50 285 139 2 +275 17 149 2 +54 132 181 2 +686 36 665 2 +142 160 18 2 +92 3 143 2 +186 106 28 2 +72 218 152 2 +189 725 134 2 +681 642 114 2 +82 262 209 2 +148 47 538 2 +100 22 178 2 +227 2 167 2 +68 244 168 2 +121 297 124 2 +161 74 213 2 +28 570 106 2 +163 94 268 2 +224 102 270 2 +211 39 121 2 +253 28 256 2 +260 253 83 2 +172 59 246 2 +59 163 135 2 +755 60 169 2 +9 156 243 2 +30 279 115 2 +31 301 231 2 +238 88 1 2 +217 157 87 2 +87 157 303 2 +214 135 19 2 +281 221 74 2 +221 213 74 2 +287 34 232 2 +98 634 635 2 +29 81 116 2 +84 267 196 2 +130 23 177 2 +291 123 127 2 +34 130 265 2 +111 205 246 2 +100 178 79 2 +79 200 266 2 +92 3 217 2 +100 79 240 2 +282 51 174 2 +174 51 166 2 +112 232 34 2 +11 127 123 2 +185 54 122 2 +27 642 681 2 +81 170 116 2 +54 181 180 2 +41 271 102 2 +102 134 41 2 +63 186 184 2 +122 180 25 2 +114 248 257 2 +35 187 206 2 +252 159 247 2 +119 259 12 2 +83 256 193 2 +261 43 176 2 +285 16 140 2 +158 18 141 2 +142 18 158 2 +57 154 115 2 +105 15 208 2 +179 2 81 2 +257 288 164 2 +164 290 257 2 +178 200 79 2 +127 302 153 2 +302 39 153 2 +66 210 157 2 +182 296 294 2 +107 132 54 2 +176 43 245 2 +175 31 733 2 +139 21 108 2 +169 11 755 2 +44 129 617 2 +82 209 236 2 +245 21 93 2 +47 142 158 2 +179 229 66 2 +189 60 725 2 +125 42 126 2 +254 581 98 2 +12 197 286 2 +69 171 228 2 +171 44 228 2 +89 242 216 2 +76 230 296 2 +131 112 24 2 +490 106 12 2 +180 25 228 2 +121 39 297 2 +53 195 100 2 +136 47 154 2 +254 36 665 2 +87 200 262 2 +200 87 303 2 +73 175 733 2 +136 142 47 2 +202 44 129 2 +115 57 188 2 +123 755 11 2 +147 271 61 2 +57 667 668 2 +185 122 208 2 +234 290 77 2 +20 189 134 2 +48 146 135 2 +175 31 231 2 +132 650 33 2 +275 300 138 2 +138 274 275 2 +279 214 115 2 +96 4 237 2 +170 687 40 2 +195 22 100 2 +193 283 7 2 +83 253 256 2 +193 256 63 2 +210 179 66 2 +199 171 69 2 +149 56 173 2 +50 137 140 2 +247 162 299 2 +224 102 20 2 +97 9 198 2 +19 136 154 2 +153 127 11 2 +687 121 124 2 +298 194 147 2 +303 5 200 2 +15 185 208 2 +227 167 103 2 +53 201 235 2 +266 79 240 2 +202 86 129 2 +55 192 191 2 +159 37 247 2 +149 173 17 2 +105 509 208 2 +78 198 276 2 +192 25 213 2 +24 565 112 2 +186 65 184 2 +186 106 65 2 +181 199 69 2 +181 6 199 2 +196 225 64 2 +744 241 118 2 +150 215 62 2 +103 167 42 2 +224 184 63 2 +129 13 226 2 +2 92 167 2 +88 216 1 2 +243 156 75 2 +215 153 707 2 +237 246 111 2 +221 78 213 2 +119 31 733 2 +490 106 65 2 +116 734 170 2 +277 284 84 2 +182 76 296 2 +107 54 185 2 +177 23 220 2 +177 220 67 2 +290 164 38 2 +164 280 38 2 +159 195 97 2 +238 287 88 2 +217 3 263 2 +81 2 249 2 +140 121 16 2 +179 81 29 2 +22 159 252 2 +10 207 165 2 +725 169 134 2 +30 205 279 2 +205 30 757 2 +184 65 166 2 +300 275 17 2 +131 24 239 2 +253 84 196 2 +71 153 211 2 +93 280 164 2 +297 39 302 2 +117 252 250 2 +28 253 196 2 +299 13 222 2 +108 139 754 2 +210 29 110 2 +252 247 70 2 +27 86 202 2 +509 95 704 2 +231 95 243 2 +52 183 152 2 +183 72 152 2 +64 219 119 2 +231 243 75 2 +235 201 85 2 +143 204 8 2 +143 3 204 2 +210 179 29 2 +32 250 117 2 +26 240 89 2 +175 231 75 2 +286 113 197 2 +248 168 68 2 +100 26 201 2 +192 78 191 2 +122 25 192 2 +692 68 244 2 +211 121 16 2 +128 744 7 2 +211 153 39 2 +262 209 58 2 +283 118 7 2 +4 171 199 2 +4 199 172 2 +187 71 206 2 +178 117 293 2 +199 6 172 2 +47 158 538 2 +270 102 61 2 +102 271 61 2 +581 36 264 2 +42 103 674 2 +749 121 687 2 +15 185 727 2 +162 13 299 2 +650 625 132 2 +113 282 717 2 +120 230 296 2 +106 259 12 2 +203 75 289 2 +133 91 579 2 +254 665 90 2 +252 70 250 2 +119 733 269 2 +733 73 269 2 +3 263 204 2 +717 273 113 2 +273 717 112 2 +99 240 89 2 +168 80 534 2 +137 2 227 2 +57 148 154 2 +263 87 262 2 +650 94 241 2 +258 289 175 2 +76 238 182 2 +238 1 182 2 +27 96 212 2 +138 302 127 2 +127 274 138 2 +260 83 118 2 +118 33 260 2 +220 223 67 2 +223 89 67 2 +26 89 223 2 +153 707 71 2 +184 20 224 2 +107 132 33 2 +509 208 55 2 +257 248 14 2 +64 225 219 2 +717 282 51 2 +44 161 228 2 +161 25 228 2 +141 158 255 2 +509 704 191 2 +92 229 66 2 +77 689 257 2 +229 2 179 2 +239 190 123 2 +190 291 123 2 +21 93 577 2 +63 270 151 2 +226 281 74 2 +91 158 255 2 +105 301 219 2 +73 175 258 2 +239 24 190 2 +60 239 123 2 +242 152 1 2 +216 242 1 2 +73 258 130 2 +249 2 137 2 +250 90 32 2 +222 90 250 2 +574 126 8 2 +272 126 574 2 +251 116 173 2 +689 77 264 2 +254 98 32 2 +90 254 32 2 +40 249 170 2 +293 209 117 2 +273 130 197 2 +256 28 186 2 +256 186 63 2 +617 129 226 2 +260 84 253 2 +148 10 668 2 +285 16 145 2 +104 234 272 2 +744 592 128 2 +259 64 119 2 +135 268 48 2 +144 264 36 2 +277 260 84 2 +196 64 570 2 +88 265 177 2 +265 130 177 2 +293 58 178 2 +674 753 21 2 +76 232 287 2 +76 287 238 2 +198 37 276 2 +273 130 34 2 +273 34 112 2 +127 46 274 2 +120 149 46 2 +149 274 46 2 +301 31 219 2 +219 31 119 2 +538 148 10 2 +274 149 275 2 +37 97 198 2 +139 145 285 2 +107 277 33 2 +214 59 135 2 +59 214 279 2 +246 59 205 2 +205 59 279 2 +258 289 23 2 +281 37 221 2 +37 276 221 2 +37 162 247 2 +124 297 300 2 +13 162 226 2 +226 162 281 2 +283 83 193 2 +284 15 267 2 +50 285 140 2 +286 282 174 2 +286 113 282 2 +197 273 113 2 +287 265 88 2 +257 14 288 2 +234 38 272 2 +290 38 234 2 +77 257 290 2 +46 291 190 2 +190 120 46 2 +200 5 266 2 +5 292 266 2 +292 5 233 2 +233 5 110 2 +56 294 218 2 +218 173 56 2 +744 48 592 2 +298 194 18 2 +18 194 141 2 +570 196 28 2 +147 271 41 2 +295 218 294 2 +294 182 295 2 +295 182 1 2 +93 577 280 2 +12 174 490 2 +634 581 104 2 +607 101 608 2 +86 129 652 2 +732 188 80 2 +717 112 131 2 +82 635 204 2 +95 704 243 2 +704 9 243 2 +104 272 574 2 +230 565 76 2 +125 577 674 2 +668 667 109 2 +174 490 65 2 +21 139 753 2 +288 534 176 2 +8 634 574 2 +634 104 574 2 +248 642 114 2 +144 27 686 2 +107 727 284 2 +30 757 244 2 +33 650 241 2 +49 608 139 2 +133 207 49 2 +509 105 301 2 +533 52 242 2 +97 9 730 2 +635 634 8 2 +116 17 734 2 +236 635 98 2 +592 128 146 2 +608 145 139 2 +89 533 242 2 +686 144 36 2 +48 744 241 2 +80 732 168 2 +123 60 755 2 +191 509 55 2 +204 635 8 2 +730 156 53 2 +565 232 76 2 +99 533 89 2 +132 625 181 2 +625 6 181 2 +744 118 7 2 +111 205 757 2 +565 232 112 2 +625 163 94 2 +95 509 301 2 +137 40 140 2 +74 226 617 2 +652 665 90 2 +86 665 652 2 +35 206 579 2 +579 91 35 2 +30 732 244 2 +244 732 168 2 +44 617 161 2 +248 68 642 2 +106 570 259 2 +570 64 259 2 +704 191 9 2 +254 36 581 2 +288 534 14 2 +16 607 145 2 +96 237 212 2 +237 692 212 2 +206 579 101 2 +577 125 38 2 +38 280 577 2 +163 6 625 2 +749 40 140 2 +206 101 607 2 +206 607 16 2 +667 188 80 2 +129 652 13 2 +27 681 144 2 +757 111 244 2 +53 156 235 2 +57 188 667 2 +538 158 91 2 +707 62 187 2 +207 49 754 2 +121 749 140 2 +101 579 133 2 +101 133 49 2 +169 60 725 2 +686 27 86 2 +14 534 168 2 +732 30 188 2 +730 9 156 2 +24 565 230 2 +692 111 244 2 +50 139 753 2 +745 278 155 2 +753 227 103 2 +261 667 109 2 +687 749 40 2 +284 727 15 2 +212 68 642 2 +27 642 212 2 +668 148 57 2 +681 689 144 2 +689 114 681 2 +111 237 692 2 +51 717 131 2 +195 730 97 2 +53 195 730 2 +687 734 124 2 +734 124 300 2 +734 300 17 2 +61 745 155 2 +753 227 50 2 +165 207 754 2 +49 139 754 2 +Tetrahedra +3586 +669 309 483 629 1 +510 420 537 286 1 +475 372 495 322 1 +103 753 515 674 1 +264 234 104 442 1 +531 357 748 454 1 +314 382 454 596 1 +122 192 55 474 1 +328 495 611 372 1 +425 357 314 709 1 +594 359 586 470 1 +145 591 139 49 1 +407 231 95 301 1 +591 145 607 608 1 +94 625 650 572 1 +497 745 270 151 1 +674 125 601 42 1 +335 702 756 400 1 +594 653 541 343 1 +393 514 654 349 1 +440 688 518 368 1 +486 401 21 108 1 +37 428 708 670 1 +477 586 354 444 1 +352 455 615 311 1 +405 638 697 375 1 +586 354 461 648 1 +624 531 347 416 1 +680 428 602 350 1 +21 674 577 636 1 +219 105 518 225 1 +406 410 311 447 1 +346 580 481 557 1 +688 726 518 368 1 +347 492 484 445 1 +646 502 701 345 1 +723 364 526 619 1 +375 4 508 199 1 +397 459 362 559 1 +232 663 112 510 1 +58 293 209 506 1 +610 91 538 398 1 +137 436 411 249 1 +583 555 341 637 1 +642 432 671 358 1 +230 604 120 24 1 +409 623 310 613 1 +376 467 394 557 1 +428 670 247 602 1 +386 307 694 492 1 +717 51 537 419 1 +486 754 373 108 1 +727 107 185 363 1 +308 662 377 414 1 +433 682 316 637 1 +728 545 416 317 1 +17 173 116 459 1 +337 617 472 542 1 +596 329 454 357 1 +305 678 710 448 1 +736 431 647 374 1 +519 455 371 352 1 +635 435 82 236 1 +122 474 55 208 1 +143 412 569 8 1 +503 324 539 482 1 +734 362 459 170 1 +583 660 653 525 1 +523 344 448 587 1 +580 336 698 419 1 +85 513 220 203 1 +202 129 472 452 1 +391 324 503 482 1 +109 10 165 655 1 +209 32 564 117 1 +447 356 410 541 1 +459 251 72 173 1 +133 655 207 10 1 +264 442 104 581 1 +438 378 341 627 1 +97 680 37 159 1 +347 694 484 492 1 +560 396 45 511 1 +680 556 428 417 1 +491 263 3 383 1 +683 617 472 337 1 +495 464 383 322 1 +317 728 545 619 1 +434 252 22 117 1 +261 351 588 43 1 +578 335 756 400 1 +664 19 214 115 1 +25 656 366 563 1 +330 473 380 549 1 +475 522 747 310 1 +472 337 415 543 1 +624 357 531 416 1 +427 558 352 403 1 +429 365 389 590 1 +454 375 543 329 1 +2 229 92 566 1 +544 203 513 235 1 +584 450 456 30 1 +37 281 162 708 1 +384 224 524 426 1 +678 305 477 448 1 +709 677 314 430 1 +471 346 663 658 1 +644 146 592 48 1 +387 32 236 98 1 +636 321 520 457 1 +447 359 470 449 1 +514 19 136 146 1 +734 362 170 687 1 +651 437 481 342 1 +539 91 538 10 1 +191 198 400 78 1 +45 511 396 458 1 +9 704 400 756 1 +478 477 354 369 1 +41 194 738 476 1 +587 448 313 386 1 +726 390 632 684 1 +755 467 376 169 1 +528 591 608 49 1 +712 477 609 369 1 +160 142 45 511 1 +425 525 709 430 1 +245 108 21 401 1 +135 644 446 546 1 +658 481 346 419 1 +440 267 616 225 1 +705 639 35 579 1 +451 299 553 222 1 +582 487 324 343 1 +627 356 378 583 1 +427 399 352 318 1 +215 707 62 593 1 +637 627 469 341 1 +689 114 257 671 1 +489 543 416 337 1 +548 381 693 313 1 +251 183 29 716 1 +347 531 561 696 1 +560 610 393 354 1 +363 600 688 319 1 +516 106 695 28 1 +344 531 748 494 1 +568 703 414 442 1 +448 305 477 609 1 +459 149 562 479 1 +747 623 495 310 1 +551 191 535 55 1 +542 451 337 74 1 +541 660 343 653 1 +67 380 216 88 1 +45 396 128 458 1 +602 670 247 70 1 +396 514 136 146 1 +511 648 160 18 1 +382 456 757 244 1 +353 520 430 321 1 +230 460 604 346 1 +669 679 373 582 1 +378 438 462 306 1 +441 140 676 16 1 +313 384 524 426 1 +472 683 337 489 1 +380 630 549 67 1 +66 217 500 157 1 +695 628 338 488 1 +542 418 213 535 1 +527 363 501 339 1 +131 419 468 51 1 +537 729 628 420 1 +539 668 482 109 1 +9 400 191 198 1 +98 633 581 634 1 +659 279 205 450 1 +680 428 37 159 1 +530 234 442 457 1 +513 330 549 589 1 +441 411 379 483 1 +708 281 162 451 1 +434 595 117 22 1 +5 110 536 157 1 +731 540 730 53 1 +550 575 446 349 1 +83 283 118 408 1 +39 371 465 519 1 +713 361 554 66 1 +485 566 167 404 1 +545 723 526 619 1 +56 460 120 296 1 +726 492 688 326 1 +696 507 319 466 1 +376 336 467 557 1 +510 112 273 113 1 +261 80 667 391 1 +471 658 663 389 1 +365 666 589 661 1 +56 149 120 460 1 +526 475 322 434 1 +657 606 643 471 1 +594 318 586 444 1 +668 539 10 109 1 +703 358 671 442 1 +618 374 540 731 1 +550 349 450 391 1 +470 359 327 449 1 +614 334 496 529 1 +752 604 460 346 1 +652 90 222 553 1 +418 276 221 78 1 +453 598 527 339 1 +536 554 413 500 1 +323 510 419 389 1 +239 60 131 698 1 +436 2 566 229 1 +718 429 694 307 1 +86 686 665 414 1 +440 319 363 688 1 +638 405 527 598 1 +382 432 596 456 1 +653 304 523 587 1 +528 608 101 49 1 +415 504 171 44 1 +41 194 147 738 1 +500 554 361 66 1 +463 321 636 457 1 +386 313 507 448 1 +356 740 433 583 1 +540 201 100 53 1 +412 646 345 722 1 +384 449 548 336 1 +174 381 166 65 1 +701 520 316 502 1 +523 402 710 748 1 +497 61 270 745 1 +379 50 285 139 1 +519 71 707 721 1 +334 643 630 443 1 +314 402 357 454 1 +707 455 519 352 1 +431 26 240 100 1 +464 262 506 58 1 +17 149 459 275 1 +545 720 317 418 1 +397 116 29 716 1 +666 34 273 510 1 +495 573 328 341 1 +516 186 106 28 1 +136 560 45 142 1 +437 599 462 315 1 +530 321 358 685 1 +467 725 547 493 1 +720 416 317 499 1 +518 551 407 326 1 +359 523 448 587 1 +210 554 29 413 1 +456 432 244 382 1 +313 649 381 524 1 +313 359 521 448 1 +501 727 440 363 1 +498 706 693 386 1 +409 522 360 694 1 +496 1 216 380 1 +675 369 576 333 1 +45 511 458 155 1 +576 369 458 609 1 +261 567 482 351 1 +548 384 649 313 1 +755 169 60 467 1 +321 568 358 425 1 +461 91 610 398 1 +716 183 72 251 1 +346 481 437 557 1 +412 641 569 722 1 +539 503 482 668 1 +339 572 453 719 1 +447 523 359 587 1 +747 573 495 341 1 +287 232 34 389 1 +334 736 443 388 1 +446 325 659 546 1 +378 437 447 406 1 +518 726 632 368 1 +627 306 740 469 1 +400 326 535 499 1 +453 94 625 546 1 +481 342 429 651 1 +685 596 395 314 1 +640 246 382 508 1 +485 753 515 103 1 +123 715 291 127 1 +672 737 423 507 1 +518 326 407 726 1 +210 536 110 157 1 +644 367 446 546 1 +658 481 323 429 1 +632 518 368 225 1 +500 571 328 361 1 +575 402 305 487 1 +501 440 284 620 1 +111 246 205 382 1 +324 439 373 582 1 +187 141 62 399 1 +342 735 718 651 1 +569 316 383 641 1 +380 177 88 67 1 +92 217 3 491 1 +317 416 728 499 1 +381 649 184 524 1 +419 510 112 663 1 +232 510 112 34 1 +644 592 458 367 1 +455 11 127 123 1 +701 502 412 345 1 +426 497 270 151 1 +434 595 506 564 1 +710 494 719 466 1 +39 465 121 211 1 +374 621 431 201 1 +526 364 723 555 1 +259 12 269 119 1 +401 679 309 629 1 +148 503 539 668 1 +484 512 409 335 1 +154 584 57 115 1 +647 374 540 618 1 +314 677 391 456 1 +5 464 536 739 1 +296 392 182 294 1 +31 390 175 733 1 +619 475 526 434 1 +639 607 101 591 1 +11 755 376 169 1 +669 309 629 401 1 +658 389 590 429 1 +544 374 335 731 1 +620 423 724 672 1 +675 426 524 385 1 +399 318 427 461 1 +630 216 89 67 1 +313 524 381 693 1 +683 617 337 542 1 +694 512 360 409 1 +31 632 390 733 1 +394 455 715 123 1 +229 554 179 66 1 +451 299 670 553 1 +483 379 699 669 1 +590 473 380 330 1 +189 468 166 51 1 +626 568 414 345 1 +604 190 120 24 1 +698 547 189 468 1 +230 471 76 296 1 +398 427 705 639 1 +497 738 271 147 1 +706 342 718 481 1 +428 708 670 451 1 +484 407 326 726 1 +517 458 367 333 1 +618 475 647 310 1 +626 308 422 526 1 +25 228 656 180 1 +540 731 374 53 1 +425 596 314 357 1 +66 500 713 361 1 +440 616 267 620 1 +633 254 36 665 1 +536 233 292 424 1 +399 141 62 194 1 +482 324 373 582 1 +580 336 481 557 1 +309 699 669 483 1 +505 100 195 540 1 +418 78 213 535 1 +440 363 185 474 1 +175 390 73 733 1 +393 712 560 354 1 +586 648 461 399 1 +426 151 746 576 1 +249 559 81 436 1 +465 622 297 124 1 +318 639 427 398 1 +202 129 44 472 1 +495 438 623 341 1 +685 463 321 679 1 +755 11 455 123 1 +634 345 646 722 1 +497 147 271 61 1 +667 503 57 668 1 +102 738 271 497 1 +290 77 442 234 1 +437 447 311 750 1 +557 750 437 311 1 +310 522 623 409 1 +150 593 476 376 1 +486 669 629 401 1 +437 447 750 342 1 +159 247 602 428 1 +650 501 132 33 1 +748 357 402 454 1 +307 429 512 743 1 +408 532 724 83 1 +143 92 3 491 1 +398 539 655 10 1 +387 690 626 526 1 +537 381 166 174 1 +12 420 286 628 1 +687 559 170 40 1 +380 630 388 549 1 +513 23 220 203 1 +507 338 423 385 1 +86 414 377 452 1 +481 750 706 342 1 +532 193 283 7 1 +552 331 379 483 1 +206 639 35 427 1 +672 319 507 466 1 +554 210 179 66 1 +74 213 542 418 1 +597 479 362 332 1 +643 380 657 496 1 +431 79 505 100 1 +548 649 381 313 1 +325 494 719 710 1 +413 183 29 110 1 +537 729 420 323 1 +165 655 373 482 1 +16 140 285 441 1 +552 50 137 140 1 +613 623 310 443 1 +504 96 171 44 1 +501 107 440 727 1 +386 561 347 694 1 +102 384 224 20 1 +597 455 371 394 1 +517 744 592 458 1 +176 463 588 93 1 +684 737 695 488 1 +78 556 535 418 1 +369 160 61 511 1 +153 11 127 455 1 +366 700 499 326 1 +390 661 73 733 1 +587 344 448 386 1 +194 738 298 147 1 +18 158 142 648 1 +498 429 718 307 1 +137 436 552 411 1 +714 610 393 539 1 +217 263 500 87 1 +79 751 266 240 1 +657 238 380 606 1 +610 538 393 539 1 +308 414 377 690 1 +382 246 205 508 1 +352 519 721 403 1 +333 532 517 576 1 +540 100 195 53 1 +674 125 636 601 1 +644 664 446 514 1 +444 712 654 393 1 +457 502 701 646 1 +747 526 475 322 1 +546 453 508 163 1 +611 443 623 438 1 +486 528 591 373 1 +509 208 518 105 1 +442 321 457 646 1 +198 276 556 78 1 +356 483 699 541 1 +337 418 542 720 1 +736 374 388 431 1 +565 419 24 112 1 +588 463 401 93 1 +638 508 199 375 1 +359 447 653 523 1 +37 708 162 670 1 +679 520 309 629 1 +681 358 671 703 1 +359 586 678 594 1 +311 371 615 597 1 +524 224 184 63 1 +440 727 185 363 1 +536 303 464 5 1 +137 40 249 411 1 +328 464 383 495 1 +516 693 524 385 1 +406 356 740 480 1 +715 302 622 138 1 +735 304 561 522 1 +688 600 445 319 1 +514 349 503 664 1 +265 666 130 473 1 +21 674 636 515 1 +347 484 499 445 1 +435 641 626 345 1 +487 550 575 402 1 +490 65 106 516 1 +327 376 493 476 1 +261 482 109 43 1 +314 395 567 456 1 +734 459 116 170 1 +648 461 610 354 1 +399 586 478 327 1 +454 494 312 598 1 +182 296 76 471 1 +462 332 437 406 1 +112 510 717 113 1 +640 4 375 697 1 +217 263 3 491 1 +614 392 370 562 1 +359 653 594 523 1 +447 437 311 406 1 +702 499 400 317 1 +417 556 702 400 1 +676 140 121 16 1 +405 54 180 181 1 +546 508 659 163 1 +548 468 381 649 1 +98 254 581 633 1 +682 566 404 713 1 +376 11 455 755 1 +473 130 589 666 1 +478 147 497 61 1 +434 564 673 117 1 +643 380 630 443 1 +405 563 527 363 1 +376 311 352 470 1 +374 621 201 235 1 +375 405 638 598 1 +678 523 359 594 1 +578 335 417 731 1 +575 710 305 402 1 +623 651 360 378 1 +246 4 172 508 1 +39 519 302 715 1 +397 370 605 459 1 +471 663 76 606 1 +382 329 596 432 1 +502 316 701 641 1 +139 754 486 108 1 +551 509 95 704 1 +489 545 723 690 1 +747 341 495 623 1 +732 168 456 567 1 +507 693 675 313 1 +469 573 361 316 1 +564 32 250 117 1 +521 359 477 448 1 +321 502 568 425 1 +485 355 404 601 1 +449 706 587 359 1 +501 527 132 107 1 +422 573 747 341 1 +724 385 516 186 1 +286 197 113 420 1 +549 67 220 177 1 +527 650 625 339 1 +168 68 456 248 1 +211 16 206 403 1 +552 50 285 379 1 +658 389 471 315 1 +688 445 700 326 1 +486 754 528 373 1 +68 432 692 244 1 +388 736 443 613 1 +529 242 152 52 1 +631 743 307 512 1 +542 213 161 25 1 +45 146 128 396 1 +523 561 344 587 1 +494 748 402 454 1 +81 397 436 559 1 +369 478 497 61 1 +176 351 43 588 1 +664 279 450 115 1 +493 41 738 476 1 +256 63 193 746 1 +400 535 418 499 1 +600 696 344 445 1 +137 50 552 227 1 +494 466 710 344 1 +41 134 493 102 1 +12 488 269 420 1 +353 583 555 525 1 +15 518 185 208 1 +370 529 614 716 1 +209 58 506 262 1 +457 701 412 646 1 +141 187 427 399 1 +517 283 118 7 1 +409 364 475 522 1 +536 413 691 328 1 +634 633 722 98 1 +586 359 327 470 1 +418 451 542 74 1 +636 457 125 38 1 +103 674 485 42 1 +15 727 185 518 1 +479 362 332 459 1 +604 467 190 580 1 +102 493 497 384 1 +539 655 10 109 1 +138 300 297 622 1 +385 693 338 516 1 +406 597 362 332 1 +318 558 427 639 1 +631 645 407 390 1 +397 370 742 605 1 +113 717 282 537 1 +333 408 532 672 1 +507 696 319 737 1 +75 544 203 289 1 +440 225 616 518 1 +210 413 110 536 1 +398 91 539 10 1 +418 213 221 74 1 +414 254 665 90 1 +685 395 677 314 1 +483 356 433 309 1 +366 535 474 326 1 +273 112 717 113 1 +500 464 328 536 1 +99 89 240 751 1 +363 54 527 107 1 +662 452 377 414 1 +623 522 360 409 1 +731 235 374 53 1 +503 57 148 154 1 +602 505 434 22 1 +576 609 458 333 1 +393 538 47 148 1 +47 393 148 154 1 +94 241 572 650 1 +418 556 428 708 1 +289 175 421 258 1 +601 126 412 143 1 +210 413 29 110 1 +245 176 43 93 1 +314 567 677 456 1 +462 643 370 334 1 +643 462 443 438 1 +513 621 374 235 1 +174 381 490 628 1 +552 436 566 331 1 +687 465 559 40 1 +74 213 161 542 1 +179 554 29 210 1 +350 647 540 618 1 +237 692 612 640 1 +576 283 517 7 1 +352 376 455 311 1 +333 517 466 367 1 +648 461 158 610 1 +621 85 201 235 1 +416 357 531 312 1 +153 71 707 519 1 +370 334 614 529 1 +501 107 284 440 1 +549 330 513 374 1 +501 107 132 33 1 +260 408 118 33 1 +479 715 622 138 1 +717 51 282 537 1 +429 743 590 330 1 +186 524 184 63 1 +555 502 568 308 1 +230 460 120 604 1 +81 116 397 559 1 +548 313 706 449 1 +727 440 185 518 1 +421 175 390 258 1 +684 368 737 488 1 +640 697 375 504 1 +572 408 339 501 1 +103 485 167 42 1 +614 152 72 183 1 +461 141 158 255 1 +551 509 704 191 1 +613 360 623 443 1 +625 339 650 572 1 +380 1 216 88 1 +66 217 491 500 1 +202 504 472 44 1 +536 210 413 554 1 +39 124 297 121 1 +146 514 644 396 1 +573 383 491 316 1 +515 636 355 674 1 +489 723 308 690 1 +21 577 93 401 1 +492 445 688 326 1 +600 445 531 312 1 +168 456 395 248 1 +421 743 512 330 1 +15 225 518 105 1 +396 514 644 654 1 +521 609 477 369 1 +361 573 328 500 1 +751 26 240 431 1 +288 741 176 164 1 +439 558 348 699 1 +331 411 436 480 1 +230 296 120 460 1 +478 369 511 160 1 +569 641 383 435 1 +151 745 576 426 1 +296 56 392 294 1 +185 563 122 474 1 +328 571 341 573 1 +485 682 404 355 1 +439 318 348 558 1 +541 439 318 594 1 +476 470 399 327 1 +157 217 500 87 1 +380 216 630 67 1 +581 633 36 264 1 +462 370 605 742 1 +110 52 529 183 1 +501 363 440 319 1 +200 262 87 464 1 +249 2 436 81 1 +508 4 375 640 1 +99 751 585 533 1 +382 456 450 757 1 +487 550 349 575 1 +626 422 641 322 1 +313 426 524 675 1 +655 528 373 439 1 +575 446 367 719 1 +143 126 412 8 1 +663 658 419 389 1 +45 458 128 155 1 +45 396 136 146 1 +645 175 390 421 1 +485 552 629 379 1 +442 321 358 530 1 +662 596 425 357 1 +460 332 392 562 1 +143 92 404 42 1 +493 169 134 41 1 +590 360 443 651 1 +619 364 526 475 1 +527 54 132 107 1 +519 211 71 403 1 +450 30 205 757 1 +716 614 72 183 1 +564 387 435 322 1 +188 115 57 584 1 +684 498 386 492 1 +511 160 61 155 1 +569 641 435 722 1 +23 513 549 589 1 +81 116 559 170 1 +246 4 640 237 1 +321 685 430 425 1 +185 563 474 363 1 +652 13 377 553 1 +167 404 92 42 1 +633 442 646 345 1 +695 106 570 28 1 +102 493 738 497 1 +494 600 531 312 1 +536 691 424 328 1 +31 390 645 175 1 +318 399 352 470 1 +352 615 519 403 1 +31 632 645 390 1 +530 463 164 38 1 +359 678 477 448 1 +682 331 629 485 1 +573 316 469 637 1 +40 170 249 559 1 +318 439 444 594 1 +649 20 166 184 1 +316 569 491 412 1 +194 478 738 476 1 +527 501 132 650 1 +397 605 306 362 1 +741 567 176 351 1 +430 685 677 314 1 +564 293 209 117 1 +603 740 480 306 1 +407 509 95 551 1 +130 666 273 197 1 +411 749 676 140 1 +324 503 539 393 1 +397 459 605 362 1 +542 617 472 415 1 +333 517 458 576 1 +409 512 613 335 1 +694 522 561 347 1 +23 177 130 589 1 +16 441 285 145 1 +729 693 498 706 1 +148 539 10 668 1 +526 555 308 422 1 +627 583 378 341 1 +369 478 61 160 1 +744 128 592 458 1 +413 691 742 529 1 +489 555 308 723 1 +560 511 45 142 1 +336 548 468 419 1 +206 71 403 721 1 +511 369 458 155 1 +456 432 596 395 1 +350 428 602 619 1 +516 65 106 186 1 +245 588 401 93 1 +481 323 548 419 1 +589 473 549 177 1 +81 397 29 179 1 +308 414 690 626 1 +133 91 398 10 1 +410 356 406 320 1 +277 84 260 620 1 +102 61 270 497 1 +292 233 99 424 1 +113 510 717 537 1 +659 508 59 163 1 +536 210 554 500 1 +461 610 714 398 1 +532 283 576 7 1 +584 115 450 30 1 +382 659 205 450 1 +636 463 457 38 1 +440 688 363 474 1 +180 69 228 656 1 +153 39 211 519 1 +372 505 595 647 1 +534 168 567 395 1 +452 703 414 358 1 +483 309 433 629 1 +636 355 601 457 1 +374 201 540 53 1 +382 596 314 456 1 +753 21 515 674 1 +544 335 513 421 1 +401 629 515 355 1 +198 276 37 556 1 +197 666 510 661 1 +725 547 189 698 1 +461 158 91 255 1 +102 497 271 61 1 +336 481 548 419 1 +672 319 737 507 1 +666 365 510 661 1 +469 438 341 627 1 +558 320 615 403 1 +539 538 148 10 1 +39 715 302 371 1 +372 611 647 310 1 +424 736 585 751 1 +122 535 474 563 1 +165 373 754 108 1 +746 426 524 63 1 +5 200 464 739 1 +385 426 524 746 1 +523 304 561 587 1 +141 705 35 255 1 +9 198 578 400 1 +578 198 556 400 1 +658 323 481 419 1 +587 718 706 342 1 +498 706 386 718 1 +498 718 386 307 1 +745 497 426 151 1 +702 728 499 317 1 +153 715 302 519 1 +314 550 402 454 1 +112 24 131 419 1 +484 728 499 702 1 +149 562 173 459 1 +466 448 710 344 1 +340 602 434 670 1 +617 161 542 74 1 +530 685 358 395 1 +487 349 550 391 1 +499 531 347 445 1 +552 436 331 411 1 +535 78 213 192 1 +405 543 312 375 1 +388 89 585 751 1 +474 363 700 326 1 +506 434 322 595 1 +566 404 92 167 1 +555 522 747 364 1 +395 168 248 14 1 +672 385 423 724 1 +365 323 389 510 1 +744 592 48 517 1 +249 170 81 559 1 +447 587 359 342 1 +695 570 196 28 1 +113 510 537 286 1 +391 584 349 450 1 +232 389 663 510 1 +648 610 142 354 1 +378 462 406 306 1 +606 238 287 76 1 +396 644 458 367 1 +314 550 454 382 1 +376 449 470 327 1 +693 706 507 386 1 +469 438 627 306 1 +375 4 199 697 1 +284 620 267 84 1 +702 556 317 400 1 +33 277 408 501 1 +495 310 611 372 1 +472 377 683 489 1 +493 725 547 134 1 +25 542 366 656 1 +311 455 597 394 1 +590 365 389 473 1 +378 462 437 406 1 +362 559 480 397 1 +591 607 101 608 1 +266 79 200 739 1 +489 329 662 357 1 +602 247 252 70 1 +590 365 473 330 1 +550 659 382 450 1 +391 677 487 324 1 +60 123 467 239 1 +573 316 422 641 1 +542 161 415 228 1 +415 161 44 228 1 +70 252 673 250 1 +354 477 712 369 1 +394 467 604 580 1 +90 250 387 32 1 +90 387 254 32 1 +118 260 83 408 1 +465 676 121 211 1 +594 439 444 343 1 +165 10 207 655 1 +684 695 338 488 1 +203 513 289 421 1 +157 210 536 500 1 +336 467 547 493 1 +318 558 352 427 1 +13 377 553 451 1 +487 677 314 709 1 +497 327 478 369 1 +500 210 554 66 1 +87 262 263 383 1 +618 475 350 647 1 +261 588 482 43 1 +626 641 435 322 1 +459 173 116 251 1 +165 482 588 43 1 +179 397 29 554 1 +619 428 545 317 1 +680 505 195 540 1 +527 501 650 339 1 +706 313 587 359 1 +280 164 463 38 1 +600 445 344 531 1 +335 421 512 513 1 +713 500 491 361 1 +563 700 363 405 1 +674 601 355 485 1 +581 442 646 633 1 +214 279 664 115 1 +258 589 73 661 1 +129 652 377 86 1 +591 669 379 486 1 +739 372 328 424 1 +420 488 338 628 1 +131 468 189 51 1 +77 264 442 234 1 +465 124 121 687 1 +596 358 395 432 1 +702 326 400 499 1 +633 665 36 414 1 +527 132 625 650 1 +686 144 703 452 1 +42 601 404 143 1 +33 408 572 501 1 +530 457 463 38 1 +583 522 341 555 1 +368 492 688 726 1 +377 690 553 340 1 +591 379 139 486 1 +349 503 393 514 1 +168 68 244 456 1 +310 647 618 374 1 +474 700 363 563 1 +369 155 745 576 1 +655 324 373 482 1 +142 354 511 648 1 +437 599 332 462 1 +717 419 537 510 1 +438 462 623 378 1 +615 455 371 311 1 +378 735 623 522 1 +1 182 657 295 1 +532 283 517 576 1 +11 593 150 376 1 +648 158 142 610 1 +79 431 751 240 1 +411 331 552 483 1 +464 262 87 383 1 +521 477 327 369 1 +582 351 677 430 1 +356 627 740 583 1 +443 549 388 330 1 +349 514 446 664 1 +401 520 679 355 1 +185 54 122 563 1 +485 404 167 42 1 +580 419 663 346 1 +638 69 199 181 1 +102 493 271 738 1 +719 572 453 546 1 +684 737 338 695 1 +667 482 503 668 1 +487 582 677 709 1 +486 629 515 401 1 +176 164 463 93 1 +135 546 268 644 1 +382 508 375 640 1 +530 671 395 358 1 +561 522 304 624 1 +662 596 358 425 1 +378 583 522 341 1 +500 464 383 328 1 +629 433 331 682 1 +425 709 314 430 1 +594 586 678 444 1 +5 739 292 266 1 +345 633 722 634 1 +382 375 454 329 1 +630 380 388 443 1 +578 156 243 544 1 +227 566 2 167 1 +381 184 166 65 1 +142 511 160 18 1 +456 68 244 432 1 +404 713 92 491 1 +512 335 631 421 1 +403 320 441 558 1 +410 594 470 447 1 +667 482 668 109 1 +537 381 729 323 1 +545 526 340 619 1 +540 431 647 505 1 +320 362 465 480 1 +658 346 481 437 1 +174 65 490 381 1 +495 372 464 322 1 +576 517 458 7 1 +688 326 518 726 1 +557 467 580 336 1 +723 340 690 545 1 +378 522 623 341 1 +473 177 130 265 1 +466 517 572 367 1 +426 151 270 63 1 +136 19 514 154 1 +512 360 590 429 1 +572 241 408 33 1 +740 637 433 583 1 +658 437 481 651 1 +396 592 128 458 1 +306 627 406 378 1 +290 530 164 38 1 +471 663 606 389 1 +557 376 336 449 1 +449 706 342 587 1 +642 114 432 248 1 +611 310 443 736 1 +593 399 352 721 1 +109 482 165 43 1 +176 588 43 93 1 +483 356 480 740 1 +479 604 460 752 1 +328 372 464 495 1 +449 587 342 359 1 +712 305 396 609 1 +383 641 322 435 1 +187 399 593 721 1 +198 556 400 78 1 +495 611 310 623 1 +554 716 29 413 1 +406 356 480 320 1 +594 359 470 447 1 +517 592 48 367 1 +543 312 357 416 1 +398 318 348 439 1 +666 510 273 197 1 +64 616 196 225 1 +463 530 321 457 1 +681 358 703 452 1 +391 567 677 351 1 +89 388 223 26 1 +202 96 612 504 1 +550 325 454 382 1 +409 522 694 347 1 +428 556 37 708 1 +290 77 530 442 1 +539 324 655 482 1 +614 370 72 562 1 +539 482 655 109 1 +408 532 517 333 1 +89 67 223 630 1 +402 325 550 575 1 +13 299 162 451 1 +506 564 435 322 1 +560 514 393 154 1 +435 209 82 236 1 +591 348 379 669 1 +432 671 358 395 1 +254 32 387 98 1 +136 396 560 514 1 +550 325 402 454 1 +438 742 462 306 1 +563 405 656 366 1 +123 394 291 715 1 +644 367 546 48 1 +356 309 483 541 1 +260 408 724 83 1 +27 452 144 686 1 +606 88 287 238 1 +256 746 186 63 1 +516 184 65 186 1 +386 344 696 561 1 +154 19 664 115 1 +194 478 298 738 1 +511 354 478 648 1 +185 54 363 107 1 +403 558 441 348 1 +459 562 332 479 1 +490 65 516 381 1 +512 360 330 590 1 +652 377 665 553 1 +757 456 30 244 1 +636 520 355 457 1 +321 442 358 568 1 +544 421 203 289 1 +502 641 412 345 1 +183 529 152 52 1 +326 551 407 400 1 +498 729 338 693 1 +91 705 579 133 1 +13 652 222 553 1 +694 307 484 492 1 +489 543 357 416 1 +615 371 406 597 1 +454 598 312 375 1 +650 241 572 33 1 +409 522 475 310 1 +59 659 446 214 1 +396 644 367 575 1 +644 446 367 575 1 +573 328 571 361 1 +133 49 207 528 1 +105 407 509 301 1 +548 323 468 419 1 +666 130 661 197 1 +206 71 721 187 1 +670 299 247 70 1 +384 493 547 134 1 +374 235 201 53 1 +9 578 97 730 1 +218 562 72 173 1 +519 615 676 403 1 +257 671 14 530 1 +352 707 593 721 1 +12 197 286 420 1 +674 601 485 42 1 +180 69 405 181 1 +412 569 491 143 1 +224 426 270 63 1 +633 345 646 634 1 +738 41 271 147 1 +739 536 292 424 1 +17 459 116 734 1 +640 4 504 237 1 +505 79 178 100 1 +665 377 414 553 1 +560 654 393 514 1 +535 366 418 499 1 +180 69 656 405 1 +451 418 337 545 1 +314 550 487 402 1 +611 443 310 623 1 +413 529 536 691 1 +546 659 59 163 1 +206 403 639 427 1 +698 467 725 547 1 +398 324 655 539 1 +438 378 627 306 1 +673 252 117 250 1 +425 357 709 525 1 +384 493 336 547 1 +681 703 144 452 1 +635 435 236 98 1 +125 457 601 126 1 +624 531 304 561 1 +555 502 425 568 1 +645 231 407 31 1 +118 241 517 744 1 +647 505 434 350 1 +426 224 524 63 1 +5 200 739 266 1 +409 475 618 310 1 +201 26 431 100 1 +490 381 516 628 1 +219 632 368 225 1 +462 392 332 370 1 +408 501 620 319 1 +5 536 292 739 1 +654 396 305 575 1 +603 469 740 306 1 +597 622 362 479 1 +661 365 510 420 1 +78 213 221 418 1 +442 502 646 345 1 +327 477 586 478 1 +745 369 576 426 1 +535 326 366 499 1 +409 360 623 613 1 +258 390 73 175 1 +403 639 427 558 1 +187 206 35 427 1 +664 349 503 584 1 +478 18 298 160 1 +320 441 676 403 1 +86 377 414 665 1 +11 376 150 169 1 +366 720 656 542 1 +295 1 496 657 1 +720 415 656 542 1 +744 241 517 48 1 +480 362 465 411 1 +80 168 732 567 1 +456 68 432 248 1 +406 356 447 378 1 +370 459 72 562 1 +338 628 695 516 1 +701 316 412 641 1 +334 643 443 438 1 +135 546 163 268 1 +25 161 542 228 1 +695 338 423 737 1 +585 630 89 388 1 +345 414 633 442 1 +338 488 420 684 1 +123 755 60 467 1 +696 386 507 448 1 +406 356 410 447 1 +226 13 162 451 1 +558 615 352 403 1 +675 369 333 609 1 +136 396 45 560 1 +331 566 485 404 1 +691 611 424 328 1 +421 743 631 512 1 +139 486 379 515 1 +345 633 435 722 1 +649 547 189 20 1 +447 304 653 587 1 +512 421 330 513 1 +84 620 253 260 1 +362 406 480 320 1 +522 623 747 310 1 +449 313 706 359 1 +462 605 406 306 1 +500 383 491 361 1 +563 535 474 366 1 +185 122 208 474 1 +677 582 487 324 1 +141 399 427 461 1 +149 479 460 562 1 +334 611 443 736 1 +527 363 339 598 1 +320 411 676 441 1 +754 655 207 373 1 +663 346 419 658 1 +411 749 465 676 1 +379 515 629 485 1 +411 140 676 441 1 +160 511 45 155 1 +513 85 621 235 1 +307 484 631 512 1 +646 701 412 345 1 +245 401 21 93 1 +465 749 121 676 1 +519 676 465 211 1 +520 637 316 502 1 +417 350 428 680 1 +519 403 676 211 1 +684 390 711 307 1 +601 412 404 143 1 +513 23 289 421 1 +498 507 338 386 1 +123 239 190 467 1 +12 259 488 628 1 +328 495 438 611 1 +631 407 484 726 1 +497 369 426 521 1 +432 671 395 248 1 +245 43 588 93 1 +496 216 630 380 1 +202 96 504 44 1 +504 96 4 171 1 +156 731 730 53 1 +437 597 311 406 1 +425 662 357 555 1 +151 745 278 576 1 +383 573 322 641 1 +34 112 273 510 1 +420 729 498 323 1 +741 351 588 463 1 +743 365 590 330 1 +66 500 491 713 1 +434 252 117 673 1 +686 703 36 414 1 +589 743 421 330 1 +411 552 379 483 1 +388 330 549 374 1 +618 409 335 702 1 +573 571 341 469 1 +197 420 510 113 1 +154 664 503 584 1 +366 418 542 535 1 +375 638 697 199 1 +556 276 418 78 1 +367 517 572 48 1 +584 115 664 450 1 +227 485 167 103 1 +537 381 628 729 1 +512 590 330 429 1 +475 647 434 350 1 +135 546 59 163 1 +139 486 21 108 1 +469 573 571 361 1 +499 484 326 445 1 +462 332 406 605 1 +554 397 716 413 1 +678 402 710 523 1 +415 228 44 171 1 +661 269 73 733 1 +78 400 535 556 1 +683 542 337 74 1 +526 723 308 555 1 +459 479 362 622 1 +496 242 152 529 1 +353 555 583 637 1 +81 116 29 397 1 +477 359 327 586 1 +560 396 654 514 1 +406 371 320 362 1 +563 54 527 363 1 +258 130 73 589 1 +75 243 156 544 1 +450 456 30 757 1 +493 134 384 102 1 +633 414 36 703 1 +488 695 616 368 1 +641 626 502 422 1 +397 436 179 81 1 +458 128 155 7 1 +277 107 284 501 1 +217 383 491 500 1 +392 332 370 562 1 +548 693 729 706 1 +539 538 393 148 1 +436 2 179 81 1 +493 376 150 476 1 +640 432 612 382 1 +154 19 514 664 1 +320 480 465 411 1 +188 115 584 30 1 +384 521 313 449 1 +420 729 338 498 1 +99 89 751 533 1 +423 385 338 516 1 +411 40 465 749 1 +585 242 496 529 1 +336 649 548 384 1 +698 468 189 131 1 +488 390 711 684 1 +375 405 598 312 1 +443 380 549 330 1 +63 151 193 746 1 +277 620 260 408 1 +492 484 445 326 1 +640 382 692 432 1 +425 358 395 596 1 +99 585 751 424 1 +559 436 603 397 1 +462 370 332 605 1 +373 669 486 401 1 +125 636 601 457 1 +596 382 454 329 1 +591 486 139 49 1 +79 431 240 100 1 +75 231 243 645 1 +42 126 601 143 1 +347 484 694 409 1 +143 569 204 8 1 +400 191 535 551 1 +721 519 71 403 1 +480 603 306 397 1 +17 149 173 459 1 +536 110 233 413 1 +393 503 148 154 1 +523 748 343 402 1 +464 303 87 200 1 +110 529 413 183 1 +410 615 352 558 1 +392 295 294 218 1 +466 448 507 333 1 +182 295 294 392 1 +520 353 502 321 1 +1 238 88 380 1 +440 616 368 518 1 +125 601 42 126 1 +731 374 335 618 1 +408 241 118 33 1 +692 212 432 68 1 +594 410 318 541 1 +214 659 446 664 1 +725 134 189 547 1 +158 91 610 461 1 +488 711 420 684 1 +405 69 638 181 1 +203 23 289 513 1 +677 567 391 456 1 +311 376 455 394 1 +514 503 393 154 1 +614 295 152 496 1 +245 43 108 588 1 +75 544 156 203 1 +557 481 437 750 1 +370 251 72 459 1 +334 462 643 438 1 +371 362 465 320 1 +372 736 431 647 1 +47 136 560 154 1 +724 256 253 83 1 +605 332 362 459 1 +468 649 166 381 1 +311 376 557 449 1 +670 602 673 70 1 +456 432 395 248 1 +546 325 508 453 1 +206 721 403 427 1 +189 20 166 649 1 +384 649 524 224 1 +583 624 522 555 1 +323 729 498 548 1 +207 528 754 373 1 +318 398 461 714 1 +206 721 427 187 1 +406 627 306 740 1 +589 177 130 473 1 +5 303 464 200 1 +223 621 85 201 1 +530 442 321 457 1 +23 589 549 177 1 +508 4 172 199 1 +550 325 446 575 1 +383 569 3 491 1 +391 677 314 487 1 +498 684 420 711 1 +575 654 446 349 1 +578 335 702 417 1 +403 211 71 206 1 +565 232 76 663 1 +232 663 565 112 1 +614 392 496 643 1 +306 603 571 397 1 +499 312 531 445 1 +15 518 208 105 1 +625 94 163 546 1 +531 357 454 312 1 +334 585 496 529 1 +520 433 316 637 1 +150 215 62 593 1 +415 472 504 44 1 +670 708 162 451 1 +290 234 530 38 1 +328 438 495 341 1 +643 657 392 496 1 +209 564 435 506 1 +673 564 250 117 1 +486 629 379 515 1 +446 659 59 546 1 +426 521 675 313 1 +605 406 306 480 1 +246 4 508 640 1 +391 503 324 487 1 +393 487 324 503 1 +277 408 501 620 1 +60 725 189 698 1 +272 104 646 574 1 +137 2 436 249 1 +526 340 723 545 1 +416 545 723 489 1 +407 231 301 31 1 +113 420 510 286 1 +452 612 432 329 1 +537 174 282 286 1 +316 641 502 422 1 +33 277 260 408 1 +693 729 338 516 1 +604 580 346 557 1 +401 520 355 636 1 +353 660 430 520 1 +509 407 95 301 1 +471 296 460 392 1 +230 460 471 296 1 +343 660 709 525 1 +327 738 497 478 1 +219 616 64 225 1 +40 411 137 140 1 +77 671 530 442 1 +451 377 553 340 1 +97 556 37 680 1 +627 637 740 583 1 +226 617 683 74 1 +13 553 222 451 1 +413 691 571 742 1 +408 600 466 339 1 +610 560 142 354 1 +147 478 298 160 1 +518 440 185 474 1 +187 399 62 593 1 +280 93 577 463 1 +350 505 434 602 1 +547 20 649 384 1 +489 357 308 555 1 +383 573 328 495 1 +555 422 502 308 1 +329 504 375 543 1 +657 471 643 392 1 +228 69 171 415 1 +543 504 375 415 1 +217 263 491 383 1 +644 514 446 654 1 +688 326 363 474 1 +350 602 434 619 1 +340 428 545 619 1 +340 619 526 434 1 +619 428 602 340 1 +707 721 62 593 1 +721 187 62 593 1 +153 519 211 71 1 +618 731 540 417 1 +425 353 430 321 1 +384 521 426 313 1 +654 575 305 487 1 +434 602 252 673 1 +543 312 416 720 1 +562 459 72 173 1 +384 493 497 738 1 +589 330 549 473 1 +665 686 36 414 1 +389 429 323 365 1 +400 499 418 317 1 +638 625 527 181 1 +559 603 480 397 1 +308 489 662 357 1 +393 654 560 712 1 +638 625 453 527 1 +157 303 536 5 1 +452 489 472 329 1 +663 232 76 606 1 +696 531 561 344 1 +662 329 596 357 1 +12 197 420 269 1 +369 511 61 155 1 +646 234 457 442 1 +646 104 234 442 1 +77 703 671 442 1 +684 307 498 492 1 +472 129 44 617 1 +565 663 419 112 1 +425 596 395 685 1 +386 696 347 561 1 +720 418 542 366 1 +452 377 472 489 1 +394 604 346 557 1 +604 580 24 346 1 +423 196 253 28 1 +84 196 253 423 1 +621 513 549 85 1 +223 621 549 85 1 +431 621 26 201 1 +374 431 647 540 1 +46 715 274 127 1 +292 424 99 266 1 +406 356 627 740 1 +629 433 355 520 1 +309 433 629 520 1 +540 680 350 417 1 +530 234 457 38 1 +290 234 442 530 1 +629 515 355 485 1 +685 358 395 425 1 +321 358 685 425 1 +353 555 637 422 1 +351 463 685 679 1 +583 624 555 525 1 +615 320 676 403 1 +654 514 446 349 1 +583 627 637 341 1 +425 685 430 314 1 +528 639 398 133 1 +498 307 386 492 1 +693 675 524 385 1 +559 116 459 170 1 +141 187 35 427 1 +483 433 331 629 1 +682 469 316 637 1 +553 690 673 340 1 +545 340 690 377 1 +37 159 428 247 1 +331 436 566 603 1 +671 358 530 442 1 +553 387 673 690 1 +525 709 343 402 1 +736 388 585 751 1 +376 557 394 311 1 +751 89 240 26 1 +620 423 616 84 1 +25 535 542 192 1 +68 642 432 248 1 +546 94 163 268 1 +493 41 271 738 1 +504 96 612 237 1 +507 385 675 693 1 +586 399 470 327 1 +752 394 346 557 1 +483 356 740 433 1 +516 381 524 693 1 +313 675 524 693 1 +372 79 178 505 1 +372 79 505 431 1 +22 100 195 505 1 +406 371 362 597 1 +597 394 557 311 1 +311 455 371 597 1 +6 172 453 163 1 +22 505 178 100 1 +573 422 322 641 1 +391 503 349 584 1 +638 69 697 199 1 +415 504 375 697 1 +493 476 738 327 1 +697 4 199 171 1 +27 612 642 452 1 +554 436 179 397 1 +671 395 248 14 1 +603 436 554 397 1 +571 397 603 554 1 +741 395 567 351 1 +337 451 683 74 1 +567 741 534 395 1 +683 377 451 337 1 +559 436 480 603 1 +603 436 566 361 1 +480 331 603 436 1 +324 398 714 539 1 +697 504 4 171 1 +379 483 331 629 1 +437 481 342 750 1 +694 484 512 409 1 +229 2 179 436 1 +567 168 456 395 1 +23 549 220 177 1 +472 612 452 329 1 +612 432 329 382 1 +334 496 630 643 1 +432 382 692 244 1 +433 583 637 353 1 +403 441 676 16 1 +367 644 592 48 1 +133 398 528 655 1 +280 164 93 463 1 +390 589 421 258 1 +222 299 553 670 1 +370 716 72 251 1 +15 267 440 225 1 +617 161 44 415 1 +15 440 267 284 1 +621 549 513 374 1 +542 161 617 415 1 +437 752 346 557 1 +355 682 629 485 1 +310 372 495 647 1 +540 647 350 505 1 +484 347 499 728 1 +728 416 347 499 1 +728 624 347 416 1 +709 660 430 525 1 +647 372 495 475 1 +621 223 26 201 1 +516 729 338 628 1 +284 440 267 620 1 +647 372 505 431 1 +690 414 553 387 1 +690 387 673 340 1 +705 427 35 639 1 +680 556 37 428 1 +662 308 357 555 1 +569 204 3 143 1 +491 569 3 143 1 +494 531 454 312 1 +485 601 404 42 1 +444 439 324 343 1 +506 595 322 372 1 +715 138 274 127 1 +479 138 274 715 1 +478 147 61 160 1 +578 417 97 730 1 +637 422 502 353 1 +515 636 401 355 1 +405 697 415 375 1 +550 325 382 659 1 +701 412 316 404 1 +86 377 665 652 1 +288 14 534 741 1 +660 583 433 353 1 +135 214 59 446 1 +726 390 407 632 1 +683 617 542 74 1 +162 281 226 451 1 +451 281 226 74 1 +13 299 451 222 1 +446 19 135 214 1 +165 655 754 373 1 +553 90 222 250 1 +645 632 407 390 1 +641 345 502 626 1 +237 612 504 640 1 +529 152 614 183 1 +471 392 599 315 1 +466 600 344 494 1 +348 441 607 591 1 +339 600 466 494 1 +599 346 658 437 1 +441 607 591 145 1 +598 600 494 312 1 +441 16 607 145 1 +486 49 528 754 1 +140 50 285 552 1 +583 353 660 525 1 +205 279 30 450 1 +450 279 30 115 1 +15 440 727 518 1 +646 321 457 502 1 +652 553 665 90 1 +665 553 414 90 1 +660 353 433 520 1 +309 660 433 520 1 +639 705 398 133 1 +568 308 662 425 1 +512 360 613 330 1 +614 643 496 334 1 +613 360 443 330 1 +388 443 330 613 1 +27 202 452 86 1 +202 129 452 86 1 +452 129 377 86 1 +640 612 329 382 1 +314 487 550 391 1 +628 106 695 516 1 +314 550 456 391 1 +451 670 340 553 1 +639 591 101 608 1 +206 403 101 639 1 +651 378 437 342 1 +528 101 639 133 1 +206 101 579 639 1 +679 520 629 355 1 +11 455 153 215 1 +422 637 573 341 1 +417 618 335 702 1 +31 632 733 119 1 +733 632 390 119 1 +484 335 631 512 1 +639 579 705 133 1 +398 705 91 133 1 +84 616 196 423 1 +437 332 597 406 1 +712 609 396 458 1 +440 423 616 620 1 +642 432 114 671 1 +125 38 457 126 1 +272 457 38 126 1 +272 234 38 457 1 +465 687 121 749 1 +406 740 306 480 1 +200 262 464 58 1 +731 618 335 417 1 +386 694 347 492 1 +663 232 606 389 1 +483 480 331 740 1 +420 174 537 286 1 +573 637 469 341 1 +739 424 292 266 1 +614 496 152 529 1 +47 560 393 154 1 +47 136 142 560 1 +378 735 342 651 1 +389 323 658 419 1 +389 658 323 429 1 +394 580 604 557 1 +315 599 658 437 1 +122 25 563 180 1 +185 54 563 363 1 +325 710 719 575 1 +715 46 291 127 1 +380 88 606 238 1 +511 478 160 648 1 +277 620 284 84 1 +405 415 543 375 1 +1 657 380 496 1 +563 25 192 366 1 +657 182 392 295 1 +54 180 122 563 1 +295 657 496 392 1 +12 488 420 628 1 +232 606 287 76 1 +362 480 306 397 1 +190 580 24 604 1 +502 701 412 641 1 +539 503 148 393 1 +523 304 344 561 1 +601 457 701 412 1 +489 308 662 377 1 +633 646 581 634 1 +255 35 91 705 1 +23 130 258 589 1 +589 23 289 258 1 +421 589 289 258 1 +555 568 425 308 1 +453 625 163 546 1 +416 531 347 499 1 +462 742 605 306 1 +321 502 442 568 1 +149 56 173 562 1 +39 465 297 124 1 +39 124 121 465 1 +438 462 443 623 1 +560 511 142 354 1 +741 685 530 395 1 +518 474 185 208 1 +601 126 457 412 1 +669 309 679 582 1 +376 455 394 467 1 +467 455 394 123 1 +467 394 291 123 1 +190 467 291 123 1 +605 332 406 362 1 +704 756 95 551 1 +9 756 400 578 1 +756 551 191 400 1 +704 551 191 756 1 +756 407 95 551 1 +439 582 324 343 1 +737 696 319 492 1 +595 505 434 647 1 +452 129 683 377 1 +452 683 472 377 1 +129 683 377 652 1 +683 377 337 489 1 +531 696 347 445 1 +410 470 311 447 1 +447 470 311 449 1 +376 311 470 449 1 +135 644 268 48 1 +403 441 607 348 1 +481 651 429 658 1 +182 296 471 392 1 +145 139 608 49 1 +403 16 607 441 1 +450 659 446 550 1 +227 485 566 167 1 +227 552 566 485 1 +552 566 485 331 1 +2 566 92 167 1 +230 346 471 460 1 +714 444 439 324 1 +456 596 314 395 1 +550 450 456 391 1 +380 473 88 177 1 +473 265 88 177 1 +206 607 101 403 1 +206 16 607 403 1 +188 80 391 667 1 +313 384 649 524 1 +521 448 477 609 1 +486 49 591 528 1 +591 145 608 49 1 +382 375 329 640 1 +674 125 577 636 1 +616 225 368 518 1 +531 344 696 445 1 +696 492 445 319 1 +708 556 37 221 1 +197 510 273 113 1 +615 371 320 406 1 +363 527 501 107 1 +494 402 325 454 1 +720 542 337 415 1 +458 155 576 7 1 +720 415 543 405 1 +720 543 312 405 1 +747 364 522 475 1 +109 655 165 482 1 +599 392 332 462 1 +150 476 194 41 1 +150 476 62 194 1 +476 399 62 194 1 +495 438 611 623 1 +318 594 586 470 1 +460 392 332 599 1 +376 470 476 327 1 +588 582 679 351 1 +92 713 229 66 1 +371 302 622 715 1 +430 520 309 679 1 +587 561 344 386 1 +712 369 609 458 1 +327 477 478 369 1 +511 369 712 458 1 +511 712 396 458 1 +634 722 635 98 1 +476 399 478 327 1 +649 20 184 224 1 +536 739 328 424 1 +384 20 649 224 1 +381 649 166 184 1 +336 468 548 649 1 +378 623 438 341 1 +17 275 459 479 1 +459 149 479 275 1 +149 275 274 479 1 +479 275 274 138 1 +716 413 370 529 1 +183 413 716 529 1 +716 183 29 413 1 +370 459 397 716 1 +554 397 29 716 1 +370 614 72 716 1 +459 116 397 716 1 +716 529 614 183 1 +605 332 459 370 1 +512 429 330 743 1 +46 149 274 479 1 +549 177 380 67 1 +549 513 220 85 1 +654 487 305 444 1 +388 613 330 374 1 +512 513 330 613 1 +331 483 411 480 1 +483 320 411 480 1 +320 356 480 483 1 +176 741 588 463 1 +700 445 499 326 1 +188 732 391 80 1 +441 411 483 320 1 +616 695 196 423 1 +550 450 382 456 1 +314 550 382 456 1 +261 351 43 567 1 +567 351 43 176 1 +567 391 482 351 1 +77 671 257 530 1 +653 525 343 523 1 +711 661 743 390 1 +223 630 549 388 1 +430 679 309 582 1 +387 90 553 250 1 +661 197 73 269 1 +257 671 248 14 1 +103 674 515 485 1 +500 554 571 361 1 +678 402 305 710 1 +674 636 355 601 1 +517 458 592 367 1 +631 421 645 390 1 +736 310 443 613 1 +6 625 638 181 1 +12 628 286 174 1 +324 487 444 343 1 +393 444 324 487 1 +356 583 447 378 1 +474 55 551 535 1 +12 259 269 488 1 +269 488 259 119 1 +488 119 64 259 1 +219 119 64 488 1 +581 254 36 633 1 +568 662 358 425 1 +419 510 663 389 1 +706 313 507 386 1 +702 326 407 400 1 +544 513 203 421 1 +156 203 544 235 1 +75 175 231 645 1 +324 714 393 539 1 +33 277 501 107 1 +444 714 393 324 1 +444 714 354 393 1 +683 13 451 377 1 +316 491 404 412 1 +404 412 491 143 1 +143 92 491 404 1 +398 714 439 324 1 +398 538 714 539 1 +493 476 150 41 1 +169 493 150 41 1 +169 376 150 493 1 +376 169 467 493 1 +722 641 435 345 1 +384 449 313 548 1 +376 467 336 493 1 +449 376 336 493 1 +449 493 336 384 1 +327 493 449 384 1 +327 376 449 493 1 +444 354 712 393 1 +102 41 271 493 1 +576 155 278 7 1 +151 576 278 7 1 +576 151 193 7 1 +637 353 502 520 1 +111 382 757 244 1 +612 96 212 237 1 +202 504 612 472 1 +202 612 452 472 1 +472 504 612 329 1 +494 710 402 748 1 +304 748 523 344 1 +561 531 748 344 1 +561 531 304 748 1 +574 412 126 8 1 +644 546 268 48 1 +295 1 152 496 1 +496 1 152 242 1 +242 1 216 496 1 +318 399 470 586 1 +322 595 434 475 1 +318 586 461 399 1 +524 649 184 224 1 +410 615 320 406 1 +555 624 522 364 1 +583 304 522 624 1 +497 384 426 224 1 +497 426 270 224 1 +102 497 270 224 1 +102 384 497 224 1 +739 79 200 372 1 +464 200 372 739 1 +536 464 328 739 1 +464 372 328 739 1 +581 442 104 646 1 +403 721 352 427 1 +601 412 701 404 1 +626 345 502 568 1 +686 703 414 452 1 +500 263 383 87 1 +500 464 87 383 1 +500 303 87 464 1 +323 718 498 429 1 +419 537 468 51 1 +113 537 282 286 1 +51 537 166 174 1 +157 210 500 66 1 +157 303 87 500 1 +217 263 383 500 1 +409 728 522 347 1 +542 415 656 228 1 +398 348 528 439 1 +25 656 563 180 1 +433 469 682 637 1 +180 405 656 563 1 +322 573 383 495 1 +156 235 731 53 1 +638 405 181 527 1 +521 327 497 369 1 +610 538 47 393 1 +449 521 313 359 1 +353 502 321 425 1 +393 487 503 349 1 +391 349 503 487 1 +737 319 688 492 1 +233 585 99 424 1 +479 394 604 752 1 +529 585 233 424 1 +139 21 486 515 1 +401 486 21 515 1 +39 519 465 211 1 +237 96 4 504 1 +335 513 512 613 1 +335 513 613 374 1 +640 375 329 504 1 +613 513 330 374 1 +409 360 613 512 1 +372 464 322 506 1 +383 506 322 464 1 +383 262 506 464 1 +383 262 263 506 1 +506 262 263 82 1 +383 506 263 82 1 +435 506 383 82 1 +209 506 435 82 1 +209 262 506 82 1 +664 659 446 450 1 +154 514 503 664 1 +664 19 446 214 1 +435 506 322 383 1 +384 738 497 327 1 +673 602 252 70 1 +356 660 541 653 1 +660 525 343 653 1 +660 309 582 430 1 +726 684 632 368 1 +453 508 375 325 1 +508 375 325 454 1 +382 508 325 454 1 +382 375 508 454 1 +204 435 82 635 1 +508 172 163 453 1 +59 172 163 508 1 +518 407 632 726 1 +660 430 582 343 1 +59 246 172 508 1 +420 365 510 323 1 +425 308 662 555 1 +584 503 57 667 1 +188 584 57 667 1 +261 391 667 482 1 +391 482 503 667 1 +700 600 312 445 1 +232 389 510 34 1 +478 369 354 511 1 +715 455 127 123 1 +411 40 749 140 1 +640 4 697 504 1 +338 695 423 516 1 +738 478 298 147 1 +478 738 497 147 1 +423 695 196 28 1 +516 695 423 28 1 +219 632 64 368 1 +632 488 64 368 1 +219 518 632 225 1 +105 518 632 219 1 +340 428 451 545 1 +597 371 622 479 1 +203 85 513 235 1 +337 545 416 489 1 +707 187 62 721 1 +532 256 724 83 1 +721 71 707 187 1 +622 302 297 138 1 +622 300 297 124 1 +522 341 747 623 1 +532 576 193 7 1 +560 610 47 393 1 +223 67 549 630 1 +328 691 571 413 1 +587 386 313 706 1 +425 525 430 353 1 +25 542 213 192 1 +704 756 191 400 1 +150 593 62 476 1 +11 215 150 593 1 +399 476 62 593 1 +118 241 408 517 1 +453 638 527 598 1 +561 748 304 344 1 +547 134 189 20 1 +466 408 339 517 1 +333 408 466 517 1 +522 728 624 347 1 +15 225 440 518 1 +472 617 44 415 1 +89 630 223 388 1 +77 689 257 671 1 +442 633 581 264 1 +459 116 716 251 1 +716 116 29 251 1 +370 459 716 251 1 +39 153 302 519 1 +637 555 341 422 1 +730 731 417 540 1 +195 159 680 97 1 +258 661 73 390 1 +258 589 661 390 1 +6 199 181 638 1 +521 327 477 359 1 +449 327 521 359 1 +384 327 521 449 1 +384 327 497 521 1 +497 521 426 384 1 +562 479 460 332 1 +422 316 573 637 1 +548 381 729 693 1 +556 400 535 418 1 +562 332 370 459 1 +494 531 748 454 1 +672 507 423 385 1 +556 276 37 221 1 +627 356 406 378 1 +56 562 218 173 1 +648 478 160 18 1 +322 372 595 475 1 +373 582 679 588 1 +401 679 629 355 1 +186 385 516 524 1 +186 516 184 524 1 +524 184 65 516 1 +381 524 65 516 1 +381 184 65 524 1 +572 339 650 501 1 +678 523 710 448 1 +325 494 710 402 1 +676 749 121 140 1 +542 535 213 192 1 +556 418 317 400 1 +25 366 542 535 1 +31 645 231 175 1 +361 573 491 316 1 +473 365 743 330 1 +181 54 132 527 1 +308 626 502 568 1 +639 101 579 133 1 +403 607 101 639 1 +181 54 527 405 1 +308 568 414 626 1 +390 743 421 589 1 +489 545 690 377 1 +362 605 306 480 1 +133 528 101 49 1 +396 146 128 592 1 +644 19 664 514 1 +567 395 314 677 1 +110 529 233 413 1 +468 537 166 51 1 +6 625 453 638 1 +568 442 414 345 1 +692 612 212 237 1 +642 612 432 452 1 +110 52 233 529 1 +86 686 414 452 1 +384 493 738 327 1 +408 319 672 466 1 +467 169 60 725 1 +290 77 257 530 1 +290 530 257 164 1 +288 257 530 164 1 +397 742 306 605 1 +691 334 438 742 1 +27 452 686 86 1 +413 742 370 529 1 +672 507 333 466 1 +288 257 14 530 1 +408 672 333 466 1 +416 312 531 499 1 +625 94 453 572 1 +418 276 556 221 1 +429 360 590 651 1 +339 625 453 572 1 +625 132 527 181 1 +698 467 60 725 1 +83 283 408 532 1 +408 283 118 532 1 +532 283 118 517 1 +408 532 118 517 1 +83 193 283 532 1 +83 256 193 532 1 +223 388 549 621 1 +316 422 502 637 1 +555 522 341 747 1 +586 477 354 478 1 +534 168 395 14 1 +568 345 502 442 1 +25 366 535 192 1 +122 192 474 535 1 +474 192 55 535 1 +535 191 192 55 1 +227 552 485 103 1 +411 552 137 140 1 +678 359 523 448 1 +78 191 535 400 1 +78 191 192 535 1 +454 312 357 543 1 +454 375 312 543 1 +413 529 233 536 1 +5 110 233 536 1 +5 233 292 536 1 +157 303 500 536 1 +500 303 464 536 1 +510 323 537 420 1 +473 177 380 549 1 +468 381 166 537 1 +419 323 468 537 1 +419 537 510 323 1 +323 706 718 429 1 +706 718 429 481 1 +718 342 429 481 1 +718 694 386 307 1 +537 51 282 174 1 +486 669 379 629 1 +379 669 483 629 1 +398 91 538 539 1 +25 542 656 228 1 +228 69 415 656 1 +377 340 451 545 1 +201 431 374 540 1 +399 648 478 586 1 +648 141 461 399 1 +540 431 505 100 1 +201 431 540 100 1 +595 293 506 564 1 +595 293 564 117 1 +397 116 459 559 1 +559 459 362 170 1 +515 674 355 485 1 +589 130 73 661 1 +661 390 488 119 1 +595 178 117 22 1 +505 178 595 22 1 +434 595 564 117 1 +661 130 73 197 1 +418 451 337 542 1 +80 732 391 567 1 +442 414 633 703 1 +618 613 374 335 1 +337 542 472 415 1 +519 721 707 352 1 +380 606 643 657 1 +472 504 543 415 1 +472 504 329 543 1 +472 489 543 329 1 +329 543 357 489 1 +329 454 357 543 1 +472 489 337 543 1 +732 584 456 30 1 +456 168 732 244 1 +456 732 30 244 1 +111 246 640 237 1 +111 246 382 640 1 +619 602 434 340 1 +335 513 374 544 1 +260 724 253 83 1 +691 334 424 611 1 +377 545 451 337 1 +377 489 545 337 1 +356 660 653 583 1 +660 309 430 520 1 +135 446 59 546 1 +748 525 343 402 1 +102 134 384 547 1 +102 547 384 20 1 +102 134 547 20 1 +572 501 650 33 1 +468 548 381 537 1 +548 323 381 537 1 +468 323 548 537 1 +9 578 730 156 1 +223 549 220 85 1 +223 67 220 549 1 +23 513 220 549 1 +590 360 330 443 1 +590 380 443 330 1 +443 380 388 549 1 +746 151 193 576 1 +450 550 446 349 1 +660 353 430 525 1 +474 535 551 326 1 +326 535 551 400 1 +518 474 551 326 1 +551 208 474 518 1 +509 208 551 518 1 +105 509 551 518 1 +105 551 407 518 1 +105 509 407 551 1 +55 208 551 509 1 +551 55 509 191 1 +55 208 474 551 1 +441 552 285 379 1 +411 552 441 379 1 +140 411 552 441 1 +140 552 285 441 1 +207 528 49 754 1 +485 552 379 515 1 +571 742 397 413 1 +691 334 742 529 1 +594 653 343 523 1 +447 653 523 587 1 +229 436 179 554 1 +398 538 610 714 1 +230 346 604 24 1 +387 626 345 435 1 +337 720 545 418 1 +572 94 453 546 1 +28 256 724 186 1 +724 256 385 186 1 +425 357 525 555 1 +425 555 525 353 1 +353 502 425 555 1 +353 422 502 555 1 +584 450 391 456 1 +523 748 710 344 1 +526 364 555 422 1 +494 710 748 344 1 +206 579 35 639 1 +390 661 733 119 1 +661 269 733 119 1 +97 198 556 417 1 +690 414 387 626 1 +417 428 317 556 1 +428 418 317 556 1 +690 414 377 553 1 +97 198 37 556 1 +563 366 700 405 1 +474 366 700 563 1 +187 399 721 427 1 +721 399 352 427 1 +688 700 363 326 1 +616 267 196 225 1 +352 558 470 410 1 +558 318 470 410 1 +541 318 558 410 1 +474 700 366 326 1 +352 318 470 558 1 +249 411 559 436 1 +436 411 559 480 1 +559 411 362 480 1 +411 362 465 559 1 +440 518 688 474 1 +518 326 688 474 1 +411 559 465 40 1 +411 40 249 559 1 +560 136 514 154 1 +328 611 424 372 1 +142 648 511 18 1 +616 695 423 737 1 +623 443 360 651 1 +597 752 394 479 1 +666 130 589 661 1 +165 588 108 43 1 +149 56 562 460 1 +56 562 460 296 1 +562 392 460 296 1 +56 392 562 296 1 +56 392 294 562 1 +562 392 294 218 1 +56 562 294 218 1 +311 615 406 597 1 +410 320 615 558 1 +563 192 535 366 1 +122 192 535 563 1 +122 25 192 563 1 +563 54 180 405 1 +405 54 527 563 1 +209 32 236 564 1 +564 32 236 387 1 +435 564 236 387 1 +209 564 236 435 1 +506 293 209 564 1 +596 454 314 357 1 +506 564 322 434 1 +683 451 226 74 1 +566 137 2 436 1 +552 137 566 436 1 +227 137 566 552 1 +227 137 2 566 1 +261 567 43 176 1 +261 534 567 176 1 +742 462 370 334 1 +438 462 742 334 1 +571 438 306 742 1 +742 334 370 529 1 +261 80 567 534 1 +80 168 567 534 1 +261 80 391 567 1 +261 391 482 567 1 +642 432 358 452 1 +435 383 569 82 1 +569 383 263 82 1 +204 569 263 82 1 +204 435 569 82 1 +204 569 3 263 1 +569 383 3 263 1 +316 383 491 569 1 +485 552 331 629 1 +629 552 331 379 1 +571 397 554 413 1 +500 413 571 554 1 +536 413 571 500 1 +536 571 328 500 1 +536 413 328 571 1 +692 382 111 244 1 +589 743 661 390 1 +571 438 469 306 1 +571 438 341 469 1 +340 670 428 602 1 +328 438 341 571 1 +517 241 572 48 1 +572 241 268 48 1 +546 572 268 48 1 +546 367 572 48 1 +572 94 546 268 1 +241 94 572 268 1 +408 241 572 517 1 +408 572 339 517 1 +466 517 339 572 1 +573 383 328 500 1 +361 383 573 500 1 +361 383 491 573 1 +680 505 602 22 1 +498 684 711 307 1 +498 711 429 307 1 +396 575 367 305 1 +133 398 655 10 1 +398 528 655 439 1 +31 632 407 645 1 +757 382 205 450 1 +532 256 193 746 1 +746 576 193 532 1 +63 151 746 426 1 +369 155 576 458 1 +186 746 524 63 1 +433 353 637 520 1 +578 556 417 400 1 +568 358 414 703 1 +581 646 104 634 1 +578 198 417 556 1 +578 198 97 417 1 +730 578 417 731 1 +156 731 578 730 1 +9 156 243 578 1 +91 35 579 705 1 +9 198 97 578 1 +541 410 558 699 1 +356 699 410 541 1 +669 439 348 699 1 +558 699 441 348 1 +580 131 24 419 1 +239 131 24 580 1 +190 239 24 580 1 +467 239 190 580 1 +362 406 605 480 1 +394 467 580 557 1 +699 379 348 669 1 +441 699 379 348 1 +309 541 699 483 1 +336 419 580 481 1 +580 419 346 481 1 +710 523 344 448 1 +678 586 477 444 1 +678 444 477 305 1 +390 711 307 631 1 +118 744 517 7 1 +97 556 680 417 1 +494 339 719 466 1 +453 527 625 339 1 +346 460 752 599 1 +239 698 131 580 1 +698 336 468 419 1 +560 712 511 354 1 +349 575 654 487 1 +600 319 696 445 1 +375 638 453 598 1 +453 508 638 375 1 +12 628 174 490 1 +628 420 286 174 1 +154 503 57 584 1 +139 379 50 753 1 +139 379 753 515 1 +368 737 688 492 1 +437 597 752 557 1 +597 332 752 479 1 +597 394 752 557 1 +425 596 685 314 1 +501 107 727 363 1 +533 242 89 585 1 +332 597 752 437 1 +233 533 99 585 1 +585 52 233 533 1 +533 242 585 52 1 +585 242 529 52 1 +529 52 233 585 1 +479 752 460 332 1 +359 448 313 587 1 +691 438 571 742 1 +588 351 401 463 1 +159 428 602 680 1 +482 582 588 351 1 +261 351 482 588 1 +482 582 373 588 1 +22 680 159 602 1 +486 373 401 588 1 +486 588 401 108 1 +245 108 401 588 1 +486 373 588 108 1 +165 373 108 588 1 +165 482 373 588 1 +513 589 421 330 1 +23 589 421 513 1 +421 23 289 589 1 +517 744 458 7 1 +441 591 285 145 1 +145 591 285 139 1 +591 379 285 139 1 +441 379 285 591 1 +441 348 379 591 1 +745 155 278 576 1 +376 593 476 470 1 +476 593 399 470 1 +593 352 399 470 1 +376 352 593 470 1 +455 593 376 352 1 +37 281 708 221 1 +418 556 708 221 1 +221 281 708 74 1 +11 215 593 455 1 +11 593 376 455 1 +221 708 418 74 1 +418 708 451 74 1 +708 281 451 74 1 +412 641 722 345 1 +722 435 635 98 1 +722 633 435 98 1 +644 654 446 575 1 +541 439 594 343 1 +396 654 644 575 1 +566 713 92 404 1 +401 520 636 679 1 +318 594 470 410 1 +351 430 582 679 1 +505 595 434 22 1 +372 178 595 505 1 +372 79 595 178 1 +595 79 200 178 1 +58 595 200 178 1 +58 293 595 178 1 +595 293 117 178 1 +58 293 506 595 1 +595 464 506 58 1 +200 464 595 58 1 +200 464 372 595 1 +372 464 506 595 1 +372 79 200 595 1 +437 597 557 311 1 +485 552 753 103 1 +494 600 344 531 1 +405 363 527 598 1 +446 325 546 719 1 +453 325 375 598 1 +454 325 598 375 1 +454 325 494 598 1 +720 312 416 499 1 +139 21 515 753 1 +346 471 460 599 1 +471 392 460 599 1 +659 325 446 550 1 +405 69 697 638 1 +415 504 697 171 1 +415 69 171 697 1 +408 319 466 600 1 +600 408 319 501 1 +600 501 319 363 1 +339 501 600 363 1 +363 339 598 600 1 +339 600 494 598 1 +339 408 600 501 1 +697 69 171 199 1 +333 672 675 507 1 +675 672 385 507 1 +448 507 333 675 1 +602 252 22 434 1 +159 252 22 602 1 +27 642 681 452 1 +642 671 114 681 1 +642 671 681 358 1 +642 358 681 452 1 +27 681 144 452 1 +159 247 252 602 1 +469 571 603 361 1 +571 603 361 554 1 +361 436 554 603 1 +469 571 306 603 1 +149 604 120 460 1 +604 149 479 460 1 +227 753 552 103 1 +485 552 515 753 1 +46 604 479 394 1 +604 46 291 394 1 +604 394 291 467 1 +190 604 291 467 1 +190 46 291 604 1 +604 46 120 190 1 +149 46 120 604 1 +46 149 479 604 1 +146 644 135 48 1 +606 389 315 471 1 +154 664 584 115 1 +232 389 287 606 1 +188 584 667 391 1 +261 667 109 482 1 +88 606 287 265 1 +88 473 606 265 1 +584 503 667 391 1 +590 389 606 473 1 +590 606 380 473 1 +88 380 606 473 1 +315 606 380 590 1 +315 389 606 590 1 +504 612 329 640 1 +458 609 367 333 1 +367 333 609 466 1 +466 333 609 448 1 +211 676 121 16 1 +211 403 676 16 1 +576 369 609 333 1 +744 128 458 7 1 +367 609 305 466 1 +396 305 367 609 1 +396 609 367 458 1 +404 713 491 361 1 +682 713 404 361 1 +229 713 554 66 1 +682 566 713 361 1 +158 91 538 610 1 +158 538 47 610 1 +158 47 142 610 1 +610 47 142 560 1 +336 547 649 384 1 +684 492 737 368 1 +737 368 695 488 1 +692 432 612 640 1 +465 687 749 40 1 +334 443 611 438 1 +27 612 452 202 1 +27 96 612 202 1 +27 96 212 612 1 +643 496 630 380 1 +525 624 555 357 1 +737 338 423 507 1 +218 614 72 562 1 +218 392 614 562 1 +218 295 614 392 1 +614 295 496 392 1 +218 295 152 614 1 +218 152 72 614 1 +352 615 470 311 1 +615 410 470 311 1 +311 615 410 406 1 +352 410 470 615 1 +352 455 371 615 1 +352 371 519 615 1 +371 615 465 519 1 +371 320 465 615 1 +219 368 616 225 1 +219 368 64 616 1 +64 488 616 368 1 +696 492 347 445 1 +64 570 196 616 1 +84 267 196 616 1 +388 549 621 374 1 +374 388 431 621 1 +350 618 540 417 1 +620 616 267 84 1 +620 501 440 319 1 +732 456 391 567 1 +648 354 478 586 1 +310 613 374 618 1 +310 613 618 409 1 +409 613 618 335 1 +619 350 475 434 1 +619 475 350 618 1 +350 618 417 619 1 +619 618 417 317 1 +417 317 428 619 1 +417 619 428 350 1 +317 619 618 409 1 +619 475 618 409 1 +548 729 498 706 1 +693 381 729 516 1 +277 501 284 620 1 +673 299 670 70 1 +222 299 673 70 1 +250 222 673 70 1 +467 169 725 493 1 +84 423 253 620 1 +388 223 26 621 1 +735 360 623 522 1 +17 275 622 300 1 +138 300 622 275 1 +138 622 479 275 1 +17 275 479 622 1 +17 479 459 622 1 +651 735 718 360 1 +735 561 360 522 1 +362 622 371 465 1 +39 371 622 465 1 +39 622 297 465 1 +39 302 297 622 1 +39 302 622 371 1 +597 371 362 622 1 +583 304 624 525 1 +561 522 624 347 1 +347 531 624 561 1 +28 724 516 186 1 +6 453 625 163 1 +626 526 422 322 1 +578 702 400 417 1 +387 626 435 322 1 +387 526 626 322 1 +629 433 682 355 1 +422 626 502 308 1 +741 530 463 164 1 +671 395 741 530 1 +288 530 741 164 1 +741 463 176 164 1 +176 351 588 741 1 +732 584 391 456 1 +730 680 417 97 1 +540 680 417 730 1 +174 537 628 420 1 +174 381 628 537 1 +600 696 319 466 1 +344 696 600 466 1 +696 448 507 466 1 +490 516 106 628 1 +12 628 490 106 1 +12 259 628 106 1 +344 386 696 448 1 +344 448 696 466 1 +334 630 388 443 1 +334 630 585 388 1 +334 496 585 630 1 +242 630 585 496 1 +242 216 630 496 1 +242 216 89 630 1 +242 630 89 585 1 +484 335 407 631 1 +105 632 301 219 1 +632 31 301 219 1 +31 219 632 119 1 +632 219 488 119 1 +390 632 488 119 1 +634 646 104 574 1 +407 31 301 632 1 +105 407 301 632 1 +105 407 632 518 1 +219 488 64 632 1 +435 633 236 98 1 +633 387 236 98 1 +254 387 633 98 1 +90 633 254 387 1 +90 553 633 387 1 +633 553 414 387 1 +626 414 387 633 1 +626 633 387 345 1 +345 387 435 633 1 +435 387 236 633 1 +626 414 633 345 1 +90 553 414 633 1 +90 414 254 633 1 +310 647 495 475 1 +280 636 577 38 1 +577 636 125 38 1 +280 463 636 38 1 +628 729 338 420 1 +723 624 555 364 1 +416 624 723 364 1 +463 93 636 401 1 +636 93 577 401 1 +21 577 401 636 1 +21 636 401 515 1 +475 747 495 310 1 +675 609 333 448 1 +333 675 532 576 1 +747 364 475 526 1 +463 93 577 636 1 +280 463 577 636 1 +463 685 530 741 1 +131 698 468 419 1 +131 580 698 419 1 +60 698 189 131 1 +638 172 199 508 1 +453 172 638 508 1 +6 172 638 453 1 +6 172 199 638 1 +528 639 101 608 1 +528 591 639 608 1 +528 348 639 591 1 +348 607 639 591 1 +403 607 639 348 1 +403 348 639 558 1 +318 348 558 639 1 +318 348 639 398 1 +348 639 398 528 1 +383 316 573 641 1 +412 316 569 641 1 +335 409 484 702 1 +68 642 212 432 1 +642 212 432 612 1 +27 212 642 612 1 +370 643 614 334 1 +370 392 614 643 1 +462 392 370 643 1 +599 392 462 643 1 +599 643 462 315 1 +643 315 443 462 1 +315 643 443 590 1 +643 380 443 590 1 +315 380 643 590 1 +380 606 315 643 1 +643 606 315 471 1 +643 471 315 392 1 +599 392 643 315 1 +315 658 590 429 1 +658 651 429 315 1 +644 19 135 446 1 +146 19 644 514 1 +146 19 135 644 1 +396 146 592 644 1 +396 592 458 644 1 +75 645 243 544 1 +544 645 243 578 1 +111 382 205 757 1 +544 645 578 335 1 +544 421 645 335 1 +631 335 645 421 1 +631 335 407 645 1 +645 421 544 289 1 +75 645 544 289 1 +75 175 645 289 1 +645 175 421 289 1 +442 321 646 502 1 +646 412 457 126 1 +272 646 457 126 1 +272 574 646 126 1 +574 412 646 126 1 +272 234 457 646 1 +272 104 234 646 1 +475 595 434 647 1 +475 372 595 647 1 +648 141 158 461 1 +18 141 158 648 1 +648 141 194 18 1 +194 18 298 648 1 +648 18 298 478 1 +194 648 298 478 1 +194 648 478 476 1 +648 399 478 476 1 +194 399 648 476 1 +399 141 194 648 1 +336 468 649 547 1 +468 547 189 649 1 +189 649 166 468 1 +736 585 388 334 1 +424 585 736 334 1 +623 462 651 378 1 +651 462 437 378 1 +315 462 437 651 1 +659 325 508 546 1 +382 508 659 325 1 +429 651 590 315 1 +590 651 443 315 1 +462 315 443 651 1 +623 462 443 651 1 +653 304 447 583 1 +356 653 447 583 1 +354 712 511 369 1 +269 661 420 488 1 +350 505 602 680 1 +269 661 488 119 1 +447 356 541 653 1 +653 447 410 541 1 +594 653 410 541 1 +594 447 410 653 1 +359 447 594 653 1 +583 525 653 304 1 +304 525 653 523 1 +713 217 491 66 1 +92 217 491 713 1 +92 217 713 66 1 +393 444 487 654 1 +393 654 487 349 1 +655 439 373 324 1 +398 439 655 324 1 +528 373 207 655 1 +467 755 455 123 1 +133 528 207 655 1 +1 238 380 657 1 +1 238 657 182 1 +238 76 657 182 1 +657 76 471 182 1 +657 471 392 182 1 +471 657 606 76 1 +657 238 606 76 1 +599 658 471 315 1 +346 658 471 599 1 +315 389 590 658 1 +315 437 658 651 1 +59 279 659 214 1 +59 279 205 659 1 +59 246 659 205 1 +659 246 508 205 1 +382 508 205 659 1 +59 246 508 659 1 +439 660 582 343 1 +541 660 439 343 1 +309 660 439 541 1 +309 660 541 356 1 +356 660 433 309 1 +356 583 433 660 1 +439 309 582 660 1 +197 661 510 420 1 +420 197 661 269 1 +439 669 373 582 1 +662 358 452 414 1 +662 358 414 568 1 +308 662 414 568 1 +452 432 358 662 1 +358 662 432 596 1 +662 329 432 596 1 +452 432 662 329 1 +329 489 662 452 1 +489 662 452 377 1 +580 663 24 346 1 +230 346 24 663 1 +230 663 24 565 1 +565 663 24 419 1 +580 419 24 663 1 +230 565 76 663 1 +230 663 76 471 1 +230 346 663 471 1 +446 450 349 664 1 +584 664 349 450 1 +664 279 659 450 1 +214 279 659 664 1 +644 19 446 664 1 +633 254 665 414 1 +389 510 34 666 1 +287 389 34 666 1 +287 666 34 265 1 +265 34 130 666 1 +130 34 273 666 1 +287 606 666 265 1 +473 666 606 265 1 +473 389 606 666 1 +287 389 666 606 1 +389 365 666 473 1 +473 666 589 365 1 +389 365 510 666 1 +148 57 503 668 1 +439 309 669 582 1 +405 363 598 700 1 +363 598 700 600 1 +700 312 499 445 1 +700 598 312 600 1 +528 348 669 439 1 +528 669 373 439 1 +591 528 669 373 1 +486 591 669 373 1 +591 528 348 669 1 +451 299 162 670 1 +162 299 247 670 1 +37 670 162 247 1 +37 428 670 247 1 +709 487 343 402 1 +709 314 487 402 1 +357 314 709 402 1 +428 451 670 340 1 +432 114 671 248 1 +257 114 248 671 1 +489 690 308 377 1 +672 319 620 423 1 +493 169 725 134 1 +408 319 620 672 1 +564 322 434 673 1 +673 322 434 526 1 +673 526 434 340 1 +673 340 434 670 1 +670 602 434 673 1 +673 553 340 670 1 +673 222 553 670 1 +222 299 670 673 1 +250 222 553 673 1 +250 387 673 553 1 +473 743 589 330 1 +387 526 673 340 1 +387 322 673 526 1 +387 322 564 673 1 +387 32 673 564 1 +673 32 250 564 1 +387 32 250 673 1 +521 448 675 313 1 +448 507 675 313 1 +521 609 675 448 1 +521 369 675 609 1 +426 369 675 521 1 +426 369 576 675 1 +675 532 385 672 1 +333 532 675 672 1 +750 359 449 342 1 +750 706 342 449 1 +320 411 465 676 1 +615 320 465 676 1 +519 615 465 676 1 +447 359 750 342 1 +677 391 482 324 1 +582 677 482 324 1 +351 677 482 582 1 +351 391 482 677 1 +343 402 678 523 1 +523 343 594 678 1 +678 343 594 444 1 +444 487 678 343 1 +487 402 678 343 1 +487 402 305 678 1 +444 487 305 678 1 +359 586 477 678 1 +679 321 520 636 1 +463 321 679 636 1 +401 679 636 463 1 +351 463 679 401 1 +588 679 401 351 1 +373 679 401 588 1 +373 679 669 401 1 +679 309 669 401 1 +350 505 680 540 1 +22 505 195 680 1 +22 195 159 680 1 +469 316 361 682 1 +361 491 682 316 1 +682 491 404 316 1 +361 491 404 682 1 +714 538 610 539 1 +682 603 566 361 1 +361 469 682 603 1 +741 14 534 395 1 +331 603 566 682 1 +331 566 404 682 1 +485 331 404 682 1 +683 13 377 652 1 +129 13 683 652 1 +129 13 226 683 1 +226 13 451 683 1 +683 129 617 226 1 +472 129 617 683 1 +452 129 472 683 1 +727 107 440 284 1 +15 727 440 284 1 +390 632 684 488 1 +684 632 368 488 1 +338 498 386 684 1 +338 684 420 498 1 +679 321 685 520 1 +685 321 430 520 1 +679 685 430 520 1 +351 685 430 679 1 +430 685 351 677 1 +567 685 677 351 1 +567 395 685 351 1 +567 395 677 685 1 +463 321 530 685 1 +583 304 447 735 1 +447 304 587 735 1 +587 561 718 735 1 +587 304 561 735 1 +735 304 522 583 1 +378 735 522 583 1 +687 622 465 124 1 +362 622 465 687 1 +687 362 559 465 1 +687 362 170 559 1 +735 561 718 360 1 +492 319 688 445 1 +327 476 738 478 1 +363 600 445 688 1 +9 704 191 400 1 +114 671 689 681 1 +690 308 626 526 1 +28 724 423 516 1 +724 28 253 256 1 +724 385 423 516 1 +340 690 387 526 1 +536 529 233 691 1 +691 529 233 424 1 +536 691 233 424 1 +529 585 424 691 1 +691 585 424 334 1 +529 585 691 334 1 +611 334 438 691 1 +328 611 438 691 1 +328 438 571 691 1 +640 382 111 692 1 +237 640 111 692 1 +432 612 212 692 1 +455 593 707 215 1 +153 455 519 707 1 +455 707 153 215 1 +498 693 507 386 1 +498 693 338 507 1 +507 338 385 693 1 +360 522 561 694 1 +325 719 453 546 1 +694 360 512 429 1 +307 694 512 429 1 +572 546 719 367 1 +446 719 546 367 1 +719 710 367 575 1 +466 572 339 719 1 +484 307 694 512 1 +616 570 196 695 1 +64 695 570 616 1 +64 488 695 616 1 +64 695 488 259 1 +695 628 488 259 1 +695 106 628 259 1 +570 106 695 259 1 +64 570 695 259 1 +507 386 696 492 1 +386 492 347 696 1 +656 697 415 405 1 +656 69 697 405 1 +656 69 415 697 1 +698 336 547 468 1 +336 467 698 547 1 +336 467 580 698 1 +698 467 580 239 1 +60 467 698 239 1 +699 410 558 320 1 +558 320 441 699 1 +441 320 483 699 1 +483 356 699 320 1 +699 356 410 320 1 +441 483 379 699 1 +699 318 558 541 1 +439 318 699 541 1 +309 439 699 541 1 +309 439 669 699 1 +439 318 558 699 1 +405 700 598 312 1 +363 600 700 445 1 +688 445 363 700 1 +682 316 404 701 1 +682 701 404 355 1 +601 701 355 404 1 +601 457 355 701 1 +520 701 355 457 1 +321 701 520 457 1 +321 502 701 457 1 +321 502 520 701 1 +355 433 701 520 1 +701 433 316 520 1 +433 316 682 701 1 +433 701 682 355 1 +516 381 729 628 1 +618 409 702 317 1 +417 618 702 317 1 +417 556 317 702 1 +484 326 702 499 1 +484 326 407 702 1 +335 484 407 702 1 +578 335 400 702 1 +442 264 77 703 1 +703 264 77 689 1 +77 689 671 703 1 +681 703 671 689 1 +681 703 689 144 1 +703 264 689 144 1 +703 144 36 264 1 +633 703 36 264 1 +442 703 633 264 1 +686 144 36 703 1 +568 358 703 442 1 +141 427 35 705 1 +141 461 427 705 1 +461 318 427 705 1 +705 318 427 398 1 +461 318 705 398 1 +398 461 91 705 1 +705 461 91 255 1 +141 461 705 255 1 +323 706 429 481 1 +575 446 719 325 1 +751 89 585 533 1 +481 548 323 706 1 +706 548 323 498 1 +548 693 706 313 1 +693 313 507 706 1 +455 352 707 593 1 +428 418 708 317 1 +708 418 545 317 1 +428 708 545 317 1 +428 708 451 545 1 +708 418 451 545 1 +709 582 677 430 1 +430 709 582 343 1 +709 487 582 343 1 +343 660 430 709 1 +325 710 575 402 1 +720 499 317 418 1 +575 367 305 710 1 +710 367 305 466 1 +466 609 305 710 1 +710 609 305 448 1 +466 609 710 448 1 +337 543 416 720 1 +720 337 543 415 1 +420 711 323 498 1 +498 711 323 429 1 +711 365 323 429 1 +420 365 323 711 1 +420 661 365 711 1 +661 711 420 488 1 +661 390 711 488 1 +654 396 560 712 1 +560 396 511 712 1 +712 396 305 654 1 +444 712 305 654 1 +477 444 712 305 1 +712 305 609 477 1 +477 444 354 712 1 +361 436 566 713 1 +713 436 566 229 1 +566 229 92 713 1 +229 436 554 713 1 +713 436 554 361 1 +714 610 354 393 1 +714 461 354 610 1 +586 461 354 714 1 +586 714 354 444 1 +318 714 586 444 1 +714 318 439 444 1 +398 318 439 714 1 +318 461 586 714 1 +394 46 291 715 1 +46 394 479 715 1 +715 597 394 479 1 +371 597 715 479 1 +371 715 622 479 1 +371 597 394 715 1 +371 455 715 394 1 +519 455 715 371 1 +39 519 715 371 1 +153 715 519 455 1 +153 127 715 455 1 +153 127 302 715 1 +138 127 715 302 1 +46 479 274 715 1 +717 419 131 51 1 +112 419 131 717 1 +112 419 717 510 1 +587 386 706 718 1 +587 561 386 718 1 +718 386 694 561 1 +718 561 694 360 1 +429 718 694 360 1 +651 718 429 360 1 +310 736 647 374 1 +736 310 613 374 1 +342 718 429 651 1 +388 736 613 374 1 +323 706 498 718 1 +453 598 339 719 1 +719 598 339 494 1 +719 325 598 494 1 +453 325 598 719 1 +466 572 719 367 1 +710 719 367 466 1 +312 700 720 405 1 +720 700 366 405 1 +366 720 405 656 1 +720 415 405 656 1 +366 720 499 700 1 +720 312 499 700 1 +720 499 418 366 1 +337 416 545 720 1 +545 416 317 720 1 +569 435 204 722 1 +722 435 204 635 1 +722 635 204 8 1 +569 722 204 8 1 +412 722 569 8 1 +412 574 722 8 1 +634 722 574 8 1 +722 634 635 8 1 +634 646 574 722 1 +412 574 646 722 1 +526 690 308 723 1 +526 340 690 723 1 +489 357 555 723 1 +723 357 555 624 1 +416 357 723 624 1 +489 357 723 416 1 +555 747 341 422 1 +672 385 724 532 1 +408 672 724 532 1 +408 672 620 724 1 +620 408 724 260 1 +620 724 253 260 1 +620 423 253 724 1 +423 28 253 724 1 +726 484 492 326 1 +726 307 492 484 1 +631 307 726 484 1 +307 390 631 726 1 +631 390 407 726 1 +307 390 726 684 1 +684 307 492 726 1 +368 684 492 726 1 +545 728 723 619 1 +728 364 723 619 1 +619 364 475 728 1 +728 364 475 409 1 +619 728 475 409 1 +317 728 619 409 1 +409 728 702 317 1 +409 728 484 702 1 +409 347 484 728 1 +409 364 522 728 1 +522 364 624 728 1 +364 624 728 416 1 +364 723 416 728 1 +723 545 416 728 1 +323 381 729 548 1 +195 680 730 97 1 +195 680 540 730 1 +195 540 53 730 1 +188 584 732 30 1 +188 584 391 732 1 +578 335 731 544 1 +156 544 578 731 1 +156 235 544 731 1 +544 513 731 235 1 +731 513 374 235 1 +544 513 374 731 1 +622 362 734 687 1 +622 687 734 124 1 +17 622 734 300 1 +300 622 734 124 1 +17 459 734 622 1 +734 459 362 622 1 +587 735 718 342 1 +447 735 587 342 1 +437 735 447 342 1 +437 378 735 342 1 +437 378 447 735 1 +583 735 447 378 1 +378 360 623 735 1 +378 735 651 360 1 +424 334 736 611 1 +372 424 736 611 1 +372 611 736 647 1 +647 611 736 310 1 +440 616 423 737 1 +620 737 440 423 1 +620 319 737 423 1 +672 319 423 737 1 +620 319 440 737 1 +737 319 440 688 1 +368 737 440 688 1 +440 616 737 368 1 +616 695 737 368 1 +338 684 386 737 1 +737 684 386 492 1 +737 386 507 492 1 +507 696 737 492 1 +338 386 507 737 1 +79 372 739 431 1 +752 394 604 346 1 +552 753 379 515 1 +599 752 346 437 1 +332 752 599 437 1 +752 460 332 599 1 +603 740 331 480 1 +682 740 331 603 1 +682 469 740 603 1 +469 682 740 433 1 +740 682 331 433 1 +483 740 331 433 1 +740 469 433 637 1 +627 469 740 637 1 +671 741 14 530 1 +288 14 741 530 1 +671 395 14 741 1 +395 685 351 741 1 +741 685 351 463 1 +288 534 176 741 1 +741 534 176 567 1 +742 397 413 716 1 +370 742 413 716 1 +370 397 742 716 1 +306 742 397 571 1 +390 711 631 743 1 +631 711 307 743 1 +711 743 429 307 1 +711 365 429 743 1 +429 365 590 743 1 +711 661 365 743 1 +589 365 661 743 1 +473 365 589 743 1 +390 743 631 421 1 +369 61 497 745 1 +369 497 426 745 1 +369 61 745 155 1 +186 385 524 746 1 +256 385 186 746 1 +385 724 746 256 1 +746 724 532 256 1 +385 724 532 746 1 +385 746 532 675 1 +675 746 532 576 1 +675 426 746 576 1 +385 426 746 675 1 +747 475 495 322 1 +322 747 573 495 1 +322 422 573 747 1 +422 526 747 322 1 +422 364 747 526 1 +555 364 747 422 1 +304 624 748 531 1 +624 357 748 531 1 +624 357 525 748 1 +357 709 525 748 1 +748 709 525 402 1 +357 709 748 402 1 +304 525 748 624 1 +304 525 523 748 1 +523 525 343 748 1 +447 449 311 750 1 +750 557 449 311 1 +750 336 449 557 1 +481 336 750 557 1 +336 548 481 750 1 +481 548 706 750 1 +548 706 750 449 1 +336 548 750 449 1 +447 359 449 750 1 +751 99 266 240 1 +424 99 266 751 1 +739 424 266 751 1 +79 739 266 751 1 +79 431 739 751 1 +739 372 751 431 1 +372 751 431 736 1 +736 388 751 431 1 +431 388 751 621 1 +751 388 26 621 1 +431 751 26 621 1 +388 89 751 26 1 +372 424 751 736 1 +739 372 424 751 1 +552 50 379 753 1 +227 50 552 753 1 +165 655 207 754 1 +139 49 486 754 1 +376 755 455 467 1 +756 702 407 400 1 +756 407 551 400 1 +335 702 407 756 1 +645 407 756 335 1 +645 756 578 335 1 +645 756 243 578 1 +9 756 578 243 1 +9 704 756 243 1 +243 756 95 704 1 +231 756 95 243 1 +231 645 756 243 1 +231 407 756 645 1 +231 407 95 756 1 +End diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp new file mode 100644 index 00000000000..34fb4caedb1 --- /dev/null +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp @@ -0,0 +1,34 @@ +#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE + +#include + +#include +#include + +#include + +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; + +typedef CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3 Remeshing_triangulation; + +int main(int argc, char* argv[]) +{ + const char* filename = (argc > 1) ? argv[1] : "data/sphere.mesh"; + const double target_edge_length = (argc > 2) ? atof(argv[2]) : 0.1; + + std::ifstream is(filename, std::ios_base::in); + + Remeshing_triangulation tr; + CGAL::input_medit(is, tr); + + CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length); + + std::ofstream os("after_remeshing.mesh"); + CGAL::output_triangulation_to_medit(os, tr); + + return EXIT_SUCCESS; +} From d309bdf2ca1b2c0135bca73acba9b5676346a0f1 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 18 Aug 2020 12:16:27 +0300 Subject: [PATCH 079/149] Used ..._object() member function to obtain functor objects and cleaned up formatting. --- .../include/CGAL/Arr_segment_traits_2.h | 85 ++++++++----------- 1 file changed, 36 insertions(+), 49 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index e62c6028a24..21c6b43356a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -712,12 +712,12 @@ public: Intersection_result; // Early ending with Bbox overlapping test - if (!CGAL::do_overlap(cv1.bbox(), cv2.bbox())) - return oi; + if (! CGAL::do_overlap(cv1.bbox(), cv2.bbox())) return oi; // Early ending with specialized do_intersect const Kernel& kernel = m_traits; - if (!do_intersect (cv1.left(), cv1.right(), cv2.left(), cv2.right(), kernel)) + if (! do_intersect(cv1.left(), cv1.right(), cv2.left(), cv2.right(), + kernel)) return oi; // Intersect the two supporting lines. @@ -793,56 +793,44 @@ public: // Specialized do_intersect with many tests skipped because at // this point, we already know which point is left / right for // both segments - bool do_intersect (const Point_2 &A1, - const Point_2 &A2, - const Point_2 &B1, - const Point_2 &B2, - const Kernel& k) const + bool do_intersect(const Point_2& A1, const Point_2& A2, + const Point_2& B1, const Point_2& B2, + const Kernel& k) const { - typename Kernel::Less_xy_2 less_xy; - typename Kernel::Compare_xy_2 compare_xy; + auto less_xy = k.less_xy_2_object(); + auto compare_xy = k.compare_xy_2_object(); + namespace interx = CGAL::Intersections::internal; switch(make_certain(compare_xy(A1,B1))) { - case SMALLER: - switch(make_certain(compare_xy(A2,B1))) { - case SMALLER: - return false; - case EQUAL: - return true; - default: // LARGER - switch(make_certain(compare_xy(A2,B2))) { - case SMALLER: - return CGAL::Intersections::internal - ::seg_seg_do_intersect_crossing(A1,A2,B1,B2, k); - case EQUAL: - return true; - default: // LARGER - return CGAL::Intersections::internal - ::seg_seg_do_intersect_contained(A1,A2,B1,B2, k); - } + case SMALLER: + switch(make_certain(compare_xy(A2,B1))) { + case SMALLER: return false; + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(A2,B2))) { + case SMALLER: + return interx::seg_seg_do_intersect_crossing(A1,A2,B1,B2, k); + case EQUAL: return true; + default: // LARGER + return interx::seg_seg_do_intersect_contained(A1,A2,B1,B2, k); } - case EQUAL: - return true; - default: // LARGER - switch(make_certain(compare_xy(B2,A1))) { - case SMALLER: - return false; - case EQUAL: - return true; - default: // LARGER - switch(make_certain(compare_xy(B2,A2))) { - case SMALLER: - return CGAL::Intersections::internal - ::seg_seg_do_intersect_crossing(B1,B2,A1,A2, k); - case EQUAL: - return true; - default: // LARGER - return CGAL::Intersections::internal - ::seg_seg_do_intersect_contained(B1,B2,A1,A2, k); - } + } + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A1))) { + case SMALLER: return false; + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A2))) { + case SMALLER: + return interx::seg_seg_do_intersect_crossing(B1,B2,A1,A2, k); + case EQUAL: return true; + default: // LARGER + return interx::seg_seg_do_intersect_contained(B1,B2,A1,A2, k); } + } } - CGAL_assertion(false); + CGAL_error(); // never reached return false; } }; @@ -1130,8 +1118,7 @@ public: Bbox_2 bbox() const { Kernel kernel; - typename Kernel::Construct_bbox_2 - construct_bbox = kernel.construct_bbox_2_object(); + auto construct_bbox = kernel.construct_bbox_2_object(); return construct_bbox(this->m_ps) + construct_bbox(this->m_pt); } From 1e42f4c9d49da7aa35592d094f4a85fdf3d3990b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 11:16:58 +0200 Subject: [PATCH 080/149] rename IO functions for MEDIT format and a Triangulation_3 --- Mesh_3/include/CGAL/IO/File_medit.h | 7 ++----- .../tetrahedral_remeshing_from_mesh.cpp | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h index a1ba012b2bc..99109faebec 100644 --- a/Mesh_3/include/CGAL/IO/File_medit.h +++ b/Mesh_3/include/CGAL/IO/File_medit.h @@ -895,8 +895,7 @@ output_to_medit(std::ostream& os, template -void -output_triangulation_to_medit(std::ostream& os, const T3& t3) +void write_MEDIT(std::ostream& os, const T3& t3) { CGAL::Mesh_complex_3_in_triangulation_3 c3t3; c3t3.triangulation() = t3; @@ -905,11 +904,9 @@ output_triangulation_to_medit(std::ostream& os, const T3& t3) } template -bool input_medit(std::istream& in, T3& t3) +bool read_MEDIT(std::istream& in, T3& t3) { -// in.open(fileinfo.filePath().toUtf8(), std::ios_base::in);//not binary CGAL_assertion(!(!in)); - return CGAL::build_triangulation_from_file(in, t3); } diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp index 34fb4caedb1..8e2dd19eb21 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp @@ -1,5 +1,3 @@ -#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE - #include #include @@ -23,12 +21,12 @@ int main(int argc, char* argv[]) std::ifstream is(filename, std::ios_base::in); Remeshing_triangulation tr; - CGAL::input_medit(is, tr); + CGAL::read_MEDIT(is, tr); CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length); std::ofstream os("after_remeshing.mesh"); - CGAL::output_triangulation_to_medit(os, tr); + CGAL::write_MEDIT(os, tr); return EXIT_SUCCESS; } From e4a1d2d507cb81470ca75f88f7025070b22f515c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 11:36:29 +0200 Subject: [PATCH 081/149] example cleaning --- .../tetrahedral_remeshing_from_mesh.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp index 8e2dd19eb21..83565e56341 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp @@ -5,9 +5,7 @@ #include -#include #include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; @@ -18,9 +16,9 @@ int main(int argc, char* argv[]) const char* filename = (argc > 1) ? argv[1] : "data/sphere.mesh"; const double target_edge_length = (argc > 2) ? atof(argv[2]) : 0.1; - std::ifstream is(filename, std::ios_base::in); - Remeshing_triangulation tr; + + std::ifstream is(filename, std::ios_base::in); CGAL::read_MEDIT(is, tr); CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length); From 4afd2b3146f620490533dcdfe7855de7362de76f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 11:38:48 +0200 Subject: [PATCH 082/149] add example to the user manual --- .../Tetrahedral_remeshing/Tetrahedral_remeshing.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt index 7abec1cba08..089337289da 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt @@ -107,5 +107,16 @@ from a polyhedral domain with features. \cgalExample{Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp} + +\subsection ssecEx5 Tetrahedral Remeshing from Any Tetrahedral Mesh + +The following example shows how to read a mesh from a triangulation stored in a +Medit file, perform tetrahedral remeshing, and save the output triangulation. +The input triangulation should follow the validity requirements of a +`CGAL::Triangulation_3` (valid connectivity, positive orientation of the cells, and +coverage of the convex hull of the vertices). + +\cgalExample{Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp} + */ } /* namespace CGAL */ From 726ba9bac251cfa73f688e822a5133e06ba54696 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 11:45:48 +0200 Subject: [PATCH 083/149] fix link in doc --- .../doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt index 089337289da..60df5719e8d 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt @@ -100,7 +100,7 @@ setting the named parameter `remesh_boundaries` to `false`. The tetrahedral remeshing algorithm is designed as a post-processing for mesh generation algorithms. The API allows to generate a tetrahedral mesh -with `Mesh_3`, the tetrahedral mesh generation package, and +with the CGAL \ref PkgMesh3 package, and further improve it with the tetrahedral remeshing algorithm. This example shows how to use tetrahedral mesh generation and remeshing in sequence, from a polyhedral domain with features. From f1e295c68e783d2f3756c0430b64b12175bc6a88 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 11:58:16 +0200 Subject: [PATCH 084/149] use \cgal in doc --- .../doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt index 60df5719e8d..3c999ba33d5 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt @@ -100,7 +100,7 @@ setting the named parameter `remesh_boundaries` to `false`. The tetrahedral remeshing algorithm is designed as a post-processing for mesh generation algorithms. The API allows to generate a tetrahedral mesh -with the CGAL \ref PkgMesh3 package, and +with the \cgal \ref PkgMesh3 package, and further improve it with the tetrahedral remeshing algorithm. This example shows how to use tetrahedral mesh generation and remeshing in sequence, from a polyhedral domain with features. From a1d573a485377b141f36cc2b6c97fe3411c93c83 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Aug 2020 12:08:17 +0200 Subject: [PATCH 085/149] add implementation history --- .../Tetrahedral_remeshing/Tetrahedral_remeshing.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt index 3c999ba33d5..6336998d527 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt @@ -118,5 +118,16 @@ coverage of the convex hull of the vertices). \cgalExample{Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp} + +\section secTetRemeshingHistory Implementation History + +This package implements the uniform version of the "Multi-Material Adaptive Volume Remesher" +algorithm for quality tetrahedral remeshing, described by Noura Faraj et al. in \cgalCite{faraj2016mvr}. + +A first version of the code was written by Noura Faraj, Jean-Marc Thiery, and Tamy Boubekeur. +Jane Tournois worked on the finalization of the code, the API, and documentation. + +It was initially published in CGAL-5.1. + */ } /* namespace CGAL */ From 9de91a33861f73d85bbf22952c9060f76137bd47 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 18 Aug 2020 12:16:25 +0200 Subject: [PATCH 086/149] Disable boost_serialization and iostreams --- .travis/build_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/build_package.sh b/.travis/build_package.sh index cb046d1e29f..70e2d92d546 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -11,7 +11,7 @@ function mytime { function build_examples { mkdir -p build-travis cd build-travis - mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCGAL_BUILD_THREE_DOC=TRUE .. + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCGAL_BUILD_THREE_DOC=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_boost_serialization=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_boost_iostreams=TRUE .. mytime make -j2 VERBOSE=1 } From 93d62b969cda3283cb547648193764c3deaa3852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 18 Aug 2020 14:07:27 +0200 Subject: [PATCH 087/149] add forward declaration File_medit.h is included by Mesh_complex_3_in_triangulation_3_base.h --- .../Mesh_complex_3_in_triangulation_3_fwd.h | 34 +++++++++++++++++++ Mesh_3/include/CGAL/IO/File_medit.h | 1 + .../CGAL/Mesh_complex_3_in_triangulation_3.h | 5 +-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h diff --git a/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h new file mode 100644 index 00000000000..2f4705e66d0 --- /dev/null +++ b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h @@ -0,0 +1,34 @@ +// Copyright (C) 2020 GeometryFactory Sarl +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// + +#ifndef CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H +#define CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H + +/// \file Mesh_complex_3_in_triangulation_3_fwd.h +/// Forward declarations of the Mesh_3 package. + +#ifndef DOXYGEN_RUNNING +namespace CGAL { + +// fwdS for the public interface +template +class Mesh_complex_3_in_triangulation_3; + +template +bool build_triangulation_from_file(std::istream& is, + Tr& tr); + +} // CGAL +#endif + +#endif /* CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H */ + + diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h index 99109faebec..d8b949fb2c7 100644 --- a/Mesh_3/include/CGAL/IO/File_medit.h +++ b/Mesh_3/include/CGAL/IO/File_medit.h @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index 5440b0c0d52..0eb11a1f3c6 100644 --- a/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -38,8 +39,8 @@ namespace CGAL { template + typename CornerIndex, + typename CurveIndex> class Mesh_complex_3_in_triangulation_3 : public Mesh_3::Mesh_complex_3_in_triangulation_3_base< Tr, typename Tr::Concurrency_tag> From ae62039df390d968179a52488d67b325672d6553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 18 Aug 2020 14:08:15 +0200 Subject: [PATCH 088/149] remove used variable --- Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 21c6b43356a..da21164610a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -797,7 +797,6 @@ public: const Point_2& B1, const Point_2& B2, const Kernel& k) const { - auto less_xy = k.less_xy_2_object(); auto compare_xy = k.compare_xy_2_object(); namespace interx = CGAL::Intersections::internal; From 83e0d459f27437e36f18b4acf444c3769c7da27b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 19 Aug 2020 12:52:08 +0200 Subject: [PATCH 089/149] Store domain options in c3t3 and retrieve them in optimizers to preserve features as much as possible. --- .../Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp | 8 ++++++++ .../Plugins/Mesh_3/Optimization_plugin.cpp | 4 ++-- .../Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp | 4 ++++ Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp | 12 ++++++++++++ Polyhedron/demo/Polyhedron/Scene_c3t3_item.h | 6 ++++++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp index 5761dc4dab9..4eee5f1aa9f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp @@ -87,6 +87,14 @@ Meshing_thread* cgal_code_mesh_3(QList pMeshes, std::cerr << " done (" << timer.time() * 1000 << " ms)" << std::endl; Scene_c3t3_item* p_new_item = new Scene_c3t3_item(surface_only); + if(polylines.empty()) { + if(protect_features) { + p_new_item->set_sharp_edges_angle(sharp_edges_angle); + } + else if (protect_borders) { + p_new_item->set_detect_borders(true); + } + } QString tooltip = QString("
From \"") + filename + QString("\" with the following mesh parameters" diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp index 85cb6ccd1a1..ecddec2f9e4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp @@ -524,10 +524,9 @@ treat_result(Scene_c3t3_item& source_item, static_cast(bbox.ymin() + bbox.ymax())/2.f, static_cast(bbox.zmin() + bbox.zmax())/2.f); - result_item.setColor(QColor(59,74,226)); + result_item.setColor(source_item.color()); result_item.setRenderingMode(source_item.renderingMode()); result_item.set_data_item(source_item.data_item()); - source_item.setVisible(false); const Scene_interface::Item_id index = scene->mainSelectionIndex(); @@ -539,6 +538,7 @@ treat_result(Scene_c3t3_item& source_item, else { result_item.update_histogram(); + result_item.invalidateOpenGLBuffers(); const Scene_interface::Item_id index = scene->mainSelectionIndex(); scene->itemChanged(index); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp index 081ca9df328..627afb7577b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp @@ -141,6 +141,10 @@ Optimizer_thread* cgal_code_optimization(Scene_c3t3_item& c3t3_item, return NULL; } Polyhedral_mesh_domain* sm_domain = new Polyhedral_mesh_domain(*smesh); + if(c3t3_item.get_sharp_edges_angle() != -1 ) + sm_domain->detect_features(c3t3_item.get_sharp_edges_angle()); + else if(c3t3_item.get_detect_borders()) + sm_domain->detect_borders(); // Create thread typedef Optimization_function Opt_function; diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index 9e8beb2e5a7..f350e500775 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -347,6 +347,8 @@ struct Scene_c3t3_item_priv { cnc_are_shown = false; is_aabb_tree_built = false; alphaSlider = NULL; + sharp_edges_angle = -1; + detect_borders = false; } void computeIntersection(const Primitive& facet); void fill_aabb_tree() { @@ -501,6 +503,9 @@ struct Scene_c3t3_item_priv { bool is_valid; bool is_surface; bool last_intersection; + //only for optimizers + double sharp_edges_angle; + bool detect_borders; void push_normal(std::vector& normals, const EPICK::Vector_3& n) const { @@ -2106,5 +2111,12 @@ Scene_c3t3_item* Scene_c3t3_item::clone() const return new Scene_c3t3_item(d->c3t3, d->is_surface); } +void Scene_c3t3_item::set_sharp_edges_angle(double a) { d->sharp_edges_angle = a; } +double Scene_c3t3_item::get_sharp_edges_angle() { return d->sharp_edges_angle; } + +void Scene_c3t3_item::set_detect_borders(bool b) { d->detect_borders = b;} +bool Scene_c3t3_item::get_detect_borders() { return d->detect_borders; } + + #include "Scene_c3t3_item.moc" diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h index 90b02e87c7b..d71d906fce3 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h @@ -155,6 +155,12 @@ public: QColor get_histogram_color(const double v) const; + void set_sharp_edges_angle(double d); + double get_sharp_edges_angle(); + + void set_detect_borders(bool b); + bool get_detect_borders(); + void itemAboutToBeDestroyed(Scene_item *) Q_DECL_OVERRIDE; void initializeBuffers(Viewer_interface *) const Q_DECL_OVERRIDE; From b03fa542992d0d6839f8d0a4d9ffa44249708693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 14:29:09 +0200 Subject: [PATCH 090/149] add a convenience header file to inherit from face graphs --- BGL/doc/BGL/Doxyfile.in | 5 +- BGL/doc/BGL/PackageDescription.txt | 1 + BGL/doc/BGL/examples.txt | 2 + .../graph/graph_traits_inheritance_macros.h | 169 ++++++++++++++++++ BGL/test/BGL/CMakeLists.txt | 2 + BGL/test/BGL/graph_traits_inheritance.cpp | 79 ++++++++ .../examples/Polyhedron/poly_derivation.cpp | 43 +++++ .../examples/Surface_mesh/sm_derivation.cpp | 23 +-- 8 files changed, 303 insertions(+), 21 deletions(-) create mode 100644 BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h create mode 100644 BGL/test/BGL/graph_traits_inheritance.cpp create mode 100644 Polyhedron/examples/Polyhedron/poly_derivation.cpp diff --git a/BGL/doc/BGL/Doxyfile.in b/BGL/doc/BGL/Doxyfile.in index 8d9f34127c0..6fd75dba201 100644 --- a/BGL/doc/BGL/Doxyfile.in +++ b/BGL/doc/BGL/Doxyfile.in @@ -16,13 +16,16 @@ INPUT += ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/Euler_operations.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/partition.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/METIS/partition_graph.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/METIS/partition_dual_graph.h \ - ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/alpha_expansion_graphcut.h + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/alpha_expansion_graphcut.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/graph_traits_inheritance_macros.h EXAMPLE_PATH = ${CGAL_Surface_mesh_skeletonization_EXAMPLE_DIR} \ ${CGAL_Surface_mesh_segmentation_EXAMPLE_DIR} \ ${CGAL_Polygon_mesh_processing_EXAMPLE_DIR} \ + ${CGAL_Surface_mesh_EXAMPLE_DIR} \ ${CGAL_Property_map_EXAMPLE_DIR} \ + ${CGAL_Polyhedron_EXAMPLE_DIR} \ ${CGAL_BGL_EXAMPLE_DIR} ALIASES += "bgllink{1}=\1" diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt index 8e9032f8c07..6057bada0c6 100644 --- a/BGL/doc/BGL/PackageDescription.txt +++ b/BGL/doc/BGL/PackageDescription.txt @@ -713,6 +713,7 @@ user might encounter. - `CGAL::Graph_with_descriptor_with_graph` - `CGAL::Graph_with_descriptor_with_graph_property_map` - `CGAL::Seam_mesh` +- `CGAL/boost/graph/graph_traits_inheritance_macros.h` \cgalCRPSection{Partitioning Methods} - `CGAL::METIS::partition_graph()` diff --git a/BGL/doc/BGL/examples.txt b/BGL/doc/BGL/examples.txt index dd1d623ab0a..05a8063563c 100644 --- a/BGL/doc/BGL/examples.txt +++ b/BGL/doc/BGL/examples.txt @@ -31,4 +31,6 @@ \example Surface_mesh_segmentation/extract_segmentation_into_mesh_example.cpp \example Polygon_mesh_processing/face_filtered_graph_example.cpp \example Property_map/dynamic_properties.cpp +\example Surface_mesh/sm_derivation.cpp +\example Polyhedron/poly_derivation.cpp */ diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h new file mode 100644 index 00000000000..88921443295 --- /dev/null +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -0,0 +1,169 @@ +// Copyright (c) 2020 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sébastien Loriot + +// This file is intentionally not protected against re-inclusion. +// It's aimed at being included from within a user code to +// make any structure inheriting from a face graph model a face graph +// model itself + +// It is the responsibility of the including file to correctly set the +// macros CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME +// and optionally CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS. +// They are #undefed at the end of this file. + +/** +* \ingroup PkgBGLRef +* \file CGAL/boost/graph/graph_traits_inheritance_macros.h +* Convenience header file defining the necessary specializations and overloads to make a +* class, inheriting from a model of a face graph concept, a model of that face graph concept itself. +* Prior to the inclusion of this header, specific macros must be defined and those macros will be +* undefined automatically when processing to the inclusion of this header. +* It is possible to include the header several times if the operation must be done for several classes. +* The macros that must be defined are the following: +* - `CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME`: the inheriting class. If it is a template class, it must be instantiated parameters named as in `CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS` or parameters available in the scope including the header; +* - `CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME`: the base class. it must be instantiated parameters named as in `CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS` or parameters available in the scope including the header; +* - `CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS`: (optional) if the inheriting class, a list of template parameters separated by commas (`,`) including `class/typename/integral type`. +* +* Some examples are provided in \ref Surface_mesh/sm_derivation.cpp and \ref Polyhedron/poly_derivation.cpp. +* +*/ + +#if !defined(CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME) || !defined(CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME) + +CGAL_pragma_warning("\nBoth macros CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME and CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME " + "must be defined if you want to use this file\n") + +#else + +#ifdef CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS + +namespace boost { + +template +struct graph_traits : + public graph_traits +{}; + +template +struct property_map : + public property_map +{}; + +} // boost namespace + +#define CGAL_PM_DT_SPEC(DTAG) \ +namespace boost {\ +template \ +struct property_map > \ + : property_map > \ +{};\ +} /* boost namespace */\ +\ +namespace CGAL { \ +template \ +typename boost::property_map >::type \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +{ \ + return get(t, static_cast(g)); \ +} \ +\ +template \ +typename boost::property_map >::const_type \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +{ \ + return get(t, static_cast(g)); \ +}\ +} //CGAL namespace + +CGAL_PM_DT_SPEC(CGAL::dynamic_vertex_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_halfedge_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_face_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_edge_property_t) + +#undef CGAL_PM_DT_SPEC + +namespace CGAL { + +template +struct graph_has_property : + public CGAL::graph_has_property +{}; + + +} // CGAL namespace + +#undef CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS + +#else + +namespace boost { + +template <> +struct graph_traits : + public graph_traits +{}; + +template +struct property_map : + public property_map +{}; + +} // boost namespace + +#define CGAL_PM_DT_SPEC(DTAG) \ +namespace boost {\ +template \ +struct property_map > \ + : property_map > \ +{};\ +} /* boost namespace */\ +\ +namespace CGAL { \ +template \ +typename boost::property_map >::type \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +{ \ + return get(t, static_cast(g)); \ +} \ +\ +template \ +typename boost::property_map >::const_type \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +{ \ + return get(t, static_cast(g)); \ +}\ +} //CGAL namespace + +CGAL_PM_DT_SPEC(CGAL::dynamic_vertex_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_halfedge_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_face_property_t) +CGAL_PM_DT_SPEC(CGAL::dynamic_edge_property_t) + +#undef CGAL_PM_DT_SPEC + +namespace CGAL { + +template +struct graph_has_property : + public CGAL::graph_has_property +{}; + + +} // CGAL namespace + +#endif + + +#undef CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME +#undef CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME + +#endif + diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 2f9e1bb404e..abe121dd6b1 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -103,6 +103,8 @@ create_single_source_cgal_program( "test_wrl.cpp" ) create_single_source_cgal_program( "bench_read_from_stream_vs_add_face_and_add_faces.cpp" ) +create_single_source_cgal_program( "graph_traits_inheritance.cpp" ) + if(OpenMesh_FOUND) target_link_libraries( test_clear PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries( test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/BGL/test/BGL/graph_traits_inheritance.cpp b/BGL/test/BGL/graph_traits_inheritance.cpp new file mode 100644 index 00000000000..fd4540af69e --- /dev/null +++ b/BGL/test/BGL/graph_traits_inheritance.cpp @@ -0,0 +1,79 @@ +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; + +template +struct My_mesh_1 : public CGAL::Polyhedron_3 {}; + +struct My_mesh_2 : public CGAL::Polyhedron_3 {}; + +template +struct My_mesh_3 : public CGAL::Surface_mesh {}; + +struct My_mesh_5 : public CGAL::Surface_mesh {}; + +// dim could be hard-coded but for the purpose of the example it is left +template +struct My_mesh_4 : + CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper + <2, dim, CGAL::Linear_cell_complex_traits >::type +{}; + +/// make My_mesh_1 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS typename Traits +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_1 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Polyhedron_3 +#include + +/// make My_mesh_2 a valid face graph model +// no template parameter, CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS is then not defined +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_2 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Polyhedron_3 +#include + +/// make My_mesh_3 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS typename PT +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_3 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Surface_mesh +#include + +/// make My_mesh_4 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS int dim, typename K +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_4 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME typename CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper\ + <2, dim, CGAL::Linear_cell_complex_traits >::type +#include + +/// make My_mesh_5 a valid face graph model +// no template parameter, CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS is then not defined +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_5 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Surface_mesh +#include + +int main() +{ + typedef My_mesh_1 Mesh1; + + std::vector points; + Mesh1 poly1; + CGAL::convex_hull_3(points.begin(), points.end(), poly1); + + My_mesh_2 poly2; + CGAL::convex_hull_3(points.begin(), points.end(), poly2); + + My_mesh_3 poly3; + CGAL::convex_hull_3(points.begin(), points.end(), poly3); + + My_mesh_4<3, Kernel> poly4; + CGAL::convex_hull_3(points.begin(), points.end(), poly4); + + My_mesh_5 poly5; + CGAL::convex_hull_3(points.begin(), points.end(), poly5); + + return 0; +} diff --git a/Polyhedron/examples/Polyhedron/poly_derivation.cpp b/Polyhedron/examples/Polyhedron/poly_derivation.cpp new file mode 100644 index 00000000000..30392f83af6 --- /dev/null +++ b/Polyhedron/examples/Polyhedron/poly_derivation.cpp @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include + + +template +struct Mesh: public CGAL::Polyhedron_3 { + std::string name; +}; + +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS typename Traits +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME Mesh +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Polyhedron_3 +#include + +typedef CGAL::Simple_cartesian K; +typedef K::Point_3 Point_3; + +int main() +{ + Mesh mesh; + CGAL::make_triangle(Point_3(0,0,0), Point_3(1,0,0), Point_3(1,1,1), mesh); + typedef boost::graph_traits>::vertex_descriptor vertex_descriptor; + + typedef boost::property_map,CGAL::vertex_point_t>::type Point_property_map; + Point_property_map ppm = get(CGAL::vertex_point, mesh); + + for(vertex_descriptor vd : vertices(mesh)){ + if (vd != boost::graph_traits>::null_vertex()){ + std::cout << get(ppm, vd) << std::endl; + } + } + std::cout << CGAL::Polygon_mesh_processing::bbox(mesh) << std::endl; + + return 0; +} + + + + + diff --git a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp index 3589b291eab..cde991d63c7 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp @@ -16,26 +16,9 @@ namespace My { } // namespace My -namespace boost { - - template <> - struct graph_traits - : public boost::graph_traits - {}; - - template - struct property_map - : public boost::property_map - {}; - -} - -namespace CGAL{ - template - struct graph_has_property - : public CGAL::graph_has_property - {}; -} +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My::Mesh +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Surface_mesh<::Point_3> +#include int main() { From 00550f2bb7956b7b22ed2c4e67320f7c6353fc61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 15:00:59 +0200 Subject: [PATCH 091/149] add user manual section --- BGL/doc/BGL/BGL.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BGL/doc/BGL/BGL.txt b/BGL/doc/BGL/BGL.txt index b31a570ee71..7e45b21988a 100644 --- a/BGL/doc/BGL/BGL.txt +++ b/BGL/doc/BGL/BGL.txt @@ -634,6 +634,12 @@ Seam meshes are for example used in Chapter \ref PkgSurfaceMeshParameterization to parameterize a topological sphere by first virtually cutting it into a topological disk. +\subsection BGLInheriting Inheriting from a Model of a Face Graph Concept +Several classes are provided as model of the face graph concepts by \cgal. In case, a user wants to inherit +from one of those classes (or any such model in general), a header file consuming some user defined macros +is provided to make the inheriting class a valid model of the same concepts. See `CGAL/boost/graph/graph_traits_inheritance_macros.h` +for more details. + \section BGLPartitioning Graph Partitioning For algorithms that operate locally, partitioning is often an easy way to parallelize From 4007fd94fbf27a20c0364218406800ef8a60bdb5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 19 Aug 2020 15:08:17 +0100 Subject: [PATCH 092/149] Add file to examples.txt --- Tetrahedral_remeshing/doc/Tetrahedral_remeshing/examples.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/examples.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/examples.txt index 72212b6136c..018dde26767 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/examples.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/examples.txt @@ -4,4 +4,5 @@ \example Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp \example Tetrahedral_remeshing/tetrahedral_remeshing_with_features.cpp \example Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp +\example Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp */ From b8efebd865159da27390d3529cf2c0caee11a55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 16:34:22 +0200 Subject: [PATCH 093/149] fix warning --- .../internal/Corefinement/Generic_clip_output_builder.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h index f391696cb3a..0a7c1961ff1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h @@ -125,6 +125,7 @@ public: void set_vertex_id(vertex_descriptor v, Node_id node_id, const TriangleMesh& tm) { + CGAL_use(tm); CGAL_assertion(&tm == &tm1); vertex_to_node_id1.insert( std::make_pair(v, node_id) ); } From c8b11162bf520e238737545c4ace1020beb14562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 16:40:37 +0200 Subject: [PATCH 094/149] fix rebase issues --- .../include/CGAL/Polygon_mesh_processing/clip.h | 1 - .../include/CGAL/Polygon_mesh_processing/corefinement.h | 5 ----- 2 files changed, 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 42146523be3..ae94faba8e2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -826,7 +826,6 @@ bool clip(TriangleMesh& tm, * Setting this option to `true` will automatically set `throw_on_self_intersection` to `false` * and `clip_volume` to `false`.} * \cgalParamNEnd - * \cgalParamNEnd * * \cgalNamedParamsEnd */ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index fd833cfb338..2b1acf46173 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -703,11 +703,6 @@ corefine_and_compute_difference( TriangleMesh& tm1, * If this option is set to `true` for one mesh, * the other mesh is no longer required to be without self-intersection.} * \cgalParamNEnd - * \cgalParamBegin{do_not_modify} - * If this parameter is set to `true` for both meshes nothing will be done. - * If this option is set to `true` for one mesh, - * the other mesh is no longer required to be without self-intersection. - * \cgalParamEnd * \cgalNamedParamsEnd * */ From c24ec4cfc4572938c656884d2aaf58025121c9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 17:29:06 +0200 Subject: [PATCH 095/149] tws --- .../CGAL/boost/graph/graph_traits_inheritance_macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index 88921443295..e84244f2792 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -15,8 +15,8 @@ // model itself // It is the responsibility of the including file to correctly set the -// macros CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME -// and optionally CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS. +// macros CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME, CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME +// and optionally CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS. // They are #undefed at the end of this file. /** From 603860a5313a14dc5e9412f81dede79b506272e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 17:35:57 +0200 Subject: [PATCH 096/149] update after review --- BGL/doc/BGL/BGL.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BGL/doc/BGL/BGL.txt b/BGL/doc/BGL/BGL.txt index 7e45b21988a..a210305978d 100644 --- a/BGL/doc/BGL/BGL.txt +++ b/BGL/doc/BGL/BGL.txt @@ -635,10 +635,10 @@ to parameterize a topological sphere by first virtually cutting it into a topolo disk. \subsection BGLInheriting Inheriting from a Model of a Face Graph Concept -Several classes are provided as model of the face graph concepts by \cgal. In case, a user wants to inherit -from one of those classes (or any such model in general), a header file consuming some user defined macros -is provided to make the inheriting class a valid model of the same concepts. See `CGAL/boost/graph/graph_traits_inheritance_macros.h` -for more details. +In order for a type `FG` to be a model of one face graph concept, a specialization of +`boost::graph_traits` must exist. When you derive a class from `FG` this graph traits class specialization does not match. +For such cases, a header file consuming some user defined macros is provided to make the inheriting class a valid model +of the same concepts. See `CGAL/boost/graph/graph_traits_inheritance_macros.h` for more details. \section BGLPartitioning Graph Partitioning From 94ff9052599d11e1d8f545af70d0b6cab5d00c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 19 Aug 2020 18:08:34 +0200 Subject: [PATCH 097/149] add concept checking test --- BGL/test/BGL/CMakeLists.txt | 2 + BGL/test/BGL/graph_concept_Derived.cpp | 112 +++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 BGL/test/BGL/graph_concept_Derived.cpp diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index abe121dd6b1..875cf10fd5d 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -71,6 +71,8 @@ create_single_source_cgal_program( "graph_concept_Linear_cell_complex.cpp" ) create_single_source_cgal_program( "graph_concept_Arrangement_2.cpp" ) +create_single_source_cgal_program( "graph_concept_Derived.cpp" ) + create_single_source_cgal_program( "test_clear.cpp" ) create_single_source_cgal_program( "test_helpers.cpp" ) diff --git a/BGL/test/BGL/graph_concept_Derived.cpp b/BGL/test/BGL/graph_concept_Derived.cpp new file mode 100644 index 00000000000..f28fc180a48 --- /dev/null +++ b/BGL/test/BGL/graph_concept_Derived.cpp @@ -0,0 +1,112 @@ +#include +#include +#include +#include +#include + +#include +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; + +template +struct My_mesh_1 : public CGAL::Polyhedron_3 {}; + +struct My_mesh_2 : public CGAL::Polyhedron_3 {}; + +template +struct My_mesh_3 : public CGAL::Surface_mesh {}; + +struct My_mesh_5 : public CGAL::Surface_mesh {}; + +// dim could be hard-coded but for the purpose of the example it is left +template +struct My_mesh_4 : + CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper + <2, dim, CGAL::Linear_cell_complex_traits >::type +{}; + +/// make My_mesh_1 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS typename Traits +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_1 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Polyhedron_3 +#include + +/// make My_mesh_2 a valid face graph model +// no template parameter, CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS is then not defined +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_2 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Polyhedron_3 +#include + +/// make My_mesh_3 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS typename PT +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_3 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Surface_mesh +#include + +/// make My_mesh_4 a valid face graph model +#define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS int dim, typename K +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_4 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME typename CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper\ + <2, dim, CGAL::Linear_cell_complex_traits >::type +#include + +/// make My_mesh_5 a valid face graph model +// no template parameter, CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS is then not defined +#define CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME My_mesh_5 +#define CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME CGAL::Surface_mesh +#include + + +template +void concept_check() +{ + typedef boost::graph_traits< Graph > Traits; + typedef typename Traits::edge_descriptor edge_descriptor; + typedef typename Traits::halfedge_descriptor halfedge_descriptor; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::face_descriptor face_descriptor; + + boost::function_requires< boost::GraphConcept >(); + boost::function_requires< boost::VertexListGraphConcept >(); + boost::function_requires< boost::EdgeListGraphConcept >(); + boost::function_requires< boost::IncidenceGraphConcept >(); + boost::function_requires< boost::AdjacencyMatrixConcept >(); + boost::function_requires< boost::BidirectionalGraphConcept >(); + boost::function_requires< CGAL::HalfedgeGraphConcept >(); + boost::function_requires< CGAL::HalfedgeListGraphConcept >(); + boost::function_requires< CGAL::FaceGraphConcept >(); + boost::function_requires< CGAL::FaceListGraphConcept >(); + boost::function_requires< CGAL::MutableHalfedgeGraphConcept >(); + boost::function_requires< CGAL::MutableFaceGraphConcept >(); + + boost::function_requires< boost::concepts::ReadablePropertyGraph< + Graph, halfedge_descriptor, CGAL::halfedge_index_t> >(); + boost::function_requires< boost::concepts::ReadablePropertyGraph< + Graph, edge_descriptor, boost::edge_index_t> >(); + boost::function_requires< boost::concepts::ReadablePropertyGraph< + Graph, edge_descriptor, boost::edge_weight_t> >(); + boost::function_requires< boost::concepts::PropertyGraph< + Graph, vertex_descriptor, CGAL::vertex_point_t> >(); + boost::function_requires< boost::concepts::ReadablePropertyGraph< + Graph, vertex_descriptor, boost::vertex_index_t> >(); + boost::function_requires< boost::concepts::ReadablePropertyGraph< + Graph, face_descriptor, CGAL::face_index_t> >(); + + // null + boost::graph_traits::null_vertex(); + boost::graph_traits::null_halfedge(); + boost::graph_traits::null_face(); +} + +int main() +{ + concept_check>(); + concept_check(); + concept_check >(); + concept_check>(); + concept_check(); + return 0; +} From 370d86625047e418f314d635379a710478706705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Aug 2020 05:58:03 +0200 Subject: [PATCH 098/149] typo --- .../internal/Corefinement/Generic_clip_output_builder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h index 0a7c1961ff1..bcc8e75469d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h @@ -24,6 +24,7 @@ #include #include +#include #include @@ -125,7 +126,7 @@ public: void set_vertex_id(vertex_descriptor v, Node_id node_id, const TriangleMesh& tm) { - CGAL_use(tm); + CGAL_USE(tm); CGAL_assertion(&tm == &tm1); vertex_to_node_id1.insert( std::make_pair(v, node_id) ); } From eab5aa962ea8023e47a97d17117678534ca26b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Aug 2020 10:26:31 +0200 Subject: [PATCH 099/149] apply f4d6c6fd15 to other resource files --- Documentation/doc/resources/1.8.13/stylesheet.css | 4 +++- Documentation/doc/resources/1.8.4/stylesheet.css | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/stylesheet.css b/Documentation/doc/resources/1.8.13/stylesheet.css index 41df79908ef..6138660d112 100644 --- a/Documentation/doc/resources/1.8.13/stylesheet.css +++ b/Documentation/doc/resources/1.8.13/stylesheet.css @@ -1245,10 +1245,12 @@ dl.citelist dt { font-weight:bold; margin-right:10px; padding:5px; + text-align:right; + width:52px; } dl.citelist dd { - margin:2px 0; + margin:2px 0 2px 72px; padding:5px 0; } diff --git a/Documentation/doc/resources/1.8.4/stylesheet.css b/Documentation/doc/resources/1.8.4/stylesheet.css index 688b81b2557..7f98899c634 100644 --- a/Documentation/doc/resources/1.8.4/stylesheet.css +++ b/Documentation/doc/resources/1.8.4/stylesheet.css @@ -1079,10 +1079,12 @@ dl.citelist dt { font-weight:bold; margin-right:10px; padding:5px; + text-align:right; + width:52px; } dl.citelist dd { - margin:2px 0; + margin:2px 0 2px 72px; padding:5px 0; } From 59a4c1d1d1b7da5a7b699c45ffbfea976db46fd3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 20 Aug 2020 10:55:05 +0200 Subject: [PATCH 100/149] use a better ppa with the right libs. --- .travis/build_package.sh | 2 +- .travis/install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 70e2d92d546..254dd2b08c7 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -11,7 +11,7 @@ function mytime { function build_examples { mkdir -p build-travis cd build-travis - mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCGAL_BUILD_THREE_DOC=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_boost_serialization=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_boost_iostreams=TRUE .. + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. mytime make -j2 VERBOSE=1 } diff --git a/.travis/install.sh b/.travis/install.sh index 63a9ec329eb..ec1791b750e 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -2,7 +2,7 @@ [ -n "$CGAL_DEBUG_TRAVIS" ] && set -x DONE=0 -sudo add-apt-repository ppa:mhier/libboost-latest -y +sudo add-apt-repository ppa:mikhailnov/pulseeffects -y sudo apt-get update while [ $DONE = 0 ] @@ -10,7 +10,7 @@ do DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-10 zsh \ flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \ qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \ -libboost1.73-dev || DONE=0 && sudo apt-get update +libboost1.72-dev || DONE=0 && sudo apt-get update done exit 0 From ec6b0bcf12a2468d47749991da179657dfb67817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Aug 2020 13:18:02 +0200 Subject: [PATCH 101/149] fixes from review --- BGL/doc/BGL/BGL.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BGL/doc/BGL/BGL.txt b/BGL/doc/BGL/BGL.txt index a210305978d..ca164170b6c 100644 --- a/BGL/doc/BGL/BGL.txt +++ b/BGL/doc/BGL/BGL.txt @@ -635,10 +635,10 @@ to parameterize a topological sphere by first virtually cutting it into a topolo disk. \subsection BGLInheriting Inheriting from a Model of a Face Graph Concept -In order for a type `FG` to be a model of one face graph concept, a specialization of +In order for a type `FG` to be a model of one of the face graph concepts, a specialization of `boost::graph_traits` must exist. When you derive a class from `FG` this graph traits class specialization does not match. -For such cases, a header file consuming some user defined macros is provided to make the inheriting class a valid model -of the same concepts. See `CGAL/boost/graph/graph_traits_inheritance_macros.h` for more details. +For such cases, a header file consuming some user defined macros is provided to make the derived class a valid model +of the same concept. See `CGAL/boost/graph/graph_traits_inheritance_macros.h` for more details. \section BGLPartitioning Graph Partitioning From 9d6d9929ec898c7289efabf49ac88d995865eaf2 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 20 Aug 2020 19:53:52 +0300 Subject: [PATCH 102/149] Cleaned up. Moved some operations from the the curve (Arr_segment_2) to the traits and declared the former deprecated. Optimized further the Intersect_2 functor. --- .../include/CGAL/Arr_segment_traits_2.h | 1120 +++++++++++------ 1 file changed, 733 insertions(+), 387 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index da21164610a..76a08325fa9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -8,8 +8,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein -// Efi Fogel +// Efi Fogel // Waqar Khan +// Simon Giraudot #ifndef CGAL_ARR_SEGMENT_TRAITS_2_H #define CGAL_ARR_SEGMENT_TRAITS_2_H @@ -26,12 +27,12 @@ #include +#include #include #include #include -#include -#include #include +#include namespace CGAL { @@ -81,211 +82,143 @@ public: typedef typename Kernel::Point_2 Point_2; protected: - Line_2 m_l; // The line that supports the segment. - Point_2 m_ps; // The source point of the segment. - Point_2 m_pt; // The target point of the segment. - bool m_is_pt_max; // Is the target (lexicographically) larger - // than the source. - bool m_is_vert; // Is this a vertical segment. - bool m_is_degen; // Is the segment degenerate (a single point). + Line_2 m_l; // the line that supports the segment. + Point_2 m_ps; // the source point of the segment. + Point_2 m_pt; // the target point of the segment. + bool m_is_directed_right; // is (lexicographically) directed left to right. + bool m_is_vert; // is this a vertical segment. + bool m_is_degen; // is the segment degenerate (a single point). public: - /*! Default constructor. */ - _Segment_cached_2() : m_is_vert(false), m_is_degen(true) {} - /*! Constructor from a segment. - * \param seg The segment. - * \pre The segment is not degenerate. + /// \name Creation + //@{ + + /*! Construct default. */ + _Segment_cached_2(); + + /*! Construct a segment from a Kernel segment. + * \param seg the segment. + * \pre the segment is not degenerate. */ - _Segment_cached_2(const Segment_2& seg) - { - Kernel kernel; - auto construct_vertex = kernel.construct_vertex_2_object(); + _Segment_cached_2(const Segment_2& seg); - m_ps = construct_vertex(seg, 0); - m_pt = construct_vertex(seg, 1); - - Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); - m_is_degen = (res == EQUAL); - m_is_pt_max = (res == SMALLER); - - CGAL_precondition_msg (! m_is_degen, - "Cannot construct a degenerate segment."); - - m_l = kernel.construct_line_2_object()(seg); - m_is_vert = kernel.is_vertical_2_object()(seg); - } - - /*! Construct a segment from two end-points. - * \param source The source point. - * \param target The target point. - * \param The two points must not be equal. + /*! Construct a segment from two endpoints. + * \param source the source point. + * \param target the target point. + * \param `source` and `target` are not equal. */ - _Segment_cached_2(const Point_2& source, const Point_2& target) : - m_ps(source), - m_pt(target) - { - Kernel kernel; + _Segment_cached_2(const Point_2& source, const Point_2& target); - Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); - m_is_degen = (res == EQUAL); - m_is_pt_max = (res == SMALLER); - - CGAL_precondition_msg(! m_is_degen, - "Cannot construct a degenerate segment."); - - m_l = kernel.construct_line_2_object()(source, target); - m_is_vert = kernel.is_vertical_2_object()(m_l); - } - - /*! Construct a segment from two end-points on a supporting line. - * \param supp_line The supporting line. - * \param source The source point. - * \param target The target point. - * \pre The two endpoints are not the same and both lie on the given line. + /*! Construct a segment from two endpoints on a supporting line. + * \param line the supporting line. + * \param source the source point. + * \param target the target point. + * \pre `source` and `target` are not equal and both lie on `line`. */ - _Segment_cached_2(const Line_2& supp_line, - const Point_2& source, const Point_2& target) : - m_l(supp_line), - m_ps(source), - m_pt(target) - { - Kernel kernel; + _Segment_cached_2(const Line_2& line, + const Point_2& source, const Point_2& target); - CGAL_precondition - (Segment_assertions::_assert_is_point_on(source, m_l, - Has_exact_division()) && - Segment_assertions::_assert_is_point_on(target, m_l, - Has_exact_division())); + /*! Construct a segment from all fields. + * \param line the supporting line. + * \param source the source point. + * \param target the target point. + * \param is_directed_right is (lexicographically) directed left to right. + * \param is_vert is the segment vertical. + * \param is_degen is the segment degenerate (a single point). + */ + _Segment_cached_2(const Line_2& line, + const Point_2& source, const Point_2& target, + bool is_directed_right, bool is_vert, bool is_degen); - m_is_vert = kernel.is_vertical_2_object()(m_l); - - Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); - m_is_degen = (res == EQUAL); - m_is_pt_max = (res == SMALLER); - - CGAL_precondition_msg(! m_is_degen, - "Cannot construct a degenerate segment."); - } - - /*! Assignment operator. + /*! Assign. * \param seg the source segment to copy from - * \pre The segment is not degenerate. + * \pre the segment is not degenerate. */ - const _Segment_cached_2& operator=(const Segment_2& seg) - { - Kernel kernel; - auto construct_vertex = kernel.construct_vertex_2_object(); + const _Segment_cached_2& operator=(const Segment_2& seg); - m_ps = construct_vertex(seg, 0); - m_pt = construct_vertex(seg, 1); + //@} - Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); - m_is_degen = (res == EQUAL); - m_is_pt_max = (res == SMALLER); - - CGAL_precondition_msg(! m_is_degen, - "Cannot construct a degenerate segment."); - - m_l = kernel.construct_line_2_object()(seg); - m_is_vert = kernel.is_vertical_2_object()(seg); - - return (*this); - } - - /*! Obtain the (lexicographically) left endpoint. - */ - const Point_2& left() const { return (m_is_pt_max ? m_ps : m_pt); } - - /*! Set the (lexicographically) left endpoint. - * \param p The point to set. - * \pre p lies on the supporting line to the left of the right endpoint. - */ - void set_left(const Point_2& p) - { - CGAL_precondition(! m_is_degen); - CGAL_precondition_code(Kernel kernel); - CGAL_precondition - (Segment_assertions::_assert_is_point_on(p, m_l, Has_exact_division()) && - (kernel.compare_xy_2_object()(p, right()) == SMALLER)); - - if (m_is_pt_max) m_ps = p; - else m_pt = p; - } - - /*! Obtain the (lexicographically) right endpoint. - */ - const Point_2& right() const { return (m_is_pt_max ? m_pt : m_ps); } - - /*! Set the (lexicographically) right endpoint. - * \param p The point to set. - * \pre p lies on the supporting line to the right of the left endpoint. - */ - void set_right(const Point_2& p) - { - CGAL_precondition(! m_is_degen); - CGAL_precondition_code(Kernel kernel); - CGAL_precondition - (Segment_assertions::_assert_is_point_on(p, m_l, Has_exact_division()) && - (kernel.compare_xy_2_object()(p, left()) == LARGER)); - - if (m_is_pt_max) m_pt = p; - else m_ps = p; - } + /// \name Accessors + //@{ /*! Obtain the supporting line. + * \return the supporting line. */ - const Line_2& line() const - { - CGAL_precondition(! m_is_degen); - return m_l; - } + const Line_2& line() const; + + /*! Obtain the segment source. + * \return the segment source. + */ + const Point_2& source() const; + + /*! Obtain the segment target. + * \return the segment target. + */ + const Point_2& target() const; /*! Determine whether the curve is vertical. + * \return a Boolean flag indicating whether the curve is vertical. */ - bool is_vertical() const - { - CGAL_precondition(! m_is_degen); - return m_is_vert; - } + bool is_vertical() const; - /*! Determine whether the curve is directed lexicographic from left to right + /*! Determine whether the curve is degenerate. + * return a Boolean flag indicating whether the curve is degenerate. */ - bool is_directed_right() const { return (m_is_pt_max); } + bool is_degenerate() const; + + /*! Determine whether the curve is lexicographically directed from left to + * right. + * \return a Boolean flag indicating whether the curve is lexicographically + * directed from left to right. + */ + bool is_directed_right() const; + + /*! Obtain the (lexicographically) left endpoint. + * \return the (lexicographically) left endpoint. + */ + const Point_2& left() const; + + /*! Obtain the (lexicographically) right endpoint. + * \return the (lexicographically) right endpoint. + */ + const Point_2& right() const; + + //@} + + /// \name Modifiers + //@{ + + /*! Set the (lexicographically) left endpoint. + * \param p the point to set. + * \pre p lies on the supporting line to the left of the right endpoint. + */ + void set_left(const Point_2& p); + + /*! Set the (lexicographically) right endpoint. + * \param p the point to set. + * \pre p lies on the supporting line to the right of the left endpoint. + */ + void set_right(const Point_2& p); + + //@} + + /// \name Deprecated + //@{ /*! Determine whether the given point is in the x-range of the segment. - * \param p The query point. + * \param p the query point. * \return (true) is in the x-range of the segment; (false) if it is not. */ - bool is_in_x_range(const Point_2& p) const - { - Kernel kernel; - typename Kernel_::Compare_x_2 compare_x = kernel.compare_x_2_object(); - const Comparison_result res1 = compare_x(p, left()); - - if (res1 == SMALLER) return false; - else if (res1 == EQUAL) return true; - - const Comparison_result res2 = compare_x(p, right()); - return (res2 != LARGER); - } + CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const; /*! Determine whether the given point is in the y-range of the segment. - * \param p The query point. + * \param p the query point. * \return (true) is in the y-range of the segment; (false) if it is not. */ - bool is_in_y_range(const Point_2& p) const - { - Kernel kernel; - typename Kernel_::Compare_y_2 compare_y = kernel.compare_y_2_object(); - const Comparison_result res1 = compare_y(p, left()); + CGAL_DEPRECATED bool is_in_y_range(const Point_2& p) const; - if (res1 == SMALLER) return false; - else if (res1 == EQUAL) return true; - - const Comparison_result res2 = compare_y(p, right()); - return (res2 != LARGER); - } + //@} }; public: @@ -296,7 +229,7 @@ public: typedef unsigned int Multiplicity; public: - /*! Default constructor. */ + /*! Construct default. */ Arr_segment_traits_2() {} /// \name Basic functor definitions. @@ -306,7 +239,7 @@ public: protected: typedef Arr_segment_traits_2 Traits; - /*! The traits (in case it has state) */ + //! The traits (in case it has state). const Traits& m_traits; /*! Constructor @@ -318,8 +251,8 @@ public: public: /*! Compare the x-coordinates of two points. - * \param p1 The first point. - * \param p2 The second point. + * \param p1 the first point. + * \param p2 the second point. * \return LARGER if x(p1) > x(p2); * SMALLER if x(p1) < x(p2); * EQUAL if x(p1) = x(p2). @@ -350,8 +283,8 @@ public: public: /*! Compare two points lexicographically: by x, then by y. - * \param p1 The first point. - * \param p2 The second point. + * \param p1 the first point. + * \param p2 the second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); * SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2); * EQUAL if the two points are equal. @@ -369,8 +302,8 @@ public: class Construct_min_vertex_2 { public: /*! Obtain the left endpoint of the x-monotone curve (segment). - * \param cv The curve. - * \return The left endpoint. + * \param cv the curve. + * \return the left endpoint. */ const Point_2& operator()(const X_monotone_curve_2& cv) const { return (cv.left()); } @@ -383,8 +316,8 @@ public: class Construct_max_vertex_2 { public: /*! Obtain the right endpoint of the x-monotone curve (segment). - * \param cv The curve. - * \return The right endpoint. + * \param cv the curve. + * \return the right endpoint. */ const Point_2& operator()(const X_monotone_curve_2& cv) const { return (cv.right()); } @@ -397,7 +330,7 @@ public: class Is_vertical_2 { public: /*! Check whether the given x-monotone curve is a vertical segment. - * \param cv The curve. + * \param cv the curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ bool operator()(const X_monotone_curve_2& cv) const @@ -411,7 +344,7 @@ public: protected: typedef Arr_segment_traits_2 Traits; - /*! The traits (in case it has state) */ + /*! the traits (in case it has state) */ const Traits& m_traits; /*! Constructor @@ -423,8 +356,8 @@ public: public: /*! Return the location of the given point with respect to the input curve. - * \param cv The curve. - * \param p The point. + * \param cv the curve. + * \param p the point. * \pre p is in the x-range of cv. * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; @@ -433,19 +366,19 @@ public: Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& cv) const { - CGAL_precondition(cv.is_in_x_range(p)); + CGAL_precondition(m_traits.is_in_x_range_2_object()(cv, p)); const Kernel& kernel = m_traits; if (! cv.is_vertical()) { - // Compare p with the segment's supporting line. + // Compare p with the segment supporting line. CGAL_assertion_code(auto cmp_x = kernel.compare_x_2_object()); CGAL_assertion(cmp_x(cv.left(), cv.right()) == SMALLER); return kernel.orientation_2_object()(cv.left(), cv.right(), p); } - // Compare with the vertical segment's end-points. - typename Kernel::Compare_y_2 compare_y = kernel.compare_y_2_object(); + // Compare with the vertical segment endpoints. + auto compare_y = kernel.compare_y_2_object(); Comparison_result res1 = compare_y(p, cv.left()); Comparison_result res2 = compare_y(p, cv.right()); return (res1 == res2) ? res1 : EQUAL; @@ -473,12 +406,12 @@ public: public: /*! Compare the y value of two x-monotone curves immediately to the left * of their intersection point. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \param cv1 the first curve. + * \param cv2 the second curve. + * \param p the intersection point. + * \pre the point p lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immediately to + * \return the relative position of cv1 with respect to cv2 immediately to * the left of p: SMALLER, LARGER or EQUAL. */ Comparison_result operator()(const X_monotone_curve_2& cv1, @@ -527,12 +460,12 @@ public: public: /*! Compare the y value of two x-monotone curves immediately to the right * of their intersection point. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \param cv1 the first curve. + * \param cv2 the second curve. + * \param p the intersection point. + * \pre the point p lies on both curves, and both of them must be also be * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immediately to + * \return the relative position of cv1 with respect to cv2 immediately to * the right of p: SMALLER, LARGER or EQUAL. */ Comparison_result operator()(const X_monotone_curve_2& cv1, @@ -579,8 +512,8 @@ public: public: /*! Check whether the two x-monotone curves are the same (have the same * graph). - * \param cv1 The first curve. - * \param cv2 The second curve. + * \param cv1 the first curve. + * \param cv2 the second curve. * \return (true) if the two curves are the same; (false) otherwise. */ bool operator()(const X_monotone_curve_2& cv1, @@ -594,8 +527,8 @@ public: } /*! Determine whether the two points are the same. - * \param p1 The first point. - * \param p2 The second point. + * \param p1 the first point. + * \param p2 the second point. * \return (true) if the two point are the same; (false) otherwise. */ bool operator()(const Point_2& p1, const Point_2& p2) const @@ -607,6 +540,7 @@ public: /*! Obtain an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } + //@} /// \name Functor definitions for supporting intersections. @@ -617,9 +551,9 @@ public: /*! Cut the given curve into x-monotone subcurves and insert them into the * given output iterator. As segments are always x_monotone, only one * object will be contained in the iterator. - * \param cv The curve. - * \param oi The output iterator, whose value-type is variant<.... - * \return The past-the-end iterator. + * \param cv the curve. + * \param oi the output iterator, whose value-type is variant<.... + * \return the past-the-end iterator. */ template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const @@ -650,11 +584,11 @@ public: public: /*! Split a given x-monotone curve at a given point into two sub-curves. - * \param cv The curve to split - * \param p The split point. - * \param c1 Output: The left resulting subcurve (p is its right endpoint). - * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. + * \param cv the curve to split + * \param p the split point. + * \param c1 Output: the left resulting subcurve (p is its right endpoint). + * \param c2 Output: the right resulting subcurve (p is its left endpoint). + * \pre p lies on cv but is not one of its endpoints. */ void operator()(const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -686,21 +620,76 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! Construct * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} friend class Arr_segment_traits_2; + // Specialized do_intersect with many tests skipped because at + // this point, we already know which point is left / right for + // both segments + bool do_intersect(const Point_2& A1, const Point_2& A2, + const Point_2& B1, const Point_2& B2) const + { + const Kernel& kernel = m_traits; + auto compare_xy = kernel.compare_xy_2_object(); + namespace interx = CGAL::Intersections::internal; + + switch(make_certain(compare_xy(A1,B1))) { + case SMALLER: + switch(make_certain(compare_xy(A2,B1))) { + case SMALLER: return false; + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(A2,B2))) { + case SMALLER: + return interx::seg_seg_do_intersect_crossing(A1,A2,B1,B2, kernel); + case EQUAL: return true; + default: // LARGER + return interx::seg_seg_do_intersect_contained(A1,A2,B1,B2, kernel); + } + } + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A1))) { + case SMALLER: return false; + case EQUAL: return true; + default: // LARGER + switch(make_certain(compare_xy(B2,A2))) { + case SMALLER: + return interx::seg_seg_do_intersect_crossing(B1,B2,A1,A2, kernel); + case EQUAL: return true; + default: // LARGER + return interx::seg_seg_do_intersect_contained(B1,B2,A1,A2, kernel); + } + } + } + CGAL_error(); // never reached + return false; + } + + /*! Determine whether the bounding boxes of two segments overlap + */ + bool do_overlap(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2) const + { + const Kernel& kernel = m_traits; + auto bbox_ctr = kernel.construct_bbox_2_object(); + auto bbox1 = bbox_ctr(cv1.source()) + bbox_ctr(cv1.target()); + auto bbox2 = bbox_ctr(cv2.source()) + bbox_ctr(cv2.target()); + return CGAL::do_overlap(bbox1, bbox2); + } + public: /*! Find the intersections of the two given curves and insert them into the * given output iterator. As two segments may intersect only once, only a * single intersection will be contained in the iterator. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param oi The output iterator. - * \return The past-the-end iterator. + * \param cv1 the first curve. + * \param cv2 the second curve. + * \param oi the output iterator. + * \return the past-the-end iterator. */ template OutputIterator operator()(const X_monotone_curve_2& cv1, @@ -712,14 +701,15 @@ public: Intersection_result; // Early ending with Bbox overlapping test - if (! CGAL::do_overlap(cv1.bbox(), cv2.bbox())) return oi; + if (! do_overlap(cv1, cv2)) return oi; // Early ending with specialized do_intersect const Kernel& kernel = m_traits; - if (! do_intersect(cv1.left(), cv1.right(), cv2.left(), cv2.right(), - kernel)) + if (! do_intersect(cv1.left(), cv1.right(), cv2.left(), cv2.right())) return oi; + // An intersection is guaranteed. + // Intersect the two supporting lines. auto res = kernel.intersect_2_object()(cv1.line(), cv2.line()); CGAL_assertion(bool(res)); @@ -727,21 +717,14 @@ public: // Check if we have a single intersection point. const Point_2* ip = boost::get(&*res); if (ip != nullptr) { - // Check if the intersection point ip lies on both segments. - const bool ip_on_cv1 = cv1.is_vertical() ? - cv1.is_in_y_range(*ip) : cv1.is_in_x_range(*ip); - - if (ip_on_cv1) { - const bool ip_on_cv2 = cv2.is_vertical() ? - cv2.is_in_y_range(*ip) : cv2.is_in_x_range(*ip); - - if (ip_on_cv2) { - // Create a pair representing the point with its multiplicity, - // which is always 1 for line segments. - Intersection_point ip_mult(*ip, 1); - *oi++ = Intersection_result(ip_mult); - } - } + CGAL_assertion(cv1.is_vertical() ? + m_traits.is_in_y_range_2_object()(cv1, *ip) : + m_traits.is_in_x_range_2_object()(cv1, *ip)); + CGAL_assertion(cv2.is_vertical() ? + m_traits.is_in_y_range_2_object()(cv2, *ip) : + m_traits.is_in_x_range_2_object()(cv2, *ip)); + Intersection_point ip_mult(*ip, 1); + *oi++ = Intersection_result(ip_mult); return oi; } @@ -750,34 +733,13 @@ public: // rightmost of the two left endpoints and p_r is the leftmost of the // two right endpoints. auto compare_xy = kernel.compare_xy_2_object(); - Point_2 p_l = (compare_xy(cv1.left(), cv2.left()) == SMALLER) ? + const Point_2& p_l = (compare_xy(cv1.left(), cv2.left()) == SMALLER) ? cv2.left() : cv1.left(); - Point_2 p_r = (compare_xy(cv1.right(), cv2.right()) == SMALLER) ? + const Point_2& p_r = (compare_xy(cv1.right(), cv2.right()) == SMALLER) ? cv1.right() : cv2.right(); // Examine the resulting segment. const Comparison_result cmp_res = compare_xy(p_l, p_r); - - if (cmp_res == SMALLER) { - // We have discovered an overlapping segment: - if (cv1.is_directed_right() == cv2.is_directed_right()) { - // cv1 and cv2 have the same directions, maintain this direction - // in the overlap segment - if (cv1.is_directed_right()) { - X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); - return oi; - } - X_monotone_curve_2 overlap_seg(cv1.line(), p_r, p_l); - *oi++ = Intersection_result(overlap_seg); - return oi; - } - // cv1 and cv2 have opposite directions, the overlap segment - // will be directed from left to right - X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); - return oi; - } if (cmp_res == EQUAL) { // The two segment have the same supporting line, but they just share // a common endpoint. Thus we have an intersection point, but we leave @@ -787,50 +749,25 @@ public: return oi; } - return oi; - } - - // Specialized do_intersect with many tests skipped because at - // this point, we already know which point is left / right for - // both segments - bool do_intersect(const Point_2& A1, const Point_2& A2, - const Point_2& B1, const Point_2& B2, - const Kernel& k) const - { - auto compare_xy = k.compare_xy_2_object(); - namespace interx = CGAL::Intersections::internal; - - switch(make_certain(compare_xy(A1,B1))) { - case SMALLER: - switch(make_certain(compare_xy(A2,B1))) { - case SMALLER: return false; - case EQUAL: return true; - default: // LARGER - switch(make_certain(compare_xy(A2,B2))) { - case SMALLER: - return interx::seg_seg_do_intersect_crossing(A1,A2,B1,B2, k); - case EQUAL: return true; - default: // LARGER - return interx::seg_seg_do_intersect_contained(A1,A2,B1,B2, k); - } - } - case EQUAL: return true; - default: // LARGER - switch(make_certain(compare_xy(B2,A1))) { - case SMALLER: return false; - case EQUAL: return true; - default: // LARGER - switch(make_certain(compare_xy(B2,A2))) { - case SMALLER: - return interx::seg_seg_do_intersect_crossing(B1,B2,A1,A2, k); - case EQUAL: return true; - default: // LARGER - return interx::seg_seg_do_intersect_contained(B1,B2,A1,A2, k); - } + CGAL_assertion(cmp_res == SMALLER); + // We have discovered an overlapping segment: + if (cv1.is_directed_right() == cv2.is_directed_right()) { + // cv1 and cv2 have the same directions, maintain this direction + // in the overlap segment + if (cv1.is_directed_right()) { + X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); + *oi++ = Intersection_result(overlap_seg); + return oi; } + X_monotone_curve_2 overlap_seg(cv1.line(), p_r, p_l); + *oi++ = Intersection_result(overlap_seg); + return oi; } - CGAL_error(); // never reached - return false; + // cv1 and cv2 have opposite directions, the overlap segment + // will be directed from left to right + X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); + *oi++ = Intersection_result(overlap_seg); + return oi; } }; @@ -853,8 +790,8 @@ public: public: /*! Check whether it is possible to merge two given x-monotone curves. - * \param cv1 The first curve. - * \param cv2 The second curve. + * \param cv1 the first curve. + * \param cv2 the second curve. * \return (true) if the two curves are mergeable, that is, if they are * supported by the same line; (false) otherwise. * \pre cv1 and cv2 share a common endpoint. @@ -898,10 +835,10 @@ public: public: /*! Merge two given x-monotone curves into a single curve (segment). - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param c Output: The merged curve. - * \pre The two curves are mergeable. + * \param cv1 the first curve. + * \param cv2 the second curve. + * \param c Output: the merged curve. + * \pre the two curves are mergeable. */ void operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -939,8 +876,8 @@ public: class Approximate_2 { public: /*! Obtain an approximation of a point coordinate. - * \param p The exact point. - * \param i The coordinate index (either 0 or 1). + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). * \pre i is either 0 or 1. * \return An approximation of p's x-coordinate (if i == 0), or an * approximation of p's y-coordinate (if i == 1). @@ -956,20 +893,97 @@ public: Approximate_2 approximate_2_object() const { return Approximate_2(); } class Construct_x_monotone_curve_2 { - public: - /*! Obtain an x-monotone curve connecting the two given endpoints. - * \param p The first point. - * \param q The second point. - * \pre p and q must not be the same. - * \return A segment connecting p and q. + protected: + typedef Arr_segment_traits_2 Traits; + + //! The traits (in case it has state). + const Traits& m_traits; + + /*! Constructor + * \param traits the traits (in case it has state) */ - X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const - { return (X_monotone_curve_2(p, q)); } + Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_segment_traits_2; + + public: + typedef typename Kernel::Segment_2 Segment_2; + + /*! Obtain an x-monotone curve connecting two given endpoints. + * \param source the first point. + * \param target the second point. + * \pre `source` and `target` must not be equal. + * \return a segment connecting `source` and `target`. + */ + X_monotone_curve_2 operator()(const Point_2& source, + const Point_2& target) const + { + const Kernel& kernel = m_traits; + auto line = kernel.construct_line_2_object()(source, target); + Comparison_result res = kernel.compare_xy_2_object()(source, target); + auto is_degen = (res == EQUAL); + auto is_directed_right = (res == SMALLER); + CGAL_precondition_msg(! is_degen, + "Cannot construct a degenerate segment."); + auto is_vert = kernel.is_vertical_2_object()(line); + return X_monotone_curve_2(line, source, target, + is_directed_right, is_vert, is_degen); + } + + /*! Obtain an \f$x\f$-monotone curve given a Kernel segment. + * \param seg the segment. + * \return the \f$x\f$-monotone curve. + * \pre the segment is not degenerate. + * \return a segment that is the same as `seg`.. + */ + X_monotone_curve_2 operator()(const Segment_2& seg) const + { + const Kernel& kernel = m_traits; + auto line = kernel.construct_line_2_object()(seg); + auto vertex_ctr = kernel.construct_vertex_2_object(); + auto source = vertex_ctr(seg, 0); + auto target = vertex_ctr(seg, 1); + Comparison_result res = kernel.compare_xy_2_object()(source, target); + auto is_degen = (res == EQUAL); + auto is_directed_right = (res == SMALLER); + CGAL_precondition_msg(! is_degen, + "Cannot construct a degenerate segment."); + auto is_vert = kernel.is_vertical_2_object()(seg); + return X_monotone_curve_2(line, source, target, + is_directed_right, is_vert, is_degen); + } + + /*! Obtain an \f$x\f$-monotone curve given two endpoints and the supporting + * line. + * \param line the supporting line. + * \param the source point. + * \param the target point. + * \pre `ps` and `pt` are not equal and both lie on `line`. + */ + X_monotone_curve_2 operator()(const Line_2& line, + const Point_2& source, + const Point_2& target) const + { + const Kernel& kernel = m_traits; + CGAL_precondition + (Segment_assertions::_assert_is_point_on(source, line, + Has_exact_division()) && + Segment_assertions::_assert_is_point_on(target, line, + Has_exact_division())); + auto is_vert = kernel.is_vertical_2_object()(line); + Comparison_result res = kernel.compare_xy_2_object()(source, target); + auto is_degen = (res == EQUAL); + auto is_directed_right = (res == SMALLER); + CGAL_precondition_msg(! is_degen, + "Cannot construct a degenerate segment."); + return X_monotone_curve_2(line, source, target, + is_directed_right, is_vert, is_degen); + } }; /*! Obtain a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const - { return Construct_x_monotone_curve_2(); } + { return Construct_x_monotone_curve_2(*this); } //@} /// \name Functor definitions for the Boolean set-operation traits. @@ -990,10 +1004,10 @@ public: friend class Arr_segment_traits_2; /*! Obtain a trimmed version of a line. - * \param xseg The x-monotone segment. + * \param xseg the x-monotone segment. * \param src the new start endpoint. * \param tgt the new end endpoint. - * \return The trimmed x-monotone segment. + * \return the trimmed x-monotone segment. * \pre src != tgt * \pre both points must lie on segment */ @@ -1031,7 +1045,7 @@ public: public: /*! Compare the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). - * \param cv The curve. + * \param cv the curve. * \return SMALLER if the curve is directed right; * LARGER if the curve is directed left. */ @@ -1046,8 +1060,8 @@ public: class Construct_opposite_2 { public: /*! Construct an opposite x-monotone (with swapped source and target). - * \param cv The curve. - * \return The opposite curve. + * \param cv the curve. + * \return the opposite curve. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const { return (cv.flip()); } @@ -1057,94 +1071,426 @@ public: Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} + + /// \name Utilities. + //@{ + + class Is_in_x_range_2 { + protected: + typedef Arr_segment_traits_2 Traits; + + //! The traits (in case it has state). + const Traits& m_traits; + + /*! Construct + * \param traits the traits (in case it has state) + */ + Is_in_x_range_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_segment_traits_2; + + public: + /*! Determine whether a given point is in the \f$x\f$-range of a given + * segment. + * \param cv the segment. + * \param p the point. + * \return true if p is in the \f$x\f$-range of cv; false otherwise. + */ + bool operator()(const X_monotone_curve_2& cv, const Point_2& p) const + { + const Kernel& kernel = m_traits; + auto compare_x = kernel.compare_x_2_object(); + Comparison_result res1 = compare_x(p, cv.left()); + + if (res1 == SMALLER) return false; + else if (res1 == EQUAL) return true; + + Comparison_result res2 = compare_x(p, cv.right()); + return (res2 != LARGER); + } + }; + + /*! Obtain an Is_in_x_range_2 functor object */ + Is_in_x_range_2 is_in_x_range_2_object() const + { return Is_in_x_range_2(*this); } + + class Is_in_y_range_2 { + protected: + typedef Arr_segment_traits_2 Traits; + + //! The traits (in case it has state). + const Traits& m_traits; + + /*! Construct + * \param traits the traits (in case it has state) + */ + Is_in_y_range_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_segment_traits_2; + + public: + /*! Determine whether a given point is in the \f$y\f$-range of a given + * segment. + * \param cv the segment. + * \param p the point. + * \return true if p is in the \f$y\f$-range of cv; false otherwise. + */ + bool operator()(const X_monotone_curve_2& cv, const Point_2& p) const + { + const Kernel& kernel = m_traits; + auto compare_y = kernel.compare_y_2_object(); + Comparison_result res1 = compare_y(p, cv.left()); + + if (res1 == SMALLER) return false; + else if (res1 == EQUAL) return true; + + Comparison_result res2 = compare_y(p, cv.right()); + return (res2 != LARGER); + } + }; + + /*! Obtain an Is_in_y_range_2 functor object */ + Is_in_y_range_2 is_in_y_range_2_object() const + { return Is_in_y_range_2(*this); } + + //@} }; +// Creation + +//! \brief constructs default. +template +Arr_segment_traits_2::_Segment_cached_2::_Segment_cached_2() : + m_is_vert(false), + m_is_degen(true) +{} + +//! \brief constructs a segment from a Kernel segment. +template +Arr_segment_traits_2:: +_Segment_cached_2::_Segment_cached_2(const Segment_2& seg) +{ + Kernel kernel; + auto vertex_ctr = kernel.construct_vertex_2_object(); + + m_ps = vertex_ctr(seg, 0); + m_pt = vertex_ctr(seg, 1); + + Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); + m_is_degen = (res == EQUAL); + m_is_directed_right = (res == SMALLER); + + CGAL_precondition_msg(! m_is_degen, "Cannot construct a degenerate segment."); + + m_l = kernel.construct_line_2_object()(seg); + m_is_vert = kernel.is_vertical_2_object()(seg); +} + +//! \brief Constructs a segment from two endpoints. +template +Arr_segment_traits_2:: +_Segment_cached_2::_Segment_cached_2(const Point_2& source, + const Point_2& target) : + m_ps(source), + m_pt(target) +{ + Kernel kernel; + + Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); + m_is_degen = (res == EQUAL); + m_is_directed_right = (res == SMALLER); + + CGAL_precondition_msg(! m_is_degen, "Cannot construct a degenerate segment."); + + m_l = kernel.construct_line_2_object()(source, target); + m_is_vert = kernel.is_vertical_2_object()(m_l); +} + +//! \brief constructs a segment from two endpoints on a supporting line. +template +Arr_segment_traits_2:: +_Segment_cached_2::_Segment_cached_2(const Line_2& line, + const Point_2& source, + const Point_2& target) : + m_l(line), + m_ps(source), + m_pt(target) +{ + Kernel kernel; + + CGAL_precondition + (Segment_assertions::_assert_is_point_on(source, m_l, + Has_exact_division()) && + Segment_assertions::_assert_is_point_on(target, m_l, + Has_exact_division())); + + m_is_vert = kernel.is_vertical_2_object()(m_l); + + Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); + m_is_degen = (res == EQUAL); + m_is_directed_right = (res == SMALLER); + + CGAL_precondition_msg(! m_is_degen, "Cannot construct a degenerate segment."); +} + +//! \brief constructs a segment from all fields. +template +Arr_segment_traits_2::_Segment_cached_2:: +_Segment_cached_2(const Line_2& line, + const Point_2& source, const Point_2& target, + bool is_directed_right, bool is_vert, bool is_degen) : + m_l(line), + m_ps(source), + m_pt(target), + m_is_directed_right(is_directed_right), + m_is_vert(is_vert), + m_is_degen(is_degen) +{} + +//! \brief assigns. +template +const typename Arr_segment_traits_2::_Segment_cached_2& +Arr_segment_traits_2::_Segment_cached_2::operator=(const Segment_2& seg) +{ + Kernel kernel; + auto vertex_ctr = kernel.construct_vertex_2_object(); + + m_ps = vertex_ctr(seg, 0); + m_pt = vertex_ctr(seg, 1); + + Comparison_result res = kernel.compare_xy_2_object()(m_ps, m_pt); + m_is_degen = (res == EQUAL); + m_is_directed_right = (res == SMALLER); + + CGAL_precondition_msg(! m_is_degen, "Cannot construct a degenerate segment."); + + m_l = kernel.construct_line_2_object()(seg); + m_is_vert = kernel.is_vertical_2_object()(seg); + + return (*this); +} + +// Accessors + +//! \brief obtains the supporting line. +template +const typename Kernel::Line_2& +Arr_segment_traits_2::_Segment_cached_2::line() const { return m_l; } + +//! \brief determines whether the curve is vertical. +template +bool Arr_segment_traits_2::_Segment_cached_2::is_vertical() const +{ return m_is_vert; } + +//! \brief determines whether the curve is degenerate. +template +bool Arr_segment_traits_2::_Segment_cached_2::is_degenerate() const +{ return m_is_degen; } + +/*! \brief determines whether the curve is lexicographically directed from + * left to right + */ +template +bool Arr_segment_traits_2::_Segment_cached_2::is_directed_right() const +{ return m_is_directed_right; } + +//! \brief obtain the segment source. +template +const typename Kernel::Point_2& +Arr_segment_traits_2::_Segment_cached_2::source() const { return m_ps; } + +//! \brief obtains the segment target. +template +const typename Kernel::Point_2& +Arr_segment_traits_2::_Segment_cached_2::target() const { return m_pt; } + +//! \brief obtains the (lexicographically) left endpoint. +template +const typename Kernel::Point_2& +Arr_segment_traits_2::_Segment_cached_2::left() const +{ return (m_is_directed_right ? m_ps : m_pt); } + +//! \brief obtains the (lexicographically) right endpoint. +template +const typename Kernel::Point_2& +Arr_segment_traits_2::_Segment_cached_2::right() const +{ return (m_is_directed_right ? m_pt : m_ps); } + +// Modifiers + +//! \brief sets the (lexicographically) left endpoint. +template +void Arr_segment_traits_2::_Segment_cached_2::set_left(const Point_2& p) +{ + CGAL_precondition(! m_is_degen); + CGAL_precondition_code(Kernel kernel); + CGAL_precondition + (Segment_assertions::_assert_is_point_on(p, m_l, Has_exact_division()) && + (kernel.compare_xy_2_object()(p, right()) == SMALLER)); + + if (m_is_directed_right) m_ps = p; + else m_pt = p; +} + +//! \brief sets the (lexicographically) right endpoint. +template +void Arr_segment_traits_2::_Segment_cached_2::set_right(const Point_2& p) +{ + CGAL_precondition(! m_is_degen); + CGAL_precondition_code(Kernel kernel); + CGAL_precondition + (Segment_assertions::_assert_is_point_on(p, m_l, Has_exact_division()) && + (kernel.compare_xy_2_object()(p, left()) == LARGER)); + + if (m_is_directed_right) m_pt = p; + else m_ps = p; +} + +//! \brief determines whether the given point is in the x-range of the segment. +template +bool Arr_segment_traits_2::_Segment_cached_2:: +is_in_x_range(const Point_2& p) const +{ + Kernel kernel; + typename Kernel::Compare_x_2 compare_x = kernel.compare_x_2_object(); + const Comparison_result res1 = compare_x(p, left()); + + if (res1 == SMALLER) return false; + else if (res1 == EQUAL) return true; + + const Comparison_result res2 = compare_x(p, right()); + return (res2 != LARGER); +} + +//! \brief determines whether the given point is in the y-range of the segment. +template +bool Arr_segment_traits_2::_Segment_cached_2:: +is_in_y_range(const Point_2& p) const +{ + Kernel kernel; + typename Kernel::Compare_y_2 compare_y = kernel.compare_y_2_object(); + const Comparison_result res1 = compare_y(p, left()); + + if (res1 == SMALLER) return false; + else if (res1 == EQUAL) return true; + + const Comparison_result res2 = compare_y(p, right()); + return (res2 != LARGER); +} + +// IO + /*! \class A representation of a segment, as used by the Arr_segment_traits_2 * traits-class. */ template -class Arr_segment_2 : - public Arr_segment_traits_2::_Segment_cached_2 -{ +class Arr_segment_2 : public Arr_segment_traits_2::_Segment_cached_2 { typedef Kernel_ Kernel; + typedef typename Arr_segment_traits_2::_Segment_cached_2 Base; typedef typename Kernel::Segment_2 Segment_2; typedef typename Kernel::Point_2 Point_2; typedef typename Kernel::Line_2 Line_2; public: - /*! Default constructor. */ - Arr_segment_2() : Base() {} + /*! Construct default. */ + Arr_segment_2(); - /*! Constructor from a "kernel" segment. - * \param seg The segment. - * \pre The segment is not degenerate. + /*! Construct a segment from a "kernel" segment. + * \param seg the segment. + * \pre the segment is not degenerate. */ - Arr_segment_2(const Segment_2& seg) : Base(seg) {} + Arr_segment_2(const Segment_2& seg); - /*! Construct a segment from two end-points. - * \param source The source point. - * \param target The target point. - * \pre The two points are not the same. + /*! Construct a segment from two endpoints. + * \param source the source point. + * \param target the target point. + * \pre `source` and `target` are not equal. */ - Arr_segment_2(const Point_2& source, const Point_2& target) : - Base(source, target) - {} + Arr_segment_2(const Point_2& source, const Point_2& target); - /*! Construct a segment from a line and two end-points. - * \param line The supporting line. - * \param source The source point. - * \param target The target point. - * \pre Both source and target must be on the supporting line. - * \pre The two points are not the same. + /*! Construct a segment from a line and two endpoints. + * \param line the supporting line. + * \param source the source point. + * \param target the target point. + * \pre Both `source` and `target` must be on `line`. + * \pre `source` and `target` are not equal. */ Arr_segment_2(const Line_2& line, - const Point_2& source, const Point_2& target) : - Base(line,source, target) - {} + const Point_2& source, const Point_2& target); + + /*! Construct a segment from all fields. + * \param line the supporting line. + * \param source the source point. + * \param target the target point. + * \param is_directed_right is (lexicographically) directed left to right. + * \param is_vert is the segment vertical. + * \param is_degen is the segment degenerate (a single point). + */ + Arr_segment_2(const Line_2& line, + const Point_2& source, const Point_2& target, + bool is_directed_right, bool is_vert, bool is_degen); /*! Cast to a segment. */ - operator Segment_2() const - { - Kernel kernel; - Segment_2 seg = kernel.construct_segment_2_object()(this->m_ps, this->m_pt); - return seg; - } - - /*! Create a bounding box for the segment. - */ - Bbox_2 bbox() const - { - Kernel kernel; - auto construct_bbox = kernel.construct_bbox_2_object(); - return construct_bbox(this->m_ps) + construct_bbox(this->m_pt); - } - - /*! Obtain the segment source. - */ - const Point_2& source() const { return (this->m_ps); } - - /*! Obtain the segment target. - */ - const Point_2& target() const { return (this->m_pt); } + operator Segment_2() const; /*! Flip the segment (swap its source and target). */ - Arr_segment_2 flip() const - { - Arr_segment_2 opp; - opp.m_l = this->m_l; - opp.m_ps = this->m_pt; - opp.m_pt = this->m_ps; - opp.m_is_pt_max = !(this->m_is_pt_max); - opp.m_is_vert = this->m_is_vert; - opp.m_is_degen = this->m_is_degen; - - return opp; - } + Arr_segment_2 flip() const; }; +//! \brief constructs default. +template +Arr_segment_2::Arr_segment_2() : Base() {} + +//! \brief constructs from a "kernel" segment. +template +Arr_segment_2::Arr_segment_2(const Segment_2& seg) : Base(seg) {} + +//! \brief constructs a segment from two end-points. +template +Arr_segment_2::Arr_segment_2(const Point_2& source, + const Point_2& target) : + Base(source, target) +{} + +//! \brief constructs a segment from a line and two end-points. +template +Arr_segment_2::Arr_segment_2(const Line_2& line, + const Point_2& source, + const Point_2& target) : + Base(line,source, target) +{} + +//! \brief constructs a segment from all fields. +template +Arr_segment_2::Arr_segment_2(const Line_2& line, + const Point_2& source, + const Point_2& target, + bool is_directed_right, + bool is_vert, bool is_degen) : + Base(line, source, target, is_directed_right, is_vert, is_degen) +{} + +//! \brief casts to a segment. +template +Arr_segment_2::operator Segment_2() const +{ + Kernel kernel; + auto seg_ctr = kernel.construct_segment_2_object(); + return seg_ctr(this->source(), this->target()); +} + +//! \brief flips the segment (swap its source and target). +template +Arr_segment_2 Arr_segment_2::flip() const +{ + return Arr_segment_2(this->line(), this->target(), this->source(), + ! (this->is_directed_right()), this->is_vertical(), + this->is_degenerate()); +} + /*! Exporter for the segment class used by the traits-class. */ template From a857651c21fb20b169efd6fb32c229165e04a518 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 20 Aug 2020 20:39:50 +0300 Subject: [PATCH 103/149] Optimized the bbox construction in do_bboxes_overlap() --- .../include/CGAL/Arr_segment_traits_2.h | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 76a08325fa9..e7f0de2b586 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -672,13 +672,25 @@ public: /*! Determine whether the bounding boxes of two segments overlap */ - bool do_overlap(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const + bool do_bboxes_overlap(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2) const { - const Kernel& kernel = m_traits; - auto bbox_ctr = kernel.construct_bbox_2_object(); - auto bbox1 = bbox_ctr(cv1.source()) + bbox_ctr(cv1.target()); - auto bbox2 = bbox_ctr(cv2.source()) + bbox_ctr(cv2.target()); + auto x1_min = CGAL::to_double(cv1.left().x()); + auto x1_max = CGAL::to_double(cv1.right().x()); + auto y1_s = CGAL::to_double(cv1.source().y()); + auto y1_t = CGAL::to_double(cv1.target().y()); + auto bbox1 = (y1_s < y1_t) ? + CGAL::Bbox_2(x1_min, y1_s, x1_max, y1_t) : + CGAL::Bbox_2(x1_min, y1_t, x1_max, y1_s); + + auto x2_min = CGAL::to_double(cv2.left().x()); + auto x2_max = CGAL::to_double(cv2.right().x()); + auto y2_s = CGAL::to_double(cv2.source().y()); + auto y2_t = CGAL::to_double(cv2.target().y()); + auto bbox2 = (y2_s < y2_t) ? + CGAL::Bbox_2(x2_min, y2_s, x2_max, y2_t) : + CGAL::Bbox_2(x2_min, y2_t, x2_max, y2_s); + return CGAL::do_overlap(bbox1, bbox2); } @@ -701,7 +713,7 @@ public: Intersection_result; // Early ending with Bbox overlapping test - if (! do_overlap(cv1, cv2)) return oi; + if (! do_bboxes_overlap(cv1, cv2)) return oi; // Early ending with specialized do_intersect const Kernel& kernel = m_traits; From b4e7a4ad0265280c8d4fac8d9bf82a3bc1e01666 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 22 Aug 2020 21:04:40 +0300 Subject: [PATCH 104/149] Reverted the bbox computation optimization as it turns out it doesn't help --- .../include/CGAL/Arr_segment_traits_2.h | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index e7f0de2b586..f2e47b41549 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -675,22 +675,10 @@ public: bool do_bboxes_overlap(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const { - auto x1_min = CGAL::to_double(cv1.left().x()); - auto x1_max = CGAL::to_double(cv1.right().x()); - auto y1_s = CGAL::to_double(cv1.source().y()); - auto y1_t = CGAL::to_double(cv1.target().y()); - auto bbox1 = (y1_s < y1_t) ? - CGAL::Bbox_2(x1_min, y1_s, x1_max, y1_t) : - CGAL::Bbox_2(x1_min, y1_t, x1_max, y1_s); - - auto x2_min = CGAL::to_double(cv2.left().x()); - auto x2_max = CGAL::to_double(cv2.right().x()); - auto y2_s = CGAL::to_double(cv2.source().y()); - auto y2_t = CGAL::to_double(cv2.target().y()); - auto bbox2 = (y2_s < y2_t) ? - CGAL::Bbox_2(x2_min, y2_s, x2_max, y2_t) : - CGAL::Bbox_2(x2_min, y2_t, x2_max, y2_s); - + const Kernel& kernel = m_traits; + auto construct_bbox = kernel.construct_bbox_2_object(); + auto bbox1 = construct_bbox(cv1.source()) + construct_bbox(cv1.target()); + auto bbox2 = construct_bbox(cv2.source()) + construct_bbox(cv2.target()); return CGAL::do_overlap(bbox1, bbox2); } @@ -1390,8 +1378,6 @@ is_in_y_range(const Point_2& p) const return (res2 != LARGER); } -// IO - /*! \class A representation of a segment, as used by the Arr_segment_traits_2 * traits-class. */ From 401d266a077ed95d6aa872fb8ea4fb456b86885d Mon Sep 17 00:00:00 2001 From: oboes Date: Sun, 23 Aug 2020 05:55:48 +0200 Subject: [PATCH 105/149] Fix error in HSV/RGB color conversion --- Stream_support/include/CGAL/IO/Color.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Stream_support/include/CGAL/IO/Color.h b/Stream_support/include/CGAL/IO/Color.h index a06819e4b08..10754d9979a 100644 --- a/Stream_support/include/CGAL/IO/Color.h +++ b/Stream_support/include/CGAL/IO/Color.h @@ -221,8 +221,6 @@ public: /*! replaces the rgb values of the colors by the conversion to rgb of the hsv values given as parameters. - - Double values given as parameters should take range between 0 and 1. */ void set_hsv (double hue, double saturation, @@ -232,8 +230,8 @@ public: saturation /= 100.; value /= 100.; double C = value*saturation; - int hh = (int)(hue/60.); - double X = C * (1-std::abs (hh % 2 - 1)); + double hh = (hue/60.); + double X = C * (1-std::abs(std::fmod(hh, 2) - 1)); double r = 0, g = 0, b = 0; if( hh>=0 && hh<1 ) From 189bea6570ee027182992a052f55e10a3877d73b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 23 Jun 2020 12:09:09 +0200 Subject: [PATCH 106/149] Fix CreateSelection(List) --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 3 ++- Polyhedron/demo/Polyhedron/Scene.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index bbb4aacfad1..20ed52be684 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1339,7 +1339,8 @@ void MainWindow::selectSceneItems(QList is) sceneView->setCurrentIndex(i); sceneView->selectionModel()->select(s, QItemSelectionModel::ClearAndSelect); - sceneView->scrollTo(s.indexes().first()); + if(!s.empty()) + sceneView->scrollTo(s.indexes().first()); } } diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index bf2041c8593..46299dcbae4 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -1200,6 +1200,8 @@ bool Scene::sort_lists(QVector >&sorted_lists, bool up) } void Scene::moveRowUp() { + if(selectionIndices().isEmpty()) + return; QVector >sorted_lists(1); QList to_select; //sort lists according to the indices of each item in its container (scene or group) @@ -1251,6 +1253,8 @@ void Scene::moveRowUp() } void Scene::moveRowDown() { + if(selectionIndices().isEmpty()) + return; QVector >sorted_lists(1); QList to_select; //sort lists according to the indices of each item in its container (scene or group) @@ -1300,7 +1304,9 @@ void Scene::moveRowDown() } } } - selectionChanged(to_select); + if(!to_select.isEmpty()){ + selectionChanged(to_select); + } } Scene::Item_id Scene::mainSelectionIndex() const { return (selectionIndices().size() == 1) ? selected_item : -1; From d1054d56c0ca8820d42ffa6aa55784fb30a07323 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 23 Jun 2020 12:18:27 +0200 Subject: [PATCH 107/149] Add `,` in grid items name --- .../demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp index 4a99a1101c0..75b996dda51 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp @@ -450,7 +450,7 @@ void Polyhedron_demo_affine_transform_plugin::grid() Kernel::Aff_transformation_3 trans(CGAL::TRANSLATION, Kernel::Vector_3(i*x_t,j*y_t,k*z_t)); CGAL::Polygon_mesh_processing::transform(trans, e); Facegraph_item* t_item = new Facegraph_item(e); - t_item->setName(tr("%1 %2%3%4") + t_item->setName(tr("%1 %2,%3,%4") .arg(item->name()) .arg(i) .arg(j) From 261e68727c6e3abd392612f45a29f39c7bb9b4dd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 24 Jun 2020 13:53:54 +0200 Subject: [PATCH 108/149] Use the sceneView->selectAll() instead of doing the selection by hand. --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 20ed52be684..359c176b686 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1315,6 +1315,8 @@ void MainWindow::selectSceneItem(int i) else { QItemSelection s = proxyModel->mapSelectionFromSource(scene->createSelection(i)); + if(s.empty()) + return; QModelIndex mi = proxyModel->mapFromSource(scene->getModelIndexFromId(i).first()); sceneView->setCurrentIndex(mi); sceneView->selectionModel()->select(s, @@ -1385,10 +1387,7 @@ void MainWindow::removeSceneItemFromSelection(int i) void MainWindow::selectAll() { - QItemSelection s = - proxyModel->mapSelectionFromSource(scene->createSelectionAll()); - sceneView->selectionModel()->select(s, - QItemSelectionModel::ClearAndSelect); + sceneView->selectAll(); } int MainWindow::getSelectedSceneItemIndex() const From 7ebca1cc83b9608f88c5bd500eb282947aaf9863 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 3 Jul 2020 12:24:09 +0200 Subject: [PATCH 109/149] Fix precision problems in strings --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 12 ++++++------ Polyhedron/demo/Polyhedron/Viewer.cpp | 24 ++++++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 359c176b686..ac320afc99d 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1781,12 +1781,12 @@ void MainWindow::updateInfo() { CGAL::Bbox_3 bbox = item->bbox(); if(bbox !=CGAL::Bbox_3()) item_text += QString("
Bounding box: min (%1,%2,%3), max (%4,%5,%6)
") - .arg(bbox.xmin()) - .arg(bbox.ymin()) - .arg(bbox.zmin()) - .arg(bbox.xmax()) - .arg(bbox.ymax()) - .arg(bbox.zmax()); + .arg(bbox.xmin(),0, 'g', 17) + .arg(bbox.ymin(),0, 'g', 17) + .arg(bbox.zmin(),0, 'g', 17) + .arg(bbox.xmax(),0, 'g', 17) + .arg(bbox.ymax(),0, 'g', 17) + .arg(bbox.zmax(),0, 'g', 17); if(!item_filename.isEmpty()) { item_text += QString("
File: %1
").arg(item_filename); } diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 5764693122f..ef1f8b08980 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -1508,12 +1508,18 @@ void Viewer_impl::showDistance(QPoint pixel) TextItem *ACoord = new TextItem(float(APoint.x), float(APoint.y), float(APoint.z), - QString("A(%1,%2,%3)").arg(APoint.x-viewer->offset().x).arg(APoint.y-viewer->offset().y).arg(APoint.z-viewer->offset().z), true, font, Qt::red, true); + QString("A(%1,%2,%3)") + .arg(APoint.x/scaler.x()-viewer->offset().x, 0, 'g', 10) + .arg(APoint.y/scaler.y()-viewer->offset().y, 0, 'g', 10) + .arg(APoint.z/scaler.z()-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); distance_text.append(ACoord); TextItem *BCoord = new TextItem(float(BPoint.x), float(BPoint.y), float(BPoint.z), - QString("B(%1,%2,%3)").arg(BPoint.x-viewer->offset().x).arg(BPoint.y-viewer->offset().y).arg(BPoint.z-viewer->offset().z), true, font, Qt::red, true); + QString("B(%1,%2,%3)") + .arg(BPoint.x/scaler.x()-viewer->offset().x, 0, 'g', 10) + .arg(BPoint.y/scaler.y()-viewer->offset().y, 0, 'g', 10) + .arg(BPoint.z/scaler.z()-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); distance_text.append(BCoord); CGAL::qglviewer::Vec centerPoint = 0.5*(BPoint+APoint); TextItem *centerCoord = new TextItem(float(centerPoint.x), @@ -1525,13 +1531,13 @@ void Viewer_impl::showDistance(QPoint pixel) Q_FOREACH(TextItem* ti, distance_text) textRenderer->addText(ti); Q_EMIT(viewer->sendMessage(QString("First point : A(%1,%2,%3), second point : B(%4,%5,%6), distance between them : %7") - .arg(APoint.x-viewer->offset().x) - .arg(APoint.y-viewer->offset().y) - .arg(APoint.z-viewer->offset().z) - .arg(BPoint.x-viewer->offset().x) - .arg(BPoint.y-viewer->offset().y) - .arg(BPoint.z-viewer->offset().z) - .arg(dist))); + .arg(APoint.x/scaler.x()-viewer->offset().x) + .arg(APoint.y/scaler.y()-viewer->offset().y) + .arg(APoint.z/scaler.z()-viewer->offset().z) + .arg(BPoint.x/scaler.x()-viewer->offset().x) + .arg(BPoint.y/scaler.y()-viewer->offset().y) + .arg(BPoint.z/scaler.z()-viewer->offset().z) + .arg(dist, 0, 'g', 10))); } } From 755c0448299e7477438bbdda4446b9cd2bffe8bb Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 24 Jul 2020 12:02:11 +0200 Subject: [PATCH 110/149] Fixes --- .../demo/Polyhedron/Scene_polyhedron_selection_item.cpp | 4 ++-- Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h | 2 +- Three/include/CGAL/Three/Scene_draw_interface.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index c5cd1efb718..35b6091e75f 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2256,9 +2256,9 @@ void Scene_polyhedron_selection_item::printAllIds() { d->item->polyhedron_item()->printAllIds(); } -bool Scene_polyhedron_selection_item::testDisplayId(double x, double y, double z, CGAL::Three::Viewer_interface* viewer)const +bool Scene_polyhedron_selection_item::testDisplayId(double x, double y, double z, CGAL::Three::Viewer_interface* viewer, const QVector3D& scaler)const { - return d->item->polyhedron_item()->testDisplayId(x, y, z, viewer); + return d->item->polyhedron_item()->testDisplayId(x, y, z, viewer, scaler); return false; } diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 936152e5086..be40f12bf37 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -218,7 +218,7 @@ public: bool printEdgeIds() const; bool printFaceIds() const; void printAllIds(); - bool testDisplayId(double, double, double, CGAL::Three::Viewer_interface*)const; + bool testDisplayId(double, double, double, CGAL::Three::Viewer_interface*, const QVector3D&)const; bool shouldDisplayIds(CGAL::Three::Scene_item *current_item) const; QString defaultSaveName() const { diff --git a/Three/include/CGAL/Three/Scene_draw_interface.h b/Three/include/CGAL/Three/Scene_draw_interface.h index 3a77569d102..4ceaa728a23 100644 --- a/Three/include/CGAL/Three/Scene_draw_interface.h +++ b/Three/include/CGAL/Three/Scene_draw_interface.h @@ -16,6 +16,7 @@ #include #include +#include class QKeyEvent; class QPoint; namespace CGAL From ccda9638a4ed17a1b27c3b8d77482e8419901f02 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 24 Jul 2020 16:13:58 +0200 Subject: [PATCH 111/149] Update displayed ids when moving a point --- .../Scene_polyhedron_selection_item.cpp | 14 ++++++++ .../Scene_polyhedron_selection_item.h | 3 ++ .../Polyhedron/Scene_surface_mesh_item.cpp | 34 ++++++++++++++++--- .../demo/Polyhedron/Scene_surface_mesh_item.h | 1 + 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 35b6091e75f..d5aa1626bc5 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2610,3 +2610,17 @@ CGAL::Three::Scene_item::Header_data Scene_polyhedron_selection_item::header() c data.titles.append(QString("Average")); return data; } + + +void Scene_polyhedron_selection_item::updateDisplayedIds(QEvent* e) +{ + if(e->type() == QEvent::MouseButtonRelease ) + { + QMouseEvent* mouse_event = static_cast(e); + if((mouse_event->button() == Qt::RightButton || mouse_event->button() == Qt::MiddleButton) + && temp_selected_vertices.size() == 1) { + fg_vertex_descriptor vh = *temp_selected_vertices.begin(); + poly_item->updateIds(vh); + } + } +} diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index be40f12bf37..71cd28e6f85 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -799,6 +799,7 @@ public: } void selection_changed(bool); + void updateDisplayedIds(QEvent *e); Q_SIGNALS: void updateInstructions(QString); @@ -875,6 +876,8 @@ protected: } } + updateDisplayedIds(gen_event); + if(!visible() || !k_ring_selector.state.shift_pressing) { return false; } if(gen_event->type() == QEvent::Wheel) { diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index efd7fbabd8d..ebb7679d21b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -135,6 +135,7 @@ struct Scene_surface_mesh_item_priv{ << GouraudPlusEdges << Points; item->setProperty("classname", QString("surface_mesh")); + ids_need_update = false; } Scene_surface_mesh_item_priv(SMesh* sm, Scene_surface_mesh_item *parent): @@ -167,7 +168,8 @@ struct Scene_surface_mesh_item_priv{ << Gouraud << GouraudPlusEdges << Points; - item->setProperty("classname", QString("surface_mesh")); + item->setProperty("classname", QString("surface_mesh"));\ + ids_need_update = false; } ~Scene_surface_mesh_item_priv() @@ -223,7 +225,6 @@ struct Scene_surface_mesh_item_priv{ mutable bool edges_displayed; mutable bool faces_displayed; mutable bool all_displayed; - mutable QList text_ids; mutable std::vector targeted_id; std::string comments; @@ -238,7 +239,6 @@ struct Scene_surface_mesh_item_priv{ mutable bool isinit; mutable std::vector idx_data_; mutable std::size_t idx_data_size; - mutable std::map current_indices; //map im values to ghosts-free values mutable std::vector idx_edge_data_; mutable std::size_t idx_edge_data_size; mutable std::vector idx_feature_edge_data_; @@ -266,6 +266,7 @@ struct Scene_surface_mesh_item_priv{ bool has_nm_vertices; int genus; bool self_intersect; + bool ids_need_update; mutable QSlider* alphaSlider; QList supported_rendering_modes; }; @@ -2016,6 +2017,7 @@ void Scene_surface_mesh_item_priv::fillTargetedIds(const face_descriptor &select CGAL::Three::Viewer_interface *viewer, const CGAL::qglviewer::Vec& offset) { + all_displayed = false; compute_displayed_ids(*smesh_, viewer, selected_fh, @@ -2367,9 +2369,31 @@ void Scene_surface_mesh_item::updateVertex(vertex_descriptor vh) getTriangleContainer(0)->getVbo(Tri::Smooth_normals), new_point,id); } + d->ids_need_update = true; + redraw(); + } +} + +void Scene_surface_mesh_item::updateIds(vertex_descriptor vh) +{ + if(d->ids_need_update && + (d->faces_displayed || d->vertices_displayed || d->edges_displayed)) + { + invalidate_aabb_tree(); + + if(d->all_displayed) + { + d->killIds(); + d->all_displayed = true; + ::printVertexIds(*d->smesh_, d->textVItems); + } + else + { + d->fillTargetedIds(face(halfedge(vh, *d->smesh_), *d->smesh_), + face_graph()->point(vh), CGAL::Three::Three::mainViewer(), CGAL::Three::Three::mainViewer()->offset()); + } + d->ids_need_update = false; } - invalidate_aabb_tree(); - redraw(); } void Scene_surface_mesh_item::switchToGouraudPlusEdge(bool b) diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h index ce3ea53002a..b8b88be572f 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h @@ -156,6 +156,7 @@ public: void computeElements() const Q_DECL_OVERRIDE; void initializeBuffers(CGAL::Three::Viewer_interface*)const Q_DECL_OVERRIDE; void updateVertex(vertex_descriptor vh); + void updateIds(vertex_descriptor vh); void switchToGouraudPlusEdge(bool b); //replace flatPlusEdge by gouraudPlusEdge and ban Flat. Q_SIGNALS: void item_is_about_to_be_changed(); From 46a31fc97aaaa879c3c6bc4d09b81bf93097d65e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 7 Aug 2020 10:25:56 +0200 Subject: [PATCH 112/149] Fix alpha in soups and c3t3 --- Polyhedron/demo/Polyhedron/Scene.cpp | 17 ++++++++++++++++- Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp | 2 +- .../demo/Polyhedron/Scene_polygon_soup_item.cpp | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index 46299dcbae4..7895f0b869e 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -704,7 +704,22 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) Q_FOREACH(Item_id id, children) { Scene_item* item = m_entries[id]; - if(item->alpha() == 1.0f) + Scene_group_item* group = qobject_cast(item); + bool is_transparent=false; + if(item->alpha() != 1.0f) + is_transparent = true; + else if(group) + { + for(const auto& child : group->getChildren()) + { + if(group->getChild(child)->alpha() < 1.0f) + { + is_transparent = true; + break; + } + } + } + if(!is_transparent) opaque_items.push_back(id); else transparent_items.push_back(id); diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index 82edf798ddb..fc4476f61c9 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -145,7 +145,7 @@ public : alphaSlider->setMaximum(255); alphaSlider->setValue(255); } - viewer->makeCurrent(); + //viewer->makeCurrent(); const EPICK::Plane_3& plane = qobject_cast(this->parent())->plane(); float shrink_factor = qobject_cast(this->parent())->getShrinkFactor(); QVector4D cp(-plane.a(), -plane.b(), -plane.c(), -plane.d()); diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index c2f5978cc11..91b060ad928 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -571,12 +571,14 @@ Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(d->soup->fcolors.empty()) getTriangleContainer(Priv::Flat_facets)->setColor(this->color()); + getTriangleContainer(Priv::Flat_facets)->setAlpha(alpha()); getTriangleContainer(Priv::Flat_facets)->draw(viewer, d->soup->fcolors.empty()); } else if(renderingMode() == Gouraud) { if(d->soup->vcolors.empty()) getTriangleContainer(Priv::Smooth_facets)->setColor(this->color()); + getTriangleContainer(Priv::Smooth_facets)->setAlpha(alpha()); getTriangleContainer(Priv::Smooth_facets)->draw(viewer, d->soup->vcolors.empty()); } } From 9c2889e41b3ff575c4d9e8e864e0bf4536b41b33 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 18 Aug 2020 14:36:03 +0200 Subject: [PATCH 113/149] Get rid of the VAO destroy warning --- Polyhedron/demo/Polyhedron/Viewer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index ef1f8b08980..4b929161122 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -367,6 +367,7 @@ Viewer::~Viewer() .arg(d->specular.z())); viewer_settings.setValue("spec_power", d->spec_power); + d->vao.destroy(); if(d->_recentFunctions) delete d->_recentFunctions; if(d->painter) From 58fb204e972bfaf33007d0d9fe61dab159409e4c Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 24 Aug 2020 11:52:27 +0300 Subject: [PATCH 114/149] Placed back the bbox() function. (Will be deprecated in a separate commit.) --- .../include/CGAL/Arr_segment_traits_2.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index f2e47b41549..8e48f735158 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -1436,6 +1436,15 @@ public: /*! Flip the segment (swap its source and target). */ Arr_segment_2 flip() const; + + /*! Create a bounding box for the segment. + */ + Bbox_2 bbox() const + { + Kernel kernel; + auto construct_bbox = kernel.construct_bbox_2_object(); + return construct_bbox(this->m_ps) + construct_bbox(this->m_pt); + } }; //! \brief constructs default. From ecdce77f178345cafd859d4b935cf25a647443aa Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 24 Aug 2020 09:31:45 +0200 Subject: [PATCH 115/149] Fixes Post cherry-pick --- .../Scene_polyhedron_selection_item.cpp | 4 ++-- .../Scene_polyhedron_selection_item.h | 2 +- Polyhedron/demo/Polyhedron/Viewer.cpp | 24 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index d5aa1626bc5..8798e0c51cf 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2256,9 +2256,9 @@ void Scene_polyhedron_selection_item::printAllIds() { d->item->polyhedron_item()->printAllIds(); } -bool Scene_polyhedron_selection_item::testDisplayId(double x, double y, double z, CGAL::Three::Viewer_interface* viewer, const QVector3D& scaler)const +bool Scene_polyhedron_selection_item::testDisplayId(double x, double y, double z, CGAL::Three::Viewer_interface* viewer)const { - return d->item->polyhedron_item()->testDisplayId(x, y, z, viewer, scaler); + return d->item->polyhedron_item()->testDisplayId(x, y, z, viewer); return false; } diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 71cd28e6f85..dbfca601296 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -218,7 +218,7 @@ public: bool printEdgeIds() const; bool printFaceIds() const; void printAllIds(); - bool testDisplayId(double, double, double, CGAL::Three::Viewer_interface*, const QVector3D&)const; + bool testDisplayId(double, double, double, CGAL::Three::Viewer_interface*)const; bool shouldDisplayIds(CGAL::Three::Scene_item *current_item) const; QString defaultSaveName() const { diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 4b929161122..96e62eeddb7 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -1510,17 +1510,17 @@ void Viewer_impl::showDistance(QPoint pixel) float(APoint.y), float(APoint.z), QString("A(%1,%2,%3)") - .arg(APoint.x/scaler.x()-viewer->offset().x, 0, 'g', 10) - .arg(APoint.y/scaler.y()-viewer->offset().y, 0, 'g', 10) - .arg(APoint.z/scaler.z()-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); + .arg(APoint.x-viewer->offset().x, 0, 'g', 10) + .arg(APoint.y-viewer->offset().y, 0, 'g', 10) + .arg(APoint.z-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); distance_text.append(ACoord); TextItem *BCoord = new TextItem(float(BPoint.x), float(BPoint.y), float(BPoint.z), QString("B(%1,%2,%3)") - .arg(BPoint.x/scaler.x()-viewer->offset().x, 0, 'g', 10) - .arg(BPoint.y/scaler.y()-viewer->offset().y, 0, 'g', 10) - .arg(BPoint.z/scaler.z()-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); + .arg(BPoint.x-viewer->offset().x, 0, 'g', 10) + .arg(BPoint.y-viewer->offset().y, 0, 'g', 10) + .arg(BPoint.z-viewer->offset().z, 0, 'g', 10), true, font, Qt::red, true); distance_text.append(BCoord); CGAL::qglviewer::Vec centerPoint = 0.5*(BPoint+APoint); TextItem *centerCoord = new TextItem(float(centerPoint.x), @@ -1532,12 +1532,12 @@ void Viewer_impl::showDistance(QPoint pixel) Q_FOREACH(TextItem* ti, distance_text) textRenderer->addText(ti); Q_EMIT(viewer->sendMessage(QString("First point : A(%1,%2,%3), second point : B(%4,%5,%6), distance between them : %7") - .arg(APoint.x/scaler.x()-viewer->offset().x) - .arg(APoint.y/scaler.y()-viewer->offset().y) - .arg(APoint.z/scaler.z()-viewer->offset().z) - .arg(BPoint.x/scaler.x()-viewer->offset().x) - .arg(BPoint.y/scaler.y()-viewer->offset().y) - .arg(BPoint.z/scaler.z()-viewer->offset().z) + .arg(APoint.x-viewer->offset().x) + .arg(APoint.y-viewer->offset().y) + .arg(APoint.z-viewer->offset().z) + .arg(BPoint.x-viewer->offset().x) + .arg(BPoint.y-viewer->offset().y) + .arg(BPoint.z-viewer->offset().z) .arg(dist, 0, 'g', 10))); } From 23a02ff4412e06cd3c28e1d96fc7ec1ceb00f6a9 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 25 Aug 2020 11:48:20 +0300 Subject: [PATCH 116/149] Pacify Windows msvc (definition of casting operator). --- Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 8e48f735158..44f65d9b056 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -1482,7 +1482,7 @@ Arr_segment_2::Arr_segment_2(const Line_2& line, //! \brief casts to a segment. template -Arr_segment_2::operator Segment_2() const +Arr_segment_2::operator typename Kernel::Segment_2() const { Kernel kernel; auto seg_ctr = kernel.construct_segment_2_object(); From 9d1e849517ad2d6b2ad7bdaddb8788de1fdcaea3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 27 Aug 2020 10:26:58 +0200 Subject: [PATCH 117/149] Allow the .mesh to be read even with null domains --- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 18 ++++++++++++------ .../Plugins/Mesh_3/C3t3_io_plugin.cpp | 9 +++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index e7e8c6d87f3..52c82371776 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -106,7 +106,8 @@ bool build_finite_cells(Tr& tr, boost::unordered_map, std::vector > >& incident_cells_map, const std::map, typename Tr::Cell::Surface_patch_index>& border_facets, - const bool verbose) + const bool verbose, + bool prevent_domain_0 = true) { typedef std::array Tet_with_ref; // 4 ids + 1 reference @@ -141,7 +142,10 @@ bool build_finite_cells(Tr& tr, Cell_handle c = tr.tds().create_cell(vs[0], vs[1], vs[2], vs[3]); c->set_subdomain_index(tet[4]); // the cell's info keeps the reference of the tetrahedron - + c->info() = tet[4]; // the cell's info keeps the reference of the tetrahedron + if(prevent_domain_0){ + CGAL_precondition(tet[4] > 0); + } // assign cells to vertices for(int j=0; j<4; ++j) { @@ -328,7 +332,8 @@ bool build_triangulation(Tr& tr, const std::vector >& finite_cells, const std::map, typename Tr::Cell::Surface_patch_index>& border_facets, std::vector& vertex_handle_vector, - const bool verbose = false) + const bool verbose = false, + bool prevent_domain_0 = true) { typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; @@ -360,7 +365,7 @@ bool build_triangulation(Tr& tr, if (!finite_cells.empty()) { if(!build_finite_cells(tr, finite_cells, vertex_handle_vector, incident_cells_map, - border_facets, verbose)) + border_facets, verbose, prevent_domain_0)) return false; if(!build_infinite_cells(tr, incident_cells_map, verbose)) return false; @@ -384,7 +389,8 @@ bool build_triangulation(Tr& tr, template bool build_triangulation_from_file(std::istream& is, - Tr& tr) + Tr& tr, + bool prevent_domain_0 = true) { typedef typename Tr::Point Point_3; @@ -473,7 +479,7 @@ bool build_triangulation_from_file(std::istream& is, std::vector vertices(points.size() + 1); bool is_well_built = build_triangulation(tr, - points, finite_cells, border_facets, vertices); + points, finite_cells, border_facets, vertices, false, prevent_domain_0); return is_well_built; } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp index 95bf0246fe6..b1dd73cd90a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp @@ -127,7 +127,7 @@ Polyhedron_demo_c3t3_binary_io_plugin::load( item->setName(fileinfo.baseName()); item->set_valid(false); - if(CGAL::build_triangulation_from_file(in, item->c3t3().triangulation())) + if(CGAL::build_triangulation_from_file(in, item->c3t3().triangulation(), false)) { item->c3t3().rescan_after_load_of_triangulation(); for( C3t3::Triangulation::Finite_cells_iterator @@ -135,13 +135,14 @@ Polyhedron_demo_c3t3_binary_io_plugin::load( cit != item->c3t3().triangulation().finite_cells_end(); ++cit) { + if(cit->subdomain_index() != C3t3::Triangulation::Cell::Subdomain_index()) - item->c3t3().add_to_complex(cit, cit->subdomain_index()); + item->c3t3().add_to_complex(cit, cit->subdomain_index() == 0 ? 1 : cit->subdomain_index()); for(int i=0; i < 4; ++i) { - if(cit->surface_patch_index(i)>0) + if(cit->surface_patch_index(i)>=0) { - item->c3t3().add_to_complex(cit, i, cit->surface_patch_index(i)); + item->c3t3().add_to_complex(cit, i, cit->surface_patch_index(i) == 0 ? 1 : cit->surface_patch_index(i)); } } } From 39c0f964922b4be9a2b4d0a7380280257e67c33a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 27 Aug 2020 13:18:46 +0200 Subject: [PATCH 118/149] Fix domain 0 behaviour --- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 16 +++++++++++++++- .../Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp | 7 +++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index 52c82371776..ed43decbe56 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -119,7 +119,16 @@ bool build_finite_cells(Tr& tr, typename Tr::Geom_traits::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); ) - + int max_domain = -1; + if(!prevent_domain_0) + { + for(std::size_t i=0; i max_domain) + max_domain=tet[4]; + } + } // build the finite cells for(std::size_t i=0; i 0); } + else + { + c->set_subdomain_index(max_domain+1); // the cell's info keeps the reference of the tetrahedron + c->info() = max_domain+1; // the cell's info keeps the reference of the tetrahedron + } // assign cells to vertices for(int j=0; j<4; ++j) { diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp index b1dd73cd90a..1ea57c3958b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp @@ -135,14 +135,13 @@ Polyhedron_demo_c3t3_binary_io_plugin::load( cit != item->c3t3().triangulation().finite_cells_end(); ++cit) { - if(cit->subdomain_index() != C3t3::Triangulation::Cell::Subdomain_index()) - item->c3t3().add_to_complex(cit, cit->subdomain_index() == 0 ? 1 : cit->subdomain_index()); + item->c3t3().add_to_complex(cit, cit->subdomain_index()); for(int i=0; i < 4; ++i) { - if(cit->surface_patch_index(i)>=0) + if(cit->surface_patch_index(i)>0) { - item->c3t3().add_to_complex(cit, i, cit->surface_patch_index(i) == 0 ? 1 : cit->surface_patch_index(i)); + item->c3t3().add_to_complex(cit, i, cit->surface_patch_index(i)); } } } From 56af55ecd434b2c6a44bc86a966042e041c442a3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 27 Aug 2020 13:46:04 +0200 Subject: [PATCH 119/149] Fix bug in mesh_3 tests --- .../CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h | 6 +++++- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h index 2f4705e66d0..d6852a072f2 100644 --- a/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h +++ b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h @@ -24,8 +24,12 @@ class Mesh_complex_3_in_triangulation_3; template bool build_triangulation_from_file(std::istream& is, - Tr& tr); + Tr& tr, + bool prevent_domain_0); +template +bool build_triangulation_from_file(std::istream& is, + Tr& tr); } // CGAL #endif diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index ed43decbe56..b928aa3801f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -404,7 +404,7 @@ bool build_triangulation(Tr& tr, template bool build_triangulation_from_file(std::istream& is, Tr& tr, - bool prevent_domain_0 = true) + bool prevent_domain_0) { typedef typename Tr::Point Point_3; @@ -497,6 +497,12 @@ bool build_triangulation_from_file(std::istream& is, return is_well_built; } +template +bool build_triangulation_from_file(std::istream& is, + Tr& tr) +{ + return build_triangulation_from_file(is, tr, true); +} } // namespace CGAL #include From 53ed991b5deef876e9a5757a3595b36e0052daac Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 27 Aug 2020 15:39:08 +0200 Subject: [PATCH 120/149] Fall back to LU instead of LDLT with old Eigen --- .../include/CGAL/NewKernel_d/Types/Weighted_point.h | 13 ++++++++++++- .../CGAL/NewKernel_d/function_objects_cartesian.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h b/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h index e83af0db167..6e970a5f13a 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h @@ -236,13 +236,24 @@ template struct Power_center : Store_kernel { } // Only need to fill the lower half for(int i = 0; i < k-1; ++i){ - for(int j = i; j < k-1; ++j) + for(int j = i; j < k-1; ++j){ m(j, i) = sp(vecs[i], vecs[j]); +#if ! EIGEN_VERSION_AT_LEAST(3, 3, 5) + m(i, j) = m(j, i); +#endif + } b[i] += m(i, i); b[i] /= 2; } // Assumes Eigen... +#if EIGEN_VERSION_AT_LEAST(3, 3, 5) Vec res = m.ldlt().solve(b); +#else + // Older versions of Eigen use 1/highest as tolerance, + // which we have no way to set to 0 for exact types. + // Use something slow but that should work. + Vec res = m.fullPivLu().solve(b); +#endif Vector to_center = sv(vecs[0], res[0]); for(int i=1;i struct Construct_circumcenter : Store_kernel { vecs.emplace_back(dp(*f,p0)); // Only need to fill the lower half for(int i=0;i Date: Fri, 28 Aug 2020 08:10:04 +0200 Subject: [PATCH 121/149] add missing include directive for header checking --- BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index e84244f2792..12faf7e2a0c 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -36,6 +36,8 @@ * */ +#include + #if !defined(CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME) || !defined(CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME) CGAL_pragma_warning("\nBoth macros CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME and CGAL_GRAPH_TRAITS_INHERITANCE_BASE_CLASS_NAME " From d4fb4002508fec48b70059b1708b6aacf93b788d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Aug 2020 08:19:32 +0200 Subject: [PATCH 122/149] add missing include --- .../Convex_hull_3/dual/halfspace_intersection_interior_point_3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h index 8037b2f38fc..0e4290f3782 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h @@ -25,6 +25,7 @@ #include #include #include +#include // Description taken from http://www.qhull.org/html/qhalf.htm From 98c80402bca9c936c75f25a66bbafdc8e87c31bf Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 4 Sep 2020 12:27:32 +0200 Subject: [PATCH 123/149] Don't use cell info() --- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index b928aa3801f..6cacd32ebe3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -151,14 +151,14 @@ bool build_finite_cells(Tr& tr, Cell_handle c = tr.tds().create_cell(vs[0], vs[1], vs[2], vs[3]); c->set_subdomain_index(tet[4]); // the cell's info keeps the reference of the tetrahedron - c->info() = tet[4]; // the cell's info keeps the reference of the tetrahedron + //c->info() = tet[4]; // the cell's info keeps the reference of the tetrahedron if(prevent_domain_0){ CGAL_precondition(tet[4] > 0); } else { c->set_subdomain_index(max_domain+1); // the cell's info keeps the reference of the tetrahedron - c->info() = max_domain+1; // the cell's info keeps the reference of the tetrahedron +// c->info() = max_domain+1; // the cell's info keeps the reference of the tetrahedron } // assign cells to vertices for(int j=0; j<4; ++j) From b271ec54df4547dd63db6b84efc5b5ecd57750a7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 4 Sep 2020 15:18:51 +0200 Subject: [PATCH 124/149] Preparations for CGAL-5.1. --- Installation/CHANGES.md | 2 + Installation/include/CGAL/version.h | 6 +- .../lib/cmake/CGAL/CGALConfigVersion.cmake | 2 +- .../public_release/announcement/mailing.eml | 142 ++++++++++++++---- 4 files changed, 116 insertions(+), 36 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 420781a827c..bdb01e6b8b4 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -12,6 +12,8 @@ Release date: September 2020 that improves the quality of tetrahedra in terms of dihedral angles, while targeting a given edge length. + See also the associated [blog entry](https://www.cgal.org/2020/08/07/Tetrahedral-remeshing/). + ### [Surface Mesh Topology](https://doc.cgal.org/5.1/Manual/packages.html#PkgSurfaceMeshTopologySummary) (new package) - This package enables the computation of some topological invariants of surfaces, such as: diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index c9484b891d1..c356e53323b 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.1-beta3 +#define CGAL_VERSION 5.1 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050100000 +#define CGAL_VERSION_NR 1050101000 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20200609 +#define CGAL_RELEASE_DATE 20200908 #include diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 62b7f345e81..556f1458f4d 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -2,7 +2,7 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 1) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1-beta3") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) diff --git a/Maintenance/public_release/announcement/mailing.eml b/Maintenance/public_release/announcement/mailing.eml index 0e54c433a43..74ebc471f51 100644 --- a/Maintenance/public_release/announcement/mailing.eml +++ b/Maintenance/public_release/announcement/mailing.eml @@ -1,51 +1,129 @@ -Subject: CGAL 4.14 Released, Computational Geometry Algorithms Library +Subject: CGAL 5.1 Released, Computational Geometry Algorithms Library Content-Type: text/plain; charset="utf-8" -Body: +Body: -The CGAL Open Source Project is pleased to announce the release 4.14 +The CGAL Open Source Project is pleased to announce the release 5.1 of CGAL, the Computational Geometry Algorithms Library. -This release will be the last one supporting C++98/C++03 compilers, -and the next release, CGAL version 5.0, will require support for -C++14. -Besides fixes and general enhancement to existing packages, the -following has changed since CGAL 4.13: +Besides fixes and general enhancement to existing packages, the following +has changed since CGAL 5.0: -### 2D Periodic Hyperbolic Triangulations (new package) +Tetrahedral Remeshing (new package) -- This package allows the computation of Delaunay triangulations of - the Bolza surface. The Bolza surface is the most symmetric - hyperbolic surface of genus 2. Its fundamental domain is the - regular hyperbolic octagon with angles π/4 centered at the origin - of the Poincaré disk. Triangulations of the Bolza surface can be - seen as triangulations of the hyperbolic plane that are periodic - in the four directions defined by the sides of this regular - octagon. +- This package implements a tetrahedral isotropic remeshing algorithm, + that improves the quality of tetrahedra in terms of dihedral angles, + while targeting a given edge length. -### 2D Hyperbolic Triangulations (new package) + See also the associated blog entry: + https://www.cgal.org/2020/08/07/Tetrahedral-remeshing/ -- This package allows the computation of Delaunay Triangulations of - sets of points in the Poincaré disk, which is one of the - conformal models for the hyperbolic plane. +Surface Mesh Topology (new package) -### The Heat Method (new package) +- This package enables the computation of some topological invariants + of surfaces, such as: + - test if two (closed) curves on a combinatorial surface are + homotopic. Users can choose between free homotopy and homotopy + with fixed endpoints; + - test is a curve is contractible; + - compute shortest non-contractible cycles on a surface, with or + without weights on edges. -- This package provides an algorithm that solves the single- or - multiple-source shortest path problem by returning an - approximation of the geodesic distance for all vertices of a - triangle mesh to the closest vertex in a given set of source - vertices. + See also the associated blog entry: + https://www.cgal.org/2020/05/08/Surface_mesh_topology/ -### Triangulated Surface Mesh Approximation (new package) +Optimal Bounding Box (new package) -- This package implements the Variational Shape Approximation method - to approximate an input surface triangle mesh by a simpler surface - triangle mesh. +- This package implements an optimization algorithm that aims to + construct a close approximation of the _optimal bounding box_ of a + mesh or a point set, which is defined as the smallest (in terms of + volume) bounding box that contains a given mesh or point set. + + See also the associated blog entry: + https://www.cgal.org/2020/04/20/Optimal_bounding_box/ + +Installation + +- The CGAL_Core library no longer requires Boost.Thread, even if the + g++ compiler is used. + +- The minimal supported version of Boost is now 1.66.0. + +Tutorials + +- Two new, detailed tutorials have been added: + - Surface Reconstruction from Point Clouds, which goes over a + typical full processing pipeline in a CGAL environment. + - Geographic Information Systems (GIS), which demonstrates usage + of CGAL data structures and algorithms in the context of a + typical GIS application. + + Both tutorials provide complete code. + + See https://doc.cgal.org/5.1/Manual/tutorials.html + +Point Set Processing + +- Added wrapper functions for registration, using the Super4PCS and + ICP algorithms implemented in the third party libraries OpenGR and + libpointmatcher. -See https://www.cgal.org/2019/03/29/cgal414/ for a complete list of +Surface Mesh Simplification + +- Added a new simplification method based on the quadric error defined + by Garland and Heckbert. + +dD Spatial Searching + +- The kd-tree can now be built in parallel: CGAL::Kd_tree::build() is + given an optional template parameter ConcurrencyTag (default value + remains CGAL::Sequential_tag for backward compatibility). + +Intersecting Sequences of dD Iso-oriented Boxes + +- Added parallel versions of the functions CGAL::box_intersection_d() + and CGAL::box_self_intersection_d(). + +Polygon Mesh Processing + +- Added the function CGAL::Polygon_mesh_processing::split(), which can + be used to split meshes along a mesh or a plane. +- Added the function + CGAL::Polygon_mesh_processing::split_connected_components() to split + a single mesh containing several connected components into several + meshes containing one connected component. +- Added parallel versions of the functions + CGAL::Polygon_mesh_processing::does_self_intersect() and + CGAL::Polygon_mesh_processing::self_intersections(). +- Added several mesh repair functions (see the complete changelog for + more information). + +3D Fast Intersection and Distance Computation + +- The behavior of the internal search tree used to accelerate distance + queries has changed: usage of the internal search tree will now be + enabled by default, and its construction will be triggered by the + first distance query. Automatic construction and usage can be + disabled by calling + CGAL::AABB_tree::do_not_accelerate_distance_queries() before the + first distance query, and the tree can be built at any moment by + calling CGAL::AABB_tree::accelerate_distance_queries(). +- BREAKING CHANGE: CGAL::AABB_tree::accelerate_distance_queries() and + CGAL::AABB_tree::do_not_accelerate_distance_queries() are no longer + const functions. + + +CGAL and the Boost Graph Library (BGL) + +- Added the function CGAL::alpha_expansion_graphcut(), which + regularizes a multi-label partition over a user-defined graph. +- Added the function CGAL::regularize_face_selection_borders(), which + uses this alpha expansion graphcut to regularize the borders of a + selected faces on a triangle mesh. + +See https://www.cgal.org/2020/09/08/cgal51/ for a complete list of changes. From aeda2ef58c0f794ea4cc03ea89d770faa480c82d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 7 Sep 2020 12:35:54 +0200 Subject: [PATCH 125/149] Replace boolean name and prevent maxx_domain=0 --- .../Mesh_complex_3_in_triangulation_3_fwd.h | 2 +- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 20 +++++++++---------- .../Plugins/Mesh_3/C3t3_io_plugin.cpp | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h index d6852a072f2..d0202553abc 100644 --- a/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h +++ b/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h @@ -25,7 +25,7 @@ class Mesh_complex_3_in_triangulation_3; template bool build_triangulation_from_file(std::istream& is, Tr& tr, - bool prevent_domain_0); + bool replace_domain_0); template bool build_triangulation_from_file(std::istream& is, diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index 6cacd32ebe3..7ee67fe5c31 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -107,7 +107,7 @@ bool build_finite_cells(Tr& tr, std::vector > >& incident_cells_map, const std::map, typename Tr::Cell::Surface_patch_index>& border_facets, const bool verbose, - bool prevent_domain_0 = true) + bool replace_domain_0 = false) { typedef std::array Tet_with_ref; // 4 ids + 1 reference @@ -119,8 +119,8 @@ bool build_finite_cells(Tr& tr, typename Tr::Geom_traits::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); ) - int max_domain = -1; - if(!prevent_domain_0) + int max_domain = 0; + if(replace_domain_0) { for(std::size_t i=0; iset_subdomain_index(tet[4]); // the cell's info keeps the reference of the tetrahedron - //c->info() = tet[4]; // the cell's info keeps the reference of the tetrahedron - if(prevent_domain_0){ + if(!replace_domain_0){ CGAL_precondition(tet[4] > 0); } else { c->set_subdomain_index(max_domain+1); // the cell's info keeps the reference of the tetrahedron -// c->info() = max_domain+1; // the cell's info keeps the reference of the tetrahedron } // assign cells to vertices for(int j=0; j<4; ++j) @@ -347,7 +345,7 @@ bool build_triangulation(Tr& tr, const std::map, typename Tr::Cell::Surface_patch_index>& border_facets, std::vector& vertex_handle_vector, const bool verbose = false, - bool prevent_domain_0 = true) + bool replace_domain_0 = false) { typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; @@ -379,7 +377,7 @@ bool build_triangulation(Tr& tr, if (!finite_cells.empty()) { if(!build_finite_cells(tr, finite_cells, vertex_handle_vector, incident_cells_map, - border_facets, verbose, prevent_domain_0)) + border_facets, verbose, replace_domain_0)) return false; if(!build_infinite_cells(tr, incident_cells_map, verbose)) return false; @@ -404,7 +402,7 @@ bool build_triangulation(Tr& tr, template bool build_triangulation_from_file(std::istream& is, Tr& tr, - bool prevent_domain_0) + bool replace_domain_0) { typedef typename Tr::Point Point_3; @@ -493,7 +491,7 @@ bool build_triangulation_from_file(std::istream& is, std::vector vertices(points.size() + 1); bool is_well_built = build_triangulation(tr, - points, finite_cells, border_facets, vertices, false, prevent_domain_0); + points, finite_cells, border_facets, vertices, false, replace_domain_0); return is_well_built; } @@ -501,7 +499,7 @@ template bool build_triangulation_from_file(std::istream& is, Tr& tr) { - return build_triangulation_from_file(is, tr, true); + return build_triangulation_from_file(is, tr, false); } } // namespace CGAL diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp index 1ea57c3958b..4dfab1afc69 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp @@ -127,7 +127,7 @@ Polyhedron_demo_c3t3_binary_io_plugin::load( item->setName(fileinfo.baseName()); item->set_valid(false); - if(CGAL::build_triangulation_from_file(in, item->c3t3().triangulation(), false)) + if(CGAL::build_triangulation_from_file(in, item->c3t3().triangulation(), true)) { item->c3t3().rescan_after_load_of_triangulation(); for( C3t3::Triangulation::Finite_cells_iterator From da4a9c4ff5ac5ffb71c7eeb85b183f1938bde518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Sep 2020 10:33:00 +0200 Subject: [PATCH 126/149] Add missing header includes --- Filtered_kernel/include/CGAL/Lazy.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index ccceae388ad..f142bbec1f7 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -25,10 +25,8 @@ #include #include #include -#include -#include #include -#include +#include #include #include @@ -47,6 +45,14 @@ #include #include +#include +#include +#include +#include +#include +#include +#include + namespace CGAL { template Date: Tue, 8 Sep 2020 11:19:45 +0200 Subject: [PATCH 127/149] Fix menu_version.js in the doc --- Documentation/doc/resources/1.8.13/menu_version.js | 4 ++-- Documentation/doc/resources/1.8.14/menu_version.js | 4 ++-- Documentation/doc/resources/1.8.4/menu_version.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 0a354874978..eba433a78e4 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -7,9 +7,9 @@ var all_versions = [ 'master', 'latest', - '5.1-beta2', + '5.1', '5.0.3', - '4.14.2', + '4.14.3', '4.13.2', '4.12.2', '4.11.3', diff --git a/Documentation/doc/resources/1.8.14/menu_version.js b/Documentation/doc/resources/1.8.14/menu_version.js index 0a354874978..eba433a78e4 100644 --- a/Documentation/doc/resources/1.8.14/menu_version.js +++ b/Documentation/doc/resources/1.8.14/menu_version.js @@ -7,9 +7,9 @@ var all_versions = [ 'master', 'latest', - '5.1-beta2', + '5.1', '5.0.3', - '4.14.2', + '4.14.3', '4.13.2', '4.12.2', '4.11.3', diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index 0a354874978..eba433a78e4 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -7,9 +7,9 @@ var all_versions = [ 'master', 'latest', - '5.1-beta2', + '5.1', '5.0.3', - '4.14.2', + '4.14.3', '4.13.2', '4.12.2', '4.11.3', From 301c5e0c5caffe894d1217257bad3218bf990f06 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 13:51:17 +0200 Subject: [PATCH 128/149] Add our scripts to new releases tag names --- Scripts/developer_scripts/cgal_create_release_with_cmake.cmake | 2 +- Scripts/developer_scripts/tag_pr_per_release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake index 2bcf27c3768..cfaa4eaaa8c 100644 --- a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake +++ b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake @@ -86,7 +86,7 @@ if (CGAL_VERSION_FOUND) if (NOT CGAL_VERSION) set(CGAL_VERSION "${CGAL_VERSION_INPUT}") endif() - set (GITHUB_PREFIX "https://github.com/CGAL/cgal/blob/releases/CGAL-${CGAL_VERSION}") + set (GITHUB_PREFIX "https://github.com/CGAL/cgal/blob/v${CGAL_VERSION}") else() message(FATAL_ERROR "Cannot extract CGAL version number.") endif() diff --git a/Scripts/developer_scripts/tag_pr_per_release.sh b/Scripts/developer_scripts/tag_pr_per_release.sh index 7e130a32871..ba1fab8f3b6 100644 --- a/Scripts/developer_scripts/tag_pr_per_release.sh +++ b/Scripts/developer_scripts/tag_pr_per_release.sh @@ -32,7 +32,7 @@ REMOTE=`git config branch.releases/CGAL-${PREVIOUS_MAJOR_RELEASE}-branch.remote` # refs/pull/*/head as well. git fetch --tags "${REMOTE}" `git config "remote.${REMOTE}.fetch"` 'refs/pull/*/head:refs/pull/*/head' -PR_LIST=`git log --pretty='%D' releases/CGAL-${PREVIOUS_MAJOR_RELEASE}..releases/CGAL-${CURRENT_RELEASE} | awk 'match($0, /refs\/pull\/([0-9]+)\/head/, a) {print a[1]}' | sort -u` +PR_LIST=`git log --pretty='%D' v${PREVIOUS_MAJOR_RELEASE}..v${CURRENT_RELEASE} | awk 'match($0, /refs\/pull\/([0-9]+)\/head/, a) {print a[1]}' | sort -u` for i in ${PR_LIST}; do echo ghi label $i -a Merged_in_${CURRENT_RELEASE} -- CGAL/cgal From 4b052b53440f2977987db59131c6b4c2d96d44f1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 15:05:04 +0200 Subject: [PATCH 129/149] Tweak so that it is easier to publish a release as a mix of two internal releases CGAL-5.1 uses CGAL-5.1-I-239 for the code and CGAL-5.1-I-235 for the documentation. --- .../public_release/scripts/prepare_release | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/Maintenance/public_release/scripts/prepare_release b/Maintenance/public_release/scripts/prepare_release index 5768f1fe733..3de9d2ad544 100755 --- a/Maintenance/public_release/scripts/prepare_release +++ b/Maintenance/public_release/scripts/prepare_release @@ -3,12 +3,14 @@ set -e setopt -o glob setopt -o extended_glob +setopt -o nullglob if [ -z "$1" ]; then printf "Usage:\n prepare_release \n" exit 1 fi +error_code=0 RELEASE_CANDIDATES_DIR=/srv/CGAL/www/Members/release-candidates MANUAL_TESTS_DIR=/srv/CGAL/www/Members/Manual_doxygen_test @@ -25,7 +27,7 @@ PUBLIC_RELEASE_NAME=${PUBLIC_RELEASE_NAME/-library.zip/} PUBLIC_RELEASE_NAME=${PUBLIC_RELEASE_NAME/.zip/} DEST_DIR="${RELEASE_CANDIDATES_DIR}/$PUBLIC_RELEASE_NAME" -if [ -z "$PUBLIC_RELEASE_NAME" ]; then +if [ -z "$PUBLIC_RELEASE_NAME" ]; then echo The first argument must be a public release directory, like CGAL-3.7-I-167-public. exit 1 fi @@ -40,30 +42,36 @@ printf "Copy documentation to doc_html/ and doc_html_online/...\n" [ -d "/srv/CGAL/www/${PUBLIC_RELEASE_NAME#CGAL-}/Manual" ] || mkdir -p "/srv/CGAL/www/${PUBLIC_RELEASE_NAME#CGAL-}/Manual" cp "$PUBLIC_RELEASE_DIR"/*(.) "${RELEASE_CANDIDATES_DIR}/$PUBLIC_RELEASE_NAME" -rsync -a "$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output2/* "$DEST_DIR/doc_html/" -pushd "$DEST_DIR/doc_html/Manual/search" - for i in g n c s i; do sed -i "s/..\/BGL$i/..\/BGL\/$i/g" *; done -popd -rsync -a "$DEST_DIR/doc_html/" "$DEST_DIR/doc_html_online/" +files=("$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output2/*) +if ((${#files[@]} == 0)); then + printf "ERROR: documentation files are missing\n" + error_code=1 +else + rsync -a "$MANUAL_TESTS_DIR/$INTERNAL_RELEASE"/output2/* "$DEST_DIR/doc_html/" + pushd "$DEST_DIR/doc_html/Manual/search" + for i in g n c s i; do sed -i "s/..\/BGL$i/..\/BGL\/$i/g" *; done + popd + rsync -a "$DEST_DIR/doc_html/" "$DEST_DIR/doc_html_online/" -printf "Modify \"../../MathJax\" to MathJax CDN in doc_html...\n" -pushd "$DEST_DIR/doc_html" -find -name '*.html' -exec sed -i -e 's|../../MathJax|https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2|g' {} + -popd + printf "Modify \"../../MathJax\" to MathJax CDN in doc_html...\n" + pushd "$DEST_DIR/doc_html" + find -name '*.html' -exec sed -i -e 's|../../MathJax|https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2|g' {} + + popd -printf "Create doc_html tarball...\n" -tar cf "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" -C "$DEST_DIR" doc_html + printf "Create doc_html tarball...\n" + tar cf "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" -C "$DEST_DIR" doc_html -printf "Create doc_html zip...\n" -pushd "$DEST_DIR" -zip -q -r "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.zip" doc_html -popd + printf "Create doc_html zip...\n" + pushd "$DEST_DIR" + zip -q -r "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.zip" doc_html + popd -printf "xz doc_html tarball...\n" -xz --best < "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" > "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar.xz" + printf "xz doc_html tarball...\n" + xz --best < "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" > "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar.xz" -printf "gzip doc_html tarball...\n" -gzip -f --best "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" + printf "gzip doc_html tarball...\n" + gzip -f --best "$DEST_DIR/${PUBLIC_RELEASE_NAME}-doc_html.tar" +fi printf "Create the internal_release file\n" printf "%s\n" "${INTERNAL_RELEASE}" > "$DEST_DIR/internal_release" @@ -92,3 +100,4 @@ printf "DONE!\n" pushd "$DEST_DIR" ls -l popd +exit $error_code From 41c653cc2e9832441eca4921f7ff339c04be47ca Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 15:14:40 +0200 Subject: [PATCH 130/149] Adapt to the new release tags names --- Maintenance/public_release/scripts/github-release-upload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/public_release/scripts/github-release-upload b/Maintenance/public_release/scripts/github-release-upload index 64b2a6e57ac..760916fd838 100755 --- a/Maintenance/public_release/scripts/github-release-upload +++ b/Maintenance/public_release/scripts/github-release-upload @@ -9,5 +9,5 @@ source $HOME/private/github-token.txt for f in *.(zip|xz|txt|exe); do - github-release upload -u CGAL -r cgal -t releases/${PWD:t} --name $f -f $f; + github-release upload -u CGAL -r cgal -t v${${PWD:t}/CGAL-/} --name $f -f $f; done From 80168d85b2682fd31a2bca760af030ffb7504068 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 16:44:17 +0200 Subject: [PATCH 131/149] Next release on master will be 5.2-dev --- Installation/include/CGAL/version.h | 4 ++-- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index c356e53323b..f68383c3ed3 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,10 +17,10 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.1 +#define CGAL_VERSION 5.2 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050101000 +#define CGAL_VERSION_NR 1050200000 #define CGAL_SVN_REVISION 99999 #define CGAL_RELEASE_DATE 20200908 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 556f1458f4d..c26d639b033 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 5) -set(CGAL_MINOR_VERSION 1) +set(CGAL_MINOR_VERSION 2) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.2-dev") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From d14e08f3e969bd9cf5701df6519dc2eaf3d6d542 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 16:48:13 +0200 Subject: [PATCH 132/149] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 2600c39135e..8eb747e098f 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -23,9 +23,9 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --beta 3 --public || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it --beta 3 --public || echo ERROR +0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR # from branch 5.0 0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 From 628f238f1892c4741017f65c00cf0333edf44c13 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 8 Sep 2020 17:18:03 +0200 Subject: [PATCH 133/149] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 8eb747e098f..54fb27487bc 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -26,6 +26,8 @@ LC_CTYPE=en_US.UTF-8 0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it || echo ERROR # "integration" 0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR +# from branch 5.1 +#0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR # from branch 5.0 0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 From 7c89ed508a8ed5c824fdd8a2b23c54f8998fdf92 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 24 Aug 2020 10:46:28 +0200 Subject: [PATCH 134/149] Add a workflow to build and upload the doc on a pull_request --- .github/workflows/build_doc.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build_doc.yml diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml new file mode 100644 index 00000000000..d70fa3860b9 --- /dev/null +++ b/.github/workflows/build_doc.yml @@ -0,0 +1,50 @@ + +name: Documentation + +on: [pull_request_target] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.0.0 + - name: install dependencies + run: | + set -x + sudo apt-get install -y graphviz ssh rsync + sudo pip install lxml pyquery + wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen + sudo mv doxygen_exe /usr/bin/doxygen + sudo chmod +x /usr/bin/doxygen + mkdir -p ~/.ssh + ( + cat <> ~/.ssh/id_rsa + chmod 600 /home/runner/.ssh/id_rsa + ( + cat <> ~/.ssh/id_rsa.pub + chmod 644 /home/runner/.ssh/id_rsa.pub + ( + cat <> ~/.ssh/known_hosts + + - name: configure all + run: | + mkdir build_doc && cd build_doc && cmake ../Documentation/doc + + - name: Upload Doc + run: | + set -e + cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing + PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") + rsync --compress -a doc_output/* ${{ secrets.ids }}/pr_doc/${PR_NUMBER}/ From d8bd7c90d78186e9cf314c1c90426c7533493499 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 7 Sep 2020 15:55:23 +0200 Subject: [PATCH 135/149] delete PR on delete --- .github/workflows/delete_doc.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/delete_doc.yml diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml new file mode 100644 index 00000000000..ae6ae59eafe --- /dev/null +++ b/.github/workflows/delete_doc.yml @@ -0,0 +1,34 @@ +name: Documentation + +on: [delete] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.0.0 + - name: delete directory + run: | + mkdir -p ~/.ssh + ( + cat <> ~/.ssh/id_rsa + chmod 600 /home/runner/.ssh/id_rsa + ( + cat <> ~/.ssh/id_rsa.pub + chmod 644 /home/runner/.ssh/id_rsa.pub + ( + cat <> ~/.ssh/known_hosts + + ssh ${{ secrets.ids }}/pr_doc/ rm -rf ${PR_NUMBER}/ From 9cae0bdad7f1b6a2c6ac89eebb18a70aa8441a4f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 8 Sep 2020 11:16:52 +0200 Subject: [PATCH 136/149] Remove dir on pr closed --- .github/workflows/build_doc.yml | 1 - .github/workflows/delete_doc.yml | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index d70fa3860b9..cc0e32dbc26 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -1,4 +1,3 @@ - name: Documentation on: [pull_request_target] diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index ae6ae59eafe..58de70d1797 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -1,7 +1,8 @@ -name: Documentation - -on: [delete] +name: Documentation Removal +on: + pull_request_target: + types: [closed, removed] jobs: build: @@ -30,5 +31,6 @@ jobs: |1|GMIJAmFHn7K7IaG3Uie0MfEo8sM=|2fzc+UO3J2GnlaV+0Mqc4I+mbXo= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== EOF )>> ~/.ssh/known_hosts + PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") + ssh mgimeno@cgal.geometryfactory.com rm -rf /home/mgimeno/public_html/pr_doc/${PR_NUMBER} - ssh ${{ secrets.ids }}/pr_doc/ rm -rf ${PR_NUMBER}/ From 08600afd7221f772a60868d9063d94e0dd80fd4d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 8 Sep 2020 14:54:22 +0200 Subject: [PATCH 137/149] Add a github manip --- .github/workflows/build_doc.yml | 3 ++- .github/workflows/delete_doc.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index cc0e32dbc26..a0ba9c679ac 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -46,4 +46,5 @@ jobs: set -e cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - rsync --compress -a doc_output/* ${{ secrets.ids }}/pr_doc/${PR_NUMBER}/ + rsync --compress -a doc_output/* ${{ secrets.ids }}/cgal.github.io/${PR_NUMBER}/ + ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && git add ${PR_NUMBER} && git commit -a -m 'Add a new directory' && git push origin master" diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 58de70d1797..64d7a7f2a77 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v2.0.0 - name: delete directory run: | + set -x mkdir -p ~/.ssh ( cat <> ~/.ssh/known_hosts PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - ssh mgimeno@cgal.geometryfactory.com rm -rf /home/mgimeno/public_html/pr_doc/${PR_NUMBER} + #ssh mgimeno@cgal.geometryfactory.com rm -rf /home/mgimeno/public_html/cgal.github.io/${PR_NUMBER} + ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && rm -rf ${PR_NUMBER} && git rm -r ${PR_NUMBER} && git commit -a -m 'Remove a directory' && git push origin master" From de24c4729a3fd640310d371a5f973ef82decc7c7 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 8 Sep 2020 16:21:20 +0200 Subject: [PATCH 138/149] Clena-up --- .github/workflows/delete_doc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 64d7a7f2a77..73013cd5ba1 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -33,6 +33,5 @@ jobs: EOF )>> ~/.ssh/known_hosts PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - #ssh mgimeno@cgal.geometryfactory.com rm -rf /home/mgimeno/public_html/cgal.github.io/${PR_NUMBER} ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && rm -rf ${PR_NUMBER} && git rm -r ${PR_NUMBER} && git commit -a -m 'Remove a directory' && git push origin master" From 1f11e5d861c1b4348b6af30d885f60842383e828 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 9 Sep 2020 09:43:40 +0200 Subject: [PATCH 139/149] Don't use gf.com but only git --- .github/workflows/build_doc.yml | 16 ++++++++++------ .github/workflows/delete_doc.yml | 11 ++++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index a0ba9c679ac..666a68801ea 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -32,19 +32,23 @@ jobs: chmod 644 /home/runner/.ssh/id_rsa.pub ( cat <> ~/.ssh/known_hosts + git config --global user.email "maxime.gimeno@geometryfactory.com" + git config --global user.name "Maxime Gimeno" - name: configure all run: | + git clone git@github.com:CGAL/cgal.github.io.git mkdir build_doc && cd build_doc && cmake ../Documentation/doc - - name: Upload Doc run: | set -e - cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - rsync --compress -a doc_output/* ${{ secrets.ids }}/cgal.github.io/${PR_NUMBER}/ - ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && git add ${PR_NUMBER} && git commit -a -m 'Add a new directory' && git push origin master" + mkdir cgal.github.io/${PR_NUMBER} + cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing + mv ./doc_output/* ../cgal.github.io/${PR_NUMBER}/ + #rsync --compress -a doc_output/* ${{ secrets.ids }}/cgal.github.io/${PR_NUMBER}/ + cd ../cgal.github.io && git add ${PR_NUMBER} && git commit -a -m "Add ${PR_NUMBER}" && git push -u origin master + #ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && git add ${PR_NUMBER} && git commit -a -m 'Add a new directory' && git push origin master" diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 73013cd5ba1..d3cad05ef79 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -28,10 +28,15 @@ jobs: chmod 644 /home/runner/.ssh/id_rsa.pub ( cat <> ~/.ssh/known_hosts + git config --global user.email "maxime.gimeno@geometryfactory.com" + git config --global user.name "Maxime Gimeno" + git clone git@github.com:CGAL/cgal.github.io.git PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && rm -rf ${PR_NUMBER} && git rm -r ${PR_NUMBER} && git commit -a -m 'Remove a directory' && git push origin master" + cd cgal.github.io/ + git rm -r ${PR_NUMBER} && git commit -a -m "Remove ${PR_NUMBER}" && git push -u origin master + + #ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && rm -rf ${PR_NUMBER} && git rm -r ${PR_NUMBER} && git commit -a -m 'Remove a directory' && git push origin master" From 94f1c7cbe9ac940729000a97ce3db4b9420f2ccc Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 9 Sep 2020 11:07:00 +0200 Subject: [PATCH 140/149] update index too --- .github/workflows/build_doc.yml | 19 +++++++++++++++---- .github/workflows/delete_doc.yml | 7 +++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 666a68801ea..c6d330a035d 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -41,14 +41,25 @@ jobs: - name: configure all run: | git clone git@github.com:CGAL/cgal.github.io.git - mkdir build_doc && cd build_doc && cmake ../Documentation/doc + mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc - name: Upload Doc run: | set -e PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") - mkdir cgal.github.io/${PR_NUMBER} + mkdir -p cgal.github.io/${PR_NUMBER} cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing - mv ./doc_output/* ../cgal.github.io/${PR_NUMBER}/ + cp -r ./doc_output/* ../cgal.github.io/${PR_NUMBER}/ + cd ../cgal.github.io + INDEX_EXISTS="" + while IFS= read -r line + do + if [[ $line == *" ${PR_NUMBER}."* ]]; then + INDEX_EXISTS="TRUE" + fi + done < "index.html" + if [ -z "$INDEX_EXISTS" ]; then + echo "
  • Manual for PR ${PR_NUMBER}.
  • " >> ./index.html + fi #rsync --compress -a doc_output/* ${{ secrets.ids }}/cgal.github.io/${PR_NUMBER}/ - cd ../cgal.github.io && git add ${PR_NUMBER} && git commit -a -m "Add ${PR_NUMBER}" && git push -u origin master + git add ${PR_NUMBER} && git commit -a -m "Add ${PR_NUMBER}" && git push -u origin master #ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && git add ${PR_NUMBER} && git commit -a -m 'Add a new directory' && git push origin master" diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index d3cad05ef79..91a4f5d6a08 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -36,6 +36,13 @@ jobs: git clone git@github.com:CGAL/cgal.github.io.git PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") cd cgal.github.io/ + while IFS= read -r line + do + if [[ $line != *" ${PR_NUMBER}."* ]]; then + echo "$line" >> tmp.html + fi + done < "index.html" + mv tmp.html index.html git rm -r ${PR_NUMBER} && git commit -a -m "Remove ${PR_NUMBER}" && git push -u origin master #ssh mgimeno@cgal.geometryfactory.com "cd /home/mgimeno/public_html/cgal.github.io && rm -rf ${PR_NUMBER} && git rm -r ${PR_NUMBER} && git commit -a -m 'Remove a directory' && git push origin master" From efc903d8dc0b1af8ac778e6cc442d9b781e602b5 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 10 Sep 2020 10:22:09 +0200 Subject: [PATCH 141/149] Fix error --- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index 7ee67fe5c31..677d37124fa 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -151,10 +151,7 @@ bool build_finite_cells(Tr& tr, Cell_handle c = tr.tds().create_cell(vs[0], vs[1], vs[2], vs[3]); c->set_subdomain_index(tet[4]); // the cell's info keeps the reference of the tetrahedron - if(!replace_domain_0){ - CGAL_precondition(tet[4] > 0); - } - else + if(replace_domain_0 && tet[4] == 0) { c->set_subdomain_index(max_domain+1); // the cell's info keeps the reference of the tetrahedron } From 253902214390f1c88a5a0b67735e80a6e1688261 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 10 Sep 2020 13:44:22 +0200 Subject: [PATCH 142/149] This branch 5.1.x-branch targets CGAL 5.1.1 --- Installation/include/CGAL/version.h | 4 ++-- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index c356e53323b..39f3a7f5807 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,10 +17,10 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.1 +#define CGAL_VERSION 5.1.1 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050101000 +#define CGAL_VERSION_NR 1050111000 #define CGAL_SVN_REVISION 99999 #define CGAL_RELEASE_DATE 20200908 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 556f1458f4d..bcd409808d1 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 1) -set(CGAL_BUGFIX_VERSION 0) +set(CGAL_BUGFIX_VERSION 1) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1.1") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From ff59caa3e23b936497bb129121ae5ab40b512b2c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 10 Sep 2020 14:18:04 +0200 Subject: [PATCH 143/149] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 54fb27487bc..eccc9597f58 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -27,11 +27,11 @@ LC_CTYPE=en_US.UTF-8 # "integration" 0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR # from branch 5.1 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR +0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR # from branch 5.0 -0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR +0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 -0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.14-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.14-branch.git --public --do-it || echo ERROR +#0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.14-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.14-branch.git --public --do-it || echo ERROR ## Older stuff # from branch 4.13 From 89c135aff7c294616542a08f6d8e208a3d5620f3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 10 Sep 2020 14:31:22 +0200 Subject: [PATCH 144/149] Only remove the PR name in the index, not in the repo. --- .github/workflows/delete_doc.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 91a4f5d6a08..835ecaa1e9e 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -1,6 +1,6 @@ name: Documentation Removal -on: +on: pull_request_target: types: [closed, removed] jobs: @@ -19,7 +19,7 @@ jobs: ${{ secrets.ssh_key }} EOF )>> ~/.ssh/id_rsa - chmod 600 /home/runner/.ssh/id_rsa + chmod 600 /home/runner/.ssh/id_rsa ( cat < Date: Fri, 11 Sep 2020 15:11:15 +0200 Subject: [PATCH 145/149] update changes --- Installation/CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 420781a827c..439f1417694 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -1,6 +1,12 @@ Release History =============== +### [CGAL and the Boost Graph Library (BGL)](https://doc.cgal.org/5.1/Manual/packages.html#PkgBGL) + +- Added the convenience header `CGAL/boost/graph/graph_traits_inheritance_macros.h` that allows to easily + make any class inheriting from a model of a face graph concept, a model of the same concept. + + [Release 5.1](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.1) ----------- From c632bb4575059cfffbe74c0fef9f1a38f3c36556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 11 Sep 2020 15:14:52 +0200 Subject: [PATCH 146/149] update changes --- Installation/CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 420781a827c..94d57f49e4c 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -1,6 +1,11 @@ Release History =============== + +### [3D Convex Hulls](https://doc.cgal.org/5.1/Manual/packages.html#PkgConvexHull3) +- Added the function `CGAL::halfspace_intersection_interior_point_3()` that can be used to retrieve + the point that is the most interior a convex closed volume defined by the intersection of a set of halfspaces. + [Release 5.1](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.1) ----------- From 28968dfa11ce6106ebecf4848d04bb49e20ca39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 18 Sep 2020 13:23:11 +0200 Subject: [PATCH 147/149] update changes --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index d14479f44a3..f06b810bb74 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -15,6 +15,9 @@ Release date: December 2020 - Added the function `CGAL::halfspace_intersection_interior_point_3()` that can be used to retrieve the point that is the most interior a convex closed volume defined by the intersection of a set of halfspaces. +### [Polygon Mesh Processing](https://doc.cgal.org/5.1/Manual/packages.html#PkgPolygonMeshProcessing) +- Added an option in `corefine()`, `split()` and `clip()` functions that enables the operation to be done on a mesh with + self-intersections present in the intersection area. [Release 5.1](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.1) ----------- From cd7907194fcbaba9e85e3e2333697477a5eea650 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 18 Sep 2020 13:25:07 +0200 Subject: [PATCH 148/149] Update CHANGES.md --- Installation/CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index f06b810bb74..0c363608879 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -15,7 +15,7 @@ Release date: December 2020 - Added the function `CGAL::halfspace_intersection_interior_point_3()` that can be used to retrieve the point that is the most interior a convex closed volume defined by the intersection of a set of halfspaces. -### [Polygon Mesh Processing](https://doc.cgal.org/5.1/Manual/packages.html#PkgPolygonMeshProcessing) +### [Polygon Mesh Processing](https://doc.cgal.org/5.2/Manual/packages.html#PkgPolygonMeshProcessing) - Added an option in `corefine()`, `split()` and `clip()` functions that enables the operation to be done on a mesh with self-intersections present in the intersection area. From 806399c3c777359691b6412012cc2d01ef111738 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 Sep 2020 14:51:01 +0200 Subject: [PATCH 149/149] Use egrep and github token --- .github/workflows/build_doc.yml | 36 ++++++-------------------------- .github/workflows/delete_doc.yml | 27 ++---------------------- 2 files changed, 8 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index c6d330a035d..b5f7b9c3842 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -6,41 +6,24 @@ jobs: build: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v2.0.0 - name: install dependencies run: | set -x - sudo apt-get install -y graphviz ssh rsync + sudo apt-get install -y graphviz ssh sudo pip install lxml pyquery wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen sudo mv doxygen_exe /usr/bin/doxygen sudo chmod +x /usr/bin/doxygen - mkdir -p ~/.ssh - ( - cat <> ~/.ssh/id_rsa - chmod 600 /home/runner/.ssh/id_rsa - ( - cat <> ~/.ssh/id_rsa.pub - chmod 644 /home/runner/.ssh/id_rsa.pub - ( - cat <> ~/.ssh/known_hosts + git config --global user.email "maxime.gimeno@geometryfactory.com" git config --global user.name "Maxime Gimeno" - + - name: configure all run: | - git clone git@github.com:CGAL/cgal.github.io.git + git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5 mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc - name: Upload Doc run: | @@ -50,14 +33,7 @@ jobs: cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing cp -r ./doc_output/* ../cgal.github.io/${PR_NUMBER}/ cd ../cgal.github.io - INDEX_EXISTS="" - while IFS= read -r line - do - if [[ $line == *" ${PR_NUMBER}."* ]]; then - INDEX_EXISTS="TRUE" - fi - done < "index.html" - if [ -z "$INDEX_EXISTS" ]; then + if ! egrep -q " ${PR_NUMBER}\."; then echo "
  • Manual for PR ${PR_NUMBER}.
  • " >> ./index.html fi #rsync --compress -a doc_output/* ${{ secrets.ids }}/cgal.github.io/${PR_NUMBER}/ diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 835ecaa1e9e..88470749a6b 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -13,35 +13,12 @@ jobs: - name: delete directory run: | set -x - mkdir -p ~/.ssh - ( - cat <> ~/.ssh/id_rsa - chmod 600 /home/runner/.ssh/id_rsa - ( - cat <> ~/.ssh/id_rsa.pub - chmod 644 /home/runner/.ssh/id_rsa.pub - ( - cat <> ~/.ssh/known_hosts git config --global user.email "maxime.gimeno@geometryfactory.com" git config --global user.name "Maxime Gimeno" - git clone git@github.com:CGAL/cgal.github.io.git + git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5 PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") cd cgal.github.io/ - while IFS= read -r line - do - if [[ $line != *" ${PR_NUMBER}."* ]]; then - echo "$line" >> tmp.html - fi - done < "index.html" + egrep -v " ${PR_NUMBER}\." index.html > tmp.html mv tmp.html index.html #git rm -r ${PR_NUMBER} && git commit -a -m "Remove ${PR_NUMBER}" && git push -u origin master git commit -a -m "Remove ${PR_NUMBER}" && git push -u origin master