From 7c9823fdccff3f7bc2f8a7f05ec8deae1374377b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 18 Jun 2019 10:05:35 +0200 Subject: [PATCH 001/317] add minimal example of a non working corefinement due to non-manifold edges --- .../Polygon_mesh_processing/CMakeLists.txt | 1 + .../corefine_non_manifold.cpp | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 2f853f6cbe6..d81c769eb99 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -92,6 +92,7 @@ create_single_source_cgal_program( "corefinement_mesh_union.cpp" ) create_single_source_cgal_program( "corefinement_mesh_union_and_intersection.cpp" ) create_single_source_cgal_program( "corefinement_mesh_union_with_attributes.cpp" ) create_single_source_cgal_program( "corefinement_polyhedron_union.cpp" ) +create_single_source_cgal_program( "corefine_non_manifold.cpp" ) create_single_source_cgal_program( "random_perturbation_SM_example.cpp" ) create_single_source_cgal_program( "corefinement_LCC.cpp") create_single_source_cgal_program( "hole_filling_example_LCC.cpp" ) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp new file mode 100644 index 00000000000..8640e3ce726 --- /dev/null +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp @@ -0,0 +1,38 @@ +#include +#include +#include +#include +#include + +#include + +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_3 P; +typedef CGAL::Surface_mesh

Surface_mesh; + +namespace PMP = CGAL::Polygon_mesh_processing; + +int main() +{ + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,4,0), P(0,4,0), tm1); + CGAL::make_quad(P(0,-4,0), P(4,-4,0), P(4,0,0), P(0,0,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,4), P(0,0,4), tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,-4), P(0,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; +// CGAL::make_quad(P(2,2,-2), P(2,-2,-2), P(2,-2,2), P(2,2,2), tm2); //TODO: test me + also test splitting the diagonal +// TOOD test more case including non-manifold vertices + CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); + PMP::triangulate_faces(tm2); + + PMP::corefine(tm1,tm2); + + std::ofstream("tm1_corefined.off") << tm1; + std::ofstream("tm2_corefined.off") << tm2; +} \ No newline at end of file From b536b8a2327e9e3c07f864c0dca4cd6ae1b2d2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 18 Jun 2019 15:46:09 +0200 Subject: [PATCH 002/317] use non-manifold edges map to filter intersection of edges and faces --- .../CGAL/boost/graph/parameters_interface.h | 2 +- .../corefine_non_manifold.cpp | 10 ++- .../Non_manifold_features_map.h | 82 +++++++++++++++++++ .../Polygon_mesh_processing/corefinement.h | 5 ++ .../internal/Corefinement/intersection_impl.h | 74 +++++++++++++---- 5 files changed, 154 insertions(+), 19 deletions(-) create mode 100644 Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 3273de59c53..a0e2c179ded 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -83,6 +83,7 @@ CGAL_add_named_parameter(output_iterator_t, output_iterator, output_iterator) CGAL_add_named_parameter(erase_all_duplicates_t, erase_all_duplicates, erase_all_duplicates) CGAL_add_named_parameter(require_same_orientation_t, require_same_orientation, require_same_orientation) CGAL_add_named_parameter(face_size_map_t, face_size_map, face_size_map) +CGAL_add_named_parameter(non_manifold_features_map_t, non_manifold_features_map, non_manifold_features_map) // 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) @@ -141,4 +142,3 @@ CGAL_add_named_parameter(face_proxy_map_t, face_proxy_map, face_proxy_map) CGAL_add_named_parameter(proxies_t, proxies, proxies) CGAL_add_named_parameter(anchors_t, anchors, anchors) CGAL_add_named_parameter(triangles_t, triangles, triangles) - diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp index 8640e3ce726..ad1616f3aac 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp @@ -27,12 +27,14 @@ int main() Surface_mesh tm2; // CGAL::make_quad(P(2,2,-2), P(2,-2,-2), P(2,-2,2), P(2,2,2), tm2); //TODO: test me + also test splitting the diagonal -// TOOD test more case including non-manifold vertices - CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); +// TODO: test more case including non-manifold vertices + CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); PMP::triangulate_faces(tm2); - PMP::corefine(tm1,tm2); + PMP::Non_manifold_features_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_features_map(nm_map_1)); std::ofstream("tm1_corefined.off") << tm1; std::ofstream("tm2_corefined.off") << tm2; -} \ No newline at end of file +} diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h new file mode 100644 index 00000000000..365c391a9c6 --- /dev/null +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h @@ -0,0 +1,82 @@ +// Copyright (c) 2019 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ +// +// +// Author(s) : Sebastien Loriot + + +#ifndef CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURES_MAP +#define CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURES_MAP + +namespace CGAL { +namespace Polygon_mesh_processing { + +//TODO: right now the base name parameter mechanism will make a deep copy, we probably want to avoid that +template +struct Non_manifold_features_map +{ + typedef boost::graph_traits Graph_traits; + typedef typename Graph_traits::edge_descriptor edge_descriptor; + typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor; + typedef dynamic_edge_property_t Edge_to_id_tag; + typedef typename boost::property_map::type Edge_to_nm_id; + Edge_to_nm_id e_nm_id; + std::vector< std::vector > non_manifold_edges; + + Non_manifold_features_map() + {} + + template + Non_manifold_features_map(PolygonMesh& pm, Vpm vpm) + : e_nm_id(get(Edge_to_id_tag(), pm)) + { + typedef typename boost::property_traits::value_type Point_3; + + std::map< std::pair, std::vector > edge_map; + for(edge_descriptor ed : edges(pm)) + { + put(e_nm_id, ed, std::size_t(-1)); // init map + + halfedge_descriptor hd = halfedge(ed, pm); + const Point_3& src = get(vpm, source(ed, pm)); + const Point_3& tgt = get(vpm, target(ed, pm)); + // TODO: what to do with null edges? + if (src > tgt) + hd = opposite(hd, pm); + edge_map[ make_sorted_pair(src, tgt) ].push_back(edge(hd,pm)); + } + + for(std::pair< const std::pair, + std::vector >& p : edge_map) + { + if (p.second.size()!=1) + { + std::cout << "Found a non-manifold edge, nb representatives: " << p.second.size() << "\n"; + for (edge_descriptor ed : p.second) + put(e_nm_id, ed, non_manifold_edges.size()); + non_manifold_edges.resize(non_manifold_edges.size()+1); + // we steal the vertor from the map + p.second.swap(non_manifold_edges.back()); + } + } + } +}; + +} } // end of CGAL::Polygon_mesh_processing + +#endif 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 97491b151a9..909eb23c6f7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -903,6 +903,11 @@ corefine_and_compute_difference( TriangleMesh& tm1, Ecm ecm(tm1,tm2,ecm1,ecm2); Corefinement::Intersection_of_triangle_meshes functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm)); + + // Fill non-manifold feature maps if provided + functor.set_non_manifold_features_map_1(boost::get_param(np1, internal_np::non_manifold_features_map)); + functor.set_non_manifold_features_map_2(boost::get_param(np2, internal_np::non_manifold_features_map)); + functor(CGAL::Emptyset_iterator(), throw_on_self_intersection, true); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 5d47cfc840a..8b0ccfcf8e6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -196,12 +197,16 @@ class Intersection_of_triangle_meshes Node_visitor visitor; Faces_to_nodes_map f_to_node; //Associate a pair of triangles to their intersection points std::vector extra_terminal_nodes; //used only for autorefinement + Non_manifold_features_map non_manifold_features_map_1, + non_manifold_features_map_2; CGAL_assertion_code(bool doing_autorefinement;) + // member functions void filter_intersections(const TriangleMesh& tm_f, const TriangleMesh& tm_e, const VertexPointMap& vpm_f, const VertexPointMap& vpm_e, + const Non_manifold_features_map& non_manifold_features_map, bool throw_on_self_intersection) { std::vector face_boxes, edge_boxes; @@ -222,15 +227,38 @@ class Intersection_of_triangle_meshes edge_boxes.reserve(num_edges(tm_e)); edge_boxes_ptr.reserve(num_edges(tm_e)); - for(edge_descriptor ed : edges(tm_e)) - { - halfedge_descriptor h=halfedge(ed,tm_e); - edge_boxes.push_back( Box( - get(vpm_e,source(h,tm_e)).bbox() + - get(vpm_e,target(h,tm_e)).bbox(), - h ) ); - edge_boxes_ptr.push_back( &edge_boxes.back() ); - } + if (non_manifold_features_map.non_manifold_edges.empty()) + // general manifold case + for(edge_descriptor ed : edges(tm_e)) + { + halfedge_descriptor h=halfedge(ed,tm_e); + edge_boxes.push_back( Box( + get(vpm_e,source(h,tm_e)).bbox() + + get(vpm_e,target(h,tm_e)).bbox(), + h ) ); + edge_boxes_ptr.push_back( &edge_boxes.back() ); + } + else + // non-manifold case + for(edge_descriptor ed : edges(tm_e)) + { + std::size_t eid=get(non_manifold_features_map.e_nm_id, ed); + halfedge_descriptor h=halfedge(ed,tm_e); + // insert only one copy of a non-manifold edge + if (eid!=std::size_t(-1)) + { + if (non_manifold_features_map.non_manifold_edges[eid].front()!=ed) + continue; + else + // make sure the halfedge used is consistant with stored one + h = halfedge(non_manifold_features_map.non_manifold_edges[eid].front(), tm_e); + } + edge_boxes.push_back( Box( + get(vpm_e,source(h,tm_e)).bbox() + + get(vpm_e,target(h,tm_e)).bbox(), + h ) ); + edge_boxes_ptr.push_back( &edge_boxes.back() ); + } /// \todo experiments different cutoff values std::ptrdiff_t cutoff = 2 * std::ptrdiff_t( @@ -670,6 +698,7 @@ class Intersection_of_triangle_meshes const TriangleMesh& tm2, const VertexPointMap& vpm1, const VertexPointMap& vpm2, + const Non_manifold_features_map& non_manifold_features_map, Node_id& current_node) { typedef std::tuple Inter_type; @@ -679,6 +708,11 @@ class Intersection_of_triangle_meshes it!=tm1_edge_to_tm2_faces.end();++it) { edge_descriptor e_1=it->first; + + std::size_t eid_1 = non_manifold_features_map.non_manifold_edges.empty() ? + std::size_t(-1) : + get(non_manifold_features_map.e_nm_id, e_1); + halfedge_descriptor h_1=halfedge(e_1,tm1); Face_set& fset=it->second; while (!fset.empty()){ @@ -1289,6 +1323,18 @@ public: CGAL_assertion_code( doing_autorefinement=true; ) } +// setting maps of non manifold features + void set_non_manifold_features_map_1(boost::param_not_found){} + void set_non_manifold_features_map_2(boost::param_not_found){} + void set_non_manifold_features_map_1(const Non_manifold_features_map& m) + { + non_manifold_features_map_1=m; + } + void set_non_manifold_features_map_2(const Non_manifold_features_map& m) + { + non_manifold_features_map_2=m; + } + template OutputIterator operator()(OutputIterator output, bool throw_on_self_intersection, @@ -1301,12 +1347,12 @@ public: const VertexPointMap& vpm1=nodes.vpm1; const VertexPointMap& vpm2=nodes.vpm2; - filter_intersections(tm1, tm2, vpm1, vpm2, throw_on_self_intersection); - filter_intersections(tm2, tm1, vpm2, vpm1, throw_on_self_intersection); + filter_intersections(tm1, tm2, vpm1, vpm2, non_manifold_features_map_2, throw_on_self_intersection); + filter_intersections(tm2, tm1, vpm2, vpm1, non_manifold_features_map_1, throw_on_self_intersection); Node_id current_node((std::numeric_limits::max)()); CGAL_assertion(current_node+1==0); - +// TODO: handle non-manifold edges in coplanar #ifndef DO_NOT_HANDLE_COPLANAR_FACES //first handle coplanar triangles if (&tm1<&tm2) @@ -1327,8 +1373,8 @@ public: ? stm_edge_to_ltm_faces : ltm_edge_to_stm_faces; - compute_intersection_points(tm1_edge_to_tm2_faces, tm1, tm2, vpm1, vpm2, current_node); - compute_intersection_points(tm2_edge_to_tm1_faces, tm2, tm1, vpm2, vpm1, current_node); + compute_intersection_points(tm1_edge_to_tm2_faces, tm1, tm2, vpm1, vpm2, non_manifold_features_map_1, current_node); + compute_intersection_points(tm2_edge_to_tm1_faces, tm2, tm1, vpm2, vpm1, non_manifold_features_map_2, current_node); if (!build_polylines){ visitor.finalize(nodes,tm1,tm2,vpm1,vpm2); return output; From 956d02109d541e2172aaa7f4395e843f9230a34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Jun 2019 11:10:06 +0200 Subject: [PATCH 003/317] add a new named parameter to pass a map of non-manifold features --- BGL/include/CGAL/boost/graph/parameters_interface.h | 3 ++- BGL/test/BGL/test_cgal_bgl_named_params.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index a0e2c179ded..ea65f330e4f 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -83,7 +83,8 @@ CGAL_add_named_parameter(output_iterator_t, output_iterator, output_iterator) CGAL_add_named_parameter(erase_all_duplicates_t, erase_all_duplicates, erase_all_duplicates) CGAL_add_named_parameter(require_same_orientation_t, require_same_orientation, require_same_orientation) CGAL_add_named_parameter(face_size_map_t, face_size_map, face_size_map) -CGAL_add_named_parameter(non_manifold_features_map_t, non_manifold_features_map, non_manifold_features_map) +CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, non_manifold_feature_map) + // 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 e797e2b3398..c23d32a13d9 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -43,11 +43,11 @@ void test(const NamedParameters& np) assert(get_param(np, CGAL::internal_np::METIS_options).v == 800000001); assert(get_param(np, CGAL::internal_np::vertex_partition_id).v == 800000002); assert(get_param(np, CGAL::internal_np::face_partition_id).v == 800000003); - + assert(get_param(np, CGAL::internal_np::vertex_to_vertex_output_iterator).v == 800000004); assert(get_param(np, CGAL::internal_np::halfedge_to_halfedge_output_iterator).v == 800000005); assert(get_param(np, CGAL::internal_np::face_to_face_output_iterator).v == 800000006); - + assert(get_param(np, CGAL::internal_np::vertex_to_vertex_map).v == 800000007); assert(get_param(np, CGAL::internal_np::halfedge_to_halfedge_map).v == 800000008); assert(get_param(np, CGAL::internal_np::face_to_face_map).v == 800000009); @@ -88,6 +88,7 @@ void test(const NamedParameters& np) assert(get_param(np, CGAL::internal_np::require_same_orientation).v == 49); assert(get_param(np, CGAL::internal_np::use_bool_op_to_clip_surface).v == 50); assert(get_param(np, CGAL::internal_np::face_size_map).v == 52); + assert(get_param(np, CGAL::internal_np::non_manifold_feature_map).v == 51); // Named parameters that we use in the package 'Surface Mesh Simplification' assert(get_param(np, CGAL::internal_np::get_cost_policy).v == 34); @@ -169,6 +170,7 @@ void test(const NamedParameters& np) check_same_type<49>(get_param(np, CGAL::internal_np::require_same_orientation)); check_same_type<50>(get_param(np, CGAL::internal_np::use_bool_op_to_clip_surface)); check_same_type<52>(get_param(np, CGAL::internal_np::face_size_map)); + check_same_type<51>(get_param(np, CGAL::internal_np::non_manifold_feature_map)); // Named parameters that we use in the package 'Surface Mesh Simplification' check_same_type<34>(get_param(np, CGAL::internal_np::get_cost_policy)); @@ -249,6 +251,7 @@ int main() .clip_volume(A<44>(44)) .use_compact_clipper(A<45>(45)) .use_bool_op_to_clip_surface(A<50>(50)) + .non_manifold_feature_map(A<51>(51)) .apply_per_connected_component(A<46>(46)) .output_iterator(A<47>(47)) .erase_all_duplicates(A<48>(48)) From 2e4881dcbdeadfb6e68410c1978e937b0547ea6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Jun 2019 11:12:27 +0200 Subject: [PATCH 004/317] add a helper indicating from the types if a named parameter contains a given parameter --- .../CGAL/boost/graph/named_params_helper.h | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 90e8bdc08cd..b7ab874f33c 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -34,14 +34,28 @@ namespace CGAL { + namespace parameters + { + template + struct Is_default + { + typedef typename boost::lookup_named_param_def < + Parameter, + NamedParameters, + boost::param_not_found > ::type NP_type; + static const bool value = boost::is_same::value; + typedef CGAL::Boolean_tag type; + }; + } // end of parameters namespace + // forward declarations to avoid dependency to Solver_interface template class Default_diagonalize_traits; class Eigen_svd; class Lapack_svd; // - - + + //helper classes template class property_map_selector @@ -245,7 +259,7 @@ namespace CGAL { typedef std::random_access_iterator_tag iterator_category; }; }; - + namespace parameters { template @@ -259,7 +273,7 @@ namespace CGAL { namespace internal{ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_type_iterator, iterator, false) } - + template::value> class GetPointMap @@ -381,7 +395,7 @@ namespace CGAL { DefaultPMap > ::type const_type; }; - + template class GetPlaneIndexMap { @@ -429,7 +443,7 @@ namespace CGAL { }; } // namespace Point_set_processing_3 - + template class GetSolver { @@ -462,10 +476,10 @@ namespace CGAL { typedef int Matrix; static FT solve (const Matrix&, Vector&) { return 0.; } }; - + public: typedef DummySvdTraits NoTraits; - + typedef typename boost::lookup_named_param_def < internal_np::svd_traits_t, NamedParameters, From 2696ee1fac983cc30d895907bc7559147256eacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Jun 2019 11:14:42 +0200 Subject: [PATCH 005/317] WIP backup commit to be rebased --- .../corefine_non_manifold.cpp | 25 ++++++- ...tures_map.h => Non_manifold_feature_map.h} | 11 ++- .../Polygon_mesh_processing/corefinement.h | 10 ++- .../internal/Corefinement/Visitor.h | 51 ++++++++++++-- .../internal/Corefinement/intersection_impl.h | 68 ++++++++++++------- .../Polygon_mesh_processing/intersection.h | 17 +++-- 6 files changed, 135 insertions(+), 47 deletions(-) rename Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/{Non_manifold_features_map.h => Non_manifold_feature_map.h} (88%) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp index ad1616f3aac..4cf264612ab 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp @@ -17,6 +17,15 @@ namespace PMP = CGAL::Polygon_mesh_processing; int main() { +// { +// Surface_mesh tm; +// CGAL::make_triangle (P(0,0,0), P(5,0,0), P(0,5,0), tm); +// CGAL::make_triangle (P(1,1,-1), P(2,1,-1), P(1.5,1,1), tm); +// std::ofstream("/tmp/tm.off") << tm; +// PMP::experimental::autorefine(tm); +// std::ofstream("/tmp/tm_aurefined.off") << tm; +// } + Surface_mesh tm1; CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,4,0), P(0,4,0), tm1); CGAL::make_quad(P(0,-4,0), P(4,-4,0), P(4,0,0), P(0,0,0), tm1); @@ -31,9 +40,21 @@ int main() CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); PMP::triangulate_faces(tm2); - PMP::Non_manifold_features_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); - PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_features_map(nm_map_1)); + // std::vector< std::vector

> polylines; + // PMP::surface_intersection(tm1, tm2, std::back_inserter(polylines), CGAL::parameters::non_manifold_feature_map(nm_map_1)); + // + // //dump polylines + // std::ofstream output("intersection_polylines.cgal"); + // for(const std::vector

& polyline : polylines) + // { + // output << polyline.size() << " "; + // std::copy(polyline.begin(), polyline.end(),std::ostream_iterator

(output," ")); + // output << "\n"; + // } + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); std::ofstream("tm1_corefined.off") << tm1; std::ofstream("tm2_corefined.off") << tm2; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h similarity index 88% rename from Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h rename to Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h index 365c391a9c6..322d52b7925 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_features_map.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h @@ -20,15 +20,15 @@ // Author(s) : Sebastien Loriot -#ifndef CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURES_MAP -#define CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURES_MAP +#ifndef CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURE_MAP +#define CGAL_POLYGON_MESH_PROCESSING_NON_MANIFOLD_FEATURE_MAP namespace CGAL { namespace Polygon_mesh_processing { //TODO: right now the base name parameter mechanism will make a deep copy, we probably want to avoid that template -struct Non_manifold_features_map +struct Non_manifold_feature_map { typedef boost::graph_traits Graph_traits; typedef typename Graph_traits::edge_descriptor edge_descriptor; @@ -38,11 +38,11 @@ struct Non_manifold_features_map Edge_to_nm_id e_nm_id; std::vector< std::vector > non_manifold_edges; - Non_manifold_features_map() + Non_manifold_feature_map() {} template - Non_manifold_features_map(PolygonMesh& pm, Vpm vpm) + Non_manifold_feature_map(PolygonMesh& pm, Vpm vpm) : e_nm_id(get(Edge_to_id_tag(), pm)) { typedef typename boost::property_traits::value_type Point_3; @@ -66,7 +66,6 @@ struct Non_manifold_features_map { if (p.second.size()!=1) { - std::cout << "Found a non-manifold edge, nb representatives: " << p.second.size() << "\n"; for (edge_descriptor ed : p.second) put(e_nm_id, ed, non_manifold_edges.size()); non_manifold_edges.resize(non_manifold_edges.size()+1); 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 909eb23c6f7..fdabb7327b0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -895,18 +895,22 @@ corefine_and_compute_difference( TriangleMesh& tm1, User_visitor uv( boost::choose_param( boost::get_param(np1, internal_np::graph_visitor), Corefinement::Default_visitor() ) ); + static const bool handle_non_manifold_features = + !parameters::Is_default::value || + !parameters::Is_default::value; + // surface intersection algorithm call typedef Corefinement::No_extra_output_from_corefinement Ob; typedef Corefinement::Surface_intersection_visitor_for_corefinement< - TriangleMesh, Vpm, Ob, Ecm, User_visitor> Algo_visitor; + TriangleMesh, Vpm, Ob, Ecm, User_visitor, false, handle_non_manifold_features> Algo_visitor; Ob ob; Ecm ecm(tm1,tm2,ecm1,ecm2); Corefinement::Intersection_of_triangle_meshes functor(tm1, tm2, vpm1, vpm2, Algo_visitor(uv,ob,ecm)); // Fill non-manifold feature maps if provided - functor.set_non_manifold_features_map_1(boost::get_param(np1, internal_np::non_manifold_features_map)); - functor.set_non_manifold_features_map_2(boost::get_param(np2, internal_np::non_manifold_features_map)); + functor.set_non_manifold_feature_map_1(boost::get_param(np1, internal_np::non_manifold_feature_map)); + functor.set_non_manifold_feature_map_2(boost::get_param(np2, internal_np::non_manifold_feature_map)); 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 c5432d4035d..ce54494c023 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 @@ -115,7 +115,8 @@ template< class TriangleMesh, class OutputBuilder_ = Default, class EdgeMarkMapBind_ = Default, class UserVisitor_ = Default, - bool doing_autorefinement = false > + bool doing_autorefinement = false, + bool handle_non_manifold_features = false > class Surface_intersection_visitor_for_corefinement{ //default template parameters typedef typename Default::Get Vertex_to_node_id; typedef std::map Mesh_to_vertex_to_node_id; + typedef Non_manifold_feature_map NM_features_map; // typedef for the CDT typedef typename Intersection_nodes::Exact_kernel EK; @@ -174,6 +176,9 @@ private: std::map< Node_id,std::set > coplanar_constraints; +// optional data members to handle non-manifold issues + std::map non_manifold_feature_maps; + //data members that require initialization in the constructor UserVisitor& user_visitor; OutputBuilder& output_builder; @@ -217,6 +222,40 @@ public: , input_with_coplanar_faces(false) {} + void + set_non_manifold_feature_map( + const TriangleMesh& tm, + const NM_features_map& nm) + { + non_manifold_feature_maps[&tm] = &nm; + } + + void copy_nodes_ids_for_non_manifold_features() + { + for(const std::pair& tm_and_nm : + non_manifold_feature_maps) + { + // update nodes on edges + On_edge_map& on_edge_map = on_edge[const_cast(tm_and_nm.first)]; + std::vector< std::pair > edges_to_copy; + for (const std::pair& ed_and_ids : on_edge_map) + { + std::size_t eid = get(tm_and_nm.second->e_nm_id, ed_and_ids.first); + if (eid!=std::size_t(-1)) + edges_to_copy.push_back(std::make_pair(eid,&(ed_and_ids.second))); + } + for(const std::pair& id_and_nodes : edges_to_copy) + { + const std::vector& nm_edges = + tm_and_nm.second->non_manifold_edges[id_and_nodes.first]; + CGAL_assertion( on_edge_map.count(nm_edges.front())==1 ); + + for (std::size_t i=1; i void annotate_graph(std::vector& graph) { @@ -561,7 +600,7 @@ public: // this condition ensures to consider only graph edges that are in // the same triangle if ( !points_on_triangle || it_vh!=id_to_CDT_vh.end() ){ - CGAL_assertion(doing_autorefinement || it_vh!=id_to_CDT_vh.end()); + CGAL_assertion(doing_autorefinement || handle_non_manifold_features || it_vh!=id_to_CDT_vh.end()); if (it_vh==id_to_CDT_vh.end()) continue; // needed for autorefinement (interior nodes) cdt.insert_constraint(vh,it_vh->second); constrained_edges.push_back(std::make_pair(id,id_n)); @@ -601,6 +640,8 @@ public: const VertexPointMap& vpm1, const VertexPointMap& vpm2) { + copy_nodes_ids_for_non_manifold_features(); + nodes.all_nodes_created(); TriangleMesh* tm1_ptr = const_cast(&tm1); @@ -824,7 +865,7 @@ public: f_vertices[1]=it_fb->second.vertices[1]; f_vertices[2]=it_fb->second.vertices[2]; update_face_indices(f_vertices,f_indices,vertex_to_node_id); - if (doing_autorefinement) + if (doing_autorefinement || handle_non_manifold_features) it_fb->second.update_node_id_to_vertex_map(node_id_to_vertex, tm); } else{ @@ -870,7 +911,7 @@ public: { id_to_CDT_vh.insert( std::make_pair(f_indices[ik],triangle_vertices[ik])); - if (doing_autorefinement) + if (doing_autorefinement || handle_non_manifold_features) // update the current vertex in node_id_to_vertex // to match the one of the face node_id_to_vertex[f_indices[ik]]=f_vertices[ik]; @@ -1039,8 +1080,6 @@ public: } } - nodes.finalize(); - // additional operations output_builder(nodes, input_with_coplanar_faces, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 8b0ccfcf8e6..74013d712ee 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -109,9 +109,12 @@ struct Default_surface_intersection_visitor{ // If we implement a predicate only test, we can get rid of it. static const bool Predicates_on_constructions_needed = doing_autorefinement; static const bool do_need_vertex_graph = false; + void set_non_manifold_feature_map( + const TriangleMesh&, + const Non_manifold_feature_map&) + {} }; - struct Node_id_set { typedef std::size_t Node_id; @@ -197,8 +200,8 @@ class Intersection_of_triangle_meshes Node_visitor visitor; Faces_to_nodes_map f_to_node; //Associate a pair of triangles to their intersection points std::vector extra_terminal_nodes; //used only for autorefinement - Non_manifold_features_map non_manifold_features_map_1, - non_manifold_features_map_2; + Non_manifold_feature_map non_manifold_feature_map_1, + non_manifold_feature_map_2; CGAL_assertion_code(bool doing_autorefinement;) // member functions @@ -206,7 +209,7 @@ class Intersection_of_triangle_meshes const TriangleMesh& tm_e, const VertexPointMap& vpm_f, const VertexPointMap& vpm_e, - const Non_manifold_features_map& non_manifold_features_map, + const Non_manifold_feature_map& non_manifold_feature_map, bool throw_on_self_intersection) { std::vector face_boxes, edge_boxes; @@ -227,7 +230,7 @@ class Intersection_of_triangle_meshes edge_boxes.reserve(num_edges(tm_e)); edge_boxes_ptr.reserve(num_edges(tm_e)); - if (non_manifold_features_map.non_manifold_edges.empty()) + if (non_manifold_feature_map.non_manifold_edges.empty()) // general manifold case for(edge_descriptor ed : edges(tm_e)) { @@ -242,16 +245,16 @@ class Intersection_of_triangle_meshes // non-manifold case for(edge_descriptor ed : edges(tm_e)) { - std::size_t eid=get(non_manifold_features_map.e_nm_id, ed); + std::size_t eid=get(non_manifold_feature_map.e_nm_id, ed); halfedge_descriptor h=halfedge(ed,tm_e); // insert only one copy of a non-manifold edge if (eid!=std::size_t(-1)) { - if (non_manifold_features_map.non_manifold_edges[eid].front()!=ed) + if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) continue; else // make sure the halfedge used is consistant with stored one - h = halfedge(non_manifold_features_map.non_manifold_edges[eid].front(), tm_e); + h = halfedge(non_manifold_feature_map.non_manifold_edges[eid].front(), tm_e); } edge_boxes.push_back( Box( get(vpm_e,source(h,tm_e)).bbox() + @@ -698,7 +701,8 @@ class Intersection_of_triangle_meshes const TriangleMesh& tm2, const VertexPointMap& vpm1, const VertexPointMap& vpm2, - const Non_manifold_features_map& non_manifold_features_map, + const Non_manifold_feature_map& nm_features_map_1, + const Non_manifold_feature_map& nm_features_map_2, Node_id& current_node) { typedef std::tuple Inter_type; @@ -709,9 +713,9 @@ class Intersection_of_triangle_meshes { edge_descriptor e_1=it->first; - std::size_t eid_1 = non_manifold_features_map.non_manifold_edges.empty() ? + std::size_t eid_1 = nm_features_map_1.non_manifold_edges.empty() ? std::size_t(-1) : - get(non_manifold_features_map.e_nm_id, e_1); + get(nm_features_map_1.e_nm_id, e_1); halfedge_descriptor h_1=halfedge(e_1,tm1); Face_set& fset=it->second; @@ -768,9 +772,22 @@ class Intersection_of_triangle_meshes add_intersection_point_to_face_and_all_edge_incident_faces(f_2,*it_edge,tm2,tm1,node_id); //erase face from the list to test intersection with it_edge if ( it_edge==all_edges.begin() ) + { fset.erase(fset.begin()); + if (eid_1!=std::size_t(-1)) + { + for (std::size_t k=1; + ksecond.erase(f_2); } @@ -1140,7 +1157,7 @@ class Intersection_of_triangle_meshes } else{ CGAL_assertion(segment.size()==1); - isolated_point_seen=true; + isolated_point_seen=true; // NOT TRUE CAN BE END POINT OF POLYLINE FALLING ONTO AN INPUT EDGE } } @@ -1324,15 +1341,17 @@ public: } // setting maps of non manifold features - void set_non_manifold_features_map_1(boost::param_not_found){} - void set_non_manifold_features_map_2(boost::param_not_found){} - void set_non_manifold_features_map_1(const Non_manifold_features_map& m) + void set_non_manifold_feature_map_1(boost::param_not_found){} + void set_non_manifold_feature_map_2(boost::param_not_found){} + void set_non_manifold_feature_map_1(const Non_manifold_feature_map& m) { - non_manifold_features_map_1=m; + non_manifold_feature_map_1=m; + visitor.set_non_manifold_feature_map(nodes.tm1, non_manifold_feature_map_1); } - void set_non_manifold_features_map_2(const Non_manifold_features_map& m) + void set_non_manifold_feature_map_2(const Non_manifold_feature_map& m) { - non_manifold_features_map_2=m; + non_manifold_feature_map_2=m; + visitor.set_non_manifold_feature_map(nodes.tm2, non_manifold_feature_map_2); } template @@ -1347,8 +1366,8 @@ public: const VertexPointMap& vpm1=nodes.vpm1; const VertexPointMap& vpm2=nodes.vpm2; - filter_intersections(tm1, tm2, vpm1, vpm2, non_manifold_features_map_2, throw_on_self_intersection); - filter_intersections(tm2, tm1, vpm2, vpm1, non_manifold_features_map_1, throw_on_self_intersection); + filter_intersections(tm1, tm2, vpm1, vpm2, non_manifold_feature_map_2, throw_on_self_intersection); + filter_intersections(tm2, tm1, vpm2, vpm1, non_manifold_feature_map_1, throw_on_self_intersection); Node_id current_node((std::numeric_limits::max)()); CGAL_assertion(current_node+1==0); @@ -1373,8 +1392,9 @@ public: ? stm_edge_to_ltm_faces : ltm_edge_to_stm_faces; - compute_intersection_points(tm1_edge_to_tm2_faces, tm1, tm2, vpm1, vpm2, non_manifold_features_map_1, current_node); - compute_intersection_points(tm2_edge_to_tm1_faces, tm2, tm1, vpm2, vpm1, non_manifold_features_map_2, current_node); + compute_intersection_points(tm1_edge_to_tm2_faces, tm1, tm2, vpm1, vpm2, non_manifold_feature_map_1, non_manifold_feature_map_2, current_node); + compute_intersection_points(tm2_edge_to_tm1_faces, tm2, tm1, vpm2, vpm1, non_manifold_feature_map_2, non_manifold_feature_map_1, current_node); + if (!build_polylines){ visitor.finalize(nodes,tm1,tm2,vpm1,vpm2); return output; @@ -1428,7 +1448,7 @@ public: //compute intersection points of segments and triangles. //build the nodes of the graph and connectivity infos - compute_intersection_points(stm_edge_to_ltm_faces, tm, tm, vpm, vpm, current_node); + compute_intersection_points(stm_edge_to_ltm_faces, tm, tm, vpm, vpm, non_manifold_feature_map_1, non_manifold_feature_map_1, current_node); if (!build_polylines){ visitor.finalize(nodes,tm,tm,vpm,vpm); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 4029676a33c..b46d5b72781 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -411,10 +411,10 @@ compute_face_face_intersection(const FaceRange& face_range1, typedef TriangleMesh TM; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename CGAL::Box_intersection_d::Box_with_info_d Box; - + CGAL::Bbox_3 b1 = CGAL::Polygon_mesh_processing::bbox(tm1, np1), b2 = CGAL::Polygon_mesh_processing::bbox(tm2, np2); - + if(!CGAL::do_overlap(b1, b2)) { return out; @@ -661,7 +661,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, using boost::get_param; CGAL_precondition(CGAL::is_triangle_mesh(tm)); - + CGAL::Bbox_3 b1,b2; b1 = CGAL::Polygon_mesh_processing::bbox(tm, np); for(std::size_t i =0; i< polyline_range.size(); ++i) @@ -669,10 +669,10 @@ compute_face_polylines_intersection(const FaceRange& face_range, b2 += CGAL::bbox_3(polyline_range[i].begin(), polyline_range[i].end()); } - + if(!CGAL::do_overlap(b1,b2)) return out; - + typedef TriangleMesh TM; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename GetVertexPointMap::const_type VertexPointMap; @@ -887,7 +887,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, b2 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes2.reserve(polylines_size); - + if(!CGAL::do_overlap(b1,b2)) return out; std::size_t range_size = std::distance( boost::begin(polylines1), boost::end(polylines1) ); @@ -1715,6 +1715,11 @@ surface_intersection(const TriangleMesh& tm1, Corefinement::Intersection_of_triangle_meshes functor(tm1, tm2, vpm1, vpm2); + + // Fill non-manifold feature maps if provided + functor.set_non_manifold_feature_map_1(boost::get_param(np1, internal_np::non_manifold_feature_map)); + functor.set_non_manifold_feature_map_2(boost::get_param(np2, internal_np::non_manifold_feature_map)); + return functor(polyline_output, throw_on_self_intersection, true); } From 42bef4e9269af15cfca03c71793fb9fd76218789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Jun 2019 16:04:35 +0200 Subject: [PATCH 006/317] WIP backup commit - add non manifold vertices --- .../Non_manifold_feature_map.h | 33 ++++++++++++++++++ .../internal/Corefinement/Visitor.h | 34 +++++++++++++++++-- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h index 322d52b7925..edbb9809a54 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h @@ -31,12 +31,17 @@ template struct Non_manifold_feature_map { typedef boost::graph_traits Graph_traits; + typedef typename Graph_traits::vertex_descriptor vertex_descriptor; typedef typename Graph_traits::edge_descriptor edge_descriptor; typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor; typedef dynamic_edge_property_t Edge_to_id_tag; + typedef dynamic_vertex_property_t Vertex_to_id_tag; typedef typename boost::property_map::type Edge_to_nm_id; + typedef typename boost::property_map::type Vertex_to_nm_id; Edge_to_nm_id e_nm_id; + Vertex_to_nm_id v_nm_id; std::vector< std::vector > non_manifold_edges; + std::vector< std::vector > non_manifold_vertices; Non_manifold_feature_map() {} @@ -44,15 +49,43 @@ struct Non_manifold_feature_map template Non_manifold_feature_map(PolygonMesh& pm, Vpm vpm) : e_nm_id(get(Edge_to_id_tag(), pm)) + , v_nm_id(get(Vertex_to_id_tag(), pm)) { typedef typename boost::property_traits::value_type Point_3; + // detect non-manifold vertices + std::map > vertex_map; + for(vertex_descriptor vd : vertices(pm)) + { + put(v_nm_id, vd, std::size_t(-1)); // init map + vertex_map[get(vpm, vd)].push_back(vd); + } + + for(std::pair< const Point_3, + std::vector >& p : vertex_map) + { + if (p.second.size()!=1) + { + for (vertex_descriptor vd : p.second) + put(v_nm_id, vd, non_manifold_vertices.size()); + non_manifold_vertices.resize(non_manifold_vertices.size()+1); + // we steal the vertor from the map + p.second.swap(non_manifold_vertices.back()); + } + } + + // detect non-manifold edges std::map< std::pair, std::vector > edge_map; for(edge_descriptor ed : edges(pm)) { put(e_nm_id, ed, std::size_t(-1)); // init map halfedge_descriptor hd = halfedge(ed, pm); + + // an edge can be non-manifold only if both its vertices are non-manifold + if ( get(v_nm_id, source(hd, pm))==std::size_t(-1) || + get(v_nm_id, target(hd, pm))==std::size_t(-1) ) continue; + const Point_3& src = get(vpm, source(ed, pm)); const Point_3& tgt = get(vpm, target(ed, pm)); // TODO: what to do with null edges? 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 ce54494c023..7f324dfd9f4 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 @@ -235,8 +235,9 @@ public: for(const std::pair& tm_and_nm : non_manifold_feature_maps) { + TriangleMesh* tm_ptr = const_cast(tm_and_nm.first); // update nodes on edges - On_edge_map& on_edge_map = on_edge[const_cast(tm_and_nm.first)]; + On_edge_map& on_edge_map = on_edge[tm_ptr]; std::vector< std::pair > edges_to_copy; for (const std::pair& ed_and_ids : on_edge_map) { @@ -253,6 +254,32 @@ public: for (std::size_t i=1; i node_id + Vertex_to_node_id& vertex_to_node_id = mesh_to_vertex_to_node_id[tm_ptr]; + Node_to_target_of_hedge_map vertices_on_inter = mesh_to_vertices_on_inter[tm_ptr]; + + std::vector< std::pair > vertices_to_add; + for (const typename std::pair& vd_and_id + : vertex_to_node_id) + { + std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_id.first); + if (vid!=std::size_t(-1)) + vertices_to_add.push_back(std::make_pair(vd_and_id.first,vd_and_id.second)); + for(const std::pair& vd_and_nid : vertices_to_add) + { + std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_nid.first); + for(vertex_descriptor vd : tm_and_nm.second->non_manifold_vertices[vid]) + { + if (vd != vd_and_nid.first) + { + vertex_to_node_id.insert(std::make_pair(vd,vd_and_nid.second)); + output_builder.set_vertex_id(vd, vd_and_nid.second, *tm_ptr); + vertices_on_inter.insert(std::make_pair(vd_and_nid.second,halfedge(vd,*tm_ptr))); + } + } + } + } } } @@ -509,8 +536,9 @@ public: std::copy(begin,end,std::back_inserter(node_ids_array[it_id->second])); } - // Used by the autorefinement to re-set the id of nodes on the boundary of a - // face since another vertex (inside a face or on another edge) might have + // Used by the autorefinement and non-manifold edge handling to re-set + // the id of nodes on the boundary of a face since another vertex + // (inside a face or on another edge) might have // overwritten the vertex in node_id_to_vertex template void update_node_id_to_vertex_map(Node_id_to_vertex& node_id_to_vertex, From 0e31256379523171d903e69fe08768a0bcf1ea4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 24 Jun 2019 09:30:36 +0200 Subject: [PATCH 007/317] rename confusing variable --- .../internal/Corefinement/intersection_impl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 74013d712ee..a9e31f5b294 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -399,14 +399,14 @@ class Intersection_of_triangle_meshes } void add_intersection_point_to_face_and_all_edge_incident_faces(face_descriptor f_1, - halfedge_descriptor e_2, + halfedge_descriptor h_2, const TriangleMesh& tm1, const TriangleMesh& tm2, Node_id node_id) { - if (!is_border(e_2, tm2)) + if (!is_border(h_2, tm2)) { - face_descriptor f_2 = face(e_2, tm2); + face_descriptor f_2 = face(h_2, tm2); if(&tm1!=&tm2 || f_1!=f_2) { Face_pair face_pair = &tm1==&tm2 ? make_sorted_pair(f_1,f_2): @@ -417,10 +417,10 @@ class Intersection_of_triangle_meshes f_to_node[Face_pair_and_int(face_pair,0)].insert(node_id); } } - e_2 = opposite(e_2, tm2); - if (!is_border(e_2, tm2)) + h_2 = opposite(h_2, tm2); + if (!is_border(h_2, tm2)) { - face_descriptor f_2 = face(e_2, tm2); + face_descriptor f_2 = face(h_2, tm2); if(&tm1!=&tm2 || f_1!=f_2) { Face_pair face_pair = &tm1==&tm2 ? make_sorted_pair(f_1,f_2): @@ -521,14 +521,14 @@ class Intersection_of_triangle_meshes } void handle_coplanar_case_VERTEX_EDGE(halfedge_descriptor v_1, - halfedge_descriptor e_2, + halfedge_descriptor h_2, const TriangleMesh& tm1, const TriangleMesh& tm2, Node_id node_id, bool is_new_node) { if(is_new_node) - visitor.new_node_added(node_id,ON_VERTEX,e_2,v_1,tm2,tm1,false,false); + visitor.new_node_added(node_id,ON_VERTEX,h_2,v_1,tm2,tm1,false,false); Edge_to_faces& tm1_edge_to_tm2_faces = &tm1 <= &tm2 ? stm_edge_to_ltm_faces @@ -539,7 +539,7 @@ class Intersection_of_triangle_meshes { typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); Face_set* fset = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_edge(node_id,fset,h_1,e_2,tm1,tm2); + cip_handle_case_edge(node_id,fset,h_1,h_2,tm1,tm2); } } From a903d3585a847f6ec9ff9d16e00bce1203366e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 24 Jun 2019 10:18:30 +0200 Subject: [PATCH 008/317] WIP handle non-manifold edges with edge endpoint on a face --- .../internal/Corefinement/intersection_impl.h | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index a9e31f5b294..d968812c136 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -713,9 +713,7 @@ class Intersection_of_triangle_meshes { edge_descriptor e_1=it->first; - std::size_t eid_1 = nm_features_map_1.non_manifold_edges.empty() ? - std::size_t(-1) : - get(nm_features_map_1.e_nm_id, e_1); + halfedge_descriptor h_1=halfedge(e_1,tm1); Face_set& fset=it->second; @@ -740,6 +738,29 @@ class Intersection_of_triangle_meshes all_edges.push_back(h_1); } + if (!nm_features_map_1.non_manifold_edges.empty()) + { + std::size_t nb_edges = all_edges.size(); + for (std::size_t ie=0; iesecond.erase(f_2); } From 0c49b605414d9364242ab40089e20f716443a65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 24 Jun 2019 11:44:52 +0200 Subject: [PATCH 009/317] WIP handle intersection on non-manifold edge --- .../internal/Corefinement/intersection_impl.h | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index d968812c136..27057ca0afd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -201,7 +201,7 @@ class Intersection_of_triangle_meshes Faces_to_nodes_map f_to_node; //Associate a pair of triangles to their intersection points std::vector extra_terminal_nodes; //used only for autorefinement Non_manifold_feature_map non_manifold_feature_map_1, - non_manifold_feature_map_2; + non_manifold_feature_map_2; CGAL_assertion_code(bool doing_autorefinement;) // member functions @@ -812,14 +812,31 @@ class Intersection_of_triangle_meshes add_new_node(h_1,f_2,tm1,tm2,vpm1,vpm2,res); halfedge_descriptor h_2=std::get<1>(res); visitor.new_node_added(node_id,ON_EDGE,h_1,h_2,tm1,tm2,std::get<3>(res),std::get<2>(res)); + + std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_2.e_nm_id, edge(h_2, tm2)); + for (;it_edge!=all_edges.end();++it_edge){ if ( it_edge!=all_edges.begin() ){ typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(*it_edge,tm1)); Face_set* fset_bis = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_edge(node_id,fset_bis,*it_edge,h_2,tm1,tm2); + if( eid2 == std::size_t(-1) ) + cip_handle_case_edge(node_id,fset_bis,*it_edge,h_2,tm1,tm2); + else + { + for (edge_descriptor e2 : nm_features_map_2.non_manifold_edges[eid2]) + cip_handle_case_edge(node_id,fset_bis,*it_edge,halfedge(e2, tm2),tm1,tm2); + } } else - cip_handle_case_edge(node_id,&fset,*it_edge,h_2,tm1,tm2); + { + if( eid2 == std::size_t(-1) ) + cip_handle_case_edge(node_id,&fset,*it_edge,h_2,tm1,tm2); + else + for (edge_descriptor e2 : nm_features_map_2.non_manifold_edges[eid2]) + cip_handle_case_edge(node_id,&fset,*it_edge,halfedge(e2, tm2),tm1,tm2); + } } } // end case ON_EDGE break; From 5d8768c8ac01e8363ffd8b329865bda5591c8b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 24 Jun 2019 11:51:45 +0200 Subject: [PATCH 010/317] WIP handle intersection on non-manifold vertex --- .../internal/Corefinement/intersection_impl.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 27057ca0afd..52f2ca48931 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -848,14 +848,27 @@ class Intersection_of_triangle_meshes nodes.add_new_node(get(vpm2, target(h_2,tm2))); //we use the original vertex to create the node //before it was ON_FACE but do not remember why, probably a bug... visitor.new_node_added(node_id,ON_VERTEX,h_1,h_2,tm1,tm2,std::get<3>(res),std::get<2>(res)); + + std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_2.v_nm_id, target(h_2, tm2)); + for (;it_edge!=all_edges.end();++it_edge){ if ( it_edge!=all_edges.begin() ){ typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(*it_edge,tm1)); Face_set* fset_bis = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_vertex(node_id,fset_bis,*it_edge,h_2,tm1,tm2); + if( vid2 == std::size_t(-1) ) + cip_handle_case_vertex(node_id,fset_bis,*it_edge,h_2,tm1,tm2); + else + for (vertex_descriptor vd2 : nm_features_map_2.non_manifold_vertices[vid2]) + cip_handle_case_vertex(node_id,fset_bis,*it_edge,halfedge(vd2, tm2),tm1,tm2); } else - cip_handle_case_vertex(node_id,&fset,*it_edge,h_2,tm1,tm2); + if( vid2 == std::size_t(-1) ) + cip_handle_case_vertex(node_id,&fset,*it_edge,h_2,tm1,tm2); + else + for (vertex_descriptor vd2 : nm_features_map_2.non_manifold_vertices[vid2]) + cip_handle_case_vertex(node_id,&fset,*it_edge,halfedge(vd2, tm2),tm1,tm2); } } // end case ON_VERTEX break; From 0f9d57116829274fad4efea9d7fba40bdfbdb613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 10:09:27 +0200 Subject: [PATCH 011/317] WIP code for coplanar and non-manifold edges --- .../internal/Corefinement/intersection_impl.h | 143 ++++++++++++++---- 1 file changed, 110 insertions(+), 33 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 52f2ca48931..cca786e6b75 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -501,6 +501,7 @@ class Intersection_of_triangle_meshes halfedge_descriptor f_2, const TriangleMesh& tm1, const TriangleMesh& tm2, + const Non_manifold_feature_map& nm_features_map_1, Node_id node_id, bool is_new_node) { @@ -511,19 +512,31 @@ class Intersection_of_triangle_meshes ? stm_edge_to_ltm_faces : ltm_edge_to_stm_faces; - for(halfedge_descriptor h_1 : - halfedges_around_target(v_1,tm1)) - { - add_intersection_point_to_face_and_all_edge_incident_faces(face(f_2,tm2),h_1,tm2,tm1,node_id); - typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); - if (it_ets!=tm1_edge_to_tm2_faces.end()) it_ets->second.erase(face(f_2,tm2)); - } + std::vector tmp_vertices_1(1, target(v_1, tm1)); + + std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); + + const std::vector& vertices_1 = vid1==std::size_t(-1) + ? tmp_vertices_1 + : nm_features_map_1.non_manifold_vertices[vid1]; + for(vertex_descriptor v1 : vertices_1) + for(halfedge_descriptor h_1 : + halfedges_around_target(v1,tm1)) + { + add_intersection_point_to_face_and_all_edge_incident_faces(face(f_2,tm2),h_1,tm2,tm1,node_id); + typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); + if (it_ets!=tm1_edge_to_tm2_faces.end()) it_ets->second.erase(face(f_2,tm2)); + } } void handle_coplanar_case_VERTEX_EDGE(halfedge_descriptor v_1, halfedge_descriptor h_2, const TriangleMesh& tm1, const TriangleMesh& tm2, + const Non_manifold_feature_map& nm_features_map_1, + const Non_manifold_feature_map& nm_features_map_2, Node_id node_id, bool is_new_node) { @@ -534,19 +547,43 @@ class Intersection_of_triangle_meshes ? stm_edge_to_ltm_faces : ltm_edge_to_stm_faces; - for(halfedge_descriptor h_1 : - halfedges_around_target(v_1,tm1)) - { - typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); - Face_set* fset = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_edge(node_id,fset,h_1,h_2,tm1,tm2); - } + std::vector tmp_vertices_1(1, target(v_1, tm1)); + + std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); + + const std::vector& vertices_1 = vid1==std::size_t(-1) + ? tmp_vertices_1 + : nm_features_map_1.non_manifold_vertices[vid1]; + + std::vector tmp_edges_2(1, edge(h_2, tm2)); + + std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_2.e_nm_id, edge(h_2, tm2)); + + const std::vector& edges_2 = eid2==std::size_t(-1) + ? tmp_edges_2 + : nm_features_map_2.non_manifold_edges[eid2]; + + for (vertex_descriptor v1 : vertices_1) + for(halfedge_descriptor h_1 : + halfedges_around_target(v1,tm1)) + { + typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); + Face_set* fset = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; + for (edge_descriptor e2 : edges_2) + cip_handle_case_edge(node_id,fset,h_1,halfedge(e2, tm2),tm1,tm2); + } } void handle_coplanar_case_VERTEX_VERTEX(halfedge_descriptor v_1, halfedge_descriptor v_2, const TriangleMesh& tm1, const TriangleMesh& tm2, + const Non_manifold_feature_map& nm_features_map_1, + const Non_manifold_feature_map& nm_features_map_2, Node_id node_id, bool is_new_node) { @@ -557,13 +594,33 @@ class Intersection_of_triangle_meshes ? stm_edge_to_ltm_faces : ltm_edge_to_stm_faces; - for(halfedge_descriptor h_1 : - halfedges_around_target(v_1,tm1)) - { - typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); - Face_set* fset = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_vertex(node_id,fset,h_1,v_2,tm1,tm2); - } + std::vector tmp_vertices_1(1, target(v_1, tm1)), + tmp_vertices_2(1, target(v_2, tm2)); + + std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); + + std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_2.v_nm_id, target(v_2, tm2)); + + const std::vector& vertices_1 = vid1==std::size_t(-1) + ? tmp_vertices_1 + : nm_features_map_1.non_manifold_vertices[vid1]; + const std::vector& vertices_2 = vid2==std::size_t(-1) + ? tmp_vertices_2 + : nm_features_map_2.non_manifold_vertices[vid2]; + + for (vertex_descriptor v1 : vertices_1) + for(halfedge_descriptor h_1 : + halfedges_around_target(v1,tm1)) + { + typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(h_1,tm1)); + Face_set* fset = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; + for (vertex_descriptor v2 : vertices_2) + cip_handle_case_vertex(node_id,fset,h_1,halfedge(v2, tm2),tm1,tm2); + } } void compute_intersection_of_coplanar_faces( @@ -571,7 +628,9 @@ class Intersection_of_triangle_meshes const TriangleMesh& tm1, const TriangleMesh& tm2, const VertexPointMap& vpm1, - const VertexPointMap& vpm2) + const VertexPointMap& vpm2, + const Non_manifold_feature_map& nm_features_map_1, + const Non_manifold_feature_map& nm_features_map_2) { CGAL_assertion( &tm1 < &tm2 || &tm1==&tm2 ); @@ -613,13 +672,13 @@ class Intersection_of_triangle_meshes { switch(ipt.type_2){ case ON_VERTEX: - handle_coplanar_case_VERTEX_VERTEX(ipt.info_1,ipt.info_2,tm1,tm2,node_id,is_new_node); + handle_coplanar_case_VERTEX_VERTEX(ipt.info_1,ipt.info_2,tm1,tm2,nm_features_map_1,nm_features_map_2,node_id,is_new_node); break; case ON_EDGE: - handle_coplanar_case_VERTEX_EDGE(ipt.info_1,ipt.info_2,tm1,tm2,node_id,is_new_node); + handle_coplanar_case_VERTEX_EDGE(ipt.info_1,ipt.info_2,tm1,tm2,nm_features_map_1,nm_features_map_2,node_id,is_new_node); break; case ON_FACE: - handle_coplanar_case_VERTEX_FACE(ipt.info_1,ipt.info_2,tm1,tm2,node_id,is_new_node); + handle_coplanar_case_VERTEX_FACE(ipt.info_1,ipt.info_2,tm1,tm2,nm_features_map_1,node_id,is_new_node); break; default: CGAL_error_msg("Should not get there!"); } @@ -629,15 +688,33 @@ class Intersection_of_triangle_meshes { switch(ipt.type_2){ case ON_VERTEX: - handle_coplanar_case_VERTEX_EDGE(ipt.info_2,ipt.info_1,tm2,tm1,node_id,is_new_node); + handle_coplanar_case_VERTEX_EDGE(ipt.info_2,ipt.info_1,tm2,tm1,nm_features_map_2,nm_features_map_1,node_id,is_new_node); break; case ON_EDGE: { if(is_new_node) visitor.new_node_added(node_id,ON_EDGE,ipt.info_1,ipt.info_2,tm1,tm2,false,false); - typename Edge_to_faces::iterator it_ets=stm_edge_to_ltm_faces.find(edge(ipt.info_1,tm1)); - Face_set* fset = (it_ets!=stm_edge_to_ltm_faces.end())?&(it_ets->second):nullptr; - cip_handle_case_edge(node_id,fset,ipt.info_1,ipt.info_2,tm1,tm2); + std::vector tmp_edges_1(1, edge(ipt.info_1,tm1)), + tmp_edges_2(1, edge(ipt.info_2,tm2)); + std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_1.e_nm_id, edge(ipt.info_1, tm1)); + std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_2.e_nm_id, edge(ipt.info_2, tm2)); + const std::vector& edges_1 = eid1==std::size_t(-1) + ? tmp_edges_1 + : nm_features_map_1.non_manifold_edges[eid1]; + const std::vector& edges_2 = eid2==std::size_t(-1) + ? tmp_edges_2 + : nm_features_map_2.non_manifold_edges[eid2]; + for(edge_descriptor e1 : edges_1) + for(edge_descriptor e2 : edges_2) + { + typename Edge_to_faces::iterator it_ets=stm_edge_to_ltm_faces.find(e1); + Face_set* fset = (it_ets!=stm_edge_to_ltm_faces.end())?&(it_ets->second):nullptr; + cip_handle_case_edge(node_id,fset,halfedge(e1,tm1),halfedge(e2,tm2),tm1,tm2); + } } break; default: CGAL_error_msg("Should not get there!"); @@ -647,7 +724,7 @@ class Intersection_of_triangle_meshes case ON_FACE: { CGAL_assertion(ipt.type_2==ON_VERTEX); - handle_coplanar_case_VERTEX_FACE(ipt.info_2,ipt.info_1,tm2,tm1,node_id,is_new_node); + handle_coplanar_case_VERTEX_FACE(ipt.info_2,ipt.info_1,tm2,tm1,nm_features_map_2,node_id,is_new_node); } break; default: CGAL_error_msg("Should not get there!"); @@ -1415,9 +1492,9 @@ public: #ifndef DO_NOT_HANDLE_COPLANAR_FACES //first handle coplanar triangles if (&tm1<&tm2) - compute_intersection_of_coplanar_faces(current_node, tm1, tm2, vpm1, vpm2); + compute_intersection_of_coplanar_faces(current_node, tm1, tm2, vpm1, vpm2, non_manifold_feature_map_1, non_manifold_feature_map_2); else - compute_intersection_of_coplanar_faces(current_node, tm2, tm1, vpm2, vpm1); + compute_intersection_of_coplanar_faces(current_node, tm2, tm1, vpm2, vpm1, non_manifold_feature_map_2, non_manifold_feature_map_1); visitor.set_number_of_intersection_points_from_coplanar_faces(current_node+1); if (!coplanar_faces.empty()) visitor.input_have_coplanar_faces(); @@ -1480,7 +1557,7 @@ public: CGAL_assertion(current_node+1==0); //first handle coplanar triangles - compute_intersection_of_coplanar_faces(current_node, tm, tm, vpm, vpm); + compute_intersection_of_coplanar_faces(current_node, tm, tm, vpm, vpm, non_manifold_feature_map_1, non_manifold_feature_map_1); if (!coplanar_faces.empty()) visitor.input_have_coplanar_faces(); From dda63a68ad75c209c55ae76ed84f5202035576ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 10:09:55 +0200 Subject: [PATCH 012/317] more tests --- .../corefine_non_manifold.cpp | 202 ++++++++++++++++-- 1 file changed, 179 insertions(+), 23 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp index 4cf264612ab..7a82c4ea898 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp @@ -17,15 +17,10 @@ namespace PMP = CGAL::Polygon_mesh_processing; int main() { -// { -// Surface_mesh tm; -// CGAL::make_triangle (P(0,0,0), P(5,0,0), P(0,5,0), tm); -// CGAL::make_triangle (P(1,1,-1), P(2,1,-1), P(1.5,1,1), tm); -// std::ofstream("/tmp/tm.off") << tm; -// PMP::experimental::autorefine(tm); -// std::ofstream("/tmp/tm_aurefined.off") << tm; -// } +// polyline intersection with a non-manifold edge +{ + std::cout << "running polyline test\n"; Surface_mesh tm1; CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,4,0), P(0,4,0), tm1); CGAL::make_quad(P(0,-4,0), P(4,-4,0), P(4,0,0), P(0,0,0), tm1); @@ -35,27 +30,188 @@ int main() PMP::triangulate_faces(tm1); Surface_mesh tm2; -// CGAL::make_quad(P(2,2,-2), P(2,-2,-2), P(2,-2,2), P(2,2,2), tm2); //TODO: test me + also test splitting the diagonal -// TODO: test more case including non-manifold vertices CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); PMP::triangulate_faces(tm2); PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); - // std::vector< std::vector

> polylines; - // PMP::surface_intersection(tm1, tm2, std::back_inserter(polylines), CGAL::parameters::non_manifold_feature_map(nm_map_1)); - // - // //dump polylines - // std::ofstream output("intersection_polylines.cgal"); - // for(const std::vector

& polyline : polylines) - // { - // output << polyline.size() << " "; - // std::copy(polyline.begin(), polyline.end(),std::ostream_iterator

(output," ")); - // output << "\n"; - // } + std::vector< std::vector

> polylines; + PMP::surface_intersection(tm1, tm2, std::back_inserter(polylines), CGAL::parameters::non_manifold_feature_map(nm_map_1)); + + //dump polylines + std::ofstream output("intersection_polylines.cgal"); + for(const std::vector

& polyline : polylines) + { + output << polyline.size() << " "; + std::copy(polyline.begin(), polyline.end(),std::ostream_iterator

(output," ")); + output << "\n"; + } +} + +// simple case with only one non-manifold edge +{ + std::cout << "running corefinement test 1\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,4,0), P(0,4,0), tm1); + CGAL::make_quad(P(0,-4,0), P(4,-4,0), P(4,0,0), P(0,0,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,4), P(0,0,4), tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,-4), P(0,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(2,3,-2), P(2,-2,-2), P(2,-2,2), P(2,3,2), tm2); + PMP::triangulate_faces(tm2); + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); - std::ofstream("tm1_corefined.off") << tm1; - std::ofstream("tm2_corefined.off") << tm2; + std::ofstream("t1_tm1_corefined.off") << tm1; + std::ofstream("t1_tm2_corefined.off") << tm2; +} + +// edge-edge intersection on a non-manifold edge +{ + std::cout << "running corefinement test 2\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,4,0), P(0,4,0), tm1); + CGAL::make_quad(P(0,-4,0), P(4,-4,0), P(4,0,0), P(0,0,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,4), P(0,0,4), tm1); + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,0,-4), P(0,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(2,2,-2), P(2,-2,-2), P(2,-2,2), P(2,2,2), tm2); //TODO: test me + also test splitting the diagonal + PMP::triangulate_faces(tm2); + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); + + std::ofstream("t2_tm1_corefined.off") << tm1; + std::ofstream("t2_tm2_corefined.off") << tm2; +} + +// coplanar edge and non-manifold edge +{ + std::cout << "running corefinement test 3\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(8,0,0), P(8,8,0), P(0,8,0), tm1); + CGAL::make_quad(P(8,0,0), P(12,0,0), P(12,8,0), P(8,8,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,4), P(8,0,4), tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,-4), P(8,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(6,1,0), P(14,3,0), P(13,7,4), P(5,5,0), tm2); + CGAL::make_quad(P(6,1,0), P(5,5,0), P(5,5,2), P(6,1,3), tm2); + PMP::stitch_borders(tm2); + PMP::triangulate_faces(tm2); + + std::ofstream("t3_tm1.off") << tm1; + std::ofstream("t3_tm2.off") << tm2; + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); + + std::ofstream("t3_tm1_corefined.off") << tm1; + std::ofstream("t3_tm2_corefined.off") << tm2; +} + +//TODO: add more tests nm-edge on vertex, nm-edge vs nm-edge, ... + + +// coplanar face and non-manifold edge +{ + std::cout << "running corefinement test 4\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(8,0,0), P(8,8,0), P(0,8,0), tm1); + CGAL::make_quad(P(8,0,0), P(12,0,0), P(12,8,0), P(8,8,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,4), P(8,0,4), tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,-4), P(8,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(6,1,0), P(14,3,0), P(13,7,0), P(5,5,0), tm2); + CGAL::make_quad(P(6,1,0), P(5,5,0), P(5,5,2), P(6,1,3), tm2); + PMP::stitch_borders(tm2); + PMP::triangulate_faces(tm2); + + std::ofstream("t4_tm1.off") << tm1; + std::ofstream("t4_tm2.off") << tm2; + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); + + std::ofstream("t4_tm1_corefined.off") << tm1; + std::ofstream("t4_tm2_corefined.off") << tm2; +} +// +// // coplanar face and non-manifold edge and regular intersection with incident face +{ + std::cout << "running corefinement test 5\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(4,0,0), P(4,8,0), P(0,8,0), tm1); + CGAL::make_quad(P(4,0,0), P(12,0,0), P(12,8,0), P(4,8,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(4,0,0), P(4,8,0), P(4,8,4), P(4,0,4), tm1); + CGAL::make_quad(P(4,0,0), P(4,8,0), P(4,8,-4), P(4,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(2,1,0), P(14,3,0), P(13,7,0), P(5,5,0), tm2); + CGAL::make_quad(P(2,1,0), P(5,5,0), P(5,5,2), P(2,1,3), tm2); + PMP::stitch_borders(tm2); + PMP::triangulate_faces(tm2); + + std::ofstream("t5_tm1.off") << tm1; + std::ofstream("t5_tm2.off") << tm2; + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1)); + + std::ofstream("t5_tm1_corefined.off") << tm1; + std::ofstream("t5_tm2_corefined.off") << tm2; +} + +// coplanar face and 2 non-manifold edges +{ + std::cout << "running corefinement test 6\n"; + Surface_mesh tm1; + CGAL::make_quad(P(0,0,0), P(8,0,0), P(8,8,0), P(0,8,0), tm1); + CGAL::make_quad(P(8,0,0), P(12,0,0), P(12,8,0), P(8,8,0), tm1); + PMP::stitch_borders(tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,4), P(8,0,4), tm1); + CGAL::make_quad(P(8,0,0), P(8,8,0), P(8,8,-4), P(8,0,-4), tm1); + PMP::triangulate_faces(tm1); + + Surface_mesh tm2; + CGAL::make_quad(P(6,1,0), P(14,3,0), P(13,7,0), P(5,5,0), tm2); + CGAL::make_quad(P(6,1,0), P(5,5,0), P(5,5,2), P(6,1,3), tm2); + PMP::stitch_borders(tm2); + CGAL::make_quad(P(6,1,0), P(5,5,0), P(5,5,-2), P(6,1,-3), tm2); + CGAL::make_quad(P(6,1,0), P(5,5,0), P(3,5,0), P(3,1,0), tm2); + PMP::triangulate_faces(tm2); + + std::ofstream("t6_tm1.off") << tm1; + std::ofstream("t6_tm2.off") << tm2; + + PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); + PMP::Non_manifold_feature_map nm_map_2(tm2, get(boost::vertex_point, tm2)); + + PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1), + CGAL::parameters::non_manifold_feature_map(nm_map_2)); + + std::ofstream("t6_tm1_corefined.off") << tm1; + std::ofstream("t6_tm2_corefined.off") << tm2; +} + + } From 69dc2b4f84c51f4ea02333a237ee76f16c3aacf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 11:08:35 +0200 Subject: [PATCH 013/317] WIP make key canonical despite non-manifold vertices --- .../internal/Corefinement/intersection_impl.h | 48 +++++++++++++++---- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index cca786e6b75..4fe52765b36 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -350,18 +350,34 @@ class Intersection_of_triangle_meshes get_or_create_node(const Cpl_inter_pt& ipt, Node_id& current_node, std::map& coplanar_node_map, - const TriangleMesh& tm1, - const TriangleMesh& tm2) + const Non_manifold_feature_map& nm_features_map_1, + const Non_manifold_feature_map& nm_features_map_2, + const TriangleMesh& tm1, + const TriangleMesh& tm2) { halfedge_descriptor h1=graph_traits::null_halfedge(),h2=h1; switch(ipt.type_1){ case ON_VERTEX: - h1=halfedge(target(ipt.info_1,tm1),tm1); + { + std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_1.v_nm_id, target(ipt.info_1,tm1)); + if (vid1==std::size_t(-1)) + h1=halfedge(target(ipt.info_1,tm1),tm1); + else + h1=halfedge(nm_features_map_1.non_manifold_vertices[vid1][0],tm1); + } break; case ON_EDGE : { - h1=opposite(ipt.info_1,tm1); - if (h1>ipt.info_1) h1=ipt.info_1; + std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_1.e_nm_id, edge(ipt.info_1,tm1)); + if (eid1==std::size_t(-1)) + h1=ipt.info_1; + else + h1=halfedge(nm_features_map_1.non_manifold_edges[eid1][0],tm1); + h1=(std::max)(h1, opposite(h1, tm1)); } break; case ON_FACE : @@ -371,12 +387,26 @@ class Intersection_of_triangle_meshes } switch(ipt.type_2){ case ON_VERTEX: - h2=halfedge(target(ipt.info_2,tm2),tm2); + { + std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() + ? std::size_t(-1) + : get(nm_features_map_2.v_nm_id, target(ipt.info_2,tm2)); + if (vid2==std::size_t(-1)) + h2=halfedge(target(ipt.info_2,tm2),tm2); + else + h2=halfedge(nm_features_map_2.non_manifold_vertices[vid2][0],tm2); + } break; case ON_EDGE : { - h2=opposite(ipt.info_2,tm2); - if (h2>ipt.info_2) h2=ipt.info_2; + std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_2.e_nm_id, edge(ipt.info_2,tm2)); + if (eid2==std::size_t(-1)) + h2=ipt.info_2; + else + h2=halfedge(nm_features_map_2.non_manifold_edges[eid2][0],tm2); + h2=(std::max)(h2, opposite(h2, tm2)); } break; case ON_FACE : @@ -664,7 +694,7 @@ class Intersection_of_triangle_meshes Node_id node_id; bool is_new_node; std::tie(node_id, is_new_node) = - get_or_create_node(ipt,current_node,coplanar_node_map,tm1,tm2); + get_or_create_node(ipt,current_node,coplanar_node_map,nm_features_map_1,nm_features_map_2,tm1,tm2); cpln_nodes.push_back(node_id); switch(ipt.type_1){ From e6b2dd8311aec7e17f2456dfa6a447531f49999b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 15:09:09 +0200 Subject: [PATCH 014/317] check no duplicated nodes are created --- .../internal/Corefinement/intersection_impl.h | 2 ++ .../internal/Corefinement/intersection_nodes.h | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 4fe52765b36..e38247ede8a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -1542,6 +1542,8 @@ public: compute_intersection_points(tm1_edge_to_tm2_faces, tm1, tm2, vpm1, vpm2, non_manifold_feature_map_1, non_manifold_feature_map_2, current_node); compute_intersection_points(tm2_edge_to_tm1_faces, tm2, tm1, vpm2, vpm1, non_manifold_feature_map_2, non_manifold_feature_map_1, current_node); + nodes.check_no_duplicates(); + if (!build_polylines){ visitor.finalize(nodes,tm1,tm2,vpm1,vpm2); return output; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 49162e70a44..3133d27d166 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -136,6 +136,11 @@ public: void all_nodes_created(){} void finalize() {} + void check_no_duplicates() + { + CGAL_assertion(nodes.size() == std::set(nodes.begin(), nodes.end()).size()); + } + }; // end specialization // Intersection_nodes @@ -310,6 +315,12 @@ public: put(vpm2, tm2_vertices[i], pt); } } + + void check_no_duplicates() + { + CGAL_assertion(enodes.size() == std::set(enodes.begin(), enodes.end()).size()); + } + }; // end specialization // Intersection_nodes @@ -424,7 +435,10 @@ public: void all_nodes_created(){} void finalize() {} - + void check_no_duplicates() + { + CGAL_assertion(nodes.size() == std::set(nodes.begin(), nodes.end()).size()); + } }; // end specialization From b2741af483dae12480c81c98c96db23178f12716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 15:09:35 +0200 Subject: [PATCH 015/317] update test --- .../corefine_non_manifold.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp index 7a82c4ea898..c3235d9f5f5 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp @@ -17,7 +17,6 @@ namespace PMP = CGAL::Polygon_mesh_processing; int main() { - // polyline intersection with a non-manifold edge { std::cout << "running polyline test\n"; @@ -206,11 +205,27 @@ int main() PMP::Non_manifold_feature_map nm_map_1(tm1, get(boost::vertex_point, tm1)); PMP::Non_manifold_feature_map nm_map_2(tm2, get(boost::vertex_point, tm2)); +#if 0 + std::vector< std::vector

> polylines; + PMP::surface_intersection(tm1, tm2, std::back_inserter(polylines), + CGAL::parameters::non_manifold_feature_map(nm_map_1), + CGAL::parameters::non_manifold_feature_map(nm_map_2)); + + //dump polylines + std::ofstream output("intersection_polylines.cgal"); + for(const std::vector

& polyline : polylines) + { + output << polyline.size() << " "; + std::copy(polyline.begin(), polyline.end(),std::ostream_iterator

(output," ")); + output << "\n"; + } +#else PMP::corefine(tm1, tm2, CGAL::parameters::non_manifold_feature_map(nm_map_1), CGAL::parameters::non_manifold_feature_map(nm_map_2)); std::ofstream("t6_tm1_corefined.off") << tm1; std::ofstream("t6_tm2_corefined.off") << tm2; +#endif } From 0818afb480058a06fadf8e211633405215f7de6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 25 Jun 2019 15:09:46 +0200 Subject: [PATCH 016/317] fix the lookup for edge in non-manifold case --- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7f324dfd9f4..78de7ccac9a 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 @@ -731,7 +731,7 @@ public: target(it_node_2_hedge_two->second,tm) ) { hedge=opposite(next(hedge,tm),tm); - if (tm1_ptr==tm2_ptr && hedge==start) + if ((doing_autorefinement || handle_non_manifold_features) && hedge==start) { ++it_node_2_hedge_two; // we are using a multimap and // the halfedge we are looking for From 7fc66aeec4d4ada8cba64aebbb2984749ec95117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 26 Jun 2019 11:57:22 +0200 Subject: [PATCH 017/317] readd call removed by error --- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 2 ++ 1 file changed, 2 insertions(+) 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 78de7ccac9a..60546820f66 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 @@ -1108,6 +1108,8 @@ public: } } + nodes.finalize(); + // additional operations output_builder(nodes, input_with_coplanar_faces, From c839ed5c5f55daf1493bba238099a81962e7578c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 26 Jun 2019 13:39:38 +0200 Subject: [PATCH 018/317] use variable instead of explicitly constructed value --- .../Corefinement/Face_graph_output_builder.h | 18 +++--- .../internal/Corefinement/Visitor.h | 6 +- .../internal/Corefinement/intersection_impl.h | 63 ++++++++++--------- 3 files changed, 46 insertions(+), 41 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index ed08eaef152..ad0cdaa880b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -850,7 +850,7 @@ public: vpm1, vpm2, nodes) ) //p1==q2 { - CGAL_assertion( index_p1!=index_p2 || index_p1==Node_id((std::numeric_limits::max)()) ); + CGAL_assertion( index_p1!=index_p2 || index_p1==NID ); coplanar_patches_of_tm1.set(patch_id_p1); coplanar_patches_of_tm2.set(patch_id_q2); bool q1_is_between_p1p2 = sorted_around_edge( @@ -920,17 +920,17 @@ public: #endif //CGAL_COREFINEMENT_POLYHEDRA_DEBUG CGAL_assertion( - ( index_p1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != - ( index_q1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) + ( index_p1 == NID ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != + ( index_q1 == NID ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) && - ( index_p2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != - ( index_q1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) + ( index_p2 == NID ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != + ( index_q1 == NID ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) && - ( index_p1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != - ( index_q2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) + ( index_p1 == NID ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != + ( index_q2 == NID ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) && - ( index_p2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != - ( index_q2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) + ( index_p2 == NID ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != + ( index_q2 == NID ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) ); bool q1_is_between_p1p2 = sorted_around_edge( 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 60546820f66..3b37d5e9b64 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 @@ -232,6 +232,8 @@ public: void copy_nodes_ids_for_non_manifold_features() { + static const constexpr std::size_t NM_NID((std::numeric_limits::max)()); + for(const std::pair& tm_and_nm : non_manifold_feature_maps) { @@ -242,7 +244,7 @@ public: for (const std::pair& ed_and_ids : on_edge_map) { std::size_t eid = get(tm_and_nm.second->e_nm_id, ed_and_ids.first); - if (eid!=std::size_t(-1)) + if (eid!=NM_NID) edges_to_copy.push_back(std::make_pair(eid,&(ed_and_ids.second))); } for(const std::pair& id_and_nodes : edges_to_copy) @@ -264,7 +266,7 @@ public: : vertex_to_node_id) { std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_id.first); - if (vid!=std::size_t(-1)) + if (vid!=NM_NID) vertices_to_add.push_back(std::make_pair(vd_and_id.first,vd_and_id.second)); for(const std::pair& vd_and_nid : vertices_to_add) { diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index e38247ede8a..2ff43bccdc3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -202,6 +202,7 @@ class Intersection_of_triangle_meshes std::vector extra_terminal_nodes; //used only for autorefinement Non_manifold_feature_map non_manifold_feature_map_1, non_manifold_feature_map_2; + std::size_t NM_NID; CGAL_assertion_code(bool doing_autorefinement;) // member functions @@ -248,7 +249,7 @@ class Intersection_of_triangle_meshes std::size_t eid=get(non_manifold_feature_map.e_nm_id, ed); halfedge_descriptor h=halfedge(ed,tm_e); // insert only one copy of a non-manifold edge - if (eid!=std::size_t(-1)) + if (eid!=NM_NID) { if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) continue; @@ -360,9 +361,9 @@ class Intersection_of_triangle_meshes case ON_VERTEX: { std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.v_nm_id, target(ipt.info_1,tm1)); - if (vid1==std::size_t(-1)) + if (vid1==NM_NID) h1=halfedge(target(ipt.info_1,tm1),tm1); else h1=halfedge(nm_features_map_1.non_manifold_vertices[vid1][0],tm1); @@ -371,9 +372,9 @@ class Intersection_of_triangle_meshes case ON_EDGE : { std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.e_nm_id, edge(ipt.info_1,tm1)); - if (eid1==std::size_t(-1)) + if (eid1==NM_NID) h1=ipt.info_1; else h1=halfedge(nm_features_map_1.non_manifold_edges[eid1][0],tm1); @@ -389,9 +390,9 @@ class Intersection_of_triangle_meshes case ON_VERTEX: { std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.v_nm_id, target(ipt.info_2,tm2)); - if (vid2==std::size_t(-1)) + if (vid2==NM_NID) h2=halfedge(target(ipt.info_2,tm2),tm2); else h2=halfedge(nm_features_map_2.non_manifold_vertices[vid2][0],tm2); @@ -400,9 +401,9 @@ class Intersection_of_triangle_meshes case ON_EDGE : { std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.e_nm_id, edge(ipt.info_2,tm2)); - if (eid2==std::size_t(-1)) + if (eid2==NM_NID) h2=ipt.info_2; else h2=halfedge(nm_features_map_2.non_manifold_edges[eid2][0],tm2); @@ -545,10 +546,10 @@ class Intersection_of_triangle_meshes std::vector tmp_vertices_1(1, target(v_1, tm1)); std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); - const std::vector& vertices_1 = vid1==std::size_t(-1) + const std::vector& vertices_1 = vid1==NM_NID ? tmp_vertices_1 : nm_features_map_1.non_manifold_vertices[vid1]; for(vertex_descriptor v1 : vertices_1) @@ -580,20 +581,20 @@ class Intersection_of_triangle_meshes std::vector tmp_vertices_1(1, target(v_1, tm1)); std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); - const std::vector& vertices_1 = vid1==std::size_t(-1) + const std::vector& vertices_1 = vid1==NM_NID ? tmp_vertices_1 : nm_features_map_1.non_manifold_vertices[vid1]; std::vector tmp_edges_2(1, edge(h_2, tm2)); std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.e_nm_id, edge(h_2, tm2)); - const std::vector& edges_2 = eid2==std::size_t(-1) + const std::vector& edges_2 = eid2==NM_NID ? tmp_edges_2 : nm_features_map_2.non_manifold_edges[eid2]; @@ -628,17 +629,17 @@ class Intersection_of_triangle_meshes tmp_vertices_2(1, target(v_2, tm2)); std::size_t vid1 = nm_features_map_1.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.v_nm_id, target(v_1, tm1)); std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.v_nm_id, target(v_2, tm2)); - const std::vector& vertices_1 = vid1==std::size_t(-1) + const std::vector& vertices_1 = vid1==NM_NID ? tmp_vertices_1 : nm_features_map_1.non_manifold_vertices[vid1]; - const std::vector& vertices_2 = vid2==std::size_t(-1) + const std::vector& vertices_2 = vid2==NM_NID ? tmp_vertices_2 : nm_features_map_2.non_manifold_vertices[vid2]; @@ -727,15 +728,15 @@ class Intersection_of_triangle_meshes std::vector tmp_edges_1(1, edge(ipt.info_1,tm1)), tmp_edges_2(1, edge(ipt.info_2,tm2)); std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_1.e_nm_id, edge(ipt.info_1, tm1)); std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.e_nm_id, edge(ipt.info_2, tm2)); - const std::vector& edges_1 = eid1==std::size_t(-1) + const std::vector& edges_1 = eid1==NM_NID ? tmp_edges_1 : nm_features_map_1.non_manifold_edges[eid1]; - const std::vector& edges_2 = eid2==std::size_t(-1) + const std::vector& edges_2 = eid2==NM_NID ? tmp_edges_2 : nm_features_map_2.non_manifold_edges[eid2]; for(edge_descriptor e1 : edges_1) @@ -853,7 +854,7 @@ class Intersection_of_triangle_meshes halfedge_descriptor h1 = all_edges[ie]; edge_descriptor e1 = edge(h1, tm1); std::size_t eid1 = get(nm_features_map_1.e_nm_id, e1); - if (eid1 != std::size_t(-1)) + if (eid1 != NM_NID) { for (std::size_t k=0; k(res),std::get<2>(res)); std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.e_nm_id, edge(h_2, tm2)); for (;it_edge!=all_edges.end();++it_edge){ if ( it_edge!=all_edges.begin() ){ typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(*it_edge,tm1)); Face_set* fset_bis = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - if( eid2 == std::size_t(-1) ) + if( eid2 == NM_NID ) cip_handle_case_edge(node_id,fset_bis,*it_edge,h_2,tm1,tm2); else { @@ -938,7 +939,7 @@ class Intersection_of_triangle_meshes } else { - if( eid2 == std::size_t(-1) ) + if( eid2 == NM_NID ) cip_handle_case_edge(node_id,&fset,*it_edge,h_2,tm1,tm2); else for (edge_descriptor e2 : nm_features_map_2.non_manifold_edges[eid2]) @@ -957,21 +958,21 @@ class Intersection_of_triangle_meshes visitor.new_node_added(node_id,ON_VERTEX,h_1,h_2,tm1,tm2,std::get<3>(res),std::get<2>(res)); std::size_t vid2 = nm_features_map_2.non_manifold_vertices.empty() - ? std::size_t(-1) + ? NM_NID : get(nm_features_map_2.v_nm_id, target(h_2, tm2)); for (;it_edge!=all_edges.end();++it_edge){ if ( it_edge!=all_edges.begin() ){ typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(*it_edge,tm1)); Face_set* fset_bis = (it_ets!=tm1_edge_to_tm2_faces.end())?&(it_ets->second):nullptr; - if( vid2 == std::size_t(-1) ) + if( vid2 == NM_NID ) cip_handle_case_vertex(node_id,fset_bis,*it_edge,h_2,tm1,tm2); else for (vertex_descriptor vd2 : nm_features_map_2.non_manifold_vertices[vid2]) cip_handle_case_vertex(node_id,fset_bis,*it_edge,halfedge(vd2, tm2),tm1,tm2); } else - if( vid2 == std::size_t(-1) ) + if( vid2 == NM_NID ) cip_handle_case_vertex(node_id,&fset,*it_edge,h_2,tm1,tm2); else for (vertex_descriptor vd2 : nm_features_map_2.non_manifold_vertices[vid2]) @@ -1473,6 +1474,7 @@ public: const Node_visitor& v=Node_visitor()) : nodes(tm1, tm2, vpm1, vpm2) , visitor(v) + , NM_NID((std::numeric_limits::max)()) { CGAL_assertion_code( doing_autorefinement=false; ) } @@ -1483,6 +1485,7 @@ public: const Node_visitor& v=Node_visitor()) : nodes(tm, tm, vpm, vpm) , visitor(v) + , NM_NID((std::numeric_limits::max)()) { CGAL_assertion_code( doing_autorefinement=true; ) } From b1bbcfa81aa093a3d2fd042b74a95ba7d69ddc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Jul 2019 11:48:25 +0200 Subject: [PATCH 019/317] add missing reference --- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3b37d5e9b64..204da77ce50 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 @@ -259,7 +259,7 @@ public: // update map vertex -> node_id Vertex_to_node_id& vertex_to_node_id = mesh_to_vertex_to_node_id[tm_ptr]; - Node_to_target_of_hedge_map vertices_on_inter = mesh_to_vertices_on_inter[tm_ptr]; + Node_to_target_of_hedge_map& vertices_on_inter = mesh_to_vertices_on_inter[tm_ptr]; std::vector< std::pair > vertices_to_add; for (const typename std::pair& vd_and_id From 6e061f2afe861187b9f246935b56e97d0a461ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 23 Sep 2019 17:35:32 +0200 Subject: [PATCH 020/317] fix indentation and use constexpr --- .../internal/Corefinement/intersection_impl.h | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 2ff43bccdc3..8088e219f51 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -202,7 +202,7 @@ class Intersection_of_triangle_meshes std::vector extra_terminal_nodes; //used only for autorefinement Non_manifold_feature_map non_manifold_feature_map_1, non_manifold_feature_map_2; - std::size_t NM_NID; + static const constexpr std::size_t NM_NID = (std::numeric_limits::max)(); CGAL_assertion_code(bool doing_autorefinement;) // member functions @@ -242,27 +242,27 @@ class Intersection_of_triangle_meshes h ) ); edge_boxes_ptr.push_back( &edge_boxes.back() ); } - else - // non-manifold case - for(edge_descriptor ed : edges(tm_e)) + else + // non-manifold case + for(edge_descriptor ed : edges(tm_e)) + { + std::size_t eid=get(non_manifold_feature_map.e_nm_id, ed); + halfedge_descriptor h=halfedge(ed,tm_e); + // insert only one copy of a non-manifold edge + if (eid!=NM_NID) { - std::size_t eid=get(non_manifold_feature_map.e_nm_id, ed); - halfedge_descriptor h=halfedge(ed,tm_e); - // insert only one copy of a non-manifold edge - if (eid!=NM_NID) - { - if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) - continue; - else - // make sure the halfedge used is consistant with stored one - h = halfedge(non_manifold_feature_map.non_manifold_edges[eid].front(), tm_e); - } - edge_boxes.push_back( Box( - get(vpm_e,source(h,tm_e)).bbox() + - get(vpm_e,target(h,tm_e)).bbox(), - h ) ); - edge_boxes_ptr.push_back( &edge_boxes.back() ); + if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) + continue; + else + // make sure the halfedge used is consistant with stored one + h = halfedge(non_manifold_feature_map.non_manifold_edges[eid].front(), tm_e); } + edge_boxes.push_back( Box( + get(vpm_e,source(h,tm_e)).bbox() + + get(vpm_e,target(h,tm_e)).bbox(), + h ) ); + edge_boxes_ptr.push_back( &edge_boxes.back() ); + } /// \todo experiments different cutoff values std::ptrdiff_t cutoff = 2 * std::ptrdiff_t( @@ -1474,7 +1474,6 @@ public: const Node_visitor& v=Node_visitor()) : nodes(tm1, tm2, vpm1, vpm2) , visitor(v) - , NM_NID((std::numeric_limits::max)()) { CGAL_assertion_code( doing_autorefinement=false; ) } @@ -1485,7 +1484,6 @@ public: const Node_visitor& v=Node_visitor()) : nodes(tm, tm, vpm, vpm) , visitor(v) - , NM_NID((std::numeric_limits::max)()) { CGAL_assertion_code( doing_autorefinement=true; ) } From d3094f18e4514f4caf721c5d67fd2b8dc0d1d4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 23 Sep 2019 17:36:38 +0200 Subject: [PATCH 021/317] make sure that an edge registered for split is the first one if non-manifold otherwise some points might be added on different non-manifold edges and this would require a merge of vertices on edges --- .../internal/Corefinement/Visitor.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) 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 204da77ce50..0138a3feedb 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 @@ -468,6 +468,28 @@ public: } else{ //handle intersection on principal edge + typename std::map::iterator it_find = + non_manifold_feature_maps.find(&tm1); + if ( it_find != non_manifold_feature_maps.end() ) + { + // update h_1 if it is not the canonical non-manifold edge + // This is important to make sure intersection points on non-manifold + // edges are all connected for the same edge so that the redistribution + // on other edges does not overwrite some nodes. + // This update might be required in case of EDGE-EDGE intersection or + // COPLANAR intersection. + const NM_features_map& nm_features_map_1 = *it_find->second; + std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() + ? std::size_t(-1) + : get(nm_features_map_1.e_nm_id, edge(h_1, tm1)); + + if (eid1 != std::size_t(-1)) + { + if ( edge(h_1, tm1) != nm_features_map_1.non_manifold_edges[eid1].front() ) + h_1 = halfedge(nm_features_map_1.non_manifold_edges[eid1].front(), tm1); + } + } + on_edge[tm1_ptr][edge(h_1,tm1)].push_back(node_id); // check_node_on_non_manifold_edge(node_id,h_1,tm1); } From afcf0775fb2e63109a734a7b90676afd5ec9db42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 21 Nov 2019 13:15:43 +0100 Subject: [PATCH 022/317] use the non-manifoldness of the vertex to collect incident edges we might be missing some edges that are incident to the non-manifold vertex Also include a fix to get the canonical non-manifold edge --- .../internal/Corefinement/intersection_impl.h | 99 ++++++++++++++----- 1 file changed, 76 insertions(+), 23 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 8088e219f51..88b4d322e0b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -821,8 +821,6 @@ class Intersection_of_triangle_meshes { edge_descriptor e_1=it->first; - - halfedge_descriptor h_1=halfedge(e_1,tm1); Face_set& fset=it->second; while (!fset.empty()){ @@ -834,37 +832,89 @@ class Intersection_of_triangle_meshes //handle degenerate case: one extremity of edge belong to f_2 std::vector all_edges; if ( std::get<3>(res) ) // is edge target in triangle plane - std::copy(halfedges_around_target(h_1,tm1).first, - halfedges_around_target(h_1,tm1).second, - std::back_inserter(all_edges)); + { + if (!nm_features_map_1.non_manifold_edges.empty()) + { + std::size_t vid1 = get(nm_features_map_1.v_nm_id, target(h_1, tm1)); + if (vid1 != NM_NID) + { + for (vertex_descriptor vd : nm_features_map_1.non_manifold_vertices[vid1]) + { + std::copy(halfedges_around_target(vd,tm1).first, + halfedges_around_target(vd,tm1).second, + std::back_inserter(all_edges)); + } + if (all_edges.front()!=h_1) + { + // restore expected property + typename std::vector::iterator pos = + std::find(all_edges.begin(), all_edges.end(), h_1); + CGAL_assertion(pos!=all_edges.end()); + std::swap(*pos, all_edges.front()); + } + } + else + std::copy(halfedges_around_target(h_1,tm1).first, + halfedges_around_target(h_1,tm1).second, + std::back_inserter(all_edges)); + } + else + std::copy(halfedges_around_target(h_1,tm1).first, + halfedges_around_target(h_1,tm1).second, + std::back_inserter(all_edges)); + } else{ if ( std::get<2>(res) ) // is edge source in triangle plane + { + if (!nm_features_map_1.non_manifold_edges.empty()) + { + std::size_t vid1 = get(nm_features_map_1.v_nm_id, source(h_1, tm1)); + if (vid1 != NM_NID) + { + for (vertex_descriptor vd : nm_features_map_1.non_manifold_vertices[vid1]) + { + std::copy(halfedges_around_source(vd,tm1).first, + halfedges_around_source(vd,tm1).second, + std::back_inserter(all_edges)); + } + if (all_edges.front()!=h_1) + { + // restore expected property + typename std::vector::iterator pos = + std::find(all_edges.begin(), all_edges.end(), h_1); + CGAL_assertion(pos!=all_edges.end()); + std::swap(*pos, all_edges.front()); + } + } + else + std::copy(halfedges_around_source(h_1,tm1).first, + halfedges_around_source(h_1,tm1).second, + std::back_inserter(all_edges)); + } + else std::copy(halfedges_around_source(h_1,tm1).first, halfedges_around_source(h_1,tm1).second, std::back_inserter(all_edges)); + } else - all_edges.push_back(h_1); - } - - if (!nm_features_map_1.non_manifold_edges.empty()) - { - std::size_t nb_edges = all_edges.size(); - for (std::size_t ie=0; ie(res); - visitor.new_node_added(node_id,ON_EDGE,h_1,h_2,tm1,tm2,std::get<3>(res),std::get<2>(res)); std::size_t eid2 = nm_features_map_2.non_manifold_edges.empty() ? NM_NID : get(nm_features_map_2.e_nm_id, edge(h_2, tm2)); + if (eid2!=NM_NID) + h_2 = halfedge(nm_features_map_2.non_manifold_edges[eid2].front(), tm2); + + visitor.new_node_added(node_id,ON_EDGE,h_1,h_2,tm1,tm2,std::get<3>(res),std::get<2>(res)); for (;it_edge!=all_edges.end();++it_edge){ if ( it_edge!=all_edges.begin() ){ typename Edge_to_faces::iterator it_ets=tm1_edge_to_tm2_faces.find(edge(*it_edge,tm1)); From 820621b7b750d796835a5eb3aa6ef03eb714d4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 25 Nov 2019 10:56:51 +0100 Subject: [PATCH 023/317] make sure that an edge registered for split is the first one if non-manifold (coplanar case) --- .../internal/Corefinement/intersection_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 88b4d322e0b..3429d809af3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -723,8 +723,6 @@ class Intersection_of_triangle_meshes break; case ON_EDGE: { - if(is_new_node) - visitor.new_node_added(node_id,ON_EDGE,ipt.info_1,ipt.info_2,tm1,tm2,false,false); std::vector tmp_edges_1(1, edge(ipt.info_1,tm1)), tmp_edges_2(1, edge(ipt.info_2,tm2)); std::size_t eid1 = nm_features_map_1.non_manifold_edges.empty() @@ -739,6 +737,8 @@ class Intersection_of_triangle_meshes const std::vector& edges_2 = eid2==NM_NID ? tmp_edges_2 : nm_features_map_2.non_manifold_edges[eid2]; + if(is_new_node) + visitor.new_node_added(node_id,ON_EDGE,halfedge(edges_1.front(), tm1),halfedge(edges_2.front(),tm2),tm1,tm2,false,false); for(edge_descriptor e1 : edges_1) for(edge_descriptor e2 : edges_2) { From 6fd649e5c614ca2cc08e91039c015f4865ef9a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 12 Dec 2019 11:52:53 +0100 Subject: [PATCH 024/317] avoid using 2 extra vectors already available in the main part --- .../internal/Corefinement/Visitor.h | 4 +- .../Corefinement/intersection_nodes.h | 56 ++++++++++--------- 2 files changed, 32 insertions(+), 28 deletions(-) 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 0138a3feedb..19083a2df6f 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 @@ -143,7 +143,7 @@ private: typedef boost::unordered_map On_edge_map; //to keep the correspondance between node_id and vertex_handle in each mesh typedef std::vector Node_id_to_vertex; - typedef std::map Mesh_to_map_node; + typedef std::map Mesh_to_map_node; //to handle coplanar halfedge of polyhedra that are full in the intersection typedef std::multimap Node_to_target_of_hedge_map; typedef std::map @@ -1132,7 +1132,7 @@ public: } } - nodes.finalize(); + nodes.finalize(mesh_to_node_id_to_vertex); // additional operations output_builder(nodes, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 3133d27d166..b2475bbb076 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -134,7 +134,8 @@ public: } void all_nodes_created(){} - void finalize() {} + template + void finalize(const Mesh_to_map_node&) {} void check_no_duplicates() { @@ -172,7 +173,6 @@ private: Exact_to_double exact_to_double; Exact_kernel ek; Exact_kernel::Intersect_3 exact_intersection; - std::vector tm1_vertices, tm2_vertices; const bool doing_autorefinement; public: const TriangleMesh &tm1, &tm2; @@ -282,37 +282,37 @@ public: } void all_nodes_created() + {} + + void call_put(const VertexPointMap& vpm, vertex_descriptor vd, std::size_t i, TriangleMesh&) { - tm1_vertices.resize(enodes.size(), GT::null_vertex()); - tm2_vertices.resize(enodes.size(), GT::null_vertex()); + put(vpm, vd, exact_to_double(enodes[i])); // Note this call is useless and only useful to see something in debug for intermediate results } - void call_put(const VertexPointMap& vpm, vertex_descriptor vd, std::size_t i, TriangleMesh& tm) + template + void finalize(const std::map& mesh_to_node_id_to_vertex) { - put(vpm, vd, exact_to_double(enodes[i])); - if (&tm1==&tm) + if (!doing_autorefinement) { - if ( tm1_vertices[i] == GT::null_vertex() ) + const Node_id_to_vertex& tm1_vertices = mesh_to_node_id_to_vertex.find(&tm1)->second; + const Node_id_to_vertex& tm2_vertices = mesh_to_node_id_to_vertex.find(&tm2)->second; + for (std::size_t i=0, e=enodes.size(); i!=e; ++i) { - tm1_vertices[i] = vd; - return; + Point_3 pt = exact_to_double(enodes[i]); + if ( tm1_vertices[i] != GT::null_vertex() ) + put(vpm1, tm1_vertices[i], pt); + if ( tm2_vertices[i] != GT::null_vertex() ) + put(vpm2, tm2_vertices[i], pt); } - if (doing_autorefinement) - tm2_vertices[i] = vd; } - else - tm2_vertices[i] = vd; - } - - void finalize() - { - for (std::size_t i=0, e=enodes.size(); i!=e; ++i) - { - Point_3 pt = exact_to_double(enodes[i]); - if ( tm1_vertices[i] != GT::null_vertex() ) - put(vpm1, tm1_vertices[i], pt); - if ( tm2_vertices[i] != GT::null_vertex() ) - put(vpm2, tm2_vertices[i], pt); + else{ + const Node_id_to_vertex& tm1_vertices = mesh_to_node_id_to_vertex.find(&tm1)->second; + for (std::size_t i=0, e=enodes.size(); i!=e; ++i) + { + Point_3 pt = exact_to_double(enodes[i]); + if ( tm1_vertices[i] != GT::null_vertex() ) + put(vpm1, tm1_vertices[i], pt); + } } } @@ -433,7 +433,11 @@ public: } void all_nodes_created(){} - void finalize() {} + + template + void finalize(const std::map&) + {} + void check_no_duplicates() { From de855f47dbee5e4f049e2e82c85f9dac39318bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 12 Dec 2019 14:37:50 +0100 Subject: [PATCH 025/317] readd work around for intersection edge being both on the boundary and in the interior The solution is not perfect, as too many nodes are marked as terminal but the output is correct (too much work is done on the boundary) --- .../internal/Corefinement/Visitor.h | 83 +++++++++++-------- 1 file changed, 47 insertions(+), 36 deletions(-) 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 19083a2df6f..26cb433c8db 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 @@ -162,7 +162,7 @@ private: typedef typename CDT::Vertex_handle CDT_Vertex_handle; // data members private: - // boost::dynamic_bitset<> non_manifold_nodes; + boost::dynamic_bitset<> is_node_on_boundary; // indicate if a vertex is a border vertex in tm1 or tm2 std::vector< std::vector > graph_of_constraints; boost::dynamic_bitset<> is_node_of_degree_one; //nb of intersection points between coplanar faces, see fixes XSL_TAG_CPL_VERT @@ -293,14 +293,32 @@ public: is_node_of_degree_one.resize(nb_nodes); for(std::size_t node_id=0;node_id(&tm1); TriangleMesh* tm2_ptr = const_cast(&tm2); @@ -417,7 +428,7 @@ public: 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); + check_node_on_boundary_edge_case(node_id,h_2,tm2); } break; case ON_VERTEX: @@ -429,7 +440,7 @@ public: 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); + check_node_on_boundary_vertex_case(node_id,h_2,tm2); output_builder.set_vertex_id(target(h_2, tm2), node_id, tm2); } break; @@ -450,7 +461,7 @@ public: all_incident_faces_got_a_node_as_vertex(h_1,node_id, *tm1_ptr); // register the vertex in the output builder output_builder.set_vertex_id(target(h_1, tm1), node_id, tm1); - // check_node_on_non_manifold_vertex(node_id,h_1,tm1); + check_node_on_boundary_vertex_case(node_id,h_1,tm1); } else{ if ( is_source_coplanar ){ @@ -464,7 +475,7 @@ public: all_incident_faces_got_a_node_as_vertex(h_1_opp,node_id, *tm1_ptr); // register the vertex in the output builder output_builder.set_vertex_id(source(h_1, tm1), node_id, tm1); - // check_node_on_non_manifold_vertex(node_id,h_1_opp,tm1); + check_node_on_boundary_vertex_case(node_id,h_1_opp,tm1); } else{ //handle intersection on principal edge @@ -491,7 +502,7 @@ public: } on_edge[tm1_ptr][edge(h_1,tm1)].push_back(node_id); - // check_node_on_non_manifold_edge(node_id,h_1,tm1); + check_node_on_boundary_edge_case(node_id,h_1,tm1); } } } From e3c17c1feea5cc2558377c6b54593a680eef740f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 12 Dec 2019 14:39:19 +0100 Subject: [PATCH 026/317] allow non default constructible maps --- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 26cb433c8db..bcd41847c27 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 @@ -711,8 +711,8 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, TriangleMesh* tm2_ptr = const_cast(&tm2); std::map vpms; - vpms[tm1_ptr] = vpm1; - vpms[tm2_ptr] = vpm2; + vpms.insert( std::make_pair(tm1_ptr, vpm1) ); + vpms.insert( std::make_pair(tm2_ptr, vpm2) ); vertex_descriptor null_vertex = Graph_traits::null_vertex(); const Node_id nb_nodes = nodes.size(); From 4146c5c558aa4c38bedcb8354cbe630e1bca3ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 8 Jan 2020 17:32:52 +0100 Subject: [PATCH 027/317] fix invalid scope of for loop this impacted intersections on existing non-manifold vertices --- .../internal/Corefinement/Visitor.h | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) 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 bcd41847c27..4f37ef7b238 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 @@ -268,17 +268,18 @@ public: std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_id.first); if (vid!=NM_NID) vertices_to_add.push_back(std::make_pair(vd_and_id.first,vd_and_id.second)); - for(const std::pair& vd_and_nid : vertices_to_add) + } + + for(const std::pair& vd_and_nid : vertices_to_add) + { + std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_nid.first); + for(vertex_descriptor vd : tm_and_nm.second->non_manifold_vertices[vid]) { - std::size_t vid = get(tm_and_nm.second->v_nm_id, vd_and_nid.first); - for(vertex_descriptor vd : tm_and_nm.second->non_manifold_vertices[vid]) + if (vd != vd_and_nid.first) { - if (vd != vd_and_nid.first) - { - vertex_to_node_id.insert(std::make_pair(vd,vd_and_nid.second)); - output_builder.set_vertex_id(vd, vd_and_nid.second, *tm_ptr); - vertices_on_inter.insert(std::make_pair(vd_and_nid.second,halfedge(vd,*tm_ptr))); - } + vertex_to_node_id.insert(std::make_pair(vd,vd_and_nid.second)); + output_builder.set_vertex_id(vd, vd_and_nid.second, *tm_ptr); + vertices_on_inter.insert(std::make_pair(vd_and_nid.second,halfedge(vd,*tm_ptr))); } } } @@ -740,15 +741,19 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, // Face_boundaries& face_boundaries=mesh_to_face_boundaries[&tm]; Node_to_target_of_hedge_map& nodes_to_hedge=it->second; + + // iterate on the vertices that are on the intersection between the input meshes for(typename Node_to_target_of_hedge_map::iterator it_node_2_hedge=nodes_to_hedge.begin(); it_node_2_hedge!=nodes_to_hedge.end(); ++it_node_2_hedge) { Node_id node_id_of_first=it_node_2_hedge->first; + // look for neighbors of the current node in the intersection graph std::vector& neighbors=graph_of_constraints[node_id_of_first]; if ( !neighbors.empty() ) { + // for all neighbors look for input vertices that are also on the intersection for(Node_id node_id : neighbors) { //if already done for the opposite From 9a3285be735aa8c6b8719ad329e4b4a5888a91b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 25 Mar 2020 11:46:05 +0100 Subject: [PATCH 028/317] fix patch dumping --- .../internal/Corefinement/face_graph_utils.h | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 3e9b5499feb..93316eb88cf 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -521,28 +521,38 @@ struct Patch_container{ typedef typename GT::face_descriptor face_descriptor; Patch_description& patch=this->operator[](i); - out << "OFF\n" << patch.interior_vertices.size() + - patch.shared_edges.size(); - out << " " << patch.faces.size() << " 0\n"; + + std::stringstream ss; std::map vertexid; int id=0; for(vertex_descriptor vh : patch.interior_vertices) { vertexid[vh]=id++; - out << get(vertex_point, pm, vh) << "\n"; + ss << get(vertex_point, pm, vh) << "\n"; } for(halfedge_descriptor hh : patch.shared_edges) { - vertexid[target(hh, pm)]=id++; - out << get(vertex_point, pm, target(hh, pm)) << "\n"; + if( vertexid.insert( std::make_pair(target(hh,pm), id) ).second ) + { + ss << get(vertex_point, pm, target(hh, pm)) << "\n"; + ++id; + } + if( vertexid.insert( std::make_pair(source(hh,pm), id) ).second ) + { + ss << get(vertex_point, pm, source(hh, pm)) << "\n"; + ++id; + } } + out << "OFF\n" << id << " " << patch.faces.size() << " 0\n"; + out << ss.str(); + for(face_descriptor f : patch.faces) { - out << "3 " << vertexid[source(halfedge(f,pm),pm)] << - " " << vertexid[target(halfedge(f,pm),pm)] << - " " << vertexid[target(next(halfedge(f,pm),pm),pm)] << "\n"; + out << "3 " << vertexid.at(source(halfedge(f,pm),pm)) << + " " << vertexid.at(target(halfedge(f,pm),pm)) << + " " << vertexid.at(target(next(halfedge(f,pm),pm),pm)) << "\n"; } return out; @@ -559,6 +569,16 @@ struct Patch_container{ dump_patch(i, output); } } + void dump_patches(std::string prefix) + { + for (std::size_t i=0;i Date: Wed, 25 Mar 2020 11:48:08 +0100 Subject: [PATCH 029/317] handle already updated links --- .../internal/Corefinement/face_graph_utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 93316eb88cf..b0a33bfd7bc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -1649,10 +1649,15 @@ void remove_unused_polylines( for(vertex_descriptor v: vertices_kept) { halfedge_descriptor h = halfedge(v, tm), start=GT::null_halfedge(); - + halfedge_descriptor starter=h; do{ while ( !is_border(h, tm) || is_border(opposite(h, tm), tm) ) + { h = opposite(next(h, tm), tm); + if(h==starter) // it might happen that no update is required because it is already closed thanks to another patch from tm' (usually incident to coplanar patches) + break; + } + if( !is_border(h, tm) || is_border(opposite(h, tm), tm) ) break; halfedge_descriptor in = h; if (start==GT::null_halfedge()) start=in; From 94e4ad5353cc0e333a13f115fc1af9497b7858c7 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 25 May 2020 19:48:26 +0200 Subject: [PATCH 030/317] refactoring maxime's solution --- .../triangulate_faces.h | 193 +++++++++++++++++- .../Polygon_mesh_processing/CMakeLists.txt | 1 + .../triangulate_hole_with_cdt_2_test.cpp | 53 +++++ 3 files changed, 240 insertions(+), 7 deletions(-) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 79d3c8888e4..711dbc8e9a7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -38,10 +38,13 @@ #include #endif +#include +#include #include #include #include #include +#include #include #include @@ -91,6 +94,15 @@ public: } bool triangulate_face(face_descriptor f, PM& pmesh, bool use_cdt) + { + Emptyset_iterator out; + return triangulate_face(f, pmesh, use_cdt, out); + } + + // Default for out is Emptyset_iterator(), + // and out is only used for triangulate_with_cdt_2(). + template + bool triangulate_face(face_descriptor f, PM& pmesh, bool use_cdt, OutputIterator out) { typedef typename Traits::FT FT; @@ -128,11 +140,29 @@ public: FT p0p2 = CGAL::cross_product(p1-p0,p1-p2) * CGAL::cross_product(p3-p2,p3-p0); if(p0p2>p1p3) { - CGAL::Euler::split_face(v0, v2, pmesh); + // CGAL::Euler::split_face(v0, v2, pmesh); + halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh); + face_descriptor fnew = add_face(pmesh); + CGAL::internal::insert_tip(hnew, v2, pmesh); + CGAL::internal::insert_tip(opposite(hnew, pmesh), v0, pmesh); + set_face(hnew, face(v0, pmesh), pmesh); + CGAL::internal::set_face_in_face_loop(opposite(hnew, pmesh), fnew, pmesh); + set_halfedge(face(hnew, pmesh), hnew, pmesh); + set_halfedge(face(opposite(hnew, pmesh), pmesh), opposite(hnew, pmesh), pmesh); + *out++ = fnew; } else { - CGAL::Euler::split_face(v1, v3, pmesh); + // CGAL::Euler::split_face(v1, v3, pmesh); + halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh); + face_descriptor fnew = add_face(pmesh); + CGAL::internal::insert_tip(hnew, v3, pmesh); + CGAL::internal::insert_tip(opposite(hnew, pmesh), v1, pmesh); + set_face(hnew, face(v1, pmesh), pmesh); + CGAL::internal::set_face_in_face_loop(opposite(hnew, pmesh), fnew, pmesh); + set_halfedge(face(hnew, pmesh), hnew, pmesh); + set_halfedge(face(opposite(hnew, pmesh), pmesh), opposite(hnew, pmesh), pmesh); + *out++ = fnew; } } else @@ -153,18 +183,19 @@ public: Itag> CDT; P_traits cdt_traits(normal); CDT cdt(cdt_traits); - return triangulate_face_with_CDT(f, pmesh, cdt); + return triangulate_face_with_CDT(f, pmesh, cdt, out); } #else CGAL_USE(use_cdt); #endif + // Don't use out if no cdt. return triangulate_face_with_hole_filling(f, pmesh); } return true; } - template - bool triangulate_face_with_CDT(face_descriptor f, PM& pmesh, CDT& cdt) + template + bool triangulate_face_with_CDT(face_descriptor f, PM& pmesh, CDT& cdt, OutputIterator out) { std::size_t original_size = CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh).size(); @@ -277,7 +308,13 @@ public: set_next(h1, h2, pmesh); set_next(h2, h0, pmesh); - Euler::fill_hole(h0, pmesh); + // Euler::fill_hole(h0, pmesh); + face_descriptor new_face = add_face(pmesh); + BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(h0, pmesh)) { + set_face(hd, new_face, pmesh); + } + set_halfedge(new_face, h0, pmesh); + *out++ = new_face; } } return true; @@ -446,8 +483,16 @@ bool triangulate_face(typename boost::graph_traits::face_descriptor //Option bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); + typedef typename internal_np::Lookup_named_param_def< + internal_np::output_iterator_t, + NamedParameters, + Emptyset_iterator>::type Output_iterator; + + Output_iterator out = choose_parameter( + get_parameter(np, internal_np::output_iterator), Emptyset_iterator()); + internal::Triangulate_modifier modifier(vpmap, traits); - return modifier.triangulate_face(f, pmesh, use_cdt); + return modifier.triangulate_face(f, pmesh, use_cdt, out); } template @@ -543,6 +588,140 @@ bool triangulate_faces(PolygonMesh& pmesh) return triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } +/// \cond SKIP_IN_MANUAL +template +bool is_planar_2( + const std::vector& polyline_3d, + const typename GeomTraits::Plane_3& fitted_plane, + const typename GeomTraits::FT fitting_error, + GeomTraits traits) { + + // Otherwise, I can try to use the output `fitting_error` from the function linear_least_squares_fitting_3. + // Or I can use the normal of each edge in the `polyline_3d` and check the angle + // deviation among them. If it is acceptable, return true, otherwise false. + + return true; +} +/// \endcond + +/*! + \ingroup hole_filling_grp + \brief triangulates a planar hole in a polygon mesh. + + If the hole is planar, this function uses the 2D constrained Delaunay triangulation + in order to close the hole. The constraints are the border edges of the hole. + + The hole must not contain any non-manifold vertex, nor self-intersections. + The patch generated does not introduce non-manifold edges nor degenerate triangles. + If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`. + + \tparam PolygonMesh a model of `MutableFaceGraph` + \tparam OutputIterator a model of `OutputIterator` holding + `boost::graph_traits::%face_descriptor` for patch faces. + \tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + + \param pmesh polygon mesh which has the hole + \param border_halfedge a border halfedge incident to the hole + \param out iterator over patch faces + \param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + + \cgalNamedParamsBegin + \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. + If this parameter is omitted, an internal property map for + `CGAL::vertex_point_t` should be available in `PolygonMesh` + \cgalParamEnd + \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd + \cgalNamedParamsEnd + + \return `out` +*/ +template< +typename PolygonMesh, +typename OutputIterator, +typename NamedParameters> +OutputIterator triangulate_hole_with_cdt_2( + PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + OutputIterator out, + const NamedParameters& np) { + + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; + + typedef typename GetVertexPointMap::const_type VPM; + typedef typename GetGeomTraits::type Kernel; + + typedef typename Kernel::FT FT; + typedef typename Kernel::Point_2 Point_2; + typedef typename Kernel::Point_3 Point_3; + typedef typename Kernel::Plane_3 Plane_3; + + typedef typename boost::graph_traits::face_descriptor face_descriptor; + + const VPM vpm = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::vertex_point), + get_const_property_map(boost::vertex_point, pmesh)); + const Kernel traits = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::geom_traits), Kernel()); + + Hedge_around_face_circulator circ(border_halfedge, pmesh); + Hedge_around_face_circulator done(circ); + + std::vector polyline_3d; + do { + polyline_3d.push_back(get(vpm, target(*circ, pmesh))); + } while (++circ != done); + + // Plane fitting. + typedef Exact_predicates_inexact_constructions_kernel Local_kernel; + typedef typename Local_kernel::Point_3 Local_point_3; + typedef typename Local_kernel::Plane_3 Local_plane_3; + typedef Cartesian_converter To_local_converter; + + const To_local_converter to_local_converter; + std::vector points; + points.reserve(polyline_3d.size()); + for (std::size_t i = 0; i < polyline_3d.size(); ++i) + points.push_back(to_local_converter(polyline_3d[i])); + + Local_plane_3 fitted_plane; + const FT error = static_cast(linear_least_squares_fitting_3( + points.begin(), points.end(), fitted_plane, CGAL::Dimension_tag<0>())); + const Plane_3 plane = Plane_3( + static_cast(fitted_plane.a()), + static_cast(fitted_plane.b()), + static_cast(fitted_plane.c()), + static_cast(fitted_plane.d())); + + // Checking simplicity and planarity. + std::vector polyline_2d; + polyline_2d.reserve(polyline_3d.size()); + for (std::size_t i = 0; i < polyline_3d.size(); ++i) + polyline_2d.push_back(plane.to_2d(polyline_3d[i])); + + const bool is_simple = + is_simple_2(polyline_2d.begin(), polyline_2d.end(), traits); + const bool is_planar = + is_planar_2(polyline_3d, plane, error, traits); + + const bool is_planar_hole = is_simple && is_planar; + if (!is_planar_hole) + return triangulate_hole( + pmesh, border_halfedge, out, np); + + face_descriptor new_face = add_face(pmesh); + set_halfedge(new_face, border_halfedge, pmesh); + do { + set_face(*circ, new_face, pmesh); + } while (++circ != done); + + const bool use_cdt = true; + internal::Triangulate_modifier modifier(vpm, traits); + const bool success_with_cdt_2 = + modifier.triangulate_face(new_face, pmesh, use_cdt, out); + CGAL_assertion(success_with_cdt_2); + return out; +} + } // end namespace Polygon_mesh_processing } // end namespace CGAL diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index d5ffb34ef3e..cf186a32775 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -99,6 +99,7 @@ endif() create_single_source_cgal_program("test_shape_predicates.cpp") create_single_source_cgal_program("test_pmp_collision_detection.cpp") create_single_source_cgal_program("test_pmp_manifoldness.cpp") + create_single_source_cgal_program("triangulate_hole_with_cdt_2_test.cpp") if( TBB_FOUND ) CGAL_target_use_TBB(test_pmp_distance) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp new file mode 100644 index 00000000000..18a556e0da7 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -0,0 +1,53 @@ +#include +#include + +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel GT; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef Polyhedron::Facet_handle Facet_handle; +typedef Polyhedron::Halfedge_iterator Halfedge_iterator; + +int main(int argc, char **argv) { + + Polyhedron polyhedron; + std::string path = "/Users/monet/Documents/gf/bugs/issue-4464/data/data.off"; + std::ifstream in(path.c_str(), std::ios_base::in); + CGAL::set_ascii_mode(in); + CGAL::read_off(in, polyhedron); + in.close(); + std::cout << "* finished reading the file" << std::endl; + + // Incrementally fill the holes. + std::size_t num_borders = 0; + for (Halfedge_iterator h = polyhedron.halfedges_begin(); + h != polyhedron.halfedges_end(); ++h) { + if (h->is_border()) { + + ++num_borders; + std::vector patch_faces; + CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( + polyhedron, + h, + std::back_inserter(patch_faces), + CGAL::Polygon_mesh_processing::parameters::vertex_point_map( + get(CGAL::vertex_point, polyhedron)). + geom_traits(GT())); + + assert(patch_faces.size() == 25); + std::cout << "* number of faces in the constructed patch: " << + patch_faces.size() << std::endl; + } + } + assert(num_borders == 2); + + path = "/Users/monet/Documents/fork/logs/result-4464.off"; + std::ofstream out(path.c_str(), std::ios_base::out); + CGAL::set_ascii_mode(out); + CGAL::write_off(out, polyhedron); + out.close(); + std::cout << "* finished writing the file" << std::endl; +} From 552d4fbbae71ca2b839e786fc16114e72959b956 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 26 May 2020 16:18:33 +0200 Subject: [PATCH 031/317] added hole planarity check --- .../triangulate_faces.h | 114 ++++++++++++++-- .../test/Polygon_mesh_processing/data/w.off | 110 ++++++++++++++++ .../triangulate_hole_with_cdt_2_test.cpp | 124 +++++++++++++----- 3 files changed, 305 insertions(+), 43 deletions(-) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 711dbc8e9a7..f0675eb179e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -38,13 +38,18 @@ #include #endif +#include +#include +#include #include +#include #include +#include + #include #include #include #include -#include #include #include @@ -593,14 +598,97 @@ template bool is_planar_2( const std::vector& polyline_3d, const typename GeomTraits::Plane_3& fitted_plane, - const typename GeomTraits::FT fitting_error, GeomTraits traits) { - // Otherwise, I can try to use the output `fitting_error` from the function linear_least_squares_fitting_3. - // Or I can use the normal of each edge in the `polyline_3d` and check the angle - // deviation among them. If it is acceptable, return true, otherwise false. + // Typedefs. + typedef typename GeomTraits::FT FT; + typedef typename GeomTraits::Point_3 Point_3; + typedef typename GeomTraits::Vector_3 Vector_3; + typedef typename GeomTraits::Compute_squared_length_3 Squared_length_3; + typedef typename GeomTraits::Compute_squared_distance_3 Squared_distance_3; + typedef typename GeomTraits::Compute_scalar_product_3 Scalar_product_3; + typedef typename GeomTraits::Collinear_3 Collinear_3; - return true; + const Squared_length_3 squared_length_3 = traits.compute_squared_length_3_object(); + const Squared_distance_3 squared_distance_3 = traits.compute_squared_distance_3_object(); + const Scalar_product_3 scalar_product_3 = traits.compute_scalar_product_3_object(); + const Collinear_3 collinear_3 = traits.collinear_3_object(); + + CGAL_precondition( + polyline_3d.size() >= 3); + + // Distance criteria. + + // Tolerance. + const FT dist_tol = FT(1) / FT(100000); + + // Compute max distance. + FT max_dist = -FT(1); + for (std::size_t i = 0; i < polyline_3d.size(); ++i) { + const Point_3& p = polyline_3d[i]; + const FT dist = static_cast( + CGAL::sqrt(CGAL::to_double(squared_distance_3(p, fitted_plane)))); + max_dist = (CGAL::max)(dist, max_dist); + } + CGAL_assertion(max_dist != -FT(1)); + + // Angle criteria. + + // Tolerance. + const FT angle_tol = FT(5); // degrees + const FT normal_tol = static_cast( + std::cos(CGAL::to_double( + (angle_tol * static_cast(CGAL_PI)) / FT(180)))); + + // Compute fitted plane normal. + Vector_3 normal = fitted_plane.orthogonal_vector(); + FT normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); + CGAL_assertion(normal_length > FT(0)); + const Vector_3 ref_normal = normal / normal_length; + + // Compute average normal of the hole. + FT x = FT(0), y = FT(0), z = FT(0); + std::size_t num_normals = 0; + const Point_3& ref_point = polyline_3d[0]; + for (std::size_t i = 1; i < polyline_3d.size() - 1; ++i) { + const std::size_t ip = i + 1; + + const Point_3& p1 = ref_point; + const Point_3& p2 = polyline_3d[i]; + const Point_3& p3 = polyline_3d[ip]; + + // Skip in case we have collinear points. + if (collinear_3(p1, p2, p3)) + continue; + + normal = CGAL::normal(p1, p2, p3); + normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); + CGAL_assertion(normal_length > FT(0)); + normal /= normal_length; + + x += normal.x(); y += normal.y(); z += normal.z(); + ++num_normals; + } + CGAL_assertion(num_normals >= 1); + x /= static_cast(num_normals); + y /= static_cast(num_normals); + z /= static_cast(num_normals); + + normal = Vector_3(x, y, z); + normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); + const Vector_3 avg_normal = normal / normal_length; + + const FT cos_value = + CGAL::abs(scalar_product_3(avg_normal, ref_normal)); + + // Check planarity. + const bool is_planar = ( + ( max_dist <= dist_tol ) && + ( cos_value >= normal_tol )); + return is_planar; } /// \endcond @@ -622,7 +710,7 @@ bool is_planar_2( \param pmesh polygon mesh which has the hole \param border_halfedge a border halfedge incident to the hole - \param out iterator over patch faces + \param out iterator over patch faces \param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin @@ -673,6 +761,7 @@ OutputIterator triangulate_hole_with_cdt_2( // Plane fitting. typedef Exact_predicates_inexact_constructions_kernel Local_kernel; + typedef typename Local_kernel::FT Local_FT; typedef typename Local_kernel::Point_3 Local_point_3; typedef typename Local_kernel::Plane_3 Local_plane_3; typedef Cartesian_converter To_local_converter; @@ -684,8 +773,12 @@ OutputIterator triangulate_hole_with_cdt_2( points.push_back(to_local_converter(polyline_3d[i])); Local_plane_3 fitted_plane; - const FT error = static_cast(linear_least_squares_fitting_3( - points.begin(), points.end(), fitted_plane, CGAL::Dimension_tag<0>())); + Local_point_3 fitted_centroid; + linear_least_squares_fitting_3( + points.begin(), points.end(), fitted_plane, fitted_centroid, + CGAL::Dimension_tag<0>(), Local_kernel(), + CGAL::Eigen_diagonalize_traits()); + const Plane_3 plane = Plane_3( static_cast(fitted_plane.a()), static_cast(fitted_plane.b()), @@ -701,7 +794,7 @@ OutputIterator triangulate_hole_with_cdt_2( const bool is_simple = is_simple_2(polyline_2d.begin(), polyline_2d.end(), traits); const bool is_planar = - is_planar_2(polyline_3d, plane, error, traits); + is_planar_2(polyline_3d, plane, traits); const bool is_planar_hole = is_simple && is_planar; if (!is_planar_hole) @@ -714,6 +807,7 @@ OutputIterator triangulate_hole_with_cdt_2( set_face(*circ, new_face, pmesh); } while (++circ != done); + // Triangulating. const bool use_cdt = true; internal::Triangulate_modifier modifier(vpm, traits); const bool success_with_cdt_2 = diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off new file mode 100644 index 00000000000..3de92a15ff0 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off @@ -0,0 +1,110 @@ +OFF +54 54 0 +519 0 100 +734 -817 0 +734 -817 100 +775 -636 0 +775 -636 100 +944 0 0 +944 0 100 +1131 0 0 +1131 0 100 +1463 -1062 0 +1463 -1062 100 +1288 -1062 0 +1288 -1062 100 +1106 -448 0 +1106 -448 100 +1045 -243 0 +1045 -243 100 +992 -446 0 +992 -446 100 +833 -1062 0 +833 -1062 100 +648 -1062 0 +648 -1062 100 +479 -440 0 +479 -440 100 +468 -400 0 +468 -400 100 +459 -366 0 +459 -366 100 +451 -334 0 +451 -334 100 +445 -307 0 +445 -307 100 +439 -284 0 +439 -284 100 +434 -263 0 +434 -263 100 +430 -247 0 +430 -247 100 +426 -234 0 +426 -234 100 +424 -225 0 +424 -225 100 +424 -221 0 +424 -221 100 +361 -449 0 +361 -449 100 +192 -1062 0 +192 -1062 100 +6 -1062 0 +6 -1062 100 +331 0 0 +331 0 100 +519 0 0 +3 2 1 0 +3 53 0 1 +3 4 3 2 +3 1 2 3 +3 6 5 4 +3 3 4 5 +3 8 7 6 +3 5 6 7 +3 10 9 8 +3 7 8 9 +3 12 11 10 +3 9 10 11 +3 14 13 12 +3 11 12 13 +3 16 15 14 +3 13 14 15 +3 18 17 16 +3 15 16 17 +3 20 19 18 +3 17 18 19 +3 22 21 20 +3 19 20 21 +3 24 23 22 +3 21 22 23 +3 26 25 24 +3 23 24 25 +3 28 27 26 +3 25 26 27 +3 30 29 28 +3 27 28 29 +3 32 31 30 +3 29 30 31 +3 34 33 32 +3 31 32 33 +3 36 35 34 +3 33 34 35 +3 38 37 36 +3 35 36 37 +3 40 39 38 +3 37 38 39 +3 42 41 40 +3 39 40 41 +3 44 43 42 +3 41 42 43 +3 46 45 44 +3 43 44 45 +3 48 47 46 +3 45 46 47 +3 50 49 48 +3 47 48 49 +3 52 51 50 +3 49 50 51 +3 0 53 52 +3 51 52 53 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 18a556e0da7..c9856f208b1 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -1,53 +1,111 @@ +#include #include #include +#include +#include +#include #include #include +#include #include -typedef CGAL::Exact_predicates_inexact_constructions_kernel GT; -typedef CGAL::Polyhedron_3 Polyhedron; +template< +class PolygonMesh, +class Halfedge_handle> +void detect_borders( + PolygonMesh& pmesh, + std::vector& borders) { -typedef Polyhedron::Facet_handle Facet_handle; -typedef Polyhedron::Halfedge_iterator Halfedge_iterator; + typedef CGAL::Halfedge_around_face_circulator + Halfedge_around_facet_circulator; -int main(int argc, char **argv) { + borders.clear(); + std::set border_map; + BOOST_FOREACH(Halfedge_handle h, halfedges(pmesh)) { + if ( + face(h, pmesh) == boost::graph_traits::null_face() && + border_map.find(h) == border_map.end()) { - Polyhedron polyhedron; - std::string path = "/Users/monet/Documents/gf/bugs/issue-4464/data/data.off"; + borders.push_back(h); + Halfedge_around_facet_circulator hf_around_facet(h, pmesh); + Halfedge_around_facet_circulator done(hf_around_facet); + + do { + const bool insertion_ok = border_map.insert(*hf_around_facet).second; + assert(insertion_ok); + } while (++hf_around_facet != done); + } + } +} + +// This test is inspired by the issue: https://github.com/CGAL/cgal/issues/4464. +template< +typename PolygonMesh, +typename GT> +void test_triangulate_hole_with_cdt_2( + const std::string kernel_name, + int argc, char **argv, const bool save) { + + typedef typename boost::graph_traits::face_descriptor Face_handle; + typedef typename boost::graph_traits::halfedge_descriptor Halfedge_handle; + + // Reading the file. + std::cout << "test with the " << kernel_name << " kernel:" << std::endl; + PolygonMesh pmesh; + std::string path = "data/w.off"; std::ifstream in(path.c_str(), std::ios_base::in); CGAL::set_ascii_mode(in); - CGAL::read_off(in, polyhedron); + CGAL::read_off(in, pmesh); in.close(); std::cout << "* finished reading the file" << std::endl; - // Incrementally fill the holes. - std::size_t num_borders = 0; - for (Halfedge_iterator h = polyhedron.halfedges_begin(); - h != polyhedron.halfedges_end(); ++h) { - if (h->is_border()) { + // Detecting hole borders. + std::vector borders; + detect_borders(pmesh, borders); + assert(borders.size() == 2); - ++num_borders; - std::vector patch_faces; - CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( - polyhedron, - h, - std::back_inserter(patch_faces), - CGAL::Polygon_mesh_processing::parameters::vertex_point_map( - get(CGAL::vertex_point, polyhedron)). - geom_traits(GT())); + // Triangulating holes. + std::vector patch_faces; + BOOST_FOREACH(Halfedge_handle h, borders) { + patch_faces.clear(); + CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( + pmesh, + h, + std::back_inserter(patch_faces), + CGAL::Polygon_mesh_processing::parameters::vertex_point_map( + get(CGAL::vertex_point, pmesh)). + geom_traits(GT())); - assert(patch_faces.size() == 25); - std::cout << "* number of faces in the constructed patch: " << - patch_faces.size() << std::endl; - } + assert(patch_faces.size() == 25); + std::cout << "* number of faces in the constructed patch: " << + patch_faces.size() << std::endl; } - assert(num_borders == 2); + assert(pmesh.is_valid() && is_closed(pmesh)); - path = "/Users/monet/Documents/fork/logs/result-4464.off"; - std::ofstream out(path.c_str(), std::ios_base::out); - CGAL::set_ascii_mode(out); - CGAL::write_off(out, polyhedron); - out.close(); - std::cout << "* finished writing the file" << std::endl; + // Writing the file. + if (save) { + path = ""; + if (argc > 1) path = std::string(argv[1]); + path += "w-4464.off"; + std::ofstream out(path.c_str(), std::ios_base::out); + CGAL::set_ascii_mode(out); + CGAL::write_off(out, pmesh); + out.close(); + std::cout << "* finished writing the file" << std::endl; + } +} + +int main(int argc, char **argv) { + + typedef CGAL::Exact_predicates_inexact_constructions_kernel EI; + typedef CGAL::Exact_predicates_exact_constructions_kernel EE; + + typedef CGAL::Surface_mesh Surface_mesh_EI; + typedef CGAL::Polyhedron_3 Polyhedron_3_EE; + + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, true); } From a2038e822096c0507f189577f39c45a1f7340e2c Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 26 May 2020 16:40:45 +0200 Subject: [PATCH 032/317] extended ref manual for the feature requested in the issue #4464 --- .../doc/Polygon_mesh_processing/PackageDescription.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index dd50ce28305..e03b81f09fe 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -108,6 +108,7 @@ and provides a list of the parameters that are used in this package. - `CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()` - `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()` - `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()` +- `CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2()` \cgalCRPSection{Predicate Functions} - `CGAL::Polygon_mesh_processing::does_self_intersect()` From 7ac04fd907e5d01107a034ebf3e93113dc2ebab9 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 8 Jun 2020 14:21:12 +0200 Subject: [PATCH 033/317] checking the hole simplicity with the extended triangulation projection traits --- .../triangulate_faces.h | 218 ++++++------------ .../triangulate_hole_with_cdt_2_test.cpp | 10 +- ...Triangulation_2_projection_traits_base_3.h | 35 +++ 3 files changed, 108 insertions(+), 155 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 21eb80b4059..49100398d31 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -31,11 +31,7 @@ #include #include -#include #include -#include -#include -#include #include #include @@ -305,7 +301,7 @@ public: // Euler::fill_hole(h0, pmesh); face_descriptor new_face = add_face(pmesh); - BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(h0, pmesh)) { + for (halfedge_descriptor hd : CGAL::halfedges_around_face(h0, pmesh)) { set_face(hd, new_face, pmesh); } set_halfedge(new_face, h0, pmesh); @@ -583,105 +579,6 @@ bool triangulate_faces(PolygonMesh& pmesh) return triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } -/// \cond SKIP_IN_MANUAL -template -bool is_planar_2( - const std::vector& polyline_3d, - const typename GeomTraits::Plane_3& fitted_plane, - GeomTraits traits) { - - // Typedefs. - typedef typename GeomTraits::FT FT; - typedef typename GeomTraits::Point_3 Point_3; - typedef typename GeomTraits::Vector_3 Vector_3; - typedef typename GeomTraits::Compute_squared_length_3 Squared_length_3; - typedef typename GeomTraits::Compute_squared_distance_3 Squared_distance_3; - typedef typename GeomTraits::Compute_scalar_product_3 Scalar_product_3; - typedef typename GeomTraits::Collinear_3 Collinear_3; - - const Squared_length_3 squared_length_3 = traits.compute_squared_length_3_object(); - const Squared_distance_3 squared_distance_3 = traits.compute_squared_distance_3_object(); - const Scalar_product_3 scalar_product_3 = traits.compute_scalar_product_3_object(); - const Collinear_3 collinear_3 = traits.collinear_3_object(); - - CGAL_precondition( - polyline_3d.size() >= 3); - - // Distance criteria. - - // Tolerance. - const FT dist_tol = FT(1) / FT(100000); - - // Compute max distance. - FT max_dist = -FT(1); - for (std::size_t i = 0; i < polyline_3d.size(); ++i) { - const Point_3& p = polyline_3d[i]; - const FT dist = static_cast( - CGAL::sqrt(CGAL::to_double(squared_distance_3(p, fitted_plane)))); - max_dist = (CGAL::max)(dist, max_dist); - } - CGAL_assertion(max_dist != -FT(1)); - - // Angle criteria. - - // Tolerance. - const FT angle_tol = FT(5); // degrees - const FT normal_tol = static_cast( - std::cos(CGAL::to_double( - (angle_tol * static_cast(CGAL_PI)) / FT(180)))); - - // Compute fitted plane normal. - Vector_3 normal = fitted_plane.orthogonal_vector(); - FT normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); - CGAL_assertion(normal_length > FT(0)); - const Vector_3 ref_normal = normal / normal_length; - - // Compute average normal of the hole. - FT x = FT(0), y = FT(0), z = FT(0); - std::size_t num_normals = 0; - const Point_3& ref_point = polyline_3d[0]; - for (std::size_t i = 1; i < polyline_3d.size() - 1; ++i) { - const std::size_t ip = i + 1; - - const Point_3& p1 = ref_point; - const Point_3& p2 = polyline_3d[i]; - const Point_3& p3 = polyline_3d[ip]; - - // Skip in case we have collinear points. - if (collinear_3(p1, p2, p3)) - continue; - - normal = CGAL::normal(p1, p2, p3); - normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); - CGAL_assertion(normal_length > FT(0)); - normal /= normal_length; - - x += normal.x(); y += normal.y(); z += normal.z(); - ++num_normals; - } - CGAL_assertion(num_normals >= 1); - x /= static_cast(num_normals); - y /= static_cast(num_normals); - z /= static_cast(num_normals); - - normal = Vector_3(x, y, z); - normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); - const Vector_3 avg_normal = normal / normal_length; - - const FT cos_value = - CGAL::abs(scalar_product_3(avg_normal, ref_normal)); - - // Check planarity. - const bool is_planar = ( - ( max_dist <= dist_tol ) && - ( cos_value >= normal_tol )); - return is_planar; -} -/// \endcond - /*! \ingroup hole_filling_grp \brief triangulates a planar hole in a polygon mesh. @@ -723,74 +620,93 @@ OutputIterator triangulate_hole_with_cdt_2( OutputIterator out, const NamedParameters& np) { - typedef Halfedge_around_face_circulator Hedge_around_face_circulator; + #ifdef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 + + return triangulate_hole( + pmesh, border_halfedge, out, np); + + #else + + typedef typename GetGeomTraits::type Traits; + const Traits traits = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::geom_traits), Traits()); + + typedef typename Traits::FT FT; + typedef typename Traits::Point_3 Point_3; + typedef typename Traits::Vector_3 Vector_3; + typedef typename Traits::Collinear_3 Collinear_3; + typedef typename Traits::Compute_squared_length_3 Squared_length_3; typedef typename GetVertexPointMap::const_type VPM; - typedef typename GetGeomTraits::type Kernel; - - typedef typename Kernel::FT FT; - typedef typename Kernel::Point_2 Point_2; - typedef typename Kernel::Point_3 Point_3; - typedef typename Kernel::Plane_3 Plane_3; - - typedef typename boost::graph_traits::face_descriptor face_descriptor; - const VPM vpm = parameters::choose_parameter( parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, pmesh)); - const Kernel traits = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::geom_traits), Kernel()); + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; Hedge_around_face_circulator circ(border_halfedge, pmesh); Hedge_around_face_circulator done(circ); + // Getting the hole boundary. std::vector polyline_3d; do { polyline_3d.push_back(get(vpm, target(*circ, pmesh))); } while (++circ != done); + CGAL_assertion( + polyline_3d.size() >= 3); - // Plane fitting. - typedef Exact_predicates_inexact_constructions_kernel Local_kernel; - typedef typename Local_kernel::FT Local_FT; - typedef typename Local_kernel::Point_3 Local_point_3; - typedef typename Local_kernel::Plane_3 Local_plane_3; - typedef Cartesian_converter To_local_converter; + // Compute an average normal of the hole face. + const Squared_length_3 squared_length_3 = + traits.compute_squared_length_3_object(); + const Collinear_3 collinear_3 = + traits.collinear_3_object(); - const To_local_converter to_local_converter; - std::vector points; - points.reserve(polyline_3d.size()); - for (std::size_t i = 0; i < polyline_3d.size(); ++i) - points.push_back(to_local_converter(polyline_3d[i])); + FT x = FT(0), y = FT(0), z = FT(0); + std::size_t num_normals = 0; + const Point_3& ref_point = polyline_3d[0]; + for (std::size_t i = 1; i < polyline_3d.size() - 1; ++i) { + const std::size_t ip = i + 1; - Local_plane_3 fitted_plane; - Local_point_3 fitted_centroid; - linear_least_squares_fitting_3( - points.begin(), points.end(), fitted_plane, fitted_centroid, - CGAL::Dimension_tag<0>(), Local_kernel(), - CGAL::Eigen_diagonalize_traits()); + const Point_3& p1 = ref_point; // 3 points, which form a triangle + const Point_3& p2 = polyline_3d[i]; + const Point_3& p3 = polyline_3d[ip]; - const Plane_3 plane = Plane_3( - static_cast(fitted_plane.a()), - static_cast(fitted_plane.b()), - static_cast(fitted_plane.c()), - static_cast(fitted_plane.d())); + // Skip in case we have collinear points. + if (collinear_3(p1, p2, p3)) + continue; - // Checking simplicity and planarity. - std::vector polyline_2d; - polyline_2d.reserve(polyline_3d.size()); - for (std::size_t i = 0; i < polyline_3d.size(); ++i) - polyline_2d.push_back(plane.to_2d(polyline_3d[i])); + // Computing the normal of a triangle. + Vector_3 tri_normal = CGAL::normal(p1, p2, p3); + const FT tri_normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); + CGAL_assertion(tri_normal_length > FT(0)); + tri_normal /= tri_normal_length; + x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); + ++num_normals; + } + + CGAL_assertion(num_normals >= 1); + x /= static_cast(num_normals); + y /= static_cast(num_normals); + z /= static_cast(num_normals); + + // Setting the final normal. + const Vector_3 normal = Vector_3(x, y, z); + const FT normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); + const Vector_3 avg_normal = normal / normal_length; + + // Checking the hole simplicity. + typedef Triangulation_2_projection_traits_3 P_traits; + const P_traits p_traits(avg_normal); const bool is_simple = - is_simple_2(polyline_2d.begin(), polyline_2d.end(), traits); - const bool is_planar = - is_planar_2(polyline_3d, plane, traits); - - const bool is_planar_hole = is_simple && is_planar; - if (!is_planar_hole) + is_simple_2(polyline_3d.begin(), polyline_3d.end(), p_traits); + if (!is_simple) return triangulate_hole( pmesh, border_halfedge, out, np); + // Adding the new face. + typedef typename boost::graph_traits::face_descriptor face_descriptor; face_descriptor new_face = add_face(pmesh); set_halfedge(new_face, border_halfedge, pmesh); do { @@ -799,10 +715,12 @@ OutputIterator triangulate_hole_with_cdt_2( // Triangulating. const bool use_cdt = true; - internal::Triangulate_modifier modifier(vpm, traits); + internal::Triangulate_modifier modifier(vpm, traits); const bool success_with_cdt_2 = modifier.triangulate_face(new_face, pmesh, use_cdt, out); CGAL_assertion(success_with_cdt_2); + + #endif return out; } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index c9856f208b1..eab4b75e39d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include #include #include @@ -22,7 +22,7 @@ void detect_borders( borders.clear(); std::set border_map; - BOOST_FOREACH(Halfedge_handle h, halfedges(pmesh)) { + for (Halfedge_handle h : halfedges(pmesh)) { if ( face(h, pmesh) == boost::graph_traits::null_face() && border_map.find(h) == border_map.end()) { @@ -60,14 +60,14 @@ void test_triangulate_hole_with_cdt_2( in.close(); std::cout << "* finished reading the file" << std::endl; - // Detecting hole borders. + // Detecting the hole borders. std::vector borders; detect_borders(pmesh, borders); assert(borders.size() == 2); - // Triangulating holes. + // Triangulating the holes. std::vector patch_faces; - BOOST_FOREACH(Halfedge_handle h, borders) { + for (Halfedge_handle h : borders) { patch_faces.clear(); CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( pmesh, diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h index 984d2381035..1373d24e0bb 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h @@ -281,6 +281,33 @@ public: } }; // end class Compare_along_axis +template +class Less_xy_along_axis +{ + // private members + typedef typename Traits::Vector_3 Vector_3; + typedef typename Traits::Point_2 Point; + Vector_3 base1, base2; +public: + Less_xy_along_axis(const Vector_3& base1, const Vector_3& base2) : base1(base1), base2(base2) + { + CGAL_PROFILER("Construct Less_xy_along_axis") + CGAL_TIME_PROFILER("Construct Less_xy_along_axis") + } + + typedef bool result_type; + + bool operator() (const Point &p, const Point &q) const { + + Compare_along_axis cx(base1); + Comparison_result crx = cx(p, q); + if (crx == SMALLER) { return true; } + if (crx == LARGER) { return false; } + Less_along_axis ly(base2); + return ly(p, q); + } +}; // end class Less_xy_along_axis + } // end namespace TriangulationProjectionTraitsCartesianFunctors @@ -345,6 +372,8 @@ public: Less_along_axis Less_x_2; typedef TriangulationProjectionTraitsCartesianFunctors:: Less_along_axis Less_y_2; + typedef TriangulationProjectionTraitsCartesianFunctors:: + Less_xy_along_axis Less_xy_2; typedef TriangulationProjectionTraitsCartesianFunctors:: Projected_orientation_with_normal_3 Orientation_2; @@ -385,6 +414,12 @@ public: return Less_y_2(this->base2()); } + Less_xy_2 + less_xy_2_object() const + { + return Less_xy_2(this->base1(), this->base2()); + } + Compare_x_2 compare_x_2_object() const { From a9f77bec71ac7ae7208bd4c0fc7280d011e6a6ee Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 8 Jun 2020 17:31:47 +0200 Subject: [PATCH 034/317] added various tests for checking the hole filling with cdt2 --- .../Polygon_mesh_processing/CMakeLists.txt | 16 +- .../data/elephant_nonsimple_hole.off | 8192 +++++++++++++++++ .../data/elephant_simple_hole.off | 8091 ++++++++++++++++ .../data/{w.off => w_horizontal_hole.off} | 0 .../data/w_orthogonal_hole.off | 156 + .../triangulate_hole_with_cdt_2_test.cpp | 76 +- 6 files changed, 16505 insertions(+), 26 deletions(-) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_nonsimple_hole.off create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_simple_hole.off rename Polygon_mesh_processing/test/Polygon_mesh_processing/data/{w.off => w_horizontal_hole.off} (100%) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_orthogonal_hole.off diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 47d106d1ec1..0a8a9bc5b09 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -101,7 +101,7 @@ endif() create_single_source_cgal_program("test_pmp_manifoldness.cpp") create_single_source_cgal_program("test_mesh_smoothing.cpp") create_single_source_cgal_program("test_remove_caps_needles.cpp") -# create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") + # create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") create_single_source_cgal_program("triangulate_hole_with_cdt_2_test.cpp") if( TBB_FOUND ) @@ -118,14 +118,14 @@ if(OpenMesh_FOUND) target_link_libraries( remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES} ) endif() -find_package(Ceres QUIET) -if(TARGET ceres) - target_compile_definitions( test_mesh_smoothing PRIVATE CGAL_PMP_USE_CERES_SOLVER ) - target_link_libraries( test_mesh_smoothing PRIVATE ceres ) +# find_package(Ceres QUIET) +# if(TARGET ceres) +# target_compile_definitions( test_mesh_smoothing PRIVATE CGAL_PMP_USE_CERES_SOLVER ) +# target_link_libraries( test_mesh_smoothing PRIVATE ceres ) -# target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) -# target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) -endif(TARGET ceres) +# # target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) +# # target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) +# endif(TARGET ceres) if(BUILD_TESTING) set_tests_properties( diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_nonsimple_hole.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_nonsimple_hole.off new file mode 100644 index 00000000000..5498b839df5 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_nonsimple_hole.off @@ -0,0 +1,8192 @@ +OFF +2737 5453 0 +0.262933 0.102269 0.138247 +0.0843142 0.0418575 -0.0419302 +0.0676609 -0.0308717 0.133371 +0.202895 0.468475 0.0802072 +0.113075 -0.465378 -0.0546734 +0.225577 -0.277149 -0.193776 +-0.146525 -0.22403 -0.169286 +-0.0249865 -0.129931 -0.13238 +-0.160965 -0.480027 -0.0707824 +0.0794063 -0.415277 -0.0839096 +0.0469116 -0.050008 0.252355 +-0.0998372 -0.193745 -0.16268 +-0.111131 -0.104825 -0.14166 +-0.061459 -0.0977343 -0.133353 +-0.247783 -0.131539 0.0722694 +-0.145972 -0.486627 -0.0633275 +0.0916759 0.0333604 -0.133002 +-0.184954 -0.325468 -0.133853 +0.0847778 -0.432659 -0.0978527 +-0.210776 -0.299151 0.0751516 +-0.151539 -0.388715 0.01282 +-0.154564 -0.438244 -0.0249412 +-0.123411 -0.0182656 0.0135824 +0.00773278 -0.053391 -0.0428874 +-0.0774524 -0.292395 -0.106335 +0.0201594 -0.263586 0.119859 +-0.105646 -0.0365155 -0.0770751 +-0.113391 -0.41896 -0.0906771 +-0.128213 -0.46259 -0.0994907 +-0.160526 -0.468057 -0.0393445 +0.197609 -0.127492 -0.0574767 +0.0757306 -0.449539 -0.0614557 +0.147148 -0.412461 -0.0801639 +0.103782 -0.333007 0.0288926 +0.108917 -0.401981 -0.00841926 +0.11392 -0.408931 -0.0973654 +0.129733 -0.31331 -0.0672325 +0.0904388 -0.356531 -0.0803906 +0.0359798 -0.255445 -0.113562 +-0.22312 -0.107007 -0.0611904 +-0.163408 -0.433458 -0.0704785 +-0.0915185 -0.473885 -0.0165533 +-0.141417 -0.474418 -0.0834065 +-0.0944539 -0.479454 -0.0663683 +-0.085985 -0.101282 0.158093 +-0.0225438 -0.0889567 -0.0848587 +0.092707 -0.109496 -0.114561 +-0.159213 -0.159272 -0.138793 +-0.24541 -0.230248 -0.110578 +0.183744 -0.231931 0.0176086 +0.294273 -0.0955008 0.116328 +-0.16477 -0.385872 -0.0413331 +-0.185303 -0.313456 -0.00374653 +-0.297084 -0.262835 -0.00415653 +0.167756 -0.128776 0.197921 +-0.0273811 0.0608812 -0.0989637 +0.208303 0.00452459 -0.0746544 +-0.150831 -0.448909 -0.0901866 +-0.0720206 -0.147118 -0.154796 +-0.0197986 -0.210658 -0.154154 +-0.130593 -0.498558 -0.021161 +0.129662 -0.373473 -0.0794411 +-0.120692 -0.481168 -0.0685411 +-0.108692 -0.494274 -0.0429275 +-0.0970902 -0.252938 -0.14843 +-0.0098054 -0.335319 -0.0147292 +0.0769246 -0.410346 -0.0391239 +-0.132409 -0.464154 -0.0197707 +-0.102806 -0.4217 0.00855496 +-0.0760332 -0.34128 0.100617 +-0.104435 -0.377391 0.0553722 +-0.14788 -0.33188 0.0922673 +-0.151409 -0.218926 0.165812 +-0.111518 -0.286925 0.148566 +-0.0458796 -0.210094 0.18627 +0.0439919 -0.147905 0.137964 +-0.0358575 -0.361749 0.0457868 +0.0284346 -0.311464 0.0537885 +0.0409609 -0.0869988 -0.085353 +0.118462 -0.0465078 -0.0483438 +-0.141108 -0.422593 -0.0846889 +-0.129145 -0.379198 -0.0712284 +-0.149426 -0.329507 -0.0473837 +-0.212723 -0.300322 -0.0706413 +-0.156151 -0.403775 -0.0651516 +-0.077704 -0.400019 -0.0437424 +-0.0783601 -0.342543 -0.0687412 +-0.0202922 -0.309739 -0.0758353 +0.0501325 -0.290557 -0.0430839 +0.0954448 -0.256567 0.0733017 +0.144565 -0.158299 0.0913557 +0.0562207 -0.179498 -0.140905 +0.16863 -0.175124 -0.176771 +0.121523 -0.241503 -0.138152 +0.196749 0.136407 0.00365942 +0.14057 0.277481 0.154966 +0.156168 -0.385879 -0.0324162 +-0.146564 -0.288069 -0.168907 +-0.212533 -0.256019 -0.170893 +0.0775241 -0.353084 -0.0221894 +-0.161054 -0.48311 -0.0516067 +-0.151386 -0.488726 -0.0297486 +-0.167299 -0.464731 -0.058517 +-0.167494 -0.44542 -0.0440266 +-0.166175 -0.416312 -0.0405929 +-0.155665 -0.409399 -0.0112037 +-0.130777 -0.428881 -0.00549876 +-0.162855 -0.460869 -0.0783452 +-0.0949104 -0.0628065 -0.118829 +-0.171364 -0.0681205 -0.104606 +-0.189411 -0.0391257 -0.0301772 +-0.201329 -0.0450332 0.0672375 +-0.0621659 -0.0595357 -0.0819357 +-0.0724451 -0.0386843 -0.0212262 +-0.0317016 -0.00827391 0.0812953 +0.125617 -0.445138 -0.086335 +0.16914 -0.45638 -0.0514974 +-0.188699 -0.102786 0.151505 +-0.127982 -0.406882 0.0143939 +-0.130706 -0.384 0.0373578 +-0.17253 -0.34721 0.0442322 +-0.136499 -0.357829 0.0655808 +-0.101729 -0.398953 0.0314689 +-0.06477 -0.393705 0.00175031 +-0.0683606 -0.382507 0.0422398 +-0.0619729 -0.361557 0.0725343 +-0.0129886 -0.329893 0.099078 +-0.0485077 -0.306718 0.14972 +-0.0586671 -0.359537 -0.0297503 +-0.105132 -0.354471 0.0834642 +-0.111953 -0.324339 0.110194 +-0.146952 -0.298663 0.122985 +-0.147935 -0.259899 0.146585 +-0.224685 -0.230598 0.12386 +-0.194785 -0.274899 0.125615 +-0.1144 -0.250007 0.185149 +-0.10665 -0.185071 0.204627 +-0.155805 -0.154327 0.174517 +-0.215755 -0.165279 0.142947 +-0.0743299 -0.277016 0.17853 +-0.0218198 -0.257755 0.16445 +0.000800113 -0.199671 0.138749 +-0.0254547 -0.133829 0.140633 +0.0635315 -0.20852 0.111271 +-0.0256804 -0.0569419 0.140514 +-0.0948894 -0.0414189 0.110395 +-0.0705488 -0.0374163 0.0415111 +-0.00760713 -0.0195458 0.0164934 +0.0499878 0.0289775 0.0673286 +0.140466 0.0718009 0.144428 +-0.00188983 0.0792593 -0.003093 +0.0559872 -0.0140882 -0.011506 +-0.227407 -0.0888195 0.0117762 +-0.273528 -0.167121 -0.0102922 +-0.0402782 -0.263586 -0.140793 +-0.137564 -0.296782 -0.109847 +-0.166109 -0.381665 -0.0120175 +-0.16983 -0.360755 0.0137933 +-0.16456 -0.354211 -0.0308766 +-0.185156 -0.334386 0.0190529 +-0.207978 -0.298552 0.0310885 +-0.252507 -0.243462 0.0511336 +-0.223388 -0.268692 -0.019703 +-0.193938 -0.322649 0.048456 +-0.175095 -0.332532 0.0736524 +-0.176111 -0.310734 0.103586 +-0.147337 -0.494175 -0.0467278 +-0.129359 -0.490613 -0.0537016 +-0.148829 -0.364106 -0.0543963 +-0.120087 -0.343197 -0.0662243 +-0.130345 -0.305692 -0.0722136 +-0.171529 -0.299424 -0.0833938 +-0.181343 -0.292949 -0.0416997 +0.207831 -0.217496 -0.0966998 +0.180453 0.174523 0.151623 +0.0997558 -0.44202 -0.0211251 +0.141829 -0.427452 -0.0246256 +0.231902 -0.0518172 0.0262484 +0.222165 -0.00765217 0.131632 +0.257605 0.0468554 0.0496674 +0.134457 -0.362329 0.00455646 +0.162364 -0.298449 0.0119315 +0.167632 -0.334853 -0.0258239 +0.166781 -0.258058 -0.0451734 +0.196618 -0.203737 -0.0367216 +0.204966 -0.148702 0.029823 +0.188775 -0.0899398 0.0842549 +0.118735 -0.0897053 0.120666 +0.108518 -0.0623755 0.19827 +0.0943505 -0.134977 0.262277 +0.0987744 0.0186293 0.19077 +0.164162 -0.016078 0.17849 +0.217401 -0.0732307 0.174029 +0.244384 -0.159022 0.158735 +0.0938974 -0.414078 -0.0986619 +0.0882094 -0.386204 -0.0874415 +0.110237 -0.433985 -0.106491 +0.0752909 -0.377302 -0.0545033 +0.136893 -0.424401 -0.103861 +0.101623 -0.446793 -0.0879738 +0.0803589 -0.447974 -0.0828166 +0.0955794 -0.458697 -0.0690652 +0.0852254 -0.472952 -0.043714 +0.0423481 -0.131534 -0.117698 +0.0102534 -0.163639 -0.135844 +-0.0294235 -0.16777 -0.154302 +-0.0581903 -0.19678 -0.162941 +-0.0495263 -0.23206 -0.157295 +0.0213258 -0.204668 -0.142847 +0.0591534 -0.221375 -0.128414 +0.094939 -0.204956 -0.158559 +0.102368 -0.149902 -0.152017 +0.161838 -0.127189 -0.119413 +0.0883157 -0.255475 -0.0965547 +0.00337956 -0.243572 -0.138992 +-0.00441584 -0.28038 -0.109802 +0.139454 -0.244447 -0.0884262 +0.17799 -0.253819 -0.13106 +0.239512 -0.249475 -0.139746 +0.239769 -0.199663 -0.201225 +0.139899 -0.220537 -0.184787 +0.188104 -0.214287 -0.208834 +0.241446 -0.186766 -0.139849 +0.209446 -0.161297 -0.101029 +-0.199048 -0.317265 -0.100601 +-0.293252 -0.31357 -0.122798 +-0.243299 -0.355691 -0.130502 +-0.247594 -0.319033 -0.0988683 +-0.291668 -0.287409 -0.0637038 +-0.248832 -0.272185 -0.0865389 +-0.259174 -0.220646 -0.0469428 +-0.282126 -0.263379 -0.124759 +-0.269731 -0.294935 -0.18724 +-0.247297 -0.165961 -0.0866554 +0.0601914 -0.0464014 -0.0549033 +-0.211085 -0.18579 -0.128927 +-0.200721 -0.132547 -0.108259 +-0.0634953 -0.15489 0.179525 +0.153912 -0.0887253 -0.0733484 +0.185145 -0.0471144 -0.0260532 +0.211443 0.0144377 0.0032337 +0.139575 0.0029693 0.000737671 +0.166751 0.0710484 -0.0323169 +0.107842 0.107181 0.0410238 +0.241648 0.0800111 -0.0150955 +-0.140262 -0.4992 -0.033581 +-0.123763 -0.497978 -0.0364981 +-0.108133 -0.495253 -0.0202341 +-0.1219 -0.481038 -0.0158085 +-0.110456 -0.461331 -0.014079 +-0.087635 -0.441699 -0.0445804 +-0.0916102 -0.451765 -0.0239283 +-0.0811529 -0.421697 -0.020421 +-0.0723115 -0.470105 -0.0423155 +-0.102577 -0.44033 -0.0062072 +-0.139118 -0.480546 -0.0199347 +-0.149266 -0.466768 -0.0254061 +0.222317 -0.0925366 -0.0161067 +-0.0417433 -0.361447 0.00632817 +-0.00965295 -0.347119 0.0218202 +0.0216724 -0.318231 0.010836 +-0.00474667 -0.341486 0.0613973 +0.0698488 -0.285166 0.0205835 +-0.108371 -0.29389 -0.0941984 +-0.11094 -0.279255 -0.127432 +-0.0852691 -0.31423 -0.083395 +-0.0516331 -0.309713 -0.0908278 +-0.0463843 -0.329032 -0.0615785 +-0.13427 -0.295211 -0.140976 +-0.16029 -0.312528 -0.151535 +-0.208046 -0.313472 -0.188061 +-0.177638 -0.29982 -0.178676 +-0.173332 -0.259819 -0.179118 +-0.186949 -0.225139 -0.161631 +-0.121077 -0.271737 -0.158365 +-0.222098 -0.229029 -0.143015 +-0.254895 -0.254361 -0.158387 +-0.119307 -0.241249 -0.168619 +-0.0940058 -0.224454 -0.161034 +-0.119452 -0.213541 -0.164903 +-0.133444 -0.181194 -0.153714 +-0.123212 -0.142937 -0.146434 +-0.154852 -0.114002 -0.127562 +-0.16919 -0.193253 -0.151916 +-0.202578 -0.281459 -0.18846 +-0.238459 -0.276537 -0.185897 +-0.240282 -0.308392 -0.197824 +-0.31592 -0.411023 -0.222975 +-0.28556 -0.354091 -0.210885 +-0.235315 -0.349789 -0.176342 +-0.247249 -0.413591 -0.205119 +-0.313616 -0.39085 -0.145549 +-0.265064 -0.38952 -0.162643 +-0.137308 -0.0765217 -0.126585 +-0.138269 -0.043252 -0.101811 +-0.149787 -0.024537 -0.0569204 +-0.190238 -0.325155 -0.164883 +-0.214126 -0.342005 -0.145019 +-0.11169 -0.0249744 -0.0351987 +-0.154494 -0.0206052 -0.0150451 +-0.170024 -0.0235376 0.033341 +-0.149964 -0.0212297 0.0915499 +-0.146292 -0.0570396 0.143171 +-0.204533 -0.050976 0.0222898 +-0.222839 -0.0748301 0.0497298 +-0.218112 -0.0836084 0.106186 +-0.241131 -0.10804 0.0423425 +-0.253857 -0.126023 0.000914005 +-0.268045 -0.155579 0.0359862 +-0.254096 -0.191499 0.0837602 +-0.284127 -0.206805 0.0257642 +-0.255388 -0.139415 -0.0455141 +-0.266486 -0.179542 -0.0496151 +-0.255448 -0.200689 -0.0776309 +-0.238672 -0.192995 -0.107883 +-0.225097 -0.163824 -0.109937 +-0.22995 -0.135947 -0.0896828 +-0.209528 -0.114818 -0.0862766 +-0.197715 -0.0771741 -0.074156 +-0.18152 -0.102481 -0.104911 +-0.212552 -0.0754645 -0.0336012 +-0.179069 -0.0426745 -0.0757348 +-0.191113 -0.0400122 0.118805 +0.0761558 -0.344791 -0.0536197 +0.0734921 -0.316433 -0.0291825 +0.0865869 -0.298841 -0.0691012 +0.0805876 -0.328744 0.0029047 +0.0952029 -0.361348 0.00820626 +0.11906 -0.273469 -0.0673767 +0.0841053 -0.310717 0.0264162 +0.125408 -0.292597 0.041066 +0.0878905 -0.285295 0.052224 +0.0491288 -0.272854 0.0806291 +0.143869 -0.242882 0.0528378 +0.117789 -0.207199 0.0870858 +0.169353 -0.193132 0.0552639 +0.0969256 -0.166289 0.115505 +0.054006 -0.288058 0.0505697 +0.0199581 -0.301066 0.0971587 +-0.00766116 -0.296894 0.132807 +0.0766599 -0.302889 0.00259846 +0.0459981 -0.299327 0.00649094 +0.0275534 -0.307808 -0.0222832 +0.0149271 -0.300169 -0.0594622 +0.0407712 -0.276916 -0.0798141 +0.0598138 -0.291021 -0.0166231 +0.105499 -0.310063 0.042044 +0.129965 -0.318676 0.0271739 +-0.0843085 -0.494264 -0.0321529 +-0.0752323 -0.238787 0.196776 +-0.295928 -0.43397 -0.176216 +0.0851801 -0.382062 -0.0130588 +0.0187394 -0.0952484 0.145146 +0.0700063 -0.10227 0.135872 +0.0221841 -0.0461712 0.144279 +0.0234739 0.0145751 0.123876 +-0.00955997 -0.0145334 0.135796 +-0.0455413 -0.0274983 0.116817 +-0.0630042 -0.0646849 0.123712 +-0.0996182 -0.0685448 0.139479 +-0.129134 -0.0937854 0.159793 +-0.112763 -0.133107 0.183753 +-0.0586283 -0.0384282 0.0801443 +-0.0976008 -0.0306336 0.0712047 +-0.187313 -0.236737 0.146886 +-0.186919 -0.194456 0.158247 +-0.276732 -0.200888 -0.0224537 +-0.291326 -0.23573 -0.0313163 +-0.262172 -0.26119 -0.0228289 +-0.244304 -0.258186 0.0138536 +-0.238049 -0.253808 -0.053252 +-0.278468 -0.245353 0.0237178 +-0.250374 -0.233381 -0.0762153 +-0.317786 -0.266287 -0.0397057 +-0.29694 -0.227134 0.00135872 +-0.28761 -0.282597 -0.0302299 +-0.0768305 -0.203891 0.202176 +-0.107975 -0.220055 0.202264 +-0.134773 -0.20066 0.190676 +-0.13214 -0.167949 0.192848 +-0.157713 -0.187173 0.17141 +-0.0792541 -0.17391 0.197354 +-0.103166 -0.157466 0.196315 +-0.0861693 -0.139966 0.183699 +-0.0642112 -0.126048 0.16286 +-0.0525585 -0.0978366 0.139755 +0.124762 -0.0100876 0.132612 +0.0801162 0.0231847 0.117816 +0.0903158 0.0691509 0.0824377 +0.111706 0.138719 0.113497 +0.109897 0.0476799 0.0291314 +0.0568194 0.0789592 0.018431 +0.166721 0.186565 0.0672199 +0.252858 0.160254 0.0700128 +0.103948 0.0891733 -0.0142249 +0.151331 0.103958 0.00831307 +0.156258 0.148984 0.0332697 +0.195526 0.176469 0.0301312 +0.246249 0.159404 0.0147221 +0.272985 0.107792 0.0403664 +0.220496 0.208803 0.0718273 +0.172006 0.242405 0.105809 +0.284857 0.213191 0.163319 +0.220004 0.262975 0.168971 +0.243752 0.187223 0.124992 +0.303317 0.156118 0.132187 +0.124557 0.160014 0.070217 +0.145476 0.178627 0.113721 +0.143822 0.145597 0.146983 +0.199699 0.112576 0.148784 +0.221259 0.0552492 0.134196 +0.124553 0.109697 0.139987 +0.100062 0.0751807 0.125633 +0.107686 0.0453443 0.15701 +0.152453 0.0251604 0.154394 +0.160741 0.1045 0.158385 +0.183054 0.0708926 0.1447 +0.188656 0.0314673 0.13741 +0.286002 0.0789154 0.0896861 +0.044874 0.0868553 -0.0397086 +0.0292084 0.0351428 -0.0773123 +-0.00652383 0.0868322 -0.0563984 +0.153395 -0.330946 0.00521793 +0.165687 0.227811 0.159326 +0.176713 -0.253714 -0.180764 +0.276141 0.126578 0.0974557 +-0.0329659 -0.0648403 -0.0508016 +-0.022748 -0.0460692 -0.0136176 +-0.0397109 -0.0394184 0.0195973 +0.00993129 -0.0278328 -0.0155697 +0.0270531 -0.00832198 0.0106523 +0.0103826 0.00500549 0.0538795 +0.0666135 0.0125544 0.0261568 +0.103369 0.00889595 0.155654 +0.11659 -0.0298082 0.170544 +0.153029 -0.0696813 0.168481 +0.113461 -0.0186162 0.216944 +0.10035 -0.0580327 0.251516 +0.150235 -0.084971 0.233939 +0.0675669 -0.0946043 0.253879 +0.0719166 -0.0391569 0.214813 +0.10687 -0.103697 0.22877 +0.136543 -0.144876 0.235107 +0.1197 -0.0491892 0.122959 +0.148505 -0.0696344 0.112799 +0.152678 -0.114026 0.101195 +0.181641 -0.136376 0.0700095 +0.219377 -0.0856118 0.124697 +0.177363 -0.0676828 0.147605 +0.177944 -0.101552 0.169756 +0.213844 -0.114113 0.199683 +0.250347 -0.109904 0.165803 +0.259893 -0.130195 0.122038 +0.180633 -0.0723966 0.203599 +0.114076 -0.0955963 0.272717 +0.201886 -0.0333539 0.161782 +0.240288 -0.0485439 0.141813 +0.261312 -0.0227503 0.104643 +0.273982 -0.0593402 0.119899 +0.280362 -0.074792 0.0701015 +0.238595 0.0177583 0.0951404 +0.14643 -0.0478943 0.212489 +-0.227331 -0.265687 0.0979085 +-0.244646 -0.230401 0.0887962 +-0.293688 -0.268968 -0.164669 +-0.297979 -0.308788 -0.162348 +-0.312868 -0.346598 -0.144794 +-0.344082 -0.367401 -0.192127 +-0.317302 -0.337357 -0.184462 +-0.280828 -0.350074 -0.123607 +0.105148 0.105807 0.112878 +0.112708 0.122082 0.0774818 +0.133565 0.128779 0.0503619 +-0.153371 -0.370618 0.0324641 +0.254239 -0.0926281 0.0998171 +-0.0128437 0.0136567 0.10826 +0.0175667 0.0217155 0.0871281 +0.0477136 0.0340255 0.104217 +0.0750182 0.0489044 0.100742 +0.0776037 0.0433948 0.0700673 +0.0973389 0.0603657 0.0539823 +0.0861821 0.0686274 0.0252903 +0.0735784 0.0589072 -0.0094551 +0.0829016 0.102631 0.0164944 +0.0811061 0.0911963 0.0569078 +0.0940457 0.0476479 0.121838 +0.105428 0.0231317 0.131003 +0.0916425 -0.00738665 0.126455 +0.0604145 5.34629e-05 0.128347 +0.10359 0.0595398 0.00049955 +0.144344 0.0457444 0.00327488 +0.122523 0.0419513 -0.0300499 +0.11811 0.0162342 -0.0830375 +0.170091 0.0155571 -0.145681 +0.138389 0.0626357 -0.0743287 +0.165069 0.0235027 -0.0532363 +0.177768 0.0409007 -0.100742 +0.136707 0.0380317 -0.122381 +0.124141 0.00775387 -0.157586 +0.154959 -0.000810753 -0.105169 +0.105591 0.0562623 -0.100272 +0.0594242 0.0548004 -0.106957 +0.201162 -0.0168583 -0.120783 +0.0976411 0.0972697 0.0801317 +0.0943337 0.0848541 0.102457 +0.0890479 0.0650811 0.109825 +0.0389773 0.0745551 -0.0779593 +0.0138551 0.0593589 -0.108474 +0.0773146 0.0765993 -0.0629692 +0.118409 0.00125651 -0.11931 +0.14578 -0.0101392 -0.137264 +0.178622 -0.0192175 -0.148664 +0.15461 0.0388676 -0.0266866 +0.193622 0.0322602 -0.0272748 +0.1942 0.050466 -0.0642106 +0.173634 0.0303747 -0.00069076 +0.179101 -0.0110744 -0.00523936 +0.230507 0.0422098 -0.0173425 +0.202418 0.070871 -0.0135348 +0.22302 0.0184239 -0.0441485 +0.215157 -0.0248187 0.00288885 +0.233855 -0.00344678 0.0259658 +0.238719 0.033163 0.0205233 +0.25481 0.0672767 0.0179763 +0.222129 -0.0581209 -0.00731524 +0.227145 -0.0819987 0.0145053 +0.219253 -0.118982 0.0109807 +0.211654 -0.158762 -0.0192499 +0.210611 -0.101269 0.0490966 +0.200451 -0.190104 0.0116714 +0.203938 -0.0712158 -0.0282028 +0.173774 -0.0735362 -0.0475631 +0.2027 -0.10102 -0.0400541 +0.212795 -0.129107 -0.0298945 +0.206091 -0.151217 -0.0455168 +0.202467 -0.150775 -0.0745887 +0.209378 -0.187531 -0.0743719 +0.181149 -0.126003 -0.0892617 +0.205972 -0.177843 -0.0383337 +0.188301 -0.142819 -0.114464 +0.208779 -0.164491 -0.140437 +0.171227 -0.151151 -0.147387 +0.136617 -0.138704 -0.143839 +0.131975 -0.166643 -0.169617 +0.128263 -0.113939 -0.11894 +0.116875 -0.0858965 -0.091059 +0.0786764 -0.0829677 -0.090746 +0.187859 -0.214057 -0.0686071 +0.175679 -0.237132 -0.0957975 +0.178163 -0.10588 -0.0665832 +0.269129 0.0763722 0.0451229 +0.27889 0.058723 0.0679827 +0.267652 0.0453551 0.105512 +0.2613 0.0363273 0.0775663 +0.250278 0.0199214 0.0566543 +0.250269 0.00638094 0.0769677 +0.262967 -0.0160504 0.0796628 +0.285344 -0.0433845 0.0872574 +0.210073 -0.0746435 0.0657137 +0.221889 -0.0775407 0.0410909 +0.302572 -0.0710887 0.0949218 +0.21774 0.0486965 -0.0445342 +0.224846 0.0339602 -0.0740774 +0.244042 0.0044793 -0.10874 +0.254336 0.102378 0.0100739 +0.220262 0.108437 -0.00385435 +0.184431 0.103867 -0.0063665 +0.227766 0.138272 0.00117268 +0.21603 0.168687 0.00560537 +0.214962 0.252952 4.36931e-05 +0.24674 0.211475 0.00674743 +0.208103 0.206716 0.00898043 +0.198252 0.239152 0.0425261 +0.241235 0.183275 -0.00372162 +0.24846 0.187657 0.0253371 +0.236173 0.217937 0.0406376 +0.208251 0.202717 0.0430183 +0.190765 0.204953 0.0676283 +0.199822 0.228771 0.0907818 +0.212055 0.262964 0.121847 +0.167888 0.20936 0.0941323 +0.230768 0.216285 0.106419 +0.226441 0.220307 0.1523 +0.160904 0.217518 0.126833 +0.151535 0.251202 0.133586 +0.158786 0.306935 0.0984538 +0.193903 0.396086 0.195106 +0.119767 0.364922 0.154966 +0.158434 0.284691 0.125614 +0.188265 0.327264 0.175224 +0.139712 0.323472 0.144742 +0.247398 0.226772 0.208026 +0.162628 0.357991 0.158091 +0.132463 0.334186 0.215838 +0.184892 0.418747 0.128073 +0.148158 0.405567 0.1589 +0.116952 0.392105 0.208798 +0.128904 0.307582 0.18276 +0.173163 0.280669 0.197839 +0.237808 0.190239 0.0542196 +0.242415 0.187695 0.0885314 +0.257589 0.159811 0.105872 +0.25799 0.149475 0.1552 +0.249199 0.167605 0.0439231 +0.270589 0.141138 0.0478035 +0.291007 0.120776 0.0668204 +0.27986 0.0943457 0.0648346 +0.262028 0.128688 0.0220064 +0.283888 0.104244 0.08796 +0.278117 0.09277 0.114653 +0.296211 0.119268 0.134225 +0.25745 0.0686993 0.129638 +0.231499 0.0874258 0.144645 +0.23624 0.121986 0.150481 +0.21822 0.158716 0.152133 +0.276736 0.0681718 0.110294 +0.286087 0.0545245 0.0921962 +0.114064 0.342002 0.184102 +0.184346 0.361594 0.187357 +0.161147 0.378013 0.229421 +0.186402 0.32651 0.232026 +0.224199 0.278314 0.231623 +0.178684 0.387524 0.165454 +0.207571 0.416517 0.162223 +0.115261 0.360345 0.210089 +0.111327 0.375408 0.183082 +0.123148 0.405595 0.17979 +0.161317 0.441861 0.200022 +0.134075 0.42215 0.208124 +0.166581 0.413272 0.221996 +0.184888 0.467555 0.155941 +0.139501 0.435526 0.173911 +0.158717 0.435906 0.144337 +0.167498 0.45215 0.103084 +0.137763 0.359978 0.22921 +0.165611 0.348074 0.227085 +0.15984 0.318857 0.217125 +0.185554 0.304169 0.211919 +0.205103 0.278784 0.204981 +0.244841 0.279219 0.196675 +0.226891 0.25345 0.209087 +0.216714 0.31142 0.225032 +0.18164 0.33693 0.20427 +0.203702 0.303717 0.18726 +0.193627 0.296232 0.146589 +0.191637 0.257284 0.18429 +0.157803 0.257523 0.177293 +0.175634 0.311565 0.125155 +0.161107 0.457828 0.173386 +0.194169 0.447882 0.185268 +0.194408 0.477711 0.118315 +0.219599 0.449898 0.13857 +0.135294 0.387364 0.228733 +0.145147 0.282789 0.187345 +0.143956 0.303159 0.203618 +0.177446 0.366384 0.212315 +0.179329 0.391491 0.217312 +0.18672 0.412483 0.210145 +0.202606 0.421792 0.189409 +0.174085 0.42914 0.210627 +0.153641 0.426813 0.21312 +0.144424 0.408706 0.223131 +0.190464 0.428693 0.201747 +0.178837 0.441581 0.19921 +0.169704 0.452082 0.187978 +0.180705 0.459908 0.173619 +0.202088 0.458198 0.166952 +0.151672 0.449754 0.186725 +0.142475 0.436806 0.198199 +0.127991 0.425256 0.188222 +0.210178 0.437176 0.172385 +0.119636 0.410278 0.199562 +0.206557 0.46857 0.145869 +0.215386 0.468035 0.123827 +0.207969 0.436894 0.106764 +0.212477 0.477963 0.10116 +0.128023 0.4054 0.215288 +0.223073 0.454408 0.0921651 +0.184017 0.321535 0.149004 +0.164058 0.339436 0.133054 +0.141763 0.356765 0.138374 +0.138767 0.331395 0.111494 +0.18387 0.5 0.0894472 +0.178253 0.341112 0.15974 +0.158692 0.397227 0.229447 +0.261987 0.258572 0.22454 +0.209557 0.191204 0.156985 +0.19703 0.220129 0.168363 +0.114158 0.395299 0.191384 +0.237163 0.239354 0.0176536 +0.22873 0.228755 -0.0079498 +0.204237 0.229854 -0.000985107 +0.191898 0.248869 0.0164149 +0.195144 0.299533 0.0501168 +0.211408 0.277777 0.0261684 +0.181525 0.269092 0.042102 +0.232338 -0.0296485 0.018274 +0.220704 0.448894 0.117889 +0.211836 0.430361 0.128709 +0.200007 0.22745 0.0221073 +0.206622 0.221816 0.0395427 +0.223655 0.239447 0.0484776 +0.206846 0.263872 0.061817 +0.192412 0.289403 0.0880222 +0.1998 0.487191 0.0879627 +0.178418 0.478766 0.0726805 +0.171907 0.478 0.098484 +0.179607 0.4432 0.070784 +0.215421 0.44036 0.0572748 +0.206111 0.438517 0.081171 +0.184196 0.432818 0.0953164 +0.172787 0.433405 0.115219 +0.16681 0.454422 0.128591 +0.158037 0.463512 0.080819 +0.300027 -0.106441 0.0798503 +0.301565 -0.138608 0.110073 +0.294284 -0.0698767 0.0795338 +0.293906 -0.0887216 0.0736412 +0.275743 -0.101071 0.0877101 +0.309738 -0.0894098 0.0874741 +0.287014 -0.123527 0.0945964 +0.311125 -0.118131 0.0991123 +0.298899 -0.117613 0.118193 +0.276193 -0.109289 0.135451 +0.270493 -0.137621 0.153632 +0.286312 -0.136798 0.132025 +0.257826 -0.0797919 0.144654 +0.303792 -0.0864306 0.104131 +0.28817 -0.0747287 0.113826 +0.276632 -0.0878111 0.128274 +0.30695 -0.103289 0.107245 +0.287682 -0.0559229 0.10414 +0.272738 -0.0407993 0.108633 +0.253435 -0.0365139 0.124117 +0.295415 -0.0573592 0.0898843 +0.263375 -0.0783235 0.0820667 +-0.216962 -0.20051 0.140681 +-0.236047 -0.180496 0.115013 +-0.230292 -0.136771 0.112494 +-0.247625 -0.159292 0.0914591 +-0.209896 -0.129892 0.141237 +0.222682 0.288177 0.190351 +0.233778 0.296853 0.212089 +0.209365 0.287061 0.167624 +0.208618 0.271128 0.146657 +0.223776 0.247151 0.14266 +0.250594 0.280585 0.221005 +0.215525 0.238928 0.164607 +0.248724 0.243405 0.176599 +0.282927 0.23674 0.194658 +0.253819 0.208937 0.178714 +0.265424 0.184312 0.155732 +0.308614 0.169998 0.183237 +0.273365 0.179729 0.192265 +0.265912 0.204786 0.204674 +0.300509 0.203464 0.194384 +0.281969 0.151677 0.177526 +0.279246 0.127373 0.158699 +0.31079 0.143896 0.162421 +0.30954 0.171009 0.155179 +0.288086 0.1804 0.137744 +0.264265 0.175268 0.132545 +0.241184 0.168571 0.143536 +0.282052 0.162312 0.123541 +0.290218 0.138764 0.11928 +0.232003 0.191432 0.146429 +0.237199 0.211128 0.131059 +0.175486 0.13591 0.157401 +0.244193 0.0453066 0.121153 +0.216838 0.0295154 0.115567 +0.0778181 0.0182774 -0.0959304 +0.132697 0.385267 0.165833 +0.155812 0.38306 0.160495 +-0.00373338 0.0386319 -0.0871428 +0.0052284 0.0508015 -0.0521262 +-0.0272532 0.0521944 -0.0650671 +-0.0417118 0.0760468 -0.0274796 +0.0432101 0.0478592 -0.0430105 +0.0360437 0.064037 -0.0095129 +0.0264403 0.0878588 0.0105855 +0.0200841 0.0963175 -0.0204482 +0.0508265 0.0939603 -0.0091335 +0.0753367 0.087282 -0.0290458 +-0.0114666 0.0989277 -0.0268583 +0.189464 0.426182 0.111762 +-0.04038 -0.0265907 0.0536548 +0.188037 0.19051 0.048384 +0.170897 0.170857 0.0404072 +0.180803 0.154042 0.0195245 +0.168583 0.128396 0.0100026 +0.150344 0.161847 0.0580756 +0.146195 0.173828 0.0846654 +0.123104 0.163389 0.100752 +0.131952 0.158423 0.126057 +0.154039 0.169296 0.137953 +0.163282 0.191526 0.127822 +0.170691 0.206066 0.147249 +0.123979 0.136658 0.135 +0.136161 0.125537 0.148878 +0.153818 0.131557 0.161379 +0.111897 0.12133 0.126074 +0.111889 0.144276 0.0890707 +0.11658 0.140768 0.0690434 +0.119959 0.124948 0.0613596 +0.107779 0.107117 0.0626571 +0.122618 0.115267 0.0466942 +0.127454 0.104238 0.0219653 +0.136258 0.119892 0.0320023 +0.129073 0.0915077 -0.00265103 +0.130797 0.0780035 -0.0369633 +0.10768 0.094992 0.00979378 +0.163926 0.154671 0.152149 +0.0894836 0.0909923 0.00058556 +0.0689505 0.0963924 0.00171312 +0.0612997 0.100634 0.0224348 +0.0675451 0.0846698 0.038694 +0.0795109 0.103357 0.0384133 +0.0848094 0.0754581 0.0444653 +0.110567 0.10366 0.130086 +0.12281 0.0864143 0.139975 +0.117855 0.062854 0.143513 +0.13666 0.0472165 0.155281 +0.128164 0.0235742 0.176647 +0.163067 0.0498951 0.143567 +0.143932 0.0949004 0.145284 +0.179917 0.317727 0.0742859 +0.183725 0.275085 0.0676723 +0.16838 0.29297 0.0787056 +0.0930951 0.102542 0.05002 +0.100339 0.0681106 0.0373411 +0.102886 0.0622715 0.0197467 +0.121511 0.0540863 0.0117598 +0.124719 0.0242285 0.0166428 +0.0967861 -0.00310471 -0.0020113 +0.12138 0.0519179 -0.0102922 +0.0990646 0.0492208 -0.022422 +0.0873807 -0.0275369 -0.03209 +0.200694 -0.191636 -0.0546067 +0.206298 -0.170055 -0.0598788 +0.209964 -0.168421 -0.0791806 +0.221182 -0.183261 -0.0963771 +0.222775 -0.172837 -0.120159 +0.235715 -0.195921 -0.115182 +0.253933 -0.218526 -0.134037 +0.311213 -0.253911 -0.191866 +0.279294 -0.244732 -0.16099 +0.266185 -0.201338 -0.169529 +0.285572 -0.216415 -0.213382 +0.273765 -0.285731 -0.187819 +0.259679 -0.265381 -0.248632 +0.24894 -0.227823 -0.231771 +0.232153 -0.25966 -0.225227 +0.254118 -0.290735 -0.220386 +0.336364 -0.328047 -0.241676 +0.281317 -0.319577 -0.26697 +0.295033 -0.317038 -0.218433 +0.327766 -0.263669 -0.27537 +0.320681 -0.238904 -0.235706 +0.333487 -0.28367 -0.222752 +0.25789 -0.299076 -0.25318 +0.280382 -0.278404 -0.287734 +0.262726 -0.334272 -0.234674 +0.315714 -0.303377 -0.28762 +0.358898 -0.298323 -0.270079 +0.292961 -0.250812 -0.263064 +0.260427 0.269097 0.206442 +0.273912 0.251948 0.207483 +0.274266 0.226866 0.218876 +0.254508 0.262332 0.186312 +0.268737 0.247011 0.182676 +0.278883 0.230014 0.174886 +0.292676 0.216891 0.181537 +0.301666 0.196568 0.170643 +0.235991 0.25839 0.179999 +0.216996 0.262302 0.191107 +0.233602 0.240223 0.192553 +0.26623 0.217767 0.166603 +0.291208 0.219735 0.206357 +0.285626 0.200003 0.208179 +0.295054 0.181857 0.198439 +-0.119559 -0.0454446 0.130205 +-0.148541 -0.0288065 0.124554 +-0.122421 -0.0280036 0.104512 +-0.169628 -0.0428483 0.136658 +-0.192691 -0.0700149 0.138018 +-0.165949 -0.0805689 0.151606 +-0.157867 -0.111652 0.162619 +-0.182289 -0.134815 0.160033 +-0.171616 -0.0265274 0.119564 +-0.182821 -0.0294707 0.089096 +-0.207158 -0.0941133 0.130893 +-0.0813687 -0.408143 0.0168626 +-0.0493082 -0.255289 0.183439 +-0.0417823 -0.281988 0.16825 +-0.0232624 -0.242141 -0.150317 +0.237084 0.148575 0.150278 +0.21825 0.135883 0.152701 +0.196547 0.147262 0.152063 +0.248839 0.134889 0.149793 +0.25417 0.116897 0.146677 +0.154738 -0.248351 -0.113516 +0.149894 -0.252291 -0.14374 +0.127807 -0.247316 -0.112579 +0.100037 -0.239188 -0.118127 +0.171952 -0.258325 -0.155783 +0.206243 -0.267544 -0.164319 +0.152779 -0.244265 -0.170212 +0.238869 -0.271194 -0.164355 +0.19948 -0.240785 -0.114164 +0.228533 -0.228656 -0.117975 +0.0806348 -0.448964 -0.0364622 +0.092817 -0.46403 -0.0236687 +0.131465 -0.464547 -0.0186627 +0.111576 -0.45856 -0.0162136 +0.12236 -0.437795 -0.0167687 +0.116113 -0.473014 -0.0333379 +0.141834 -0.466374 -0.0462667 +0.15629 -0.45187 -0.0265272 +0.162053 -0.430562 -0.0436087 +0.170805 -0.433786 -0.074571 +0.150694 -0.440322 -0.089161 +0.142403 -0.453672 -0.0687084 +0.20922 0.0225383 -0.118012 +0.245897 0.00269769 -0.0710137 +-0.0868896 -0.445579 -0.0827631 +-0.0899978 -0.418668 -0.0662628 +-0.0919895 -0.382051 -0.0731611 +-0.286076 -0.18977 0.00251657 +0.166397 -0.235956 -0.0665238 +0.18289 -0.231659 -0.0402536 +0.183601 -0.256036 -0.0114407 +0.19304 -0.222737 -0.0114233 +0.168396 -0.264129 0.0198747 +0.175145 -0.292863 -0.0261367 +0.159612 -0.311932 -0.0502102 +0.151795 -0.349231 -0.058414 +0.168467 0.120276 0.165442 +0.179322 0.109989 0.151163 +0.191745 0.091503 0.1476 +0.207409 0.0731218 0.143583 +0.170472 0.088013 0.148441 +0.198308 0.0526608 0.137187 +-0.288444 -0.322548 -0.196751 +-0.258254 -0.336596 -0.201797 +-0.260706 -0.370334 -0.191889 +-0.262012 -0.38355 -0.234182 +0.169409 0.331718 0.106522 +-0.0883279 -0.427369 -0.00320489 +-0.0757242 -0.410706 -0.00350047 +-0.0694098 -0.396348 -0.0215868 +-0.339105 -0.28249 -0.133907 +0.14338 -0.190029 -0.185968 +0.113197 -0.189729 -0.178573 +0.161752 -0.208101 -0.1989 +0.163143 -0.233988 -0.192556 +0.187542 -0.24244 -0.20457 +0.214342 -0.231174 -0.221761 +0.200695 -0.263551 -0.191549 +0.0888974 -0.174918 -0.165344 +0.0728578 -0.155488 -0.148655 +0.0857975 -0.13271 -0.133069 +0.0496654 -0.153477 -0.133288 +0.208417 -0.252602 -0.211864 +0.214499 -0.20684 -0.209109 +0.212326 -0.182246 -0.176825 +0.196622 -0.193456 -0.194925 +-0.0366034 0.0848157 -0.0747335 +-0.0106036 0.0767347 -0.0825468 +-0.248014 -0.143811 -0.0711582 +0.156176 -0.353723 -0.00967102 +0.161881 -0.35946 -0.0354879 +0.154192 -0.374021 -0.054565 +0.153835 -0.401954 -0.0551512 +0.147106 -0.376782 -0.0111704 +0.141013 -0.401853 -0.0175381 +0.127378 -0.38782 -0.00428773 +0.152558 -0.410563 -0.0345712 +0.144573 -0.387551 -0.0699167 +0.129797 -0.395951 -0.0860393 +0.110844 -0.383365 -0.0877166 +0.111358 -0.362136 -0.0828181 +0.10863 -0.332992 -0.0757964 +0.131091 -0.348484 -0.0736181 +0.114528 -0.372564 0.00601769 +0.116893 -0.350867 0.0177725 +0.143657 -0.369483 -0.0686154 +0.0433039 -0.239647 0.0998892 +-0.318832 -0.357055 -0.211401 +-0.299837 -0.377374 -0.238049 +-0.340344 -0.383626 -0.224893 +-0.356366 -0.419986 -0.188103 +-0.285529 -0.404192 -0.228972 +-0.356375 -0.393121 -0.201407 +-0.349321 -0.392013 -0.165399 +-0.328811 -0.42272 -0.163607 +-0.345548 -0.417553 -0.216974 +-0.322795 -0.427865 -0.195551 +-0.33518 -0.363207 -0.161311 +-0.0812327 -0.396788 0.0342935 +-0.065289 -0.38943 0.0224745 +-0.0508718 -0.371639 0.0298172 +-0.260668 -0.216401 0.0653687 +-0.2704 -0.185201 0.0538295 +0.187032 0.486356 0.0996338 +0.279593 -0.136382 0.110973 +0.26837 -0.117918 0.105466 +0.248285 -0.109463 0.116456 +0.232397 -0.125931 0.141691 +0.210603 -0.141776 0.171116 +0.137574 -0.108705 0.207737 +0.169921 0.29167 0.0522744 +0.00992085 -0.113945 -0.0964453 +0.258261 -0.257702 -0.154872 +0.275321 -0.267702 -0.17038 +0.295633 -0.272896 -0.184932 +0.295815 -0.294739 -0.20199 +0.314713 -0.27743 -0.201437 +0.327332 -0.256197 -0.214678 +0.340385 -0.261017 -0.241446 +0.313356 -0.232789 -0.209684 +0.296344 -0.226073 -0.182212 +0.31592 -0.301772 -0.216769 +0.318635 -0.326842 -0.222796 +0.307178 -0.325937 -0.251416 +0.274745 -0.303144 -0.21295 +0.263287 -0.308346 -0.232527 +0.255382 -0.319889 -0.248754 +0.332002 -0.310475 -0.229091 +0.353636 -0.307458 -0.245121 +0.335859 -0.313851 -0.265914 +0.340499 -0.300896 -0.286697 +0.344989 -0.280039 -0.276203 +0.327449 -0.28026 -0.295194 +0.304942 -0.268737 -0.28762 +0.34983 -0.283684 -0.251927 +0.343136 -0.265469 -0.261534 +0.326713 -0.248963 -0.256716 +0.307917 -0.24034 -0.252462 +0.279159 -0.231625 -0.241522 +0.300353 -0.229376 -0.234338 +0.311358 -0.251222 -0.26759 +0.299024 -0.289572 -0.301481 +0.279907 -0.305571 -0.290358 +0.263002 -0.29286 -0.276914 +0.260616 -0.313748 -0.268771 +0.275922 -0.322371 -0.224156 +0.284975 -0.33259 -0.244221 +0.303023 -0.336946 -0.233483 +0.289605 -0.333838 -0.221905 +0.166435 0.39886 0.154509 +0.189152 0.404825 0.153461 +0.197133 0.400723 0.1737 +0.17424 0.413608 0.143911 +0.169142 0.426834 0.132439 +0.188725 0.386035 0.180698 +0.186219 0.378081 0.198788 +-0.267025 -0.372115 -0.138391 +-0.248022 -0.367522 -0.158602 +0.174505 0.292586 0.0990952 +0.186251 0.309263 0.0928235 +0.181697 0.30513 0.109614 +0.189499 0.279776 0.119317 +0.172647 0.294457 0.120787 +0.158057 0.303956 0.130265 +0.143476 0.291331 0.139139 +0.131312 0.30031 0.159002 +0.186095 0.298863 0.131041 +0.198975 0.28677 0.132576 +0.172236 0.277192 0.117866 +0.184313 0.260452 0.109718 +0.15755 0.265746 0.122578 +0.145983 0.269471 0.137935 +0.151234 0.256355 0.155644 +0.124293 0.323596 0.164277 +0.126678 0.342635 0.150186 +0.129524 0.341544 0.128525 +0.146576 0.349856 0.118779 +0.192269 0.30374 0.0759625 +0.202728 0.285813 0.0690781 +0.210479 0.281567 0.0483558 +0.222196 0.26209 0.0407369 +0.224073 0.261141 0.0186008 +0.162756 0.306191 0.114529 +0.149682 0.318744 0.121136 +0.152677 0.341974 0.100993 +0.164071 0.331208 0.0841361 +0.146523 0.323278 0.093798 +0.15695 0.312461 0.0714443 +0.22266 -0.203518 -0.100877 +0.262076 -0.292278 -0.202356 +0.249754 -0.28212 -0.183581 +0.242451 -0.284733 -0.203885 +0.229725 -0.273053 -0.211906 +0.243386 -0.275428 -0.225419 +0.255999 -0.283472 -0.239546 +-0.261873 -0.405224 -0.222848 +-0.280772 -0.420055 -0.201182 +-0.274389 -0.414773 -0.173401 +-0.298626 -0.411672 -0.158377 +-0.28738 -0.389898 -0.148508 +-0.300008 -0.369107 -0.135836 +-0.257381 -0.39915 -0.185758 +-0.257531 -0.421709 -0.186727 +-0.319983 -0.369357 -0.146016 +-0.25404 -0.39271 -0.206532 +-0.269186 -0.375948 -0.213104 +0.171129 0.312683 0.0555484 +0.186538 0.309469 0.0612947 +0.17697 0.322584 0.0897939 +0.180094 0.317456 0.102692 +0.0389455 -0.294719 0.0707663 +0.19085 0.129482 0.148059 +0.26893 -0.330546 -0.250405 +0.261495 -0.324416 -0.260179 +0.163955 0.0845671 -0.00775852 +0.172992 0.467003 0.114773 +0.17962 0.47069 0.135115 +0.167392 0.460661 0.148013 +0.0927702 -0.0102964 0.178794 +0.0791092 -0.00358862 0.211868 +0.0484002 -0.0727004 0.143042 +0.0857054 -0.0664246 0.132462 +0.170606 0.462905 0.162683 +0.107346 -0.291576 0.0507084 +0.123054 -0.26548 0.0555752 +0.1033 -0.273351 0.0618915 +-0.217347 -0.0684085 0.0793768 +-0.232534 -0.1003 0.0785864 +0.160705 0.203815 0.112095 +0.157448 0.189802 0.0951937 +0.163855 0.222961 0.107992 +0.178039 0.226994 0.0939715 +0.157779 0.236558 0.121407 +0.156862 0.233096 0.141593 +0.254115 0.147478 0.0328869 +0.246739 0.139758 0.0163119 +-0.313249 -0.26088 -0.138114 +-0.319034 -0.272336 -0.0954566 +-0.312031 -0.286413 -0.151154 +-0.318615 -0.301412 -0.127758 +-0.31358 -0.30952 -0.0911544 +-0.342054 -0.297563 -0.104135 +-0.285707 -0.289103 -0.098473 +-0.332554 -0.290038 -0.0650158 +0.224391 0.444149 0.0748945 +0.224127 0.466497 0.0733316 +0.00933378 -0.0890982 -0.073455 +-0.196836 -0.0544369 -0.0547609 +-0.268852 -0.35939 -0.204575 +-0.134821 -0.144762 0.184037 +-0.134018 -0.119846 0.172991 +-0.108849 -0.110436 0.169417 +-0.142893 -0.258813 -0.176858 +0.163435 0.422628 0.144619 +0.149105 0.425301 0.157986 +0.151653 0.445126 0.160854 +0.205634 0.453218 0.0682861 +0.196116 0.437078 0.0613117 +0.305429 0.136514 0.131635 +0.304223 0.128705 0.150462 +0.294739 0.1352 0.16485 +0.29983 0.148475 0.176204 +0.293633 0.16134 0.186506 +0.312816 0.146868 0.144611 +0.290574 0.119539 0.149687 +0.280449 0.10933 0.137413 +0.285959 0.112117 0.117297 +0.154398 0.116961 0.162863 +0.147042 0.108372 0.152274 +0.179394 0.214392 0.162515 +0.185651 0.194518 0.157404 +0.180628 0.232354 0.173507 +0.198969 0.238329 0.174545 +0.207694 0.253512 0.177641 +0.203869 0.264161 0.186147 +0.189501 0.273156 0.193533 +0.17312 0.263127 0.188581 +-0.206119 -0.0619918 0.116346 +-0.201545 -0.0465532 0.095691 +0.256266 0.152102 0.0503785 +0.264034 0.143148 0.0672501 +0.26342 0.152022 0.0867622 +0.269601 0.144159 0.103885 +0.281713 0.137095 0.0629023 +0.296165 0.127981 0.0376256 +0.300117 0.13462 0.0559043 +0.287642 0.140563 0.0456708 +0.278661 0.132147 0.0309413 +0.271646 0.118273 0.028754 +0.262921 0.1025 0.0261376 +0.261118 0.0855637 0.0169037 +0.25422 0.0767023 0.000233527 +0.237362 0.0575218 0.00198963 +0.283388 0.119704 0.0383643 +0.282941 0.112062 0.0540402 +0.249937 0.0937398 -0.00575339 +0.231931 0.0954578 -0.0107377 +0.210437 0.0914748 -0.0140972 +0.239252 0.109782 0.000233887 +0.191402 0.0870306 -0.0134669 +0.184376 0.0704441 -0.0225342 +0.184719 0.0606504 -0.044543 +0.166145 0.0578967 -0.0668264 +0.200251 0.061117 -0.0313226 +0.217304 0.057967 -0.0199728 +0.227686 0.12158 0.00370932 +0.20937 0.123042 0.000300618 +0.244333 0.124524 0.00810813 +0.295429 0.120597 0.0522453 +0.178132 0.0791963 -0.0112798 +0.177197 -0.279627 -0.000252101 +0.173639 -0.299787 -0.00606886 +0.172196 -0.313975 -0.0223573 +0.166117 -0.326159 -0.00858114 +0.168079 -0.321719 -0.0379096 +0.162521 -0.339731 -0.0445028 +0.151373 -0.32895 -0.0576036 +0.312369 -0.105021 0.0899766 +0.306 -0.11652 0.0866674 +0.301418 -0.129182 0.0942967 +0.290875 -0.135236 0.101483 +0.289966 -0.143698 0.1109 +0.295915 -0.13953 0.122573 +0.279108 -0.148197 0.122497 +0.27841 -0.152315 0.142258 +0.265867 -0.157983 0.158785 +0.256687 -0.14661 0.137703 +0.25422 -0.140442 0.172759 +0.232237 -0.161116 0.192798 +0.192807 -0.160413 0.202508 +0.178601 -0.140578 0.237092 +0.154384 -0.117167 0.24831 +0.13004 -0.134226 0.269277 +0.17845 -0.105479 0.223698 +0.247464 -0.158843 0.179106 +0.226891 -0.158442 0.171794 +0.209982 -0.159856 0.187271 +0.217821 -0.141328 0.207646 +0.23745 -0.141109 0.186416 +0.229503 -0.142546 0.156329 +0.214657 -0.125289 0.155947 +0.193847 -0.12199 0.171057 +0.217246 -0.105649 0.140104 +0.198069 -0.0856194 0.142621 +0.193693 -0.14343 0.18682 +0.198045 -0.145975 0.222277 +0.178989 -0.164931 0.225321 +0.158831 -0.146831 0.218292 +0.158889 -0.159611 0.244735 +0.138513 -0.154491 0.257842 +0.156487 -0.13924 0.256434 +-0.290841 -0.208347 -0.00770324 +-0.29533 -0.224009 -0.017137 +-0.30561 -0.24462 -0.0155011 +-0.278365 -0.220452 -0.0277869 +-0.267819 -0.241114 -0.0357093 +-0.286737 -0.259306 -0.0462551 +-0.310093 -0.264404 -0.0203987 +-0.307167 -0.250649 -0.0341839 +-0.307612 -0.281242 -0.0310235 +-0.321036 -0.286281 -0.0471544 +-0.310491 -0.270102 -0.0639157 +-0.311345 -0.301149 -0.0633156 +-0.297683 -0.291436 -0.0450671 +-0.294949 -0.304108 -0.0790095 +-0.285459 -0.27779 -0.0488974 +-0.296472 -0.275126 -0.0168658 +-0.276222 -0.270671 -0.00788631 +-0.246454 -0.248267 -0.0329014 +-0.244456 -0.252303 -0.00937036 +-0.304286 -0.259682 -0.0492577 +-0.294933 -0.27203 -0.0604957 +-0.300998 -0.278796 -0.0743602 +-0.316674 -0.274623 -0.0789273 +-0.337714 -0.280945 -0.0853892 +-0.325825 -0.275251 -0.0655092 +-0.332977 -0.302425 -0.0833069 +-0.293564 -0.290291 -0.0772666 +-0.298024 -0.281309 -0.0905074 +-0.293634 -0.272694 -0.109468 +-0.270428 -0.274072 -0.107657 +-0.256077 -0.253991 -0.120812 +-0.261078 -0.296954 -0.0999473 +-0.2381 -0.297373 -0.0849839 +-0.232752 -0.278906 -0.0645746 +-0.272041 -0.319246 -0.10842 +-0.21032 -0.284441 -0.0448701 +-0.256436 -0.341131 -0.11181 +-0.225098 -0.336223 -0.113241 +-0.200175 -0.288996 -0.0158483 +-0.223009 -0.317757 -0.0905879 +-0.301096 -0.262202 -0.123506 +-0.32405 -0.263071 -0.116908 +-0.292477 -0.257052 -0.14263 +-0.270149 -0.255918 -0.142108 +-0.275486 -0.258003 -0.162669 +-0.259523 -0.2674 -0.178244 +-0.251069 -0.250018 -0.0970302 +-0.24056 -0.260706 -0.172311 +-0.232499 -0.247239 -0.154361 +-0.34182 -0.274562 -0.107339 +-0.294559 -0.307923 -0.0994756 +-0.275844 -0.269552 -0.0355918 +-0.227344 -0.270897 -0.045083 +0.25093 0.170443 0.120028 +0.248384 0.184009 0.106523 +0.235777 0.198062 0.103222 +0.23641 0.211305 0.086191 +0.221152 0.226047 0.0898201 +0.223243 0.24123 0.111495 +0.203883 0.250541 0.105061 +0.226958 0.225862 0.123117 +0.219737 0.240254 0.12789 +0.214138 0.253162 0.132941 +0.232275 0.224561 0.138088 +0.109391 -0.247931 -0.0995264 +0.104952 -0.262437 -0.0820427 +0.080763 -0.274056 -0.0783487 +0.0604155 -0.262392 -0.0950373 +-0.227936 -0.329497 -0.190147 +-0.214125 -0.337031 -0.170051 +0.237261 -0.0846396 0.108485 +0.245187 0.0234669 0.0372413 +0.250061 0.17416 0.133813 +0.259114 0.167602 0.148828 +0.26511 0.166925 0.171546 +0.238618 0.181672 0.138204 +0.229669 0.176644 0.149535 +0.262049 0.187134 0.176237 +0.261795 0.200868 0.165371 +0.276513 0.199318 0.153854 +0.292677 0.199982 0.157209 +0.302715 0.186361 0.157188 +0.308755 0.181779 0.171774 +0.305926 0.190608 0.185482 +0.312423 0.167782 0.169221 +0.31381 0.157653 0.158921 +0.310783 0.154703 0.171639 +0.301108 0.177938 0.144841 +0.293264 0.189309 0.147256 +0.279322 0.188458 0.145304 +0.262483 0.193127 0.192418 +0.274289 0.192768 0.20161 +0.254841 0.206509 0.193978 +0.245154 0.222549 0.189318 +0.253012 0.22552 0.174345 +0.265429 0.23121 0.17081 +-0.253206 -0.236908 -0.0443888 +0.149428 0.386275 0.232451 +0.147867 0.371017 0.232576 +0.152926 0.356705 0.229375 +0.149032 0.338169 0.225131 +0.166114 0.363727 0.223417 +0.172256 0.353426 0.215568 +0.179541 0.338962 0.221969 +0.181625 0.354174 0.201921 +0.186426 0.343494 0.187951 +0.192075 0.328517 0.215563 +0.192453 0.320313 0.195502 +0.17815 0.351274 0.174302 +0.17655 0.370022 0.172318 +0.165276 0.33179 0.225541 +0.00939661 -0.323412 0.0804555 +0.117561 -0.144032 0.250595 +0.120353 -0.125008 0.233582 +0.111251 -0.145731 0.271784 +0.11093 -0.120815 0.285658 +0.0754192 -0.0921393 0.301481 +0.0769558 -0.124739 0.290267 +0.0748528 -0.117401 0.265004 +0.0426218 -0.103655 0.282975 +0.0504123 -0.0659143 0.287583 +0.0836935 -0.0669285 0.279976 +0.0588543 -0.11803 0.279938 +0.0586609 -0.105277 0.297458 +0.0557269 -0.0839063 0.29826 +0.0381914 -0.083198 0.286361 +0.0371995 -0.0680895 0.266535 +0.047335 -0.0888232 0.265922 +0.05563 -0.0732275 0.247968 +0.0616189 -0.0543441 0.232231 +0.0811821 -0.0784737 0.231059 +0.0764784 -0.0353683 0.254905 +0.0689625 -0.0703705 0.29266 +0.0661415 -0.0548095 0.278244 +0.0608765 -0.028919 0.235586 +0.087271 -0.018263 0.234864 +0.0756435 -0.10953 0.298971 +0.0951645 -0.0988538 0.288259 +0.0930654 -0.116235 0.295574 +0.0947803 -0.133863 0.284699 +0.0966033 -0.0830131 0.273711 +0.113798 -0.076403 0.258582 +0.127442 -0.0600385 0.234949 +0.132794 -0.0953943 0.252522 +0.0489111 -0.0556973 0.272686 +0.0606107 -0.0431898 0.263976 +0.0971312 -0.036293 0.245012 +0.110687 -0.0488392 0.23675 +0.126176 -0.0414728 0.221378 +0.136057 -0.0243951 0.201716 +0.122078 0.00127519 0.196707 +0.142291 0.00027007 0.178375 +0.0664164 -0.0191578 0.217877 +0.0802696 -0.0234954 0.199319 +0.0910082 -0.0454502 0.20083 +0.0798776 -0.132726 0.273919 +0.102454 0.00166634 0.210465 +0.0802091 -0.00534582 0.192641 +0.0863635 0.00814252 0.179895 +0.0946306 0.0282399 0.168655 +0.0981336 0.029523 0.148764 +0.101777 0.0395859 0.135111 +0.102082 0.0581642 0.134881 +0.0956437 0.0321468 0.122829 +0.0938658 0.0161985 0.122282 +0.107901 0.00369122 0.128399 +0.078491 0.00576055 0.124425 +0.0841199 0.0382034 0.11313 +0.0659972 0.0331947 0.109714 +0.0520056 0.0196069 0.12098 +0.108345 -0.0142416 0.126349 +0.0915975 -0.0313276 0.129913 +0.122833 -0.0287943 0.124051 +0.142658 -0.0228961 0.131632 +0.132595 -0.0194368 0.150249 +0.060233 0.0422739 0.0970401 +0.0469107 0.0353785 0.0851224 +0.0330985 0.0252247 0.0760721 +0.0344131 0.0145341 0.0525338 +0.0185411 0.0141735 0.0691085 +-0.00651953 0.00766464 0.081092 +0.0314926 0.0314677 0.0951056 +0.0155266 0.0258059 0.107793 +0.11957 0.0050674 0.144577 +0.11348 -0.010764 0.15919 +0.0864989 0.00930931 0.196192 +0.112679 0.0343949 0.172228 +0.110056 0.0172326 0.144505 +-0.231861 -0.256194 -0.0373807 +-0.233847 -0.249852 -0.0220477 +-0.230235 -0.258784 -0.00973726 +-0.217151 -0.280061 0.00814621 +-0.228026 -0.273051 0.0389012 +-0.222798 -0.271648 -0.00409819 +-0.229682 -0.268052 0.0118625 +-0.212876 -0.279385 -0.0140325 +-0.214439 -0.277583 -0.0303969 +-0.199886 -0.285356 -0.0320197 +-0.187179 -0.295224 -0.0255156 +-0.167219 -0.315028 -0.0304058 +-0.156845 -0.302235 -0.0544314 +-0.236758 -0.254924 0.00227314 +0.0884351 -0.404348 -0.0195924 +0.0722252 -0.268984 0.0670772 +0.070147 -0.245252 0.0862941 +0.0966471 -0.229612 0.0882203 +0.0926053 -0.203806 0.103764 +0.0777673 -0.186021 0.118999 +0.0417862 -0.182948 0.126604 +0.0709209 -0.158179 0.128709 +0.095465 -0.128791 0.124296 +0.0102764 -0.16375 0.133447 +-0.0233099 -0.171526 0.153541 +-0.0499934 -0.0465621 -0.00582837 +-0.0749973 -0.0355191 0.0101971 +-0.0645299 -0.324704 -0.077104 +0.221779 0.470802 0.0892895 +0.219761 0.464582 0.1032 +0.246597 0.0246927 0.0795416 +0.253586 0.0320272 0.0977802 +0.252394 0.0305168 0.0670227 +0.261064 0.0424817 0.0637394 +0.267205 0.0556508 0.058182 +0.262106 0.0615289 0.0436471 +0.250683 0.0500973 0.0298185 +0.272972 0.0454164 0.0731281 +0.274554 0.0385023 0.090004 +0.285852 0.0505507 0.0780368 +0.287544 0.066644 0.0791877 +0.280213 0.0764884 0.0661465 +0.226162 0.0537579 -0.00800313 +0.231726 0.0372941 0.00212281 +0.226833 0.070796 -0.0125112 +-0.0228881 0.0822405 -0.0141151 +-0.0164496 0.062439 -0.0353807 +-0.0311204 0.09353 -0.0291259 +-0.0468617 0.0890411 -0.0503417 +-0.0192694 0.0958145 -0.0445491 +-0.0451838 0.0631149 -0.0497516 +-0.0349277 0.0970377 -0.0439657 +-0.0281121 0.0908295 -0.0597278 +-0.0422149 0.0875756 -0.0360098 +-0.0493018 0.0748281 -0.0407497 +-0.0508974 0.0756362 -0.0555946 +-0.045787 0.0616401 -0.0714534 +-0.0463878 0.0860458 -0.0643425 +-0.0469 0.0754389 -0.0734442 +-0.0361876 0.0721397 -0.0877453 +-0.0344753 0.0506229 -0.0835042 +-0.0209274 0.0429352 -0.0951495 +-0.00835098 0.0548898 -0.109767 +-0.0439408 0.0675081 -0.0809412 +-0.0384794 0.0604865 -0.0888934 +-0.0325578 0.0529818 -0.0938199 +-0.0250287 0.0507859 -0.100857 +-0.0171358 0.0586173 -0.103485 +-0.00108771 0.0669554 -0.09638 +0.0141047 0.0764389 -0.0789872 +-0.0166767 0.0687863 -0.0931008 +-0.0154196 0.0443974 -0.106822 +0.00804033 0.0334573 -0.118139 +-0.00353356 0.0420783 -0.115203 +0.00267945 0.0333406 -0.10199 +0.0284162 0.0260832 -0.102463 +0.0140719 0.0342408 -0.0876383 +0.01206 0.042083 -0.0690778 +0.0262722 0.0834922 -0.057317 +0.052314 0.0257381 -0.0888721 +0.0550064 0.0153199 -0.121681 +0.0742668 0.0307726 -0.0684202 +0.0254542 0.0462258 -0.0537161 +0.0192751 0.0579365 -0.0299961 +0.043388 0.0389601 -0.0621497 +0.0632571 0.0407552 -0.0511604 +0.0628168 0.0511918 -0.0295138 +-0.00769957 0.0468719 -0.0674097 +0.0356439 0.036944 -0.129564 +0.00985644 0.0486694 -0.11871 +0.0293481 0.0500299 -0.116265 +0.034304 0.0639803 -0.0982281 +0.0203799 0.0394103 -0.126099 +0.0274107 0.0238815 -0.120304 +-0.00989932 0.038173 -0.0977698 +0.0409915 0.0204434 -0.130582 +0.0603476 0.0361414 -0.135064 +0.0745924 0.0111822 -0.144256 +0.0995383 0.0164619 -0.152082 +0.079494 0.0098491 -0.119596 +0.109969 -0.00178903 -0.14121 +0.128369 -0.00667529 -0.145234 +0.147176 -0.000628591 -0.159936 +0.143478 0.0207956 -0.143584 +0.15945 -0.0140125 -0.151421 +0.167046 -0.013357 -0.130058 +0.175024 -0.000463673 -0.161193 +0.200548 0.00730904 -0.144289 +0.228188 0.00606999 -0.13371 +0.232374 -0.0225206 -0.12062 +0.217352 -0.0205681 -0.149989 +0.196446 -0.0094088 -0.159916 +0.0468892 0.0318746 -0.136603 +0.0588847 0.0194871 -0.141629 +0.0497176 0.0425705 -0.12546 +0.067316 0.0466181 -0.121528 +0.0829023 0.0554408 -0.10632 +0.0702884 0.0671402 -0.0864572 +0.0736048 0.0280122 -0.141966 +-0.0393368 0.0927115 -0.058201 +-0.074253 -0.462729 -0.0674302 +-0.0882268 -0.46748 -0.0836924 +-0.10265 -0.454789 -0.102517 +-0.100302 -0.434985 -0.0953132 +-0.123508 -0.439573 -0.0964816 +0.30376 -0.329009 -0.220778 +-0.34576 -0.287787 -0.1184 +-0.333412 -0.299886 -0.118936 +-0.318278 -0.306436 -0.109371 +-0.342798 -0.273541 -0.122349 +-0.330946 -0.265681 -0.13448 +-0.32759 -0.278136 -0.147142 +-0.313986 -0.269795 -0.152301 +-0.304937 -0.277784 -0.160852 +-0.289134 -0.290053 -0.171285 +-0.300398 -0.29313 -0.159904 +-0.305136 -0.304081 -0.143109 +-0.303823 -0.326091 -0.148763 +-0.297334 -0.338307 -0.131821 +-0.0297344 -0.320795 0.126249 +-0.0440833 -0.337561 0.102751 +-0.0635963 -0.3222 0.124646 +-0.0820192 -0.303394 0.145977 +-0.0280108 -0.346215 0.0792887 +0.190023 -0.166658 -0.160984 +0.187606 0.489479 0.0788413 +0.169798 0.492699 0.0805537 +0.160239 0.479513 0.0724411 +0.160997 0.477019 0.0876359 +0.167909 0.48647 0.0907839 +0.168839 0.465921 0.0685027 +0.185848 0.461592 0.0756332 +0.163713 0.449815 0.0719867 +0.171034 0.442192 0.0868531 +0.172622 0.439121 0.100638 +0.191763 0.435033 0.0761478 +0.150024 0.450095 0.173316 +0.142684 0.444609 0.180888 +0.134925 0.435737 0.185852 +0.0901553 -0.0455623 0.257862 +0.0764097 -0.0467149 0.266788 +0.218445 0.190081 -0.00453558 +0.212983 0.187132 0.0158667 +0.234912 0.203072 -0.0090602 +0.217724 0.208098 -0.00630956 +0.209095 0.231498 0.0538229 +0.223398 0.222537 0.0510417 +0.229495 0.205818 0.051858 +0.241614 0.200114 0.0387668 +0.245196 0.212463 0.0252865 +0.232616 0.199508 0.066443 +0.245867 0.187445 0.0704899 +0.218046 0.211438 0.0580939 +0.206013 0.207163 0.0667587 +0.208167 0.217137 0.0808695 +0.189985 0.216171 0.0819923 +-0.328288 -0.282754 -0.0562593 +-0.321215 -0.270892 -0.0527491 +-0.321885 -0.294532 -0.0580289 +-0.324301 -0.301836 -0.070993 +-0.309665 -0.294095 -0.0515043 +-0.298437 -0.298535 -0.0585809 +-0.293755 -0.297175 -0.0685565 +-0.301865 -0.303693 -0.0670723 +-0.312242 -0.307406 -0.0760424 +0.113855 0.0103494 0.135894 +0.117356 -0.000872108 0.134011 +0.24192 0.231796 0.179613 +0.236568 0.24336 0.180529 +0.226028 0.250706 0.186633 +0.280884 -0.220307 -0.163899 +0.26654 -0.211351 -0.150233 +0.265056 -0.233891 -0.14678 +0.318482 -0.331697 -0.239506 +0.324395 -0.322699 -0.253479 +0.31194 -0.314679 -0.269415 +0.329739 -0.334727 -0.229668 +0.336703 -0.323152 -0.229076 +0.344428 -0.313085 -0.23571 +0.342498 -0.293727 -0.236916 +0.350543 -0.322922 -0.2465 +0.353252 -0.314 -0.261759 +0.347047 -0.326986 -0.235121 +0.0827363 -0.465408 -0.0592863 +0.0757733 -0.45735 -0.0483001 +0.0758332 -0.442944 -0.0486429 +0.0763754 -0.427162 -0.064874 +0.0810297 -0.429275 -0.0354104 +0.0760881 -0.402196 -0.0628009 +0.0803331 -0.462498 -0.0366385 +0.075746 -0.427719 -0.0496393 +0.213629 0.454927 0.154222 +0.216172 0.433851 0.152191 +0.213875 -0.163106 0.208849 +0.228479 0.0837143 -0.0171959 +0.214862 0.0777937 -0.0178642 +0.203914 0.0820668 -0.0169156 +0.213551 0.066976 -0.0133462 +-0.291696 -0.291685 -0.053913 +-0.288445 -0.286967 -0.0453936 +-0.283457 -0.280518 -0.0392925 +0.198493 0.267303 0.113918 +-0.00816198 -0.315253 0.11742 +0.312224 -0.337685 -0.224702 +0.0776115 -0.0114015 0.225043 +0.094616 -0.00802053 0.222738 +0.212523 -0.00317223 -0.153514 +0.228944 -0.0069181 -0.146501 +0.230166 -0.0223035 -0.138067 +0.212902 -0.0238532 -0.132712 +0.194522 -0.0219296 -0.138137 +0.240306 -0.00819778 -0.130311 +0.24497 -0.0122967 -0.113875 +0.221562 -0.0094445 -0.0973672 +0.242491 -0.00970392 -0.0927411 +-0.195428 -0.293105 -0.0588105 +-0.174639 -0.293714 -0.0615636 +-0.159198 -0.295096 -0.0708856 +-0.150745 -0.297027 -0.0916319 +-0.165094 -0.309633 -0.116063 +-0.129532 -0.293794 -0.0901166 +-0.12154 -0.29002 -0.105668 +-0.103655 -0.284754 -0.110478 +-0.083304 -0.273535 -0.126518 +-0.126229 -0.291149 -0.124142 +-0.0551206 -0.282297 -0.123125 +-0.0279253 -0.280704 -0.123568 +-0.0254074 -0.296918 -0.100527 +-0.143636 -0.296672 -0.0765836 +0.228772 0.249576 0.00807469 +0.246793 0.197559 -0.000456927 +0.249351 0.185655 0.00965958 +0.077471 -0.38535 -0.0716786 +0.0780138 -0.366405 -0.0698751 +0.0796117 -0.349597 -0.0694382 +0.0817673 -0.324046 -0.067713 +0.0920794 -0.339278 -0.0766687 +0.0745961 -0.308674 -0.0513846 +0.0686559 -0.285979 -0.0584538 +0.0701691 -0.296007 -0.0346939 +0.0958416 -0.324563 -0.0739969 +0.111686 -0.315208 -0.0712996 +0.118212 -0.295045 -0.0671537 +0.145789 -0.285221 -0.0572786 +0.142444 -0.258951 -0.0651148 +0.125807 -0.256448 -0.0777825 +0.0725557 -0.302564 -0.0188272 +0.0757738 -0.318738 -0.0113816 +0.0755625 -0.334153 -0.022547 +0.0716925 -0.292684 -0.00740334 +0.0574002 -0.292216 -0.00131701 +0.0442788 -0.29974 -0.0118635 +0.0322898 -0.309073 -0.00126775 +0.0158934 -0.319374 -0.00927168 +0.00270388 -0.318254 -0.036966 +0.00321031 -0.33353 0.006095 +0.0101246 -0.330737 0.0331595 +0.0571801 -0.291727 0.0142738 +0.0411549 -0.302632 0.0323113 +0.0568056 -0.290026 0.0325413 +0.0726196 -0.279494 0.0399911 +0.0843075 -0.293947 0.0355701 +0.0802412 -0.296732 0.0208207 +0.0757523 -0.290551 0.00911073 +0.0904109 -0.307387 0.0401159 +0.0937218 -0.321431 0.0333001 +0.0876185 -0.332554 0.0196986 +-0.261918 -0.356193 -0.123562 +-0.274572 -0.363058 -0.128675 +-0.283885 -0.374671 -0.137095 +0.0993425 -0.475253 -0.0345906 +0.105878 -0.470302 -0.022596 +0.161209 0.00758193 -0.157082 +0.162861 -0.00496129 -0.160125 +0.14622 0.0234899 0.00861402 +0.16407 0.00688456 0.00334424 +0.187476 0.0108016 -0.000104135 +0.198618 0.0267239 -0.00776275 +0.213159 0.032032 -0.0211609 +0.229764 0.0271876 -0.0288068 +0.229938 0.0432028 -0.0342052 +0.231973 0.0361819 -0.05417 +0.241585 0.0230077 -0.0674939 +0.235826 0.0200922 -0.0913851 +0.229532 0.00831192 -0.0604593 +0.228417 0.0182383 -0.11087 +0.214387 0.0313739 -0.095916 +0.23826 0.0319925 -0.0407356 +0.240603 0.0153722 -0.0478262 +0.185434 0.0390225 -0.0120783 +0.174046 0.035224 -0.0278333 +0.183039 0.0254835 -0.0435084 +0.185088 0.013208 -0.0664572 +0.184517 -0.00115634 -0.0944301 +0.15883 0.0112792 -0.0789407 +0.166768 0.0454452 -0.0125857 +0.149871 0.0473393 -0.0127261 +0.24097 0.0273212 -0.0523021 +0.244689 0.0183228 -0.0578172 +0.239121 0.00955592 -0.0564169 +0.23067 0.0133196 -0.0511149 +0.217815 0.013095 -0.0555127 +0.202953 0.0215885 -0.0445658 +0.223255 0.0309758 -0.00933388 +0.246338 0.00680161 -0.0920968 +-0.29666 -0.251794 -0.0420083 +-0.282377 -0.246563 -0.0382484 +-0.274248 -0.257163 -0.0411355 +0.121069 0.3764 0.220244 +0.124178 0.361607 0.222425 +0.12316 0.347289 0.21517 +0.120818 0.335014 0.200629 +0.131773 0.318764 0.203442 +0.240354 -0.189104 -0.174254 +0.226426 -0.17846 -0.157236 +0.25469 -0.197929 -0.186668 +0.262527 -0.207499 -0.20859 +0.275709 -0.206748 -0.189755 +0.268196 -0.218714 -0.226562 +0.252109 -0.214264 -0.221034 +0.231966 -0.219863 -0.222417 +0.16439 -0.290409 -0.045741 +0.174232 0.353361 0.161991 +0.167416 0.346038 0.151615 +0.153417 0.351454 0.147309 +0.141711 0.365653 0.160008 +0.174784 0.33351 0.146976 +0.172695 0.32064 0.137876 +0.171538 0.327653 0.122668 +-0.153467 -0.465689 -0.0917447 +-0.142244 -0.458217 -0.0978282 +-0.137315 -0.444624 -0.0945322 +-0.142546 -0.468457 -0.0929801 +-0.130113 -0.470071 -0.0887414 +-0.111868 -0.466578 -0.0912306 +-0.129822 -0.476932 -0.0773011 +-0.116192 -0.47396 -0.0799073 +-0.102072 -0.471199 -0.0816089 +0.0648327 -0.288276 0.006469 +0.290523 -0.14969 0.120852 +0.286341 -0.149084 0.132395 +0.276561 -0.154417 0.131433 +0.266874 -0.144863 0.128327 +0.266123 -0.155511 0.139202 +0.254682 -0.156501 0.14847 +0.243072 -0.144724 0.147014 +0.246658 -0.132891 0.13506 +0.271484 -0.158645 0.148826 +0.262513 -0.161728 0.150556 +0.255383 -0.163883 0.160093 +0.258182 -0.154155 0.170424 +0.247063 -0.165211 0.168804 +0.236375 -0.166699 0.177267 +0.223809 -0.16596 0.182974 +0.219971 -0.167303 0.19665 +0.224247 -0.15536 0.203023 +0.206877 -0.166582 0.198203 +0.201256 -0.167208 0.210293 +0.187949 -0.165778 0.214542 +0.175727 -0.151043 0.207983 +0.205839 -0.156778 0.218275 +0.191606 -0.158183 0.226132 +0.180969 -0.154585 0.235065 +0.170507 -0.150398 0.244702 +0.167678 -0.135398 0.246604 +0.174695 -0.121433 0.234619 +0.192199 -0.123695 0.219574 +0.161002 -0.150315 0.252813 +0.149901 -0.156196 0.25282 +0.145756 -0.15618 0.238445 +0.158231 -0.157867 0.22927 +0.148019 -0.147104 0.261177 +0.14318 -0.132144 0.260892 +0.131504 -0.114456 0.261736 +0.136414 -0.145181 0.266602 +0.124033 -0.152215 0.261533 +0.128756 -0.151616 0.248741 +0.169715 -0.162656 0.235355 +0.125332 -0.145025 0.270918 +0.118124 -0.13431 0.277651 +0.122928 -0.121301 0.271952 +0.113017 -0.148351 0.260498 +0.105868 -0.137752 0.254904 +0.0970603 -0.116879 0.246491 +0.113377 -0.13188 0.244126 +0.102989 -0.14407 0.26402 +0.09993 -0.141861 0.276203 +-0.208269 -0.22401 0.141633 +-0.20692 -0.250284 0.132437 +0.0965268 -0.427234 -0.105996 +0.0991486 -0.439673 -0.0998914 +0.19126 -0.17619 0.0390751 +0.184715 -0.204433 0.0324441 +0.164304 -0.221583 0.0465757 +0.1444 -0.208807 0.0686986 +0.0226172 -0.0147867 0.137076 +-0.142255 -0.49298 -0.0216335 +0.233691 0.0208001 -0.0385404 +-0.192672 -0.315988 0.0839294 +-0.202286 -0.295403 0.104035 +-0.212462 -0.276423 0.111373 +-0.218066 -0.285356 0.0914372 +-0.230517 -0.270625 0.068595 +0.136055 0.0355608 0.0131192 +0.121886 0.0399552 0.0198872 +0.106186 0.0275039 0.0255554 +0.0928691 0.0373146 0.0446539 +0.107832 0.0113031 0.0106037 +0.0853288 0.00897116 0.0135994 +0.0648776 -0.00152148 0.00684991 +0.301901 0.1917 0.196837 +0.304498 0.181718 0.192274 +0.29757 0.171529 0.192207 +0.283611 0.170157 0.190984 +0.17589 0.332048 0.230978 +0.176274 0.318104 0.221305 +0.189786 0.308195 0.22975 +0.199452 0.291101 0.221444 +0.210647 0.278153 0.221165 +0.212403 0.290739 0.232707 +0.229872 0.295702 0.229994 +0.238851 0.283146 0.23072 +0.237981 0.260514 0.227763 +0.248013 0.243086 0.221386 +0.245976 0.271423 0.230129 +0.237201 0.240055 0.208931 +0.239318 0.292509 0.222434 +0.244312 0.28734 0.210021 +0.234086 0.289095 0.199595 +0.221914 0.298769 0.201947 +0.1778 0.322602 0.229777 +0.232474 0.299285 0.221376 +0.223334 0.304746 0.213608 +0.207337 0.311267 0.204764 +0.224642 0.304397 0.226583 +0.214619 0.302742 0.233384 +0.203769 0.313465 0.232857 +0.204968 0.319702 0.218324 +0.201735 0.298965 0.232154 +-0.0492057 -0.0812756 -0.10551 +-0.0710597 -0.075701 -0.12067 +-0.0879497 -0.0905516 -0.13677 +-0.0843511 -0.119489 -0.147588 +-0.0762899 -0.059326 -0.102542 +-0.0985707 -0.0477827 -0.098696 +-0.118275 -0.0536394 -0.113913 +-0.11441 -0.0717159 -0.128365 +0.179503 0.303256 0.0436704 +0.192013 0.290229 0.0290644 +0.17689 0.287515 0.0370015 +0.192038 0.271729 0.0156116 +0.209167 0.267708 0.00969983 +0.200133 0.255704 0.00478026 +-0.247504 -0.392344 -0.224787 +-0.247477 -0.405986 -0.218212 +-0.243099 -0.400741 -0.206484 +-0.246703 -0.405341 -0.193269 +-0.249065 -0.417066 -0.193806 +-0.263856 -0.417281 -0.202583 +-0.253854 -0.410374 -0.185389 +-0.264275 -0.407223 -0.177693 +-0.272044 -0.40206 -0.166216 +-0.284666 -0.409799 -0.163624 +-0.28689 -0.423019 -0.170791 +-0.283285 -0.428723 -0.186577 +-0.301536 -0.424549 -0.197331 +-0.276684 -0.426319 -0.176604 +-0.270204 -0.426002 -0.18843 +-0.267033 -0.421163 -0.178871 +-0.28572 -0.431162 -0.176917 +0.0984334 0.0428629 0.147655 +0.0984512 0.0370662 0.158757 +-0.324734 -0.278381 -0.0492733 +-0.319049 -0.278035 -0.0388895 +-0.314693 -0.271902 -0.0298211 +-0.0814975 -0.486596 -0.0514846 +-0.0716057 -0.47534 -0.0576231 +-0.0807984 -0.475501 -0.0687174 +-0.0782273 -0.46782 -0.0773567 +-0.0794515 -0.454639 -0.076562 +-0.0865219 -0.442019 -0.0638219 +-0.0826697 -0.456554 -0.0896798 +-0.0913604 -0.446861 -0.0969099 +-0.0924184 -0.432044 -0.0753911 +-0.098273 -0.416607 -0.0817744 +-0.111942 -0.395187 -0.0818225 +-0.0923505 -0.401008 -0.0727607 +-0.110463 -0.376831 -0.0757945 +-0.0955645 -0.358515 -0.0727168 +-0.0748788 -0.367775 -0.053732 +-0.099584 -0.336657 -0.0718408 +-0.0617229 -0.346951 -0.0508932 +-0.0372908 -0.340191 -0.0358611 +-0.187209 -0.0514446 0.134371 +-0.172275 -0.062062 0.144345 +-0.181772 -0.0387772 0.12984 +0.27325 0.225257 0.167666 +0.283037 0.221467 0.169903 +0.141164 -0.00931766 -0.150578 +0.223335 -0.262546 -0.149684 +0.199958 -0.258684 -0.141852 +0.218212 -0.249649 -0.131577 +-0.0730224 -0.485274 -0.0383372 +-0.0765985 -0.473674 -0.025717 +-0.0833487 -0.485599 -0.0202509 +-0.0969784 -0.487241 -0.0157338 +-0.106328 -0.475595 -0.0156679 +-0.107519 -0.486132 -0.0147883 +-0.117398 -0.491224 -0.0155421 +-0.11866 -0.497871 -0.0255495 +0.192205 -0.0198585 -0.151725 +0.281772 0.238327 0.210562 +0.269826 0.243309 0.222088 +0.243244 0.207816 -0.00325363 +0.239729 0.221932 -0.000908316 +0.243256 0.225044 0.0142927 +0.235434 0.23543 0.00346349 +0.158954 -0.447934 -0.074517 +0.164 -0.440163 -0.0849532 +0.160645 -0.422992 -0.0839209 +0.160099 -0.41995 -0.0633914 +0.170063 -0.432118 -0.0580684 +0.170775 -0.442201 -0.0470561 +0.167356 -0.452883 -0.036848 +0.157537 -0.464023 -0.0432353 +0.154265 -0.458207 -0.0582632 +0.146921 -0.466798 -0.0291891 +0.17099 -0.445942 -0.0649823 +0.152813 -0.426396 -0.0985179 +0.142833 -0.435406 -0.0989063 +0.126573 -0.436557 -0.100225 +0.120949 -0.42189 -0.103936 +0.130685 -0.411647 -0.0938972 +0.160351 -0.460975 -0.0324222 +0.164884 -0.460693 -0.0398836 +0.167083 -0.430709 -0.0834012 +0.161089 -0.432508 -0.0931652 +0.165433 -0.424956 -0.0749657 +0.155909 -0.417913 -0.0743018 +0.149825 -0.407366 -0.067413 +0.142015 -0.399818 -0.0764637 +0.153043 -0.435416 -0.0966096 +0.148842 -0.431897 -0.101759 +0.145045 -0.424265 -0.10134 +0.147732 -0.418014 -0.0911084 +0.138977 -0.417451 -0.0965307 +0.139635 -0.411036 -0.0878314 +0.14174 -0.430413 -0.104765 +0.134784 -0.434536 -0.101822 +0.135086 -0.440748 -0.0918112 +0.13766 -0.447456 -0.0800542 +0.122938 -0.455334 -0.0698495 +0.127914 -0.428797 -0.106691 +0.135671 -0.430083 -0.106069 +-0.0268041 -0.304928 0.142542 +-0.0182344 -0.281255 0.151927 +0.000262015 -0.258244 0.142866 +0.0151742 -0.229959 0.128466 +-0.00970849 -0.227931 0.154073 +0.0337917 -0.209923 0.115845 +0.0199495 -0.192987 0.125832 +-0.154293 -0.0335699 -0.082135 +-0.129631 -0.0324487 -0.0813475 +-0.120097 -0.027431 -0.0586998 +-0.0956922 -0.0340394 -0.0533561 +-0.0814148 -0.0448428 -0.0722969 +-0.0594432 -0.0515596 -0.0534184 +-0.160793 -0.0482086 -0.0989707 +-0.166155 -0.0307425 -0.0663998 +-0.169924 -0.0270352 -0.0414151 +-0.183311 -0.0375758 -0.0551581 +-0.174206 -0.0274939 -0.0203147 +-0.192353 -0.0397338 -0.00141151 +-0.170447 -0.0249801 0.0063437 +-0.211587 -0.0636911 -0.00501259 +-0.0018753 -0.187141 -0.149775 +0.0183103 -0.182965 -0.142326 +0.0322217 -0.167313 -0.134641 +0.0236675 -0.146992 -0.123167 +-0.00232452 -0.142332 -0.126149 +0.0375806 -0.18533 -0.140019 +0.0530379 -0.201545 -0.137283 +0.0772348 -0.20845 -0.140694 +0.0988175 -0.224384 -0.140468 +0.119251 -0.222512 -0.162731 +0.03788 -0.218276 -0.135529 +0.0772845 -0.19139 -0.155355 +0.080882 -0.225907 -0.127445 +0.0653619 -0.242778 -0.113036 +0.0731805 -0.173068 -0.155239 +0.0897045 -0.191329 -0.166141 +0.102707 -0.199007 -0.171074 +0.119058 -0.208637 -0.176942 +0.127514 -0.196293 -0.185172 +0.13998 -0.205302 -0.190755 +0.149824 -0.215626 -0.194546 +0.161245 -0.221969 -0.199237 +0.175364 -0.230409 -0.20401 +0.173584 -0.215336 -0.204853 +0.178202 -0.198362 -0.197173 +0.188397 -0.22907 -0.211289 +0.202734 -0.22056 -0.215065 +0.199745 -0.239634 -0.214151 +0.0815106 -0.18364 -0.162988 +-0.172104 -0.359269 -0.00938238 +-0.172319 -0.335226 -0.0164663 +-0.16873 -0.368903 -0.0231312 +-0.292266 -0.291505 -0.0889456 +-0.288266 -0.299574 -0.0955502 +-0.280983 -0.308012 -0.105167 +-0.278654 -0.297571 -0.101297 +-0.274336 -0.285615 -0.103446 +-0.260134 -0.28158 -0.0989442 +-0.257005 -0.265144 -0.10215 +-0.26942 -0.305285 -0.10276 +-0.257003 -0.309674 -0.100476 +-0.244993 -0.306014 -0.0938734 +-0.249351 -0.292113 -0.0926885 +-0.25954 -0.322424 -0.104282 +-0.267093 -0.332079 -0.111051 +-0.283312 -0.328944 -0.119574 +-0.249017 -0.331591 -0.10481 +-0.232981 -0.32784 -0.100164 +-0.240291 -0.342062 -0.113719 +-0.229688 -0.345883 -0.126712 +-0.23058 -0.352629 -0.145077 +-0.21352 -0.337371 -0.127344 +-0.269191 -0.344874 -0.117105 +-0.208623 -0.327937 -0.112241 +-0.191793 -0.321843 -0.117022 +-0.180909 -0.311277 -0.104708 +0.11012 0.10505 0.0238496 +0.213679 0.221732 0.163906 +-0.0357839 -0.0025294 0.108473 +-0.0312254 -0.0135193 0.128152 +-0.0238807 -0.033229 0.139313 +-0.00300831 -0.046529 0.144036 +-0.00364169 -0.0760125 0.145155 +-0.0103288 -0.10643 0.141831 +0.015326 -0.129347 0.142131 +-0.041062 -0.0443202 0.130625 +-0.0555252 -0.0465254 0.114753 +-0.0556686 -0.0325657 0.0996413 +-0.0768736 -0.0422105 0.0949058 +-0.0167984 0.000564353 0.123722 +0.00524698 0.0020139 0.129964 +-0.0281137 -0.0861213 0.139333 +-0.0785841 -0.0379469 0.0747431 +-0.0762529 -0.0505618 0.114297 +-0.032521 -0.108383 0.136839 +-0.0633754 -0.0458183 0.101476 +-0.0250298 0.00663901 0.112981 +-0.0219675 0.00393164 0.0935556 +-0.147404 -0.304789 -0.127071 +0.192111 0.473304 0.143665 +0.202701 0.475169 0.131787 +0.206558 0.475874 0.120017 +0.202492 0.480449 0.108775 +0.157654 -0.366957 -0.0205798 +0.26661 -0.307414 -0.281977 +0.270077 -0.295571 -0.288815 +0.283263 -0.291236 -0.297392 +0.290598 -0.279448 -0.297082 +0.304158 -0.276932 -0.29882 +0.315035 -0.2885 -0.301158 +0.307588 -0.298676 -0.297006 +0.297613 -0.307939 -0.283621 +0.293787 -0.301201 -0.295424 +0.318389 -0.297707 -0.296483 +0.328066 -0.301032 -0.289042 +0.324582 -0.309109 -0.276338 +0.33579 -0.291676 -0.2964 +0.346867 -0.288071 -0.287976 +0.353956 -0.299169 -0.28317 +0.345495 -0.307423 -0.274703 +0.352866 -0.288693 -0.277818 +0.351312 -0.284395 -0.265224 +0.355354 -0.294774 -0.257468 +0.360217 -0.304818 -0.260578 +0.35682 -0.308388 -0.269609 +0.359106 -0.312264 -0.252967 +0.356474 -0.316127 -0.245135 +0.351445 -0.319298 -0.237976 +-0.26647 -0.314705 -0.199507 +-0.27426 -0.329739 -0.204261 +-0.290128 -0.337563 -0.206145 +-0.303723 -0.332243 -0.195363 +-0.303858 -0.323407 -0.176279 +-0.302757 -0.349394 -0.210447 +-0.304665 -0.364526 -0.223447 +-0.321319 -0.375627 -0.232938 +-0.285437 -0.371465 -0.224735 +-0.28011 -0.37957 -0.242654 +-0.314609 -0.397575 -0.24523 +-0.31498 -0.344154 -0.199865 +-0.330892 -0.351901 -0.189469 +-0.332902 -0.388937 -0.243068 +-0.348245 -0.402805 -0.233911 +-0.328232 -0.404959 -0.235266 +-0.273541 -0.396265 -0.240028 +-0.293049 -0.39498 -0.245656 +-0.355214 -0.402159 -0.217135 +-0.360108 -0.415844 -0.205721 +-0.346381 -0.42668 -0.201491 +-0.340374 -0.436455 -0.180032 +-0.360217 -0.406031 -0.193698 +-0.356506 -0.391255 -0.182727 +-0.356512 -0.407116 -0.177427 +-0.347384 -0.421732 -0.172779 +-0.348669 -0.37532 -0.17511 +-0.341266 -0.408591 -0.160307 +-0.332592 -0.391247 -0.153464 +-0.323849 -0.407723 -0.153687 +-0.349384 -0.43169 -0.189135 +-0.335815 -0.43119 -0.192046 +-0.324454 -0.435806 -0.181733 +-0.331465 -0.433295 -0.170921 +-0.314528 -0.431132 -0.168412 +-0.260177 -0.397767 -0.235 +-0.252953 -0.401301 -0.227678 +-0.247407 -0.394723 -0.238053 +-0.24372 -0.401046 -0.225417 +-0.243948 -0.396615 -0.216223 +-0.258003 -0.38952 -0.247437 +-0.272162 -0.387844 -0.252537 +-0.287147 -0.384539 -0.255755 +-0.302942 -0.384129 -0.252391 +-0.315505 -0.382766 -0.24459 +-0.323099 -0.390444 -0.249836 +-0.312399 -0.390336 -0.253745 +-0.328503 -0.399215 -0.245058 +-0.340635 -0.398589 -0.24271 +-0.266346 -0.382624 -0.244488 +-0.267321 -0.391914 -0.245578 +-0.0266812 0.0695328 -0.0242573 +-0.00773299 0.0681739 -0.0184911 +0.0122858 0.0669077 -0.0123781 +0.0150035 0.0767227 0.00239352 +0.0141467 0.0954062 -0.00215996 +0.0325338 0.098411 -0.00617133 +0.0450676 0.0983028 0.010086 +0.0314473 0.0730983 0.00401189 +0.0505593 0.0686309 0.00292132 +0.0698817 0.067505 0.00832925 +0.145383 0.180744 0.0984363 +0.132189 0.17376 0.0925198 +0.121241 0.164951 0.0850023 +0.133425 0.169934 0.0774819 +0.11505 0.153676 0.07879 +-0.083942 -0.368893 -0.0674225 +-0.0809876 -0.385027 -0.0581697 +-0.0723248 -0.382058 -0.0416794 +-0.00904893 0.0914446 -0.0120745 +0.00504523 0.0987359 -0.0150796 +0.0060609 0.0932522 -0.034057 +0.0248461 0.0873188 -0.0377031 +0.0363994 0.089055 -0.023789 +0.00213821 0.0914225 -0.00482177 +0.0092558 0.0863088 0.00212053 +0.106375 0.0274106 0.14138 +-0.263884 -0.385451 -0.252252 +0.258755 0.24689 0.225661 +0.259085 0.23306 0.219814 +0.249971 0.25591 0.228242 +-0.322841 -0.345115 -0.164492 +-0.323706 -0.355326 -0.152393 +-0.279169 -0.265328 -0.0439542 +-0.285416 -0.267917 -0.0516616 +-0.294745 -0.263175 -0.0517725 +0.23393 -0.0149701 -0.10397 +0.219738 -0.0165453 -0.112039 +0.204608 -0.00981825 -0.104246 +0.187184 -0.00954937 -0.110855 +0.228145 0.230452 0.102316 +0.214447 0.238029 0.0983297 +0.23229 0.220992 0.0943503 +0.215398 0.247623 0.105271 +0.217938 0.25177 0.117669 +0.210276 0.258003 0.111405 +0.220949 0.241286 0.103103 +0.290344 -0.337843 -0.233955 +0.276226 -0.337233 -0.22831 +0.296573 -0.339782 -0.226215 +0.227663 0.461812 0.0838481 +0.234265 0.455281 0.0718225 +0.229698 0.445794 0.0603386 +0.225781 0.470182 0.0813133 +0.214396 0.4698 0.0788369 +0.208406 0.478123 0.0862021 +0.214031 0.460896 0.0711899 +0.217085 0.451741 0.0628259 +0.219354 0.474333 0.0827819 +0.21619 0.47758 0.0903862 +0.217994 0.472178 0.097233 +0.209525 0.481852 0.0939712 +0.227208 0.456115 0.0633709 +0.234329 0.451682 0.0642008 +0.23166 0.462658 0.0759848 +0.273713 -0.249314 -0.252993 +0.274317 -0.268417 -0.267071 +0.263304 -0.282613 -0.260934 +-0.240326 -0.404033 -0.2139 +-0.241182 -0.408607 -0.207233 +0.243855 0.194683 0.113624 +0.235959 0.206195 0.114609 +-0.329827 -0.30598 -0.098469 +-0.057071 -0.0425853 0.0117122 +-0.0551192 -0.0420888 0.0309046 +-0.0534835 -0.0402863 0.0500454 +-0.0435993 -0.0469165 0.00748095 +-0.0255629 -0.0374196 0.00481763 +-0.00817324 -0.0328811 -0.0061182 +-0.00350439 -0.0437548 -0.0255784 +-0.0349503 -0.0490115 -0.00492533 +-0.0419875 -0.0536475 -0.0293419 +-0.0139014 -0.0607747 -0.0378374 +-0.0105205 -0.0780801 -0.0585195 +-0.0335249 -0.0540562 -0.0180409 +-0.0278411 -0.0595083 -0.0313207 +0.193253 0.49569 0.0858481 +0.189805 0.494474 0.0949255 +0.179559 0.491992 0.0947812 +0.19709 0.487808 0.0978913 +0.174576 0.497081 0.0879734 +0.179584 0.496616 0.0784813 +0.175502 0.48892 0.0725035 +0.169475 0.481635 0.069206 +0.164994 0.474033 0.0669237 +0.155945 0.469227 0.0714265 +0.159639 0.459314 0.0671634 +0.0454737 -0.0938547 0.293886 +0.0481458 -0.104952 0.292926 +0.0550885 -0.114349 0.29062 +0.0654216 -0.120788 0.289843 +0.0691263 -0.126298 0.278339 +0.0372417 -0.0943784 0.286279 +0.0377118 -0.088702 0.274623 +0.179652 -0.262284 0.0054219 +0.186087 -0.244472 0.00347757 +0.246807 -0.00615903 -0.103541 +0.242297 -0.0135206 -0.100916 +0.240802 -0.0172339 -0.108388 +0.232593 -0.0188607 -0.112191 +0.240348 -0.0194541 -0.117278 +0.238974 -0.018297 -0.127651 +-0.164632 -0.397326 -0.024693 +0.0813645 -0.458079 -0.0716845 +0.302397 0.127887 0.0470846 +0.298473 0.138148 0.0455108 +0.292313 0.136477 0.0386335 +0.288054 0.130079 0.0326142 +0.28271 0.137427 0.0379629 +0.271939 0.136706 0.038053 +0.261008 0.14116 0.0404912 +0.28194 0.12422 0.0312108 +0.300876 0.126279 0.0551937 +0.295306 0.129324 0.0632115 +0.286846 0.130603 0.0706512 +0.282604 0.11846 0.0804122 +0.273418 0.134767 0.0747422 +0.296205 0.121995 0.0600976 +0.289869 0.116278 0.0576534 +0.283444 0.108666 0.0679441 +0.208186 0.435058 0.0678801 +0.218992 0.437774 0.0675136 +0.20517 0.444041 0.0615 +0.195457 0.447135 0.0675955 +0.224157 0.438328 0.0597838 +0.221367 0.446069 0.0584788 +0.168291 -0.443724 -0.076199 +-0.239169 -0.248023 -0.0426243 +-0.246509 -0.244281 -0.0523825 +-0.245933 -0.250709 -0.0701381 +-0.252213 -0.23035 -0.0598084 +-0.256922 -0.212794 -0.063622 +-0.26443 -0.20039 -0.048456 +-0.236601 -0.248665 -0.0331221 +-0.248238 -0.244973 -0.04299 +-0.257005 -0.243536 -0.0363368 +-0.264619 -0.253098 -0.0324677 +-0.260909 -0.234911 -0.0387305 +-0.270856 -0.228969 -0.0335016 +-0.268106 -0.214873 -0.0367573 +-0.255525 -0.250409 -0.0291707 +-0.246354 -0.252152 -0.0213798 +-0.25421 -0.258055 -0.0140562 +-0.253371 -0.258976 0.00135493 +-0.263391 -0.256528 0.0180325 +-0.264412 -0.265611 -0.0106557 +-0.268835 -0.263918 0.00476582 +-0.24972 -0.252323 0.0327963 +-0.239732 -0.259608 0.0493553 +-0.242639 -0.251027 0.0706418 +-0.27192 -0.270836 -0.02103 +-0.264888 -0.241199 0.0366373 +-0.279792 -0.22631 0.033251 +-0.274206 -0.207933 0.0474852 +-0.283361 -0.276288 -0.0174295 +-0.267659 -0.226048 0.0482271 +0.202151 0.274483 0.19338 +0.194908 0.283204 0.198963 +-0.157532 -0.273615 -0.179435 +-0.176899 -0.279729 -0.184503 +-0.188947 -0.290942 -0.187096 +-0.192598 -0.3074 -0.18306 +-0.203551 -0.297799 -0.190929 +-0.222085 -0.288246 -0.191352 +-0.217908 -0.303036 -0.194268 +-0.355074 -0.426501 -0.195973 +-0.354866 -0.423993 -0.205337 +-0.355569 -0.419108 -0.214528 +-0.353763 -0.412061 -0.224887 +-0.346029 -0.286085 -0.1062 +-0.341227 -0.288967 -0.0947058 +-0.336277 -0.278132 -0.0971269 +-0.328988 -0.269127 -0.105169 +-0.340297 -0.292656 -0.0831052 +-0.335578 -0.266756 -0.115188 +-0.339311 -0.299368 -0.0917431 +0.212569 0.261061 0.18216 +0.216886 0.255854 0.175009 +0.219484 0.251322 0.162982 +0.212289 0.247584 0.170006 +0.218513 0.26322 0.154269 +0.225667 0.261532 0.178216 +0.218436 0.276817 0.178562 +0.234042 0.273996 0.185236 +0.223426 0.242038 0.154678 +0.21181 0.288948 0.181391 +0.220498 0.257755 0.18435 +0.211254 0.266563 0.187703 +0.211739 0.26954 0.199826 +0.278409 -0.209413 -0.174692 +0.233056 0.457965 0.0658843 +0.227063 0.46182 0.0682472 +0.220168 0.458063 0.0666597 +-0.0481392 -0.0447802 0.0166181 +0.131516 0.0530135 0.000672445 +0.12038 0.0567042 0.000376152 +0.134766 0.046581 0.0097546 +0.0956782 -0.141364 0.26837 +0.0877085 -0.13595 0.269242 +0.0854698 -0.124959 0.261926 +0.0839071 -0.111836 0.253439 +0.0904091 -0.099649 0.239147 +0.0872053 -0.136949 0.279095 +0.085161 -0.130401 0.287023 +0.0763801 -0.13103 0.282851 +-0.00884361 -0.0890856 -0.0728998 +-0.00654069 -0.102279 -0.0895079 +-0.0290648 -0.104665 -0.111248 +-0.0100257 -0.116287 -0.107029 +0.0875054 -0.104584 0.297054 +0.191386 -0.264049 -0.175252 +0.190045 -0.262732 -0.156889 +0.204589 -0.269071 -0.178679 +0.222111 -0.273266 -0.172895 +0.189235 0.0753918 -0.0129238 +0.0782752 -0.467624 -0.0498343 +0.0759673 -0.46177 -0.0555898 +0.0772195 -0.460605 -0.0642783 +0.151932 0.323656 0.079912 +0.153175 0.313215 0.0881136 +0.161272 0.302381 0.0857396 +0.163146 0.324848 0.0718597 +0.151557 0.334415 0.0880604 +0.142886 0.334889 0.0972586 +0.140662 0.34411 0.107021 +0.133598 0.347717 0.117582 +0.131314 0.355467 0.129074 +0.127988 0.361743 0.142546 +0.123763 0.348981 0.138438 +0.119822 0.353337 0.149718 +0.116288 0.351928 0.168204 +0.226419 0.174912 -0.00671405 +0.232006 0.15884 0.00199041 +0.243933 0.169091 0.00253819 +0.237571 0.172786 -0.00612936 +0.183717 0.142245 0.147062 +0.183533 0.157982 0.153224 +0.200684 0.169917 0.154336 +0.175927 0.14817 0.154877 +0.164064 0.143191 0.159694 +0.181391 0.132744 0.149775 +0.177453 0.123521 0.157312 +0.108424 0.0602759 0.0311611 +0.101691 0.0511896 0.042029 +0.297187 0.12858 0.124591 +0.286869 0.125817 0.115842 +0.279264 0.13651 0.11071 +0.277464 0.150893 0.114839 +0.267972 0.163015 0.116989 +0.29066 -0.215317 -0.195858 +-0.0439761 -0.143405 -0.149346 +0.0959309 0.0199379 0.158053 +0.0941358 0.00844127 0.16726 +0.273991 -0.158318 0.138404 +0.280108 -0.155995 0.136908 +0.28311 -0.154668 0.131232 +0.287165 -0.152142 0.126309 +0.291082 -0.145525 0.127381 +0.258354 -0.329753 -0.2515 +0.256649 -0.327468 -0.240856 +0.265642 -0.321399 -0.233195 +0.269005 -0.32965 -0.227653 +0.204877 0.287044 0.0357487 +0.289139 -0.339472 -0.226774 +0.282728 -0.335989 -0.224475 +0.283065 -0.327384 -0.221193 +0.28398 -0.316486 -0.219293 +0.289461 -0.305296 -0.210924 +0.2738 -0.310998 -0.221733 +0.2646 -0.301502 -0.221281 +0.282981 -0.339471 -0.231684 +0.275544 -0.336339 -0.239462 +0.259131 -0.2954 -0.232139 +0.281853 -0.296955 -0.202405 +0.287258 -0.287693 -0.192682 +0.301236 -0.282638 -0.194913 +0.23745 0.0270265 -0.0333549 +0.234865 0.0358956 -0.0292661 +0.240774 0.0243245 -0.0402136 +0.034599 -0.0884904 0.28182 +0.0345637 -0.0787252 0.277243 +0.0422003 -0.0728232 0.283477 +0.048607 -0.0763619 0.292696 +0.0395236 -0.0802562 0.266836 +0.0486856 -0.0788086 0.257578 +0.044992 -0.0647291 0.254151 +0.0587204 -0.0731238 0.296598 +0.068389 -0.0812067 0.300077 +0.0829644 -0.0808872 0.290453 +0.0435251 -0.0559756 0.262078 +0.20354 0.276522 0.016541 +-0.0980428 -0.240155 0.197738 +-0.0924965 -0.26196 0.186819 +-0.109853 -0.270124 0.168775 +-0.253582 -0.386742 -0.238773 +-0.0267016 0.0982672 -0.0374627 +0.214024 0.433945 0.0622105 +0.204736 0.432758 0.058829 +0.201109 0.433103 0.0655996 +0.201809 0.436011 0.073894 +0.193477 0.433855 0.0682907 +0.185218 0.436354 0.0703184 +0.180836 0.436291 0.0819631 +0.191166 0.440882 0.0659291 +0.187348 0.447071 0.070626 +0.179215 0.453739 0.0726364 +0.193028 0.454826 0.0736221 +0.173421 0.440644 0.0776765 +-0.147031 -0.496444 -0.028386 +-0.151597 -0.495421 -0.0374969 +-0.157627 -0.484775 -0.0397619 +-0.140246 -0.499465 -0.0256815 +-0.132401 -0.5 -0.0296698 +-0.132703 -0.497498 -0.0384881 +-0.126331 -0.494492 -0.0452588 +-0.11646 -0.490117 -0.0524448 +-0.101295 -0.487303 -0.0547567 +-0.136101 -0.494007 -0.0471871 +-0.13938 -0.490039 -0.0561432 +-0.133381 -0.483866 -0.0661423 +-0.15577 -0.492035 -0.0446482 +-0.153261 -0.490282 -0.0555144 +0.197755 0.272342 0.0690149 +0.190382 0.263313 0.0560052 +0.0686632 -0.292912 -0.0237205 +0.056243 -0.29127 -0.0303266 +0.0398126 -0.298058 -0.030698 +0.0315681 -0.295788 -0.0489563 +0.043708 -0.285681 -0.061727 +0.0621136 -0.289132 -0.040881 +0.0722108 -0.295077 -0.0484755 +0.0577034 -0.286988 -0.0524253 +0.0569935 -0.281989 -0.0659264 +0.064236 -0.290328 -0.0328163 +-0.0127838 0.0757233 -0.00921143 +0.0935192 0.0772038 0.0642915 +0.169714 0.302879 0.0497006 +0.163659 0.300165 0.0640716 +0.172929 0.295611 0.0434924 +0.049865 0.0913802 0.0221499 +0.0418831 0.0808731 0.013212 +0.0368549 0.0913191 0.0145569 +0.0319565 0.0968433 0.00544037 +0.310435 0.13526 0.142507 +0.026474 0.0305763 -0.129196 +0.017822 0.0292426 -0.122273 +0.0163904 0.0280919 -0.108702 +0.0350495 0.0278097 -0.132911 +0.178361 0.286185 0.0866978 +0.184473 0.288229 0.0959947 +0.0746028 -0.0119842 0.202652 +0.0770488 -0.00198153 0.201878 +0.0861829 0.00359659 0.206228 +0.0964676 0.00912576 0.20305 +0.110414 0.00821695 0.200752 +0.119478 0.0159283 0.18886 +-0.0749585 -0.470198 -0.0703816 +-0.0722579 -0.469101 -0.0627931 +-0.0775597 -0.45771 -0.0519849 +-0.0725204 -0.466379 -0.0530837 +-0.0822617 -0.458336 -0.0360309 +0.11796 -0.00196684 -0.151498 +0.110489 0.008862 -0.155734 +0.119387 0.0273131 -0.141295 +0.100036 0.00317869 -0.149099 +0.0946498 0.00360487 -0.130289 +0.0996271 0.00897841 -0.108462 +0.0876406 0.00969553 -0.149119 +0.0889673 0.0239205 -0.144401 +0.103773 0.0275171 -0.140968 +0.112143 0.0407687 -0.122665 +0.128275 -0.00210722 -0.155193 +0.136944 0.00690927 -0.158099 +0.1315 0.01712 -0.150046 +0.148823 0.0111196 -0.154092 +0.137878 -0.00286061 -0.157253 +0.0812501 0.0180999 -0.148671 +0.0723702 0.0199576 -0.146504 +0.0894465 0.0177562 -0.14994 +-0.244247 -0.411744 -0.197734 +0.0532101 -0.0425986 0.239458 +0.0614299 -0.034607 0.250277 +0.0718515 -0.0264935 0.244569 +0.0612036 -0.0408317 0.227838 +0.211416 0.21985 0.0506815 +0.209629 0.209187 0.0516229 +0.197715 0.200596 0.0531448 +0.210711 0.212673 0.041983 +0.209533 0.205981 0.0261421 +0.207685 0.214484 0.0320655 +0.204793 0.215907 0.019768 +0.207322 0.190012 0.0316877 +0.210424 0.206724 0.0353988 +0.209086 0.197885 0.0355421 +0.19948 0.191764 0.0420701 +0.206287 0.1798 0.0239909 +0.199532 0.162119 0.0159658 +0.0889829 0.0153312 0.187549 +0.0895058 0.0194699 0.175832 +0.0997882 0.0258376 0.180178 +0.0912633 -0.43583 -0.104962 +0.0893849 -0.44209 -0.0966632 +0.0818551 -0.438899 -0.0891003 +0.0775492 -0.435915 -0.0759439 +0.0805228 -0.426773 -0.087989 +0.0848008 -0.421093 -0.0971385 +0.0844397 -0.410175 -0.0930928 +0.0796444 -0.399052 -0.082153 +0.096306 -0.399151 -0.0928503 +0.0992866 -0.434977 -0.10667 +-0.038871 -0.095203 0.134909 +-0.0453136 -0.074362 0.132403 +-0.0642973 -0.0816285 0.135216 +0.128958 0.371237 0.164377 +0.114324 0.368213 0.169385 +0.110394 0.358489 0.182698 +0.119359 0.382173 0.172221 +0.244566 0.0274799 0.091132 +0.236517 0.0321023 0.108593 +0.228129 0.0154777 0.110489 +0.243652 -0.0044318 0.106704 +0.215089 0.0116198 0.126655 +0.193164 -0.00203925 0.149761 +0.295901 -0.145148 0.11649 +0.181002 0.326878 0.162405 +0.192626 0.308402 0.164847 +0.180295 0.335983 0.171005 +0.215019 0.222685 -0.0085752 +0.216226 0.238327 -0.00679645 +0.204842 0.243639 -0.00108745 +0.197086 0.237151 0.00943393 +0.207737 0.21475 -0.00125832 +0.200663 0.225332 0.00994825 +0.227239 0.239308 -0.00361834 +0.210369 0.205349 -0.000451507 +0.212421 0.195338 0.00658041 +0.0965367 0.0723068 0.0490018 +-0.263237 -0.382248 -0.20077 +-0.334935 -0.395374 -0.246716 +0.0666968 0.0983382 0.0352739 +0.0735768 0.104043 0.0256427 +0.0854137 0.105714 0.0280147 +0.0966684 0.103408 0.0197312 +-0.293219 -0.246559 0.00868918 +-0.284829 -0.260543 0.00656712 +0.231694 -0.239358 -0.229883 +0.249173 -0.248287 -0.23972 +-0.313753 -0.278534 -0.156686 +-0.167921 -0.0222432 0.100354 +-0.166557 -0.0217484 0.0804222 +-0.137191 -0.0189498 0.0544508 +-0.183157 -0.0297007 0.0652393 +-0.193717 -0.0386652 0.0428719 +-0.162262 -0.0205653 0.0563587 +-0.148465 -0.0201145 0.071316 +-0.122512 -0.0229086 0.0762312 +-0.112808 -0.0225311 0.0535636 +-0.15755 -0.0225071 0.112728 +-0.13968 -0.0242143 0.109228 +-0.128528 -0.0323847 0.121144 +-0.137944 -0.0426964 0.133983 +0.338353 -0.331842 -0.233 +0.197716 0.0369013 -0.0158252 +0.225598 0.0269623 0.107608 +0.227611 0.0352699 0.116368 +0.216481 0.0416846 0.126455 +0.20366 0.0291575 0.127785 +0.197706 0.0139181 0.138946 +0.177004 0.0154396 0.15063 +0.196436 0.0406475 0.130552 +0.183582 0.0465791 0.137895 +0.171962 0.0340634 0.144092 +0.209838 0.0350513 0.1214 +0.122018 -0.0147207 0.202688 +0.134625 -0.010294 0.190699 +0.150345 -0.0204184 0.190322 +0.171467 -0.0443352 0.191435 +0.124137 -0.0275222 0.21069 +0.115004 -0.0324307 0.220668 +0.103488 -0.0235525 0.230568 +-0.234966 -0.250492 -0.00657503 +0.230136 -0.0629922 0.010065 +0.22781 -0.0439028 0.0052695 +0.226758 -0.0758146 -0.00318988 +0.218119 -0.0755566 -0.0185995 +0.210925 -0.0881128 -0.0299059 +0.195391 -0.0835698 -0.0397083 +0.187049 -0.0970928 -0.0513544 +0.215909 -0.10623 -0.0275177 +0.221663 -0.111792 -0.00835326 +0.21689 -0.135734 -0.006698 +0.187289 -0.0668273 -0.0361071 +0.170089 -0.0549841 -0.0384156 +0.158135 -0.0292105 -0.0224101 +0.144698 -0.0631652 -0.0561794 +0.210349 -0.156804 0.00619425 +0.122465 -0.0210506 -0.020971 +0.25102 0.0827579 -0.00901225 +0.246076 0.0717907 -0.00732438 +0.248146 0.0653429 0.00439784 +0.245544 0.0538898 0.0151974 +0.255748 0.0868229 -0.000826293 +-0.125725 -0.258433 -0.170214 +0.151089 -0.0268375 0.140451 +0.244155 0.0131187 -0.0533056 +0.246127 0.0105937 -0.0612737 +0.239403 0.00492409 -0.0645919 +0.228547 -0.00190445 -0.0800819 +0.236042 0.000460551 -0.073323 +0.244455 -0.00400961 -0.0816292 +0.225173 0.00380285 -0.0703884 +0.247885 -0.00234363 -0.0902777 +0.247838 0.00379159 -0.0839495 +0.243353 0.0148187 -0.0838177 +0.236031 0.0244971 -0.0791546 +0.225616 0.0291453 -0.0875646 +-0.29518 -0.390079 -0.254006 +-0.303646 -0.394416 -0.248506 +-0.302477 -0.403327 -0.233435 +-0.298023 -0.412267 -0.217588 +-0.29425 -0.38151 -0.250683 +-0.302074 -0.390767 -0.254186 +0.191342 0.435898 0.0636941 +-0.0964353 -0.460913 -0.0144457 +0.137532 -0.0116873 0.139128 +0.343547 -0.294973 -0.292923 +0.137424 0.0947211 0.0118894 +0.147115 0.0902563 -0.00271409 +0.147874 0.0802052 -0.0226835 +0.255027 -0.310713 -0.257667 +0.257498 -0.300887 -0.266482 +0.220835 -0.0105204 -0.15317 +0.210403 -0.014095 -0.156518 +0.204562 -0.0228168 -0.148776 +-0.117774 -0.20207 0.202016 +3 566 1199 1209 +3 886 137 1150 +3 2085 17 2088 +3 1317 1316 328 +3 1015 1021 1016 +3 1219 1218 721 +3 970 1215 182 +3 526 528 185 +3 528 446 185 +3 1552 1534 1551 +3 665 666 630 +3 1114 1209 242 +3 279 6 280 +3 6 283 280 +3 612 938 939 +3 235 273 275 +3 2527 1710 2528 +3 2188 2187 2186 +3 11 206 278 +3 906 93 2043 +3 524 2685 2686 +3 2107 2109 2102 +3 1341 1343 750 +3 1328 1341 750 +3 1738 519 1856 +3 2588 1612 2587 +3 2300 2228 2301 +3 976 96 974 +3 103 21 104 +3 1644 1645 31 +3 1649 1645 1644 +3 2027 2028 295 +3 732 733 458 +3 588 1068 1070 +3 987 2154 2153 +3 2147 987 2153 +3 214 38 215 +3 2165 2168 467 +3 2687 257 2690 +3 216 548 928 +3 548 547 928 +3 970 2117 96 +3 452 1006 1005 +3 945 1912 2496 +3 616 1478 1479 +3 1749 1754 512 +3 1550 2735 1969 +3 52 1449 1450 +3 2064 52 1450 +3 2330 2336 1347 +3 2017 1463 74 +3 329 326 1725 +3 917 918 176 +3 1967 247 1966 +3 413 1929 1930 +3 837 538 184 +3 1120 354 352 +3 1859 1858 134 +3 5 962 1092 +3 80 27 1563 +3 1453 1646 175 +3 1915 1916 2581 +3 21 105 104 +3 21 103 29 +3 2143 943 1148 +3 288 2143 1148 +3 294 1903 1904 +3 1247 1828 442 +3 1718 1719 337 +3 687 1171 1169 +3 1170 687 1169 +3 1453 66 1646 +3 68 891 122 +3 260 1711 341 +3 790 396 472 +3 1480 418 1479 +3 279 11 278 +3 277 279 278 +3 226 2083 2082 +3 258 259 76 +3 677 674 709 +3 1216 934 1214 +3 1561 1562 1941 +3 91 2036 961 +3 714 719 1217 +3 714 717 719 +3 47 281 280 +3 85 1945 2209 +3 207 154 64 +3 1963 1961 1962 +3 547 837 184 +3 76 261 1582 +3 259 261 76 +3 673 697 1468 +3 651 697 673 +3 296 17 297 +3 17 2085 297 +3 548 216 900 +3 381 383 382 +3 271 269 296 +3 269 17 296 +3 1066 647 1786 +3 115 199 196 +3 1040 1033 864 +3 1484 2536 2211 +3 212 544 238 +3 1943 1562 27 +3 364 72 365 +3 665 648 664 +3 82 168 158 +3 1117 632 1155 +3 439 1373 1378 +3 788 787 397 +3 178 2624 455 +3 159 2063 157 +3 1620 1622 1621 +3 1622 1264 1621 +3 1463 141 1462 +3 2107 2100 2109 +3 358 2100 2107 +3 559 528 525 +3 64 264 274 +3 137 365 380 +3 379 137 380 +3 117 887 886 +3 377 376 136 +3 88 2528 2529 +3 83 1283 1290 +3 1782 683 1785 +3 1605 575 701 +3 636 593 1771 +3 497 494 496 +3 1818 1247 54 +3 1669 1544 511 +3 1153 1053 1052 +3 42 1788 1791 +3 21 67 106 +3 81 80 84 +3 20 105 118 +3 20 156 105 +3 67 21 256 +3 999 258 1000 +3 259 258 65 +3 640 874 1628 +3 1984 116 1983 +3 1130 401 1131 +3 126 1579 1582 +3 164 1857 163 +3 120 164 163 +3 2736 378 377 +3 1759 1856 519 +3 504 505 412 +3 1127 738 305 +3 1241 1008 1244 +3 850 1779 1778 +3 2647 1779 850 +3 565 1206 1205 +3 1636 1022 1635 +3 158 168 51 +3 777 1524 1525 +3 980 982 61 +3 280 281 11 +3 903 93 902 +3 581 2263 1306 +3 1289 1442 1446 +3 68 122 118 +3 238 531 549 +3 138 365 887 +3 1500 1526 1499 +3 264 1683 268 +3 2042 2043 93 +3 6 273 283 +3 2516 63 246 +3 236 317 319 +3 40 84 80 +3 84 40 104 +3 762 1324 1323 +3 1326 762 1323 +3 170 263 265 +3 1949 170 265 +3 21 106 105 +3 928 183 1703 +3 928 929 183 +3 1857 164 165 +3 67 249 106 +3 283 235 47 +3 63 1968 246 +3 314 235 275 +3 434 435 188 +3 1709 1710 345 +3 1145 2393 2394 +3 2421 585 1086 +3 1448 1289 1446 +3 2 1120 1121 +3 1046 2472 2473 +3 1774 219 1772 +3 1699 981 1695 +3 264 268 274 +3 438 1394 1231 +3 520 2684 524 +3 2684 2683 524 +3 118 105 106 +3 164 120 121 +3 71 131 165 +3 63 247 1968 +3 1857 165 1858 +3 2017 2015 2016 +3 2248 2394 2249 +3 254 106 249 +3 254 68 106 +3 676 652 661 +3 1462 75 2098 +3 973 180 975 +3 263 24 265 +3 1984 1983 916 +3 1687 170 1451 +3 124 1000 76 +3 277 278 64 +3 430 151 429 +3 2188 2719 2152 +3 802 406 472 +3 1463 237 74 +3 1957 1540 2573 +3 2659 888 881 +3 888 883 881 +3 377 378 135 +3 132 72 364 +3 282 109 293 +3 109 282 319 +3 224 83 1290 +3 74 381 376 +3 2017 2016 141 +3 2189 2640 2187 +3 1118 1405 1404 +3 411 798 797 +3 2586 1604 700 +3 126 1582 261 +3 983 34 975 +3 883 1954 1952 +3 98 1299 275 +3 912 1730 915 +3 144 2094 2099 +3 23 234 78 +3 594 784 698 +3 337 1454 332 +3 1454 1455 332 +3 1555 16 1554 +3 541 92 543 +3 2157 2189 2152 +3 2199 2544 2543 +3 378 72 135 +3 1759 1747 1856 +3 278 206 207 +3 170 82 1451 +3 265 24 266 +3 308 153 927 +3 310 308 927 +3 267 1950 1466 +3 236 316 317 +3 1858 165 134 +3 1861 2350 1443 +3 163 159 120 +3 1428 1432 1427 +3 740 887 117 +3 138 887 740 +3 935 1215 970 +3 971 935 970 +3 2632 691 2634 +3 443 187 444 +3 1685 154 894 +3 256 21 29 +3 84 168 81 +3 1267 2348 2646 +3 2698 79 836 +3 146 363 2106 +3 1307 1308 2234 +3 68 118 106 +3 1027 1022 1636 +3 2735 1549 1668 +3 1215 1216 1214 +3 906 901 93 +3 809 394 808 +3 504 388 505 +3 747 1172 2091 +3 817 815 481 +3 554 1322 179 +3 883 888 1954 +3 630 1117 1122 +3 665 630 1122 +3 1234 1227 1238 +3 2677 2676 1400 +3 496 493 497 +3 1653 1197 1196 +3 1364 1009 442 +3 913 912 914 +3 1818 1817 1246 +3 1817 1820 1246 +3 2695 2698 241 +3 985 971 977 +3 2624 2670 191 +3 1434 2726 1425 +3 264 1680 1683 +3 264 1681 1680 +3 346 330 1123 +3 1121 1120 353 +3 1478 551 1479 +3 2008 115 1989 +3 143 1458 1459 +3 1451 1676 1687 +3 211 958 959 +3 319 318 109 +3 319 317 318 +3 2044 2040 209 +3 999 123 258 +3 207 59 894 +3 1733 241 832 +3 841 222 1773 +3 540 841 1773 +3 87 343 1713 +3 612 899 613 +3 392 787 790 +3 961 960 959 +3 1979 976 918 +3 976 176 918 +3 1757 2706 2707 +3 278 207 64 +3 518 1655 1654 +3 2734 1665 2733 +3 1665 2734 1550 +3 1091 1089 1090 +3 190 2555 2556 +3 786 392 577 +3 1740 1746 1756 +3 470 800 389 +3 2122 1033 1032 +3 510 509 1540 +3 321 2020 2026 +3 470 471 503 +3 1164 757 1165 +3 547 184 929 +3 1211 1212 933 +3 1855 255 101 +3 1882 591 2221 +3 124 998 999 +3 273 98 275 +3 225 1576 1577 +3 48 313 314 +3 533 2690 2691 +3 2690 533 532 +3 1860 1859 462 +3 1773 1772 964 +3 778 2201 2200 +3 307 39 311 +3 39 307 320 +3 1495 1497 1502 +3 1547 1665 1546 +3 409 938 612 +3 2481 2295 2294 +3 535 838 839 +3 453 438 1233 +3 523 1475 2702 +3 1243 447 1242 +3 1640 2133 2138 +3 503 388 504 +3 1667 1666 1670 +3 1666 1547 1670 +3 1607 1608 575 +3 457 556 2622 +3 175 913 914 +3 262 1719 1718 +3 1719 262 1720 +3 380 72 378 +3 365 72 380 +3 128 2210 1948 +3 2494 135 2495 +3 128 1948 1950 +3 1105 2150 288 +3 875 1626 1344 +3 135 132 2495 +3 76 1000 258 +3 117 886 885 +3 132 135 72 +3 892 139 893 +3 125 76 1582 +3 76 125 124 +3 722 721 730 +3 30 535 537 +3 30 534 535 +3 394 810 808 +3 260 1714 1712 +3 341 1709 1716 +3 173 547 548 +3 1125 331 1123 +3 1719 1454 337 +3 2630 2629 691 +3 1714 1715 259 +3 230 1347 2339 +3 281 282 12 +3 2100 2101 2109 +3 1652 1815 1813 +3 579 1660 1067 +3 1053 1153 632 +3 1133 423 1072 +3 11 279 280 +3 903 1315 213 +3 1590 705 3 +3 2336 2330 2329 +3 178 2623 2669 +3 2057 2056 2055 +3 320 318 39 +3 318 317 39 +3 738 14 739 +3 6 272 273 +3 2135 1031 1035 +3 1042 2126 2125 +3 237 1463 142 +3 1762 517 1482 +3 582 686 765 +3 687 686 2091 +3 234 23 429 +3 784 710 674 +3 236 282 47 +3 235 236 47 +3 23 1146 2275 +3 2155 2640 2190 +3 2643 2642 816 +3 236 319 282 +3 801 389 792 +3 503 504 470 +3 1624 1438 486 +3 1262 1622 1620 +3 191 2677 2678 +3 1122 1117 1155 +3 819 824 411 +3 824 1168 411 +3 1861 1860 462 +3 138 740 738 +3 22 2032 300 +3 309 739 1002 +3 1614 577 580 +3 1131 1614 580 +3 1734 2695 241 +3 2695 1734 516 +3 379 380 378 +3 1712 1714 65 +3 1692 1691 197 +3 2055 2056 954 +3 300 2032 2031 +3 887 137 886 +3 25 332 986 +3 236 235 315 +3 1146 78 1011 +3 1147 318 320 +3 147 428 785 +3 360 359 302 +3 2248 1156 3 +3 628 660 668 +3 738 1127 14 +3 2668 2671 417 +3 1197 566 565 +3 1199 566 1197 +3 2149 2186 2155 +3 2326 708 2327 +3 529 184 538 +3 601 1181 393 +3 1368 2293 2406 +3 823 149 821 +3 940 149 823 +3 181 330 347 +3 665 1122 648 +3 340 326 329 +3 1397 1382 1598 +3 2626 1785 683 +3 173 548 908 +3 928 547 929 +3 529 538 527 +3 1703 216 928 +3 334 90 336 +3 2437 767 2442 +3 911 1730 913 +3 1251 310 927 +3 2441 936 767 +3 1128 583 1130 +3 913 175 911 +3 323 1694 1693 +3 2243 2255 2392 +3 1774 1776 1775 +3 1696 1698 2532 +3 222 841 842 +3 346 1123 1723 +3 793 792 389 +3 292 1057 1056 +3 1097 1922 1925 +3 1728 1727 1100 +3 2248 2249 1156 +3 1924 996 287 +3 1717 77 1715 +3 503 804 828 +3 416 823 2672 +3 1244 1008 1236 +3 1427 1432 477 +3 2696 2694 531 +3 560 727 719 +3 2023 2022 298 +3 187 1121 353 +3 1405 1381 440 +3 463 133 737 +3 885 886 360 +3 886 1150 360 +3 583 1128 795 +3 151 234 429 +3 2284 705 2285 +3 1611 1606 1605 +3 492 770 2568 +3 1465 2658 146 +3 2661 145 882 +3 373 1933 1257 +3 1213 969 182 +3 384 237 142 +3 1009 1247 442 +3 1257 1259 1266 +3 884 1952 1177 +3 381 237 383 +3 823 821 414 +3 739 737 738 +3 138 738 737 +3 2681 436 1664 +3 773 1526 1500 +3 2566 2569 1537 +3 804 503 471 +3 764 2446 2447 +3 1168 824 415 +3 2679 1400 2675 +3 436 2679 2675 +3 1200 1203 1201 +3 393 1179 603 +3 238 544 545 +3 1190 523 1191 +3 1409 1436 2599 +3 1436 190 2599 +3 1741 1757 2707 +3 1066 1062 647 +3 1672 2229 2228 +3 492 491 1 +3 1219 720 1218 +3 615 611 552 +3 392 580 577 +3 2091 1172 687 +3 495 491 492 +3 607 1188 1189 +3 809 508 782 +3 293 2026 294 +3 215 343 87 +3 837 838 538 +3 838 837 536 +3 2731 1044 1113 +3 212 541 542 +3 121 473 119 +3 768 611 410 +3 1304 601 1305 +3 418 609 615 +3 1482 2702 522 +3 409 937 938 +3 941 2671 2667 +3 1625 1434 1624 +3 610 2446 1158 +3 2634 699 2632 +3 877 755 871 +3 1385 2584 1663 +3 2269 2270 427 +3 521 522 1322 +3 449 435 448 +3 1667 1668 1549 +3 1666 1667 1549 +3 1863 832 1864 +3 1243 1241 449 +3 400 1307 1609 +3 421 2213 1517 +3 2213 421 1488 +3 659 657 662 +3 1433 476 475 +3 1416 1625 1624 +3 613 896 409 +3 828 2643 816 +3 457 733 732 +3 461 1400 2679 +3 720 1005 718 +3 893 2014 140 +3 1200 518 1203 +3 824 940 415 +3 407 795 1128 +3 724 725 723 +3 2693 530 2688 +3 567 1207 1205 +3 455 2678 192 +3 589 2627 2626 +3 1128 1130 580 +3 618 1359 1360 +3 1357 1358 642 +3 1762 1482 240 +3 1073 597 617 +3 1739 1204 517 +3 456 455 192 +3 192 453 450 +3 692 572 695 +3 664 667 627 +3 1006 1321 474 +3 2684 177 2683 +3 456 178 455 +3 602 1325 1324 +3 616 615 552 +3 2285 1585 2284 +3 2689 531 2688 +3 733 178 456 +3 474 718 1005 +3 967 1507 1509 +3 525 528 526 +3 762 602 1324 +3 2569 2566 2567 +3 1427 479 148 +3 733 456 458 +3 411 800 818 +3 728 731 458 +3 558 528 559 +3 597 654 1771 +3 1733 1734 241 +3 818 819 411 +3 419 782 508 +3 1421 1625 1416 +3 2269 427 2272 +3 747 2091 582 +3 616 552 1477 +3 471 470 389 +3 801 471 389 +3 1490 1487 1492 +3 1526 1485 775 +3 545 46 546 +3 691 2632 2631 +3 491 495 512 +3 774 1526 1516 +3 1196 565 1198 +3 1552 1551 1535 +3 2698 833 241 +3 2002 1987 2001 +3 123 128 258 +3 128 123 949 +3 1689 1690 573 +3 544 46 545 +3 274 2704 64 +3 1742 1744 2717 +3 1744 1745 2717 +3 497 500 494 +3 700 1604 572 +3 1527 1553 1551 +3 499 492 509 +3 2201 2202 391 +3 791 2206 2204 +3 802 471 801 +3 1553 1529 501 +3 1699 325 1700 +3 1494 1495 1489 +3 856 1036 1035 +3 1763 2715 2714 +3 528 186 446 +3 594 1053 711 +3 2627 644 678 +3 1477 553 1476 +3 1745 514 562 +3 2435 1690 398 +3 2710 2712 2709 +3 240 1736 1762 +3 1736 1737 1762 +3 737 736 138 +3 1 491 835 +3 1054 618 1360 +3 1055 618 1054 +3 729 728 458 +3 787 396 790 +3 1070 1068 1069 +3 401 1070 1069 +3 1004 452 1005 +3 838 534 538 +3 534 527 538 +3 795 794 174 +3 716 734 560 +3 734 731 560 +3 449 1241 54 +3 1182 2448 425 +3 801 2207 802 +3 239 524 530 +3 242 1209 1200 +3 1546 493 922 +3 50 722 730 +3 720 714 1218 +3 534 533 527 +3 533 534 30 +3 885 1953 884 +3 223 535 839 +3 535 534 838 +3 705 1584 3 +3 212 542 544 +3 539 537 535 +3 223 539 535 +3 2418 2417 1643 +3 539 540 541 +3 223 540 539 +3 1147 110 2029 +3 212 539 541 +3 929 930 183 +3 543 542 541 +3 2710 2709 2711 +3 217 901 904 +3 173 908 909 +3 839 536 840 +3 839 838 536 +3 46 203 546 +3 1065 95 653 +3 173 536 547 +3 149 940 824 +3 1469 554 1471 +3 727 50 730 +3 2711 1673 2713 +3 179 1473 1472 +3 1471 554 179 +3 2536 150 2211 +3 656 629 684 +3 562 1741 2716 +3 696 177 2684 +3 869 866 749 +3 401 1310 578 +3 550 1480 1473 +3 1653 1654 1197 +3 727 730 719 +3 715 1219 721 +3 1341 753 1342 +3 1328 753 1341 +3 698 1050 594 +3 698 623 1050 +3 1060 647 1062 +3 575 1606 1607 +3 696 2684 520 +3 1310 401 1069 +3 1132 1070 401 +3 589 643 2627 +3 2598 2597 568 +3 757 602 898 +3 602 757 756 +3 898 613 899 +3 1888 1887 741 +3 671 688 596 +3 654 637 636 +3 717 714 718 +3 817 484 815 +3 668 660 627 +3 609 608 1166 +3 608 609 418 +3 828 484 503 +3 688 671 626 +3 1054 586 1055 +3 1788 107 57 +3 798 408 797 +3 627 663 664 +3 2311 2310 1187 +3 884 117 885 +3 1190 564 1189 +3 649 670 666 +3 2615 1784 587 +3 409 612 613 +3 2700 2699 1191 +3 640 1628 875 +3 611 0 612 +3 671 669 626 +3 665 649 666 +3 589 2626 2628 +3 1770 593 1769 +3 689 701 575 +3 701 689 1080 +3 394 782 812 +3 1332 1339 1331 +3 1338 1339 1332 +3 408 2441 811 +3 1305 601 600 +3 1135 607 1207 +3 2140 2139 1028 +3 0 899 612 +3 2626 2627 678 +3 2634 2633 571 +3 718 714 720 +3 2699 1195 2703 +3 2313 1193 1188 +3 829 2638 817 +3 2286 705 1589 +3 1135 1134 607 +3 2314 2306 1185 +3 2236 2237 579 +3 606 1480 550 +3 551 1480 1479 +3 729 50 728 +3 1129 1128 580 +3 1165 1166 610 +3 1166 1165 609 +3 2508 2507 1590 +3 611 612 410 +3 1341 1342 754 +3 404 1323 1304 +3 1326 1323 404 +3 145 2107 2102 +3 1433 2104 355 +3 137 379 1149 +3 768 552 611 +3 661 684 629 +3 659 662 663 +3 2715 1742 2716 +3 1053 712 711 +3 645 1171 1172 +3 628 669 671 +3 1650 1651 651 +3 797 389 800 +3 662 658 649 +3 658 670 649 +3 2312 1179 604 +3 598 637 654 +3 656 586 657 +3 629 657 659 +3 702 1080 1079 +3 753 1328 1325 +3 742 1887 1888 +3 588 1070 1071 +3 1952 884 1953 +3 1167 1168 415 +3 699 572 692 +3 1387 1374 2292 +3 628 671 676 +3 663 662 649 +3 660 661 629 +3 627 660 659 +3 660 629 659 +3 628 661 660 +3 1882 1884 591 +3 800 411 797 +3 684 619 656 +3 1066 1061 1062 +3 627 659 663 +3 657 586 658 +3 1604 1605 701 +3 868 639 865 +3 1651 698 651 +3 628 676 661 +3 145 359 2107 +3 1871 1870 879 +3 697 651 698 +3 1824 1231 1823 +3 716 560 719 +3 711 712 633 +3 597 1073 1065 +3 2115 673 1468 +3 841 540 223 +3 707 1591 2507 +3 1743 1760 2712 +3 732 731 557 +3 865 685 866 +3 1117 630 1116 +3 483 813 2642 +3 1512 1501 1528 +3 949 948 252 +3 484 828 816 +3 1159 1160 1164 +3 1521 1523 777 +3 2509 2504 1592 +3 1689 1602 1972 +3 976 974 176 +3 843 222 842 +3 1630 222 843 +3 717 459 716 +3 558 186 528 +3 357 2093 2092 +3 459 717 718 +3 1333 752 1335 +3 731 734 557 +3 716 719 717 +3 728 560 731 +3 560 728 727 +3 1543 510 1957 +3 862 2127 2128 +3 757 1160 756 +3 940 823 416 +3 50 727 728 +3 1217 721 1218 +3 735 718 474 +3 887 365 137 +3 459 718 735 +3 736 365 138 +3 1885 1886 742 +3 1356 2628 1359 +3 566 789 94 +3 865 746 685 +3 1409 2454 1118 +3 871 870 749 +3 405 760 1338 +3 938 416 939 +3 581 1306 1307 +3 2623 178 2621 +3 137 1149 1150 +3 757 1164 1160 +3 613 898 895 +3 438 461 1393 +3 766 582 765 +3 749 877 871 +3 412 819 818 +3 793 797 408 +3 789 807 396 +3 1323 761 1304 +3 1004 1220 1221 +3 777 1522 1521 +3 2648 2647 850 +3 949 123 948 +3 694 1080 1081 +3 2280 1003 2279 +3 1521 420 1523 +3 286 2142 232 +3 1639 2139 2140 +3 354 2096 352 +3 392 786 787 +3 406 790 472 +3 938 940 416 +3 761 2450 1304 +3 1196 1195 244 +3 2201 2542 2200 +3 797 793 389 +3 1168 1167 798 +3 819 149 824 +3 472 805 803 +3 391 2541 2542 +3 1111 2443 937 +3 803 805 804 +3 802 803 471 +3 802 472 803 +3 789 395 807 +3 803 804 471 +3 1195 564 2703 +3 396 807 472 +3 394 809 782 +3 2199 813 781 +3 815 391 481 +3 2643 483 2642 +3 782 813 812 +3 940 937 415 +3 937 940 938 +3 2091 686 582 +3 1168 798 411 +3 1906 2538 1106 +3 481 830 829 +3 1867 1866 833 +3 536 837 547 +3 16 2570 1557 +3 1032 2123 2122 +3 1550 2734 2735 +3 840 223 839 +3 962 851 1092 +3 2157 2152 2720 +3 239 530 2693 +3 2258 2259 849 +3 2133 2129 1030 +3 1122 1155 648 +3 857 1039 1019 +3 2009 2008 920 +3 2097 2108 142 +3 1151 44 360 +3 859 2259 2732 +3 2128 2127 2130 +3 1035 1036 1018 +3 898 899 757 +3 306 14 1127 +3 614 897 896 +3 2657 2656 301 +3 2315 2316 605 +3 685 746 1883 +3 1869 1870 1334 +3 1126 304 1127 +3 890 117 884 +3 740 117 890 +3 915 1730 1729 +3 738 740 890 +3 214 894 59 +3 895 896 613 +3 1113 854 1112 +3 77 337 1110 +3 901 217 900 +3 901 900 902 +3 985 982 935 +3 1359 1781 1360 +3 1702 1703 183 +3 1059 1108 1109 +3 1381 439 1379 +3 948 947 252 +3 1458 1460 1459 +3 2670 2624 2669 +3 1844 1845 2399 +3 395 2728 806 +3 807 395 806 +3 2673 414 2670 +3 416 2672 941 +3 992 467 989 +3 289 1057 944 +3 71 130 131 +3 2186 988 2185 +3 2013 339 2014 +3 1589 705 1590 +3 2482 2295 2481 +3 2369 2160 2370 +3 2160 2369 2161 +3 1210 2296 932 +3 2640 2155 2187 +3 2395 2268 2265 +3 124 999 1000 +3 248 255 60 +3 467 987 989 +3 2154 987 467 +3 2310 604 1186 +3 1999 977 1998 +3 123 891 948 +3 891 123 999 +3 1191 2701 2700 +3 1226 1801 1802 +3 910 1644 1643 +3 1093 849 1094 +3 852 1093 1094 +3 2283 1585 2282 +3 1021 1022 1027 +3 2730 2729 1114 +3 1949 265 86 +3 1947 1949 86 +3 2070 1282 2071 +3 2339 2337 1255 +3 1347 2337 2339 +3 2158 2192 2177 +3 1278 1137 1273 +3 979 61 978 +3 1237 1819 1652 +3 2076 1283 229 +3 2385 873 2383 +3 1258 1257 1253 +3 373 1257 1258 +3 1574 1575 1138 +3 1574 465 1575 +3 2083 226 2084 +3 2497 1488 1490 +3 1342 878 754 +3 2035 204 2036 +3 2563 2566 2564 +3 2563 1539 2566 +3 965 964 963 +3 965 963 221 +3 906 424 904 +3 424 906 954 +3 2105 2108 2097 +3 2612 2108 2105 +3 954 906 220 +3 113 2025 2023 +3 2413 905 1959 +3 1959 217 2413 +3 217 904 2413 +3 57 1789 1788 +3 2131 2134 2132 +3 208 2044 214 +3 754 2221 591 +3 2221 754 867 +3 2048 959 958 +3 543 958 211 +3 335 1851 1850 +3 1318 2047 213 +3 960 542 211 +3 2042 2041 210 +3 1718 337 1717 +3 1316 213 1315 +3 853 1635 1632 +3 281 58 11 +3 58 281 1901 +3 1778 1779 219 +3 1779 963 219 +3 1775 1778 219 +3 982 1216 935 +3 1960 1959 1958 +3 2057 2059 2056 +3 2059 2057 221 +3 2061 962 955 +3 962 957 955 +3 2056 2059 955 +3 2059 2061 955 +3 2061 2059 2060 +3 1583 541 540 +3 1959 905 1958 +3 2059 221 2060 +3 1784 592 1783 +3 1732 1541 1731 +3 1545 1732 1731 +3 909 908 1960 +3 968 316 233 +3 303 2654 2031 +3 2654 300 2031 +3 2092 2093 2110 +3 1493 1489 776 +3 1494 1493 1487 +3 2690 257 2691 +3 2635 690 2630 +3 690 2629 2630 +3 1505 1504 55 +3 1500 1504 1505 +3 1497 1495 1494 +3 348 1934 1961 +3 1487 1496 1494 +3 2213 2214 1517 +3 2214 2213 780 +3 667 648 1595 +3 1596 667 1595 +3 1491 421 967 +3 2211 150 2216 +3 2212 2211 2216 +3 2655 2651 2656 +3 2655 2653 2651 +3 22 298 299 +3 2618 688 626 +3 771 2618 626 +3 2561 1935 2559 +3 1935 1936 2559 +3 316 39 317 +3 316 968 39 +3 968 311 39 +3 1360 1781 592 +3 37 195 1692 +3 2015 2017 140 +3 1104 2181 1912 +3 973 974 96 +3 974 973 975 +3 1647 9 1645 +3 982 985 61 +3 66 1649 1646 +3 974 914 176 +3 914 974 34 +3 914 917 176 +3 298 2022 295 +3 195 980 979 +3 2121 1033 2122 +3 1640 1639 1029 +3 969 180 973 +3 180 969 422 +3 333 89 1124 +3 333 1456 89 +3 686 1170 2439 +3 1170 174 2439 +3 2025 2024 2023 +3 975 34 974 +3 1662 1047 1632 +3 914 912 917 +3 33 347 346 +3 33 984 347 +3 1014 1016 844 +3 1014 2477 1016 +3 1849 2602 2611 +3 2602 1848 2611 +3 1145 2394 2248 +3 977 971 972 +3 971 96 972 +3 143 1455 1456 +3 1457 143 1456 +3 1457 334 336 +3 719 730 1217 +3 38 1318 344 +3 911 910 1648 +3 1830 1249 1827 +3 1642 4 202 +3 2013 127 1578 +3 127 1580 1578 +3 906 904 901 +3 195 37 980 +3 1694 1699 1695 +3 1720 329 1723 +3 351 34 983 +3 327 351 983 +3 758 1163 1336 +3 1217 730 721 +3 1455 986 332 +3 2527 88 2531 +3 323 197 99 +3 980 981 982 +3 983 975 180 +3 984 983 180 +3 984 327 983 +3 2103 356 2104 +3 1706 1705 324 +3 984 180 422 +3 347 984 422 +3 33 327 984 +3 971 985 935 +3 351 99 197 +3 1013 848 1014 +3 2735 1669 1969 +3 2567 2568 1538 +3 944 292 1101 +3 1057 292 944 +3 1922 1921 1098 +3 2235 1310 2237 +3 1965 249 248 +3 249 67 248 +3 2164 990 2166 +3 2163 2173 2174 +3 1902 1898 1899 +3 1902 112 1898 +3 1497 966 1498 +3 1502 1497 1498 +3 2169 2166 2167 +3 70 124 125 +3 998 124 70 +3 1991 978 2005 +3 2004 1991 2005 +3 2155 989 2149 +3 1925 1923 1926 +3 1928 350 1923 +3 2150 945 2151 +3 77 1362 261 +3 41 1963 1962 +3 998 891 999 +3 122 891 998 +3 70 122 998 +3 350 1098 2176 +3 2172 2163 2167 +3 2172 2167 990 +3 2630 691 2631 +3 141 2016 2019 +3 2284 2283 1584 +3 2284 1585 2283 +3 994 2176 2171 +3 2262 1305 1306 +3 404 1305 2262 +3 697 698 674 +3 2264 1141 1566 +3 815 484 2641 +3 484 816 2641 +3 287 996 995 +3 994 2169 2167 +3 997 2154 467 +3 2168 997 467 +3 2523 166 2522 +3 2164 2165 992 +3 2166 2165 2164 +3 2331 2330 2332 +3 1859 1860 1858 +3 102 40 107 +3 2356 1267 53 +3 1267 2356 2352 +3 969 2117 970 +3 2039 2035 2036 +3 2039 208 2035 +3 308 310 1002 +3 739 308 1002 +3 308 739 14 +3 1811 1812 1235 +3 2307 1184 2308 +3 722 725 1222 +3 725 722 723 +3 1004 1005 720 +3 723 722 50 +3 50 729 723 +3 448 1243 449 +3 474 1005 1006 +3 723 729 726 +3 451 723 726 +3 1804 1803 193 +3 1803 1804 1226 +3 1656 1654 1483 +3 1009 441 188 +3 1241 1240 1008 +3 912 915 1985 +3 915 916 1985 +3 2018 2019 2016 +3 2019 2018 1459 +3 336 1461 1460 +3 2663 1641 1636 +3 1635 2663 1636 +3 435 449 1009 +3 188 435 1009 +3 453 461 438 +3 693 1107 1077 +3 1010 826 827 +3 1077 1107 825 +3 1908 2540 1906 +3 2646 2346 371 +3 2346 2646 2348 +3 1490 1488 1491 +3 2499 2500 1157 +3 2215 780 2198 +3 1060 1109 647 +3 682 2279 2278 +3 695 826 1010 +3 342 1710 1711 +3 1710 341 1711 +3 1147 320 110 +3 190 2601 2599 +3 2028 2027 2029 +3 2042 93 903 +3 2041 2040 2045 +3 2040 91 2045 +3 1215 1214 182 +3 1641 2141 1637 +3 1032 2131 2130 +3 1639 2140 2141 +3 2140 1028 2141 +3 2462 2470 1025 +3 190 2556 2557 +3 377 136 2736 +3 858 1017 1016 +3 1673 2228 2299 +3 2298 1673 2299 +3 2121 1041 2120 +3 1041 2126 2120 +3 1220 720 1219 +3 1778 1775 1777 +3 493 1542 497 +3 2278 2279 704 +3 1584 2278 704 +3 382 1149 379 +3 1017 857 1019 +3 1017 1018 857 +3 1222 715 722 +3 845 1014 844 +3 1020 845 844 +3 1019 1020 844 +3 1901 2452 58 +3 845 1013 1014 +3 1269 2682 1452 +3 1764 1270 1258 +3 367 1764 1258 +3 921 1976 1984 +3 1636 1637 1027 +3 1382 1397 2584 +3 1397 1386 2584 +3 2124 1041 2123 +3 1021 855 1022 +3 28 1563 1561 +3 1793 28 1561 +3 1988 2007 2006 +3 2124 2125 2126 +3 2136 2135 1034 +3 2135 2136 863 +3 1079 694 2464 +3 1153 595 1154 +3 1153 1049 595 +3 955 424 954 +3 649 665 664 +3 772 595 1049 +3 622 772 1049 +3 650 2116 1003 +3 2116 2281 1003 +3 424 955 957 +3 1043 2118 2732 +3 852 1089 1091 +3 1093 852 1091 +3 35 1991 1990 +3 1991 198 1990 +3 2095 356 2094 +3 331 1719 1720 +3 1977 1995 1994 +3 1995 1978 1994 +3 1031 2134 2131 +3 1030 2129 2128 +3 1032 1033 856 +3 1797 1722 262 +3 857 1037 1039 +3 1678 155 1677 +3 2471 2470 1024 +3 2693 2688 531 +3 1668 1667 1548 +3 607 2311 1187 +3 238 537 212 +3 1031 856 1035 +3 2134 2135 863 +3 1034 1035 1018 +3 1671 1670 563 +3 2053 2052 951 +3 1644 31 1643 +3 2475 1015 2476 +3 1015 2477 2476 +3 2470 2462 1045 +3 2462 2463 1045 +3 1017 858 1018 +3 1018 1036 857 +3 1036 1037 857 +3 1036 1040 1037 +3 1039 847 1019 +3 1016 1017 844 +3 1017 1019 844 +3 1038 847 1039 +3 1033 2258 864 +3 2258 1033 860 +3 1930 1411 2453 +3 1040 1036 856 +3 1669 502 2231 +3 1544 1669 2231 +3 1777 847 1038 +3 1751 1753 1752 +3 1040 864 1037 +3 1979 1980 1996 +3 1038 1037 864 +3 2157 995 2156 +3 2058 953 951 +3 2054 2055 954 +3 2054 953 2055 +3 2580 2578 2570 +3 2580 2569 2578 +3 2130 1030 2128 +3 2125 2124 862 +3 2606 2605 9 +3 1988 2001 2000 +3 1971 2220 2221 +3 867 1971 2221 +3 988 2148 2150 +3 664 663 649 +3 924 1942 1939 +3 199 1849 196 +3 2731 859 2732 +3 1090 848 1013 +3 907 1090 1013 +3 2468 2470 1045 +3 631 1155 1154 +3 1155 632 1154 +3 2187 2155 2186 +3 2732 2118 1044 +3 2118 854 1044 +3 240 522 521 +3 1482 522 240 +3 220 2051 2053 +3 2051 2052 2053 +3 1998 977 972 +3 2062 2048 958 +3 2526 1705 1708 +3 2128 2129 862 +3 1976 2009 920 +3 921 2009 1976 +3 1647 1649 66 +3 622 1049 1050 +3 1051 622 1050 +3 658 1051 623 +3 1051 1050 623 +3 586 1051 658 +3 1075 2430 2428 +3 1154 632 1153 +3 1050 1052 594 +3 1050 1049 1052 +3 1154 626 631 +3 595 626 1154 +3 1897 1895 1875 +3 1891 1890 742 +3 1051 586 1054 +3 1052 1049 1153 +3 465 1576 1575 +3 1576 225 1575 +3 1051 1054 622 +3 2361 271 2362 +3 656 655 1055 +3 655 656 619 +3 2088 2089 224 +3 102 103 40 +3 703 1059 2551 +3 2550 703 2551 +3 603 398 574 +3 398 603 1134 +3 1060 1062 1058 +3 664 648 667 +3 1068 588 1062 +3 1099 1728 1100 +3 291 1099 1100 +3 644 1067 1066 +3 678 644 1066 +3 647 1787 1786 +3 1061 1066 1067 +3 1059 1109 1060 +3 1078 1077 703 +3 702 701 1080 +3 2237 2236 2235 +3 1078 693 1077 +3 575 1974 689 +3 1974 575 1608 +3 1071 1064 588 +3 1064 1071 95 +3 584 1071 1070 +3 584 1072 1071 +3 1062 1061 1068 +3 1163 1158 405 +3 1874 1361 636 +3 1874 1889 1361 +3 681 2425 1086 +3 1060 1058 2551 +3 1785 1786 679 +3 173 1088 536 +3 1075 1074 2430 +3 1083 590 1075 +3 681 1083 1075 +3 1493 1492 1487 +3 585 1082 1083 +3 1061 1069 1068 +3 2532 325 1696 +3 588 1064 1063 +3 1926 1923 1096 +3 423 646 1072 +3 1063 1064 590 +3 1064 1065 590 +3 2385 2384 741 +3 2384 2385 2383 +3 403 2384 2383 +3 744 644 743 +3 744 1067 644 +3 48 314 275 +3 1133 1072 584 +3 2551 1059 1060 +3 2550 2551 1058 +3 1069 1061 1660 +3 1130 1132 401 +3 1130 583 1132 +3 1604 702 572 +3 702 2525 572 +3 582 766 1314 +3 1130 1131 580 +3 1131 401 578 +3 1071 1072 95 +3 1072 646 95 +3 646 653 95 +3 1783 592 1782 +3 2254 2244 2327 +3 2249 2254 2327 +3 1491 966 1558 +3 946 1108 1085 +3 1187 1188 607 +3 1077 825 1059 +3 1075 590 1074 +3 590 1073 1074 +3 2431 1074 2432 +3 1087 2423 1106 +3 2420 2423 1087 +3 398 2434 2435 +3 2434 398 1135 +3 2023 2024 26 +3 778 2200 2195 +3 590 1065 1073 +3 594 711 784 +3 711 710 784 +3 2080 2077 2078 +3 2428 2430 2429 +3 680 2428 2429 +3 2430 1074 2431 +3 2429 2430 2431 +3 617 2432 1073 +3 679 1076 680 +3 1783 680 1784 +3 1083 1063 590 +3 1110 332 338 +3 332 25 338 +3 697 677 1468 +3 674 677 697 +3 693 1078 1079 +3 946 1084 1076 +3 1062 1063 1082 +3 1063 1062 588 +3 2528 1710 342 +3 1058 1082 585 +3 1058 1062 1082 +3 585 1083 1086 +3 2524 2525 702 +3 825 1108 1059 +3 1082 1063 1083 +3 1723 329 1724 +3 249 1965 2725 +3 254 249 2725 +3 1592 1593 633 +3 1592 710 1593 +3 909 1088 173 +3 1786 1787 679 +3 1109 1108 946 +3 668 1596 1597 +3 1167 799 798 +3 1467 2245 2250 +3 2251 1467 2250 +3 2679 2680 1399 +3 840 536 1088 +3 842 840 1088 +3 842 841 840 +3 842 1088 909 +3 842 909 843 +3 585 2421 2422 +3 1086 1083 681 +3 2540 1010 2538 +3 1634 1023 854 +3 1091 1090 5 +3 1092 1091 5 +3 2240 2467 2463 +3 2240 2466 2467 +3 2467 1045 2463 +3 1635 1022 1662 +3 2329 370 1439 +3 1977 920 1995 +3 515 1754 1748 +3 1777 1038 850 +3 1778 1777 850 +3 1572 1571 464 +3 1571 1572 2649 +3 1138 2649 1572 +3 1092 851 1093 +3 1091 1092 1093 +3 1014 2476 2477 +3 1265 2225 1659 +3 2225 1265 2226 +3 1788 8 107 +3 1919 1918 1101 +3 2148 2147 288 +3 987 2147 2148 +3 2187 2188 2152 +3 2189 2187 2152 +3 88 2527 2528 +3 185 446 1850 +3 1158 764 405 +3 286 232 285 +3 1797 1716 1709 +3 116 1984 1986 +3 1984 1976 1986 +3 1917 1926 1096 +3 1796 1795 1793 +3 611 615 609 +3 2722 988 2151 +3 783 1488 2497 +3 2173 2163 2172 +3 1100 1103 291 +3 2378 1174 1173 +3 1485 2193 1489 +3 8 102 107 +3 1102 1916 1918 +3 1917 1916 1102 +3 991 2159 2158 +3 1100 469 1577 +3 1097 1919 1920 +3 1915 1914 1104 +3 1913 290 1095 +3 866 1970 749 +3 1918 1927 1102 +3 1412 1411 1929 +3 992 2165 467 +3 880 2661 2662 +3 674 698 784 +3 2205 2204 2206 +3 666 1650 672 +3 630 666 672 +3 1489 1493 1494 +3 2508 1590 3 +3 2423 825 1106 +3 896 897 1111 +3 896 1111 409 +3 937 409 1111 +3 794 811 174 +3 811 2438 174 +3 2443 2442 767 +3 2443 1111 2442 +3 829 830 2444 +3 2314 2315 2319 +3 1213 182 1212 +3 182 1214 1212 +3 1053 632 712 +3 632 1117 712 +3 2283 2282 682 +3 712 1116 1115 +3 1116 712 1117 +3 361 383 1151 +3 1865 390 1864 +3 430 147 431 +3 1213 181 422 +3 2279 2281 704 +3 2281 2279 1003 +3 1115 650 1003 +3 1115 1116 650 +3 2678 453 192 +3 1120 2 354 +3 455 2624 191 +3 530 2687 2688 +3 478 479 1426 +3 478 388 479 +3 957 2414 2412 +3 2414 905 2412 +3 2104 1854 355 +3 1407 1664 436 +3 1899 1898 13 +3 1376 2482 2481 +3 355 488 1420 +3 346 1723 1724 +3 329 1721 340 +3 1810 193 1808 +3 1809 1810 1808 +3 1819 1816 1652 +3 1231 1250 1823 +3 1362 1110 338 +3 153 366 927 +3 366 1251 927 +3 1761 519 1737 +3 2658 2652 2657 +3 363 2658 2657 +3 882 2657 301 +3 94 789 788 +3 1178 111 1126 +3 624 1768 1767 +3 1700 981 1699 +3 1481 1192 1482 +3 517 1481 1482 +3 705 2284 1584 +3 573 2436 2433 +3 573 2435 2436 +3 111 304 1126 +3 303 304 2654 +3 111 1178 889 +3 1462 2098 142 +3 2099 357 2100 +3 304 306 1127 +3 152 306 304 +3 407 794 795 +3 2438 2440 2437 +3 897 2438 2437 +3 584 1132 1133 +3 583 1133 1132 +3 792 407 2204 +3 1132 584 1070 +3 585 2422 1058 +3 2421 1087 2422 +3 1522 2194 1485 +3 794 407 793 +3 793 407 792 +3 2238 2233 2235 +3 870 869 749 +3 1133 583 796 +3 583 795 796 +3 2108 385 384 +3 142 2108 384 +3 1181 601 1182 +3 2479 1739 517 +3 2686 2685 257 +3 56 2230 1672 +3 465 2146 1576 +3 227 2075 2074 +3 1572 1573 1574 +3 464 1573 1572 +3 314 313 233 +3 313 312 233 +3 1294 1293 231 +3 276 1294 1281 +3 1276 2375 2377 +3 48 372 313 +3 465 1574 1573 +3 2349 2350 161 +3 2353 2349 161 +3 225 1567 1139 +3 321 2029 2027 +3 1147 2029 321 +3 2224 466 2223 +3 1570 1138 1139 +3 1567 1566 1139 +3 1067 1660 1061 +3 2226 1265 1271 +3 1265 228 1271 +3 1575 225 1139 +3 1294 231 1281 +3 1290 1283 2075 +3 1261 1272 1273 +3 1272 1278 1273 +3 1657 1658 1263 +3 1658 1657 1265 +3 634 652 1767 +3 1349 652 634 +3 1263 1259 1619 +3 1262 1617 1618 +3 1140 1623 1276 +3 1275 1615 1616 +3 1275 1261 1273 +3 228 1272 1271 +3 228 1277 1272 +3 1933 1259 1257 +3 2309 2310 2308 +3 2254 2394 2393 +3 2394 2254 2249 +3 1976 2328 1986 +3 366 153 312 +3 2334 366 312 +3 370 2330 2331 +3 466 2224 1103 +3 1914 2260 2181 +3 2180 2260 1913 +3 2260 2180 2181 +3 1332 1333 759 +3 1150 1151 360 +3 361 1151 1150 +3 2169 2170 993 +3 277 6 279 +3 277 1152 6 +3 268 97 274 +3 805 807 806 +3 989 2190 2156 +3 2122 1041 2121 +3 1882 2221 2220 +3 2132 1030 2727 +3 710 711 1593 +3 648 1155 1595 +3 1591 2509 1592 +3 2428 2427 1075 +3 2428 1076 2427 +3 1487 1558 1496 +3 425 2447 1166 +3 608 425 1166 +3 1180 2318 1183 +3 2318 1180 1181 +3 1165 0 609 +3 0 611 609 +3 1164 610 1159 +3 726 192 451 +3 1234 1238 1228 +3 1160 758 1161 +3 757 899 1165 +3 1599 1372 1598 +3 610 1164 1165 +3 456 192 726 +3 637 1874 636 +3 1874 637 1875 +3 755 1334 872 +3 620 1354 1873 +3 1889 620 1873 +3 1338 759 405 +3 1163 405 759 +3 1336 1163 759 +3 1407 2554 1664 +3 2552 1404 1403 +3 703 1077 1059 +3 1160 1159 758 +3 2446 610 1166 +3 2447 2446 1166 +3 2448 2449 764 +3 763 764 2449 +3 764 763 405 +3 98 272 284 +3 272 2361 284 +3 423 1171 646 +3 38 2047 1318 +3 488 487 1417 +3 1176 645 1175 +3 783 2497 1486 +3 796 1169 423 +3 1133 796 423 +3 1771 654 636 +3 796 1170 1169 +3 796 174 1170 +3 795 174 796 +3 1371 1395 2483 +3 1629 1631 845 +3 1173 645 1172 +3 2379 1173 2381 +3 868 2385 639 +3 638 1876 2359 +3 646 1171 1176 +3 2388 874 2378 +3 645 1173 1174 +3 270 2364 2363 +3 1177 890 884 +3 271 2360 97 +3 2379 2378 1173 +3 2388 2378 2379 +3 1175 2359 598 +3 645 1174 1175 +3 305 890 1177 +3 890 305 738 +3 645 1176 1171 +3 1899 108 1902 +3 1176 653 646 +3 598 653 1176 +3 653 598 654 +3 2408 1011 2410 +3 1534 2549 1551 +3 2549 1527 1551 +3 638 1877 1876 +3 1126 1127 305 +3 1177 1126 305 +3 2557 2601 190 +3 1437 2601 2557 +3 322 889 1178 +3 1178 1126 1177 +3 1180 393 1181 +3 899 0 1165 +3 2638 480 2537 +3 606 550 399 +3 1190 1189 550 +3 523 1190 550 +3 1189 399 550 +3 2174 350 2176 +3 2174 1924 350 +3 568 2433 2434 +3 567 568 2434 +3 789 396 788 +3 1179 393 1180 +3 2448 2447 425 +3 897 614 2439 +3 2598 568 94 +3 1594 709 710 +3 709 1594 2501 +3 1179 1180 604 +3 1180 1183 604 +3 607 2312 2311 +3 607 1134 2312 +3 522 2702 1475 +3 1193 1208 1194 +3 1208 2320 1194 +3 2205 406 2207 +3 83 1674 1286 +3 1284 83 1286 +3 1690 1689 570 +3 1608 570 1974 +3 1480 551 1473 +3 1205 1206 567 +3 1206 94 567 +3 604 1183 1186 +3 170 1679 263 +3 1322 522 1475 +3 1194 399 1193 +3 2729 2730 808 +3 2184 2159 2718 +3 2159 2184 2183 +3 561 1201 1203 +3 1201 561 514 +3 2701 1191 523 +3 1203 1656 1204 +3 1203 518 1656 +3 207 894 154 +3 1196 1197 565 +3 2320 1208 2319 +3 1188 399 1189 +3 1188 1193 399 +3 604 2311 2312 +3 2313 1187 2309 +3 1187 2310 2309 +3 398 1690 574 +3 495 1751 1750 +3 1934 1936 1935 +3 395 566 1114 +3 566 1209 1114 +3 2314 2319 1208 +3 1602 1689 573 +3 514 1202 1201 +3 491 512 1755 +3 2310 1186 2308 +3 242 1201 1202 +3 1192 2701 2702 +3 2701 523 2702 +3 277 2704 1152 +3 513 1748 1749 +3 1735 516 1734 +3 1202 809 242 +3 809 1202 494 +3 1986 2328 919 +3 242 1200 1201 +3 766 1311 1314 +3 56 1751 1752 +3 2593 2595 2590 +3 2593 2596 2595 +3 233 312 968 +3 1749 1748 1754 +3 1756 1747 1757 +3 561 1204 1739 +3 1207 607 564 +3 607 1189 564 +3 1739 2479 1746 +3 565 1205 1198 +3 1183 2318 2316 +3 1198 1207 564 +3 1207 1198 1205 +3 1195 1198 564 +3 418 615 616 +3 1479 418 616 +3 1134 1179 2312 +3 2417 1648 1643 +3 2249 2324 1156 +3 1658 1659 375 +3 1203 1204 561 +3 2321 606 1194 +3 2320 2321 1194 +3 1473 551 1476 +3 1220 715 1221 +3 933 930 1210 +3 183 930 933 +3 36 1216 982 +3 981 36 982 +3 858 1021 1027 +3 1210 1211 933 +3 1210 181 1211 +3 1107 693 1906 +3 725 724 1224 +3 1799 725 1224 +3 354 2 1854 +3 1213 1211 181 +3 1213 1212 1211 +3 1872 753 1325 +3 756 1872 1325 +3 907 1013 1012 +3 2141 1028 1637 +3 1216 36 934 +3 843 909 218 +3 909 1960 218 +3 908 217 1959 +3 1780 933 1214 +3 929 184 931 +3 2007 2011 2012 +3 2011 2007 1989 +3 2696 531 238 +3 1799 2458 2459 +3 1220 1004 720 +3 18 2604 2606 +3 1807 1802 1806 +3 1802 1807 1803 +3 1219 715 1220 +3 1227 1809 724 +3 1235 193 1810 +3 1333 1332 872 +3 1809 1234 1810 +3 1006 1805 1007 +3 452 1801 1226 +3 1805 1226 1804 +3 724 451 1227 +3 722 715 721 +3 2345 2348 2347 +3 2344 2345 2347 +3 1808 193 1803 +3 1239 193 1235 +3 184 529 931 +3 931 529 49 +3 529 1851 49 +3 1221 1223 1004 +3 1802 1801 1800 +3 1227 1234 1809 +3 192 450 451 +3 452 1226 1805 +3 1235 1236 1008 +3 339 2015 2014 +3 110 2028 2029 +3 1580 1581 130 +3 69 1580 130 +3 446 90 335 +3 1805 1804 1007 +3 2584 1385 2583 +3 1252 1254 367 +3 893 2013 2014 +3 2013 893 127 +3 1239 1804 193 +3 1231 1832 1831 +3 450 1238 451 +3 2514 60 2513 +3 1237 1238 450 +3 450 453 1233 +3 1233 438 1231 +3 1798 2458 1223 +3 2458 1798 2459 +3 1227 451 1238 +3 1460 1458 336 +3 2380 2381 747 +3 1261 1275 1616 +3 1872 1871 879 +3 1461 187 353 +3 2536 2193 2194 +3 1827 1828 1248 +3 1827 1249 1828 +3 439 2486 1379 +3 1238 1814 1228 +3 2271 2270 429 +3 1654 1655 1197 +3 1655 1199 1197 +3 1654 1653 1483 +3 447 1006 1242 +3 1872 1162 1871 +3 1247 1818 1246 +3 1008 1239 1235 +3 90 446 445 +3 446 186 445 +3 1240 1239 1008 +3 1239 1240 1007 +3 1241 1244 54 +3 1007 1242 1006 +3 1007 1240 1242 +3 1240 1241 1242 +3 1242 1241 1243 +3 1229 1244 1236 +3 1452 2345 1269 +3 2345 1452 369 +3 1237 450 1825 +3 1824 1230 1825 +3 1334 752 1333 +3 1870 752 1334 +3 2726 1424 2705 +3 1425 2726 2705 +3 25 2015 339 +3 1247 1246 1829 +3 1483 1653 244 +3 1653 1196 244 +3 1282 2073 2074 +3 1370 2289 2294 +3 2295 1370 2294 +3 2177 2182 2496 +3 2192 2182 2177 +3 2337 2342 2338 +3 140 74 892 +3 74 140 2017 +3 338 25 339 +3 514 561 562 +3 2560 250 2562 +3 1662 1022 1564 +3 1445 1443 369 +3 56 1752 2230 +3 1251 1254 1252 +3 1254 1251 366 +3 374 1251 1252 +3 432 1868 430 +3 988 2149 2148 +3 351 1453 34 +3 1256 1764 1765 +3 2341 230 2340 +3 230 2339 2340 +3 1266 2356 53 +3 371 2645 2646 +3 1280 2070 2071 +3 1621 1277 228 +3 1298 98 285 +3 375 1266 1259 +3 1263 375 1259 +3 463 462 133 +3 1001 463 309 +3 1002 1001 309 +3 2355 1001 1002 +3 2646 2645 53 +3 2695 2694 2696 +3 545 2696 238 +3 549 531 2689 +3 2070 1280 1279 +3 1142 2070 1279 +3 1143 1275 1274 +3 1275 1273 1274 +3 1257 1266 53 +3 1253 1257 53 +3 1276 1143 2375 +3 312 153 311 +3 2088 17 1678 +3 2082 2083 1288 +3 2363 271 296 +3 1272 1261 1271 +3 2085 2088 2087 +3 375 1263 1658 +3 1619 1620 1263 +3 1619 1262 1620 +3 373 1932 1933 +3 423 1169 1171 +3 706 1587 633 +3 1115 706 633 +3 288 2147 2144 +3 2147 2145 2144 +3 1327 762 1326 +3 369 2346 2345 +3 1991 35 978 +3 370 1284 1303 +3 158 2063 2064 +3 227 2081 1290 +3 812 483 2644 +3 52 160 1442 +3 1289 52 1442 +3 1020 2391 1629 +3 1254 2340 367 +3 2340 1254 2341 +3 2692 2697 527 +3 1255 2337 2338 +3 1765 1255 1766 +3 1255 2338 1766 +3 1136 1291 1293 +3 1291 231 1293 +3 315 314 233 +3 231 1291 1279 +3 2074 2077 227 +3 1765 1766 1256 +3 2522 166 2511 +3 1142 2067 2069 +3 1142 2066 2067 +3 1137 1274 1273 +3 968 312 311 +3 1673 1672 2228 +3 1293 1295 464 +3 1137 1278 1279 +3 289 1320 2084 +3 2346 2348 2345 +3 1320 297 2084 +3 1284 229 1283 +3 83 1284 1283 +3 1571 1293 464 +3 48 1281 1297 +3 2235 1309 2238 +3 1309 2235 2236 +3 1389 1390 1366 +3 1098 1099 291 +3 1567 2264 1566 +3 1569 1292 1136 +3 996 2174 2173 +3 371 2346 2353 +3 1100 1727 469 +3 1290 2075 227 +3 1264 1277 1621 +3 1567 225 1301 +3 1140 1567 1301 +3 469 1727 1726 +3 162 1440 1439 +3 2647 956 1779 +3 962 956 2647 +3 2077 2074 1285 +3 1299 1298 276 +3 1299 1281 275 +3 275 1281 48 +3 1299 276 1281 +3 2039 91 2040 +3 91 2039 2036 +3 2184 2722 2151 +3 1303 1286 1447 +3 369 1443 2349 +3 2346 369 2349 +3 160 52 159 +3 463 737 309 +3 1952 1954 322 +3 537 549 30 +3 549 2689 30 +3 189 1844 2399 +3 2358 1175 1174 +3 993 2166 2169 +3 2069 2070 1142 +3 2070 2069 1282 +3 1274 2372 2375 +3 367 1765 1764 +3 1137 1279 1292 +3 1292 1279 1291 +3 1292 1291 1136 +3 47 280 283 +3 372 48 1297 +3 230 2332 1347 +3 1574 1138 1572 +3 1295 1293 1294 +3 235 314 315 +3 283 273 235 +3 2073 1285 2074 +3 98 1298 1299 +3 1295 276 1296 +3 276 1295 1294 +3 1623 1264 1622 +3 1296 1298 285 +3 1298 1296 276 +3 1285 2079 2078 +3 2078 2086 1287 +3 2086 1726 1287 +3 994 2171 2169 +3 2372 2377 2375 +3 2613 2612 2105 +3 2374 2373 1137 +3 950 1139 1566 +3 1288 2083 2085 +3 1566 1141 1565 +3 2264 1276 2377 +3 1300 2371 2373 +3 2718 2159 2719 +3 638 2359 2358 +3 1324 761 1323 +3 1324 751 761 +3 895 762 614 +3 896 895 614 +3 602 895 898 +3 578 1613 1614 +3 789 566 395 +3 2440 767 2437 +3 936 2441 799 +3 404 1304 1305 +3 766 765 404 +3 2224 997 1103 +3 1327 614 762 +3 1100 466 1103 +3 1306 1305 600 +3 1026 1113 2460 +3 1026 2731 1113 +3 2334 2341 366 +3 2341 1254 366 +3 2047 903 213 +3 1975 2635 1688 +3 1307 1306 600 +3 766 2262 2263 +3 1048 1564 855 +3 2237 1660 579 +3 2467 2468 1045 +3 1308 578 2233 +3 2362 284 2361 +3 2364 284 2362 +3 2037 961 2036 +3 961 2037 203 +3 2233 2232 1308 +3 403 2379 2380 +3 2379 2381 2380 +3 2525 2524 826 +3 2358 2359 1175 +3 1782 1785 679 +3 1314 1311 1312 +3 745 1314 1312 +3 1764 2227 1270 +3 2335 1439 1440 +3 902 1315 903 +3 1315 902 216 +3 1695 1693 1694 +3 2178 1913 1095 +3 77 1110 1362 +3 1720 1723 331 +3 1723 1123 331 +3 324 323 1707 +3 296 1320 270 +3 297 1320 296 +3 1022 855 1564 +3 1502 1498 1503 +3 2131 2132 2727 +3 939 941 410 +3 502 2230 2231 +3 731 732 458 +3 457 2622 733 +3 2679 1399 461 +3 2622 178 733 +3 2621 178 2622 +3 726 458 456 +3 726 729 458 +3 447 1321 1006 +3 765 1327 1326 +3 410 2667 768 +3 990 2164 2161 +3 491 1755 834 +3 871 872 402 +3 418 1480 606 +3 516 1735 520 +3 457 732 557 +3 760 405 763 +3 2405 1390 1389 +3 1346 869 870 +3 1329 1330 751 +3 1361 1873 635 +3 1873 1354 635 +3 1328 750 1329 +3 1540 1957 510 +3 581 1307 2234 +3 1324 1325 751 +3 1325 1328 751 +3 1374 1387 1367 +3 895 602 762 +3 602 756 1325 +3 1890 1885 742 +3 2293 1373 1369 +3 751 1328 1329 +3 872 1332 1331 +3 876 1330 1329 +3 1330 876 402 +3 1331 1330 402 +3 872 1331 402 +3 1161 756 1160 +3 750 876 1329 +3 758 1336 1337 +3 1161 758 1337 +3 1337 1335 752 +3 1162 1337 752 +3 1162 1161 1337 +3 1333 1335 759 +3 756 1161 1162 +3 2137 863 2136 +3 2137 2138 863 +3 2245 1145 2246 +3 2242 2245 1467 +3 1336 759 1335 +3 1337 1336 1335 +3 765 1326 404 +3 751 1330 1340 +3 700 699 2591 +3 1613 578 1308 +3 1609 599 1606 +3 1696 323 324 +3 1330 1331 1339 +3 2262 1306 2263 +3 751 1340 761 +3 1340 760 761 +3 1310 1660 2237 +3 1340 1330 1339 +3 1338 760 1339 +3 760 1340 1339 +3 1327 2439 614 +3 754 591 1343 +3 1341 754 1343 +3 1345 748 1346 +3 748 869 1346 +3 591 1344 1343 +3 1343 1344 750 +3 1218 714 1217 +3 1344 1345 750 +3 687 1170 686 +3 591 875 1344 +3 1012 1631 218 +3 548 217 908 +3 1345 1346 876 +3 750 1345 876 +3 1956 870 871 +3 1348 619 684 +3 661 1348 684 +3 1348 661 652 +3 1877 621 1878 +3 621 1879 1878 +3 1395 1384 1396 +3 1904 293 294 +3 1349 619 1348 +3 652 1349 1348 +3 2470 2471 1025 +3 2471 2474 1025 +3 964 219 963 +3 1772 219 964 +3 655 1355 1055 +3 642 1354 1357 +3 636 1351 593 +3 1056 1728 1099 +3 620 1357 1354 +3 620 1896 1357 +3 1833 1834 1249 +3 1837 1834 1833 +3 634 1767 1768 +3 2486 1377 2487 +3 635 1353 1352 +3 635 1354 1353 +3 619 1352 655 +3 635 1352 1350 +3 1350 1352 1349 +3 1352 619 1349 +3 1350 1349 634 +3 2485 1378 2295 +3 642 1355 1353 +3 1354 642 1353 +3 1897 1894 1895 +3 1894 641 1895 +3 2616 2615 587 +3 2616 2618 2615 +3 1579 1580 69 +3 1724 33 346 +3 635 1350 1351 +3 1892 1891 1888 +3 1358 1892 643 +3 589 1358 643 +3 589 1356 1358 +3 1355 1356 618 +3 1055 1355 618 +3 592 1781 1782 +3 1360 772 622 +3 1360 592 772 +3 290 1913 2261 +3 1355 655 1353 +3 1873 1361 1889 +3 1355 642 1356 +3 1374 2291 2292 +3 620 1889 1875 +3 1889 1874 1875 +3 629 656 657 +3 1356 642 1358 +3 439 1369 1373 +3 1629 846 1630 +3 846 1629 2391 +3 2634 691 2633 +3 92 1583 965 +3 1359 618 1356 +3 1361 635 1351 +3 1886 746 865 +3 1632 1635 1662 +3 200 2603 199 +3 126 261 1362 +3 260 1717 1715 +3 2086 469 1726 +3 469 2086 2079 +3 1247 1829 1828 +3 1460 353 75 +3 1461 353 1460 +3 1879 1885 1890 +3 1399 1398 1393 +3 1440 2682 1269 +3 2682 1440 1441 +3 2104 356 1854 +3 1408 1409 1118 +3 893 139 127 +3 822 821 1437 +3 306 152 307 +3 25 986 2016 +3 189 1841 1844 +3 2290 2291 1374 +3 1403 440 2585 +3 2093 2094 356 +3 1378 1370 2295 +3 383 384 44 +3 1024 2475 1089 +3 1581 1580 127 +3 2411 1388 2490 +3 1377 2483 1395 +3 2483 1377 2482 +3 1774 846 1776 +3 1378 1373 1370 +3 1881 2222 1883 +3 621 1881 1883 +3 904 424 2412 +3 1406 2293 1369 +3 2293 1406 2406 +3 10 1380 2487 +3 1380 1379 2487 +3 1392 1391 454 +3 381 74 237 +3 1831 1832 1232 +3 2289 1375 2484 +3 1381 1380 440 +3 1385 1403 2585 +3 2663 1635 853 +3 1598 1382 1599 +3 2361 2360 271 +3 1376 2483 2482 +3 1383 1384 1371 +3 2277 2271 2274 +3 2292 1368 1387 +3 147 429 2270 +3 147 430 429 +3 1371 1384 1395 +3 353 1120 352 +3 1149 361 1150 +3 2294 2289 1376 +3 237 384 383 +3 2293 1368 2292 +3 188 441 1381 +3 349 74 376 +3 737 133 736 +3 133 1846 736 +3 1391 437 1372 +3 437 1391 1392 +3 2018 986 143 +3 2016 986 2018 +3 1842 2403 441 +3 570 574 1690 +3 2094 2093 2099 +3 1599 1382 1396 +3 1404 1408 1118 +3 1368 2405 1389 +3 438 1393 1394 +3 1393 1392 1394 +3 2223 2154 997 +3 2405 2406 2404 +3 1770 1771 593 +3 1398 437 1393 +3 1398 1397 437 +3 2679 436 2680 +3 2676 2675 1400 +3 364 365 1846 +3 2487 2491 10 +3 2487 1377 2491 +3 1841 1843 1363 +3 822 2557 1402 +3 1842 189 2401 +3 454 1391 1388 +3 1844 1840 1365 +3 1840 1844 1841 +3 1401 2675 2676 +3 356 2103 2093 +3 1843 442 1363 +3 1364 442 1843 +3 441 1009 1364 +3 461 1399 1393 +3 1366 1390 1838 +3 1830 1833 1249 +3 1833 1830 1831 +3 1394 1392 454 +3 1232 1839 1838 +3 1393 437 1392 +3 2486 2487 1379 +3 2492 1910 1909 +3 1910 2492 694 +3 1770 624 617 +3 2096 2095 144 +3 2366 286 2365 +3 108 1899 1900 +3 1386 1664 1663 +3 591 1884 875 +3 1663 1664 1119 +3 1384 1599 1396 +3 1373 2293 2292 +3 2582 2585 1380 +3 1876 1877 1878 +3 704 2253 2247 +3 2253 704 2281 +3 1666 2733 1665 +3 1372 1599 1384 +3 1383 1372 1384 +3 1882 1881 640 +3 2222 1881 1882 +3 2678 461 453 +3 66 351 197 +3 351 66 1453 +3 132 73 2495 +3 1405 434 188 +3 1425 434 1435 +3 440 1404 1405 +3 2614 44 385 +3 2406 1406 2404 +3 265 266 1466 +3 266 267 1466 +3 1464 2265 2268 +3 2402 2401 1369 +3 1404 440 1403 +3 1414 485 1418 +3 188 1381 1405 +3 1118 434 1405 +3 2555 1407 2556 +3 2164 992 2161 +3 2613 2099 358 +3 2614 2613 358 +3 2454 2453 433 +3 1940 1560 1561 +3 2599 2600 1409 +3 433 1438 1434 +3 1417 487 1415 +3 2 487 488 +3 1412 485 1414 +3 486 1412 1414 +3 2557 822 1437 +3 2601 2600 2599 +3 2601 1410 2600 +3 412 485 1413 +3 412 505 485 +3 1413 820 412 +3 412 820 819 +3 413 820 1413 +3 485 1412 1413 +3 1414 1415 486 +3 1415 1416 486 +3 443 1422 1121 +3 479 388 480 +3 910 1643 1648 +3 387 1414 1418 +3 2560 2562 253 +3 1436 2554 2555 +3 190 1436 2555 +3 487 1416 1415 +3 479 480 1865 +3 1415 387 1417 +3 1421 1422 1423 +3 1118 2454 1435 +3 1418 505 478 +3 505 1418 485 +3 505 388 478 +3 1414 387 1415 +3 476 1431 475 +3 1929 1411 1930 +3 1418 478 1419 +3 1421 1416 487 +3 387 1420 1417 +3 387 1419 1420 +3 2447 2448 764 +3 1423 386 1421 +3 1422 2 1121 +3 545 79 2696 +3 546 79 545 +3 1869 1334 755 +3 1423 1422 443 +3 1865 480 2445 +3 764 1158 2446 +3 1424 386 1423 +3 1419 1426 477 +3 1419 478 1426 +3 515 1748 1736 +3 1308 2232 2234 +3 2232 581 2234 +3 1435 1434 1425 +3 1118 1435 434 +3 1434 1435 433 +3 2728 810 806 +3 2706 1747 1758 +3 923 2708 2710 +3 1757 1747 2706 +3 1419 477 1420 +3 1426 1427 477 +3 1433 355 1432 +3 476 1433 1432 +3 479 1427 1426 +3 610 2545 1159 +3 1158 2545 610 +3 814 813 2199 +3 2642 813 814 +3 391 2542 2201 +3 1430 1431 476 +3 926 1947 2208 +3 2218 1412 486 +3 1525 2201 778 +3 1429 430 431 +3 432 430 1429 +3 1430 431 1431 +3 60 2514 1968 +3 2514 246 1968 +3 1429 1428 148 +3 1422 487 2 +3 255 1855 60 +3 414 821 822 +3 355 1420 477 +3 1432 355 477 +3 476 1432 1428 +3 2096 2105 2097 +3 470 818 800 +3 470 412 818 +3 470 504 412 +3 1268 2336 2329 +3 2131 2727 2130 +3 2727 1030 2130 +3 2104 475 2103 +3 1433 475 2104 +3 1627 873 748 +3 2651 301 2656 +3 487 1422 1421 +3 2600 2454 1409 +3 2454 2600 2453 +3 2453 2600 1410 +3 820 149 819 +3 413 821 820 +3 413 1437 821 +3 821 149 820 +3 1675 171 1676 +3 2360 1152 97 +3 1152 2360 272 +3 1289 1449 52 +3 2228 2229 2301 +3 1440 162 1441 +3 66 197 1647 +3 2330 1347 2332 +3 370 2329 2330 +3 1286 1448 1447 +3 1303 162 1439 +3 1439 370 1303 +3 1865 2445 390 +3 2357 1001 2355 +3 19 1861 1443 +3 2351 161 2350 +3 1442 1443 1445 +3 1442 160 1443 +3 2685 525 257 +3 2712 1760 56 +3 914 34 175 +3 34 1453 175 +3 2331 2332 372 +3 1446 1447 1448 +3 1446 162 1447 +3 1679 1677 155 +3 1680 1679 155 +3 1289 1448 1449 +3 1448 172 1449 +3 2692 2691 526 +3 2266 1465 146 +3 2266 2265 1465 +3 147 2270 2269 +3 1530 1508 506 +3 1465 1464 113 +3 220 2043 2051 +3 2688 2687 532 +3 2354 2357 2355 +3 1441 1444 1452 +3 172 1450 1449 +3 1450 172 1451 +3 1001 2351 463 +3 161 2351 1001 +3 1675 1451 172 +3 1451 1675 1676 +3 1444 1445 1452 +3 2689 532 30 +3 532 533 30 +3 2689 2688 532 +3 530 2686 2687 +3 2686 257 2687 +3 1457 1456 334 +3 1821 1230 1822 +3 1009 54 1247 +3 1457 336 1458 +3 143 1457 1458 +3 2269 2272 2268 +3 2272 1464 2268 +3 26 2021 2022 +3 140 892 893 +3 1842 1841 189 +3 429 23 2271 +3 1462 1459 75 +3 90 1461 336 +3 234 151 836 +3 445 187 1461 +3 90 445 1461 +3 1009 449 54 +3 1459 1462 2019 +3 1462 141 2019 +3 2099 2093 357 +3 2271 2277 427 +3 2101 114 362 +3 755 872 871 +3 2257 2258 849 +3 2257 864 2258 +3 2285 2286 1586 +3 2648 849 1093 +3 457 557 556 +3 1470 1477 552 +3 1477 1470 553 +3 460 555 1469 +3 553 1469 1471 +3 1322 1475 179 +3 517 1204 1481 +3 2092 2111 114 +3 2666 2665 2620 +3 2667 2666 768 +3 2619 1470 2620 +3 1470 768 2620 +3 1407 2675 1401 +3 2556 1407 1401 +3 2622 460 2621 +3 550 1474 523 +3 1473 1474 550 +3 1473 179 1474 +3 1472 1476 553 +3 1473 1476 1472 +3 2665 460 2620 +3 2665 2621 460 +3 1689 1972 570 +3 570 1972 1973 +3 1206 565 566 +3 2669 417 2670 +3 2667 769 2666 +3 551 1478 1476 +3 2397 2396 831 +3 1749 495 1750 +3 1474 1475 523 +3 179 1475 1474 +3 524 2683 2685 +3 2683 525 2685 +3 530 524 2686 +3 616 1477 1478 +3 1478 1477 1476 +3 2092 2110 2111 +3 1191 2703 1190 +3 2214 419 1517 +3 295 2021 2020 +3 790 2206 791 +3 392 790 791 +3 269 268 2112 +3 480 388 2537 +3 388 503 2537 +3 1525 482 2201 +3 407 1129 2203 +3 407 1128 1129 +3 144 2095 2094 +3 771 1784 2615 +3 1412 2218 1411 +3 1518 1523 420 +3 776 1484 1486 +3 2670 1402 191 +3 1509 1506 55 +3 1506 1505 55 +3 2185 2718 2723 +3 1510 1505 1506 +3 1500 1505 1510 +3 2194 2193 1485 +3 2653 889 2651 +3 2477 1015 1016 +3 2288 1591 713 +3 1492 776 1486 +3 574 1608 1607 +3 1491 1488 421 +3 303 152 304 +3 2652 2656 2657 +3 2659 301 2650 +3 1148 1105 288 +3 2639 1105 1148 +3 1496 966 1497 +3 1494 1496 1497 +3 433 2453 1438 +3 2020 2021 294 +3 299 298 295 +3 775 1489 1495 +3 2503 1594 2504 +3 1519 1534 1552 +3 1536 1519 1552 +3 1962 253 2562 +3 420 1515 1514 +3 2547 2546 1532 +3 2546 2547 1531 +3 773 1500 1533 +3 695 1010 1908 +3 966 967 1498 +3 2022 2021 295 +3 2503 2502 1594 +3 2027 2020 321 +3 1495 1503 1499 +3 1503 1495 1502 +3 2020 2027 295 +3 1900 1905 108 +3 1373 2291 1370 +3 2291 2290 1370 +3 282 281 47 +3 1686 215 87 +3 1510 1512 1533 +3 1515 773 1513 +3 2632 1911 2631 +3 1526 775 1499 +3 1551 1553 1535 +3 1507 1508 507 +3 1516 1521 774 +3 1081 569 1910 +3 569 1081 1688 +3 1511 1512 1528 +3 1512 1511 1513 +3 1524 777 1523 +3 1586 2287 1587 +3 2287 713 1587 +3 492 1 1520 +3 1510 1501 1512 +3 668 669 628 +3 668 1597 669 +3 507 1501 1507 +3 1905 12 293 +3 293 12 282 +3 1504 1503 55 +3 1507 1506 1509 +3 1507 1501 1506 +3 1509 55 1498 +3 1503 1498 55 +3 782 419 781 +3 421 1508 967 +3 506 1517 419 +3 1521 1522 774 +3 1900 1901 12 +3 420 1516 1515 +3 131 132 134 +3 1508 1507 967 +3 1038 864 2257 +3 1498 967 1509 +3 1504 1499 1503 +3 1500 1499 1504 +3 827 826 2550 +3 1529 1528 507 +3 1501 1510 1506 +3 506 419 508 +3 1531 1529 1527 +3 1529 1531 1528 +3 1555 2572 16 +3 1520 1 1524 +3 492 1520 770 +3 1909 1911 692 +3 2286 2287 1586 +3 321 2026 109 +3 1516 420 1521 +3 1543 1544 510 +3 1533 1500 1510 +3 1146 23 78 +3 2549 2546 1527 +3 2549 1532 2546 +3 1515 1516 773 +3 1155 631 1595 +3 421 1517 1508 +3 1522 1485 774 +3 2217 779 2197 +3 1104 1914 2181 +3 506 1508 1517 +3 1513 773 1533 +3 2571 16 2572 +3 2244 2326 2327 +3 234 546 78 +3 1105 945 2150 +3 1518 1514 1519 +3 2422 2539 827 +3 493 2576 1542 +3 2576 493 1731 +3 488 1417 1420 +3 476 1428 1430 +3 778 2195 1522 +3 780 2215 2214 +3 777 778 1522 +3 498 2563 2564 +3 2575 498 2564 +3 482 2202 2201 +3 1868 151 430 +3 1 1525 1524 +3 1 835 1525 +3 1525 835 482 +3 2026 2020 294 +3 1516 1526 773 +3 774 1485 1526 +3 500 1555 1556 +3 1514 1515 2548 +3 2548 2547 1532 +3 1534 1532 2549 +3 1514 1532 1519 +3 1519 1538 770 +3 1533 1512 1513 +3 2565 2575 2564 +3 1538 2568 770 +3 771 772 1784 +3 1518 420 1514 +3 1529 1530 501 +3 1530 1529 507 +3 1508 1530 507 +3 827 2550 1058 +3 2548 1532 1514 +3 966 1496 1558 +3 281 12 1901 +3 1531 1527 2546 +3 1534 1519 1532 +3 2453 1411 1438 +3 1519 1536 1538 +3 960 211 959 +3 2566 1539 2567 +3 501 1555 1554 +3 46 960 203 +3 510 499 509 +3 1537 2580 2570 +3 1546 1545 493 +3 675 2252 2251 +3 935 1216 1215 +3 1539 509 2567 +3 1753 499 1752 +3 2282 2280 682 +3 2250 2245 2246 +3 1742 2715 1763 +3 563 1742 1763 +3 206 205 59 +3 1541 2574 2576 +3 1731 1541 2576 +3 2573 2563 498 +3 69 129 125 +3 1547 1546 922 +3 2704 277 64 +3 1544 499 510 +3 218 1958 907 +3 1545 1731 493 +3 1671 2303 1670 +3 2621 769 2623 +3 1735 240 520 +3 240 521 520 +3 2133 1029 2129 +3 1048 855 2467 +3 238 549 537 +3 1214 933 1212 +3 860 2121 2120 +3 1772 1773 222 +3 846 1772 222 +3 963 956 2060 +3 956 2061 2060 +3 956 962 2061 +3 1780 1702 183 +3 2250 2246 2247 +3 1034 2135 1035 +3 2127 2123 2130 +3 2123 1032 2130 +3 832 1863 1862 +3 2319 2315 605 +3 2304 2065 51 +3 2304 156 2065 +3 183 933 1780 +3 569 1911 1910 +3 1584 704 3 +3 2633 2636 571 +3 1672 2709 56 +3 1105 2639 1104 +3 511 1544 1543 +3 1549 2734 2733 +3 1284 1286 1303 +3 1670 1547 563 +3 1752 499 2231 +3 1744 1547 922 +3 537 539 212 +3 1184 1208 1193 +3 1527 1529 1553 +3 501 1530 1556 +3 1554 1553 501 +3 1535 1553 1554 +3 770 1518 1519 +3 501 1556 1555 +3 1518 770 1520 +3 595 772 771 +3 1518 1520 1523 +3 1520 1524 1523 +3 1552 1535 1557 +3 1554 1557 1535 +3 1554 16 1557 +3 2180 2179 1912 +3 1491 1558 1490 +3 1558 1487 1490 +3 2362 2363 2364 +3 2287 2286 2288 +3 1116 630 2113 +3 1941 1562 924 +3 1562 1942 924 +3 1943 1942 1562 +3 910 1646 1644 +3 1801 452 1004 +3 1140 1276 2264 +3 924 1939 1938 +3 1562 1563 27 +3 853 1632 1633 +3 2559 1559 2561 +3 2605 31 1645 +3 1791 1788 1789 +3 1792 28 1793 +3 1097 1920 1921 +3 1926 1917 1102 +3 2521 42 1794 +3 1563 1562 1561 +3 101 2512 2511 +3 2227 1271 1270 +3 1764 1256 2227 +3 1261 1270 1271 +3 1278 1142 1279 +3 1575 1139 1138 +3 2157 2190 2189 +3 206 58 205 +3 58 2452 205 +3 950 1569 1570 +3 950 1570 1139 +3 2050 2049 952 +3 2049 958 952 +3 2047 2046 903 +3 311 153 307 +3 942 465 1573 +3 232 942 1573 +3 997 2170 1103 +3 1568 950 1565 +3 950 1566 1565 +3 2190 989 2155 +3 1571 1136 1293 +3 1136 1571 1569 +3 1570 1569 1571 +3 143 986 1455 +3 1573 1296 232 +3 464 1296 1573 +3 1295 1296 464 +3 997 2224 2223 +3 1581 127 139 +3 1971 867 1970 +3 497 2572 500 +3 1578 1580 1579 +3 125 1579 69 +3 1579 125 1582 +3 1727 1056 1726 +3 2736 136 379 +3 685 1971 866 +3 2220 1971 685 +3 1978 1996 1994 +3 73 1581 139 +3 73 132 131 +3 2177 2496 2179 +3 2496 1912 2179 +3 130 73 131 +3 130 1581 73 +3 129 69 130 +3 71 129 130 +3 1965 248 1966 +3 2631 1911 569 +3 2630 2631 569 +3 126 1578 1579 +3 217 548 900 +3 318 321 109 +3 141 1463 2017 +3 2496 2182 2191 +3 945 2496 2191 +3 2247 2246 3 +3 680 1076 2428 +3 2427 681 1075 +3 1597 1596 631 +3 668 667 1596 +3 667 668 627 +3 1595 631 1596 +3 466 1576 2223 +3 2506 2507 2508 +3 2325 2506 2508 +3 713 1592 633 +3 711 633 1593 +3 1588 1587 706 +3 1086 2425 2424 +3 2420 1086 2424 +3 1157 2505 2325 +3 946 1085 1084 +3 1085 2424 1084 +3 947 68 254 +3 712 1115 633 +3 1587 713 633 +3 1087 2421 2420 +3 2421 1086 2420 +3 2541 814 2199 +3 2030 299 2028 +3 2033 2031 110 +3 2031 2033 303 +3 2030 2028 110 +3 2653 300 2654 +3 2408 45 2407 +3 152 2033 320 +3 320 2033 110 +3 111 2653 2654 +3 2324 2325 1156 +3 669 1597 631 +3 1585 1586 1587 +3 2146 2223 1576 +3 2220 2222 1882 +3 2220 685 2222 +3 437 1598 1372 +3 2629 2633 691 +3 1883 2222 685 +3 1380 1381 1379 +3 1598 437 1397 +3 1402 1401 2676 +3 1308 1307 400 +3 1613 1308 400 +3 1129 392 791 +3 702 1604 701 +3 1275 1143 1615 +3 496 922 493 +3 400 1609 1611 +3 1612 400 1611 +3 1610 599 1609 +3 2521 62 167 +3 2596 786 2588 +3 1610 1609 1307 +3 1611 1609 1606 +3 599 603 574 +3 1607 599 574 +3 1605 1606 575 +3 576 2596 2588 +3 2589 2591 2594 +3 576 2589 2594 +3 577 1612 2588 +3 786 577 2588 +3 1610 393 603 +3 603 599 1610 +3 393 1610 600 +3 2451 1020 1019 +3 604 2310 2311 +3 600 1610 1307 +3 400 1612 1613 +3 1617 1619 1260 +3 1612 577 1614 +3 1612 1614 1613 +3 2526 1698 1705 +3 2370 995 2369 +3 1261 1616 1270 +3 1259 1260 1619 +3 1143 1617 1615 +3 1615 1617 1260 +3 157 473 120 +3 159 157 120 +3 473 121 120 +3 2064 82 158 +3 1277 1278 1272 +3 1623 1622 1262 +3 1862 490 1733 +3 1617 1262 1619 +3 1618 1623 1262 +3 1933 1932 1259 +3 1313 579 744 +3 2063 159 2064 +3 159 52 2064 +3 1450 82 2064 +3 2080 227 2077 +3 1278 2066 1142 +3 1625 1421 386 +3 1438 1624 1434 +3 2087 1288 2085 +3 1623 1618 1276 +3 1434 1625 386 +3 1626 1345 1344 +3 1345 1626 748 +3 2387 2384 743 +3 2387 741 2384 +3 1627 875 1628 +3 875 1627 1626 +3 1627 748 1626 +3 2383 2379 403 +3 873 868 748 +3 2379 2383 2388 +3 1630 1631 1629 +3 1631 1630 843 +3 1777 1775 847 +3 1629 845 1020 +3 2648 1093 851 +3 1013 845 1012 +3 1631 843 218 +3 1338 1332 759 +3 845 1631 1012 +3 1640 2138 2137 +3 2139 1640 2137 +3 1633 1632 1023 +3 1028 1638 1637 +3 1638 1027 1637 +3 942 232 2142 +3 46 544 960 +3 1638 1034 1018 +3 1808 1225 1809 +3 2125 1634 854 +3 856 1033 1040 +3 1634 1633 1023 +3 2258 1043 2259 +3 1043 2258 860 +3 1079 2464 693 +3 1685 1684 154 +3 858 1638 1018 +3 2137 2136 1028 +3 2139 2137 1028 +3 1106 1107 1906 +3 1021 858 1016 +3 1029 1633 1634 +3 858 1027 1638 +3 1797 262 1716 +3 1633 1639 853 +3 1633 1029 1639 +3 2297 930 931 +3 930 929 931 +3 201 4 1642 +3 1636 1641 1637 +3 1981 116 1986 +3 513 1737 2664 +3 653 654 597 +3 2626 683 2628 +3 1853 90 334 +3 1650 651 672 +3 1692 197 323 +3 2530 2529 343 +3 386 1424 2726 +3 2605 1645 9 +3 200 199 201 +3 2305 200 201 +3 119 118 122 +3 250 925 85 +3 250 1939 925 +3 1962 1961 253 +3 672 651 673 +3 2609 195 2610 +3 1971 1970 866 +3 175 1646 910 +3 911 175 910 +3 1649 1647 1645 +3 32 1998 1997 +3 32 1999 1998 +3 1578 1661 2013 +3 1559 2560 2561 +3 1646 1649 1644 +3 1829 1246 1836 +3 1246 1821 1836 +3 1980 1986 919 +3 1811 1234 1228 +3 1367 2489 1375 +3 1886 865 639 +3 670 623 1651 +3 670 658 623 +3 670 1651 1650 +3 666 670 1650 +3 594 1052 1053 +3 1651 623 698 +3 1815 1236 1813 +3 1845 2404 2399 +3 1824 1823 1230 +3 1656 1483 1481 +3 1483 1192 1481 +3 1204 1656 1481 +3 518 1654 1656 +3 1735 1734 515 +3 922 1745 1744 +3 1659 1302 375 +3 1620 1657 1263 +3 1620 228 1657 +3 1621 228 1620 +3 1265 1657 228 +3 1659 1658 1265 +3 1043 860 2119 +3 1310 1069 1660 +3 1080 694 1079 +3 1661 338 339 +3 1661 1362 338 +3 126 1362 1661 +3 126 1661 1578 +3 1669 1668 502 +3 1284 370 2331 +3 1403 1663 1119 +3 1663 1403 1385 +3 1546 1665 1550 +3 1545 1546 1550 +3 1970 877 749 +3 867 877 1970 +3 1385 2585 2582 +3 936 799 1167 +3 1780 934 1702 +3 2232 2238 1309 +3 2238 2232 2233 +3 1642 202 2417 +3 1753 1751 495 +3 1547 1666 1665 +3 379 378 2736 +3 2700 244 2699 +3 1674 172 1448 +3 1286 1674 1448 +3 810 2090 806 +3 2452 7 205 +3 2695 2696 79 +3 2436 2435 2434 +3 2433 2436 2434 +3 817 2537 484 +3 817 2638 2537 +3 1198 1195 1196 +3 833 2698 836 +3 2691 525 526 +3 2303 1548 1667 +3 1670 2303 1667 +3 2229 1548 2301 +3 2303 2302 1548 +3 2243 2392 2256 +3 156 2063 2065 +3 2063 158 2065 +3 171 83 224 +3 171 1674 83 +3 243 806 2090 +3 805 806 243 +3 172 1674 1675 +3 82 1450 1451 +3 1695 981 980 +3 1684 1682 154 +3 1676 171 1677 +3 1682 64 154 +3 171 1675 1674 +3 1440 1269 2343 +3 692 2632 699 +3 82 170 169 +3 272 98 273 +3 17 269 1678 +3 807 805 472 +3 155 1683 1680 +3 2410 1011 2038 +3 2409 2408 2410 +3 1680 263 1679 +3 263 1680 1681 +3 1682 1681 264 +3 1682 24 1681 +3 64 1682 264 +3 24 263 1681 +3 2038 7 2410 +3 2409 2410 7 +3 209 2046 2047 +3 38 209 2047 +3 266 1684 1686 +3 1684 266 24 +3 266 1686 87 +3 2607 2606 9 +3 1685 214 215 +3 1684 1685 1686 +3 1721 1722 340 +3 1677 1687 1676 +3 1687 1677 1679 +3 1679 170 1687 +3 1081 689 1688 +3 2637 1600 1601 +3 1600 1602 573 +3 567 1135 1207 +3 567 2434 1135 +3 978 1999 2005 +3 1973 1602 690 +3 1973 1972 1602 +3 1602 1603 690 +3 1542 2565 497 +3 2133 1640 1029 +3 2135 2134 1031 +3 2001 1987 2000 +3 261 259 1715 +3 804 243 828 +3 1692 1693 37 +3 323 1693 1692 +3 325 1317 328 +3 1317 325 1697 +3 1699 1694 325 +3 1696 1694 323 +3 1707 323 99 +3 2193 2536 1484 +3 776 2193 1484 +3 2526 2527 2535 +3 2527 2526 345 +3 325 1701 1700 +3 1706 326 340 +3 93 901 902 +3 260 341 1717 +3 1706 324 1707 +3 36 1701 1702 +3 1693 1695 37 +3 37 1695 980 +3 38 344 215 +3 325 328 1701 +3 1696 324 1698 +3 1110 337 332 +3 2535 2527 2531 +3 1704 1315 216 +3 1025 2474 859 +3 213 1317 1318 +3 36 981 1700 +3 340 1708 1705 +3 345 1708 1709 +3 1704 1316 1315 +3 2708 2712 2710 +3 2712 2708 1743 +3 1700 1701 36 +3 1054 1360 622 +3 1359 683 1781 +3 1854 2 488 +3 1852 335 1853 +3 355 1854 488 +3 36 1702 934 +3 1704 328 1316 +3 1056 226 1726 +3 1702 1701 328 +3 1703 1702 328 +3 1704 1703 328 +3 900 216 902 +3 216 1703 1704 +3 2105 144 2613 +3 1705 1706 340 +3 326 1706 1707 +3 99 326 1707 +3 327 326 99 +3 1717 337 77 +3 1697 325 2532 +3 2531 88 2533 +3 2532 2531 2533 +3 1713 343 2529 +3 342 1713 2529 +3 454 1388 1366 +3 1714 259 65 +3 260 1712 1711 +3 342 1711 1712 +3 1712 65 1713 +3 1713 342 1712 +3 2393 2392 2254 +3 327 99 351 +3 77 261 1715 +3 260 1715 1714 +3 341 1716 1717 +3 1716 1718 1717 +3 347 330 346 +3 1721 329 1720 +3 331 1125 1454 +3 1719 331 1454 +3 1125 89 1454 +3 1455 1454 89 +3 1456 1455 89 +3 1125 1124 89 +3 1716 262 1718 +3 932 330 181 +3 932 1124 330 +3 1813 1812 1228 +3 1813 1236 1812 +3 1983 1993 1992 +3 1993 1982 1992 +3 1981 1986 1980 +3 262 1722 1721 +3 262 1721 1720 +3 932 333 1124 +3 33 1725 327 +3 1725 326 327 +3 1725 33 1724 +3 329 1725 1724 +3 1577 469 2079 +3 1056 1057 226 +3 466 1100 1577 +3 40 103 104 +3 1099 292 1056 +3 4 915 1729 +3 1728 1056 1727 +3 1576 466 1577 +3 4 1729 202 +3 911 1648 202 +3 1729 911 202 +3 129 70 125 +3 915 4 916 +3 913 1730 912 +3 121 70 129 +3 1740 562 561 +3 543 92 951 +3 511 1732 1545 +3 1550 511 1545 +3 1732 511 1543 +3 1739 1740 561 +3 2620 768 2666 +3 2624 178 2669 +3 242 2730 1114 +3 490 515 1733 +3 1311 581 2232 +3 1736 1735 515 +3 1735 1736 240 +3 163 1857 19 +3 1737 519 1738 +3 1673 2709 1672 +3 524 239 520 +3 1749 512 495 +3 1192 1483 2700 +3 562 1740 1741 +3 2713 1673 2298 +3 1750 1751 1761 +3 2714 2711 2713 +3 1763 2714 2713 +3 562 2716 2717 +3 601 393 600 +3 496 494 1202 +3 922 496 1745 +3 1311 2232 1309 +3 2619 2620 460 +3 1739 1746 1740 +3 1469 2619 460 +3 1482 1192 2702 +3 1738 2479 517 +3 517 1762 1738 +3 382 383 361 +3 1195 2699 244 +3 1737 1738 1762 +3 1749 1750 513 +3 1752 2231 2230 +3 2298 2299 1671 +3 499 1753 492 +3 1544 2231 499 +3 495 492 1753 +3 496 514 1745 +3 515 490 1754 +3 1668 1669 2735 +3 1754 1755 512 +3 1754 490 1755 +3 2295 2482 2485 +3 2479 1738 2478 +3 2479 2478 1746 +3 2481 2294 1376 +3 2700 1483 244 +3 313 2333 2334 +3 2229 1672 2230 +3 1743 1758 1759 +3 2485 1377 2486 +3 1756 1757 1741 +3 1740 1756 1741 +3 1761 1737 513 +3 1750 1761 513 +3 1758 1747 1759 +3 56 1760 1751 +3 520 239 516 +3 519 1760 1759 +3 1759 1760 1743 +3 2714 2715 923 +3 1751 1760 1761 +3 519 1761 1760 +3 313 372 2333 +3 2225 2226 1256 +3 1256 1766 2225 +3 1258 1253 367 +3 372 2332 2333 +3 652 596 1767 +3 652 676 596 +3 2381 1172 747 +3 2573 1540 2563 +3 1767 596 624 +3 596 625 624 +3 624 1769 1768 +3 634 1768 1769 +3 634 1769 593 +3 1351 634 593 +3 679 946 1076 +3 1787 946 679 +3 1350 634 1351 +3 597 1771 1770 +3 1109 1787 647 +3 1772 846 1774 +3 699 2634 2592 +3 643 743 2627 +3 643 1888 741 +3 690 1603 2629 +3 964 1583 1773 +3 1773 1583 540 +3 104 2304 51 +3 218 907 1012 +3 219 1774 1775 +3 1779 956 963 +3 1038 1039 1037 +3 2289 2290 1374 +3 468 2145 2153 +3 1214 934 1780 +3 2252 1467 2251 +3 1472 553 1471 +3 1066 1786 678 +3 42 8 1788 +3 1064 95 1065 +3 680 1783 679 +3 1782 679 1783 +3 94 568 567 +3 625 596 688 +3 2618 625 688 +3 625 2618 2616 +3 655 1352 1353 +3 592 1784 772 +3 946 1787 1109 +3 1918 1915 1101 +3 1790 80 1563 +3 1942 925 1939 +3 80 57 40 +3 1790 57 80 +3 1794 1792 1795 +3 1794 62 2521 +3 1708 1797 1709 +3 1789 1790 28 +3 1790 1563 28 +3 292 1099 1920 +3 1790 1789 57 +3 1795 62 1794 +3 42 1791 1792 +3 1791 28 1792 +3 1791 1789 28 +3 1382 2583 1396 +3 2584 2583 1382 +3 1722 1708 340 +3 1708 1722 1797 +3 1851 1852 49 +3 1559 1938 1939 +3 57 107 40 +3 42 1792 1794 +3 100 2523 2522 +3 8 2523 100 +3 2512 100 2522 +3 102 29 103 +3 1795 1796 43 +3 78 203 1011 +3 2297 49 932 +3 2296 2297 932 +3 930 2297 2296 +3 1801 1004 1223 +3 1800 1801 1223 +3 529 1850 1851 +3 723 451 724 +3 1802 1803 1226 +3 452 1805 1006 +3 1807 1225 1808 +3 1807 1806 1225 +3 1804 1239 1007 +3 1213 422 969 +3 2456 1224 2455 +3 1224 1806 2455 +3 1799 1224 2456 +3 2456 2455 1800 +3 1812 1811 1228 +3 1810 1811 1235 +3 1229 1818 1244 +3 1231 1394 1832 +3 1807 1808 1803 +3 1806 1224 724 +3 1225 1806 724 +3 724 1809 1225 +3 1229 1236 1815 +3 78 546 203 +3 1983 1985 916 +3 347 422 181 +3 2102 2109 362 +3 2109 2101 362 +3 1812 1236 1235 +3 1814 1813 1228 +3 1814 1652 1813 +3 1238 1237 1814 +3 1237 1652 1814 +3 1810 1234 1811 +3 1244 1818 54 +3 1229 1816 1817 +3 1816 1229 1815 +3 1818 1229 1817 +3 1832 1839 1232 +3 333 334 1456 +3 1123 1124 1125 +3 330 1124 1123 +3 1237 1825 1245 +3 1825 1230 1245 +3 1820 1817 1816 +3 1819 1820 1816 +3 1815 1652 1816 +3 1245 1820 1819 +3 1230 1821 1245 +3 1821 1820 1245 +3 1250 1231 1831 +3 1237 1245 1819 +3 1827 1248 1826 +3 753 1872 879 +3 1821 1822 1836 +3 25 2016 2015 +3 1822 1230 1823 +3 1233 1825 450 +3 1233 1824 1825 +3 879 1870 1869 +3 1250 1831 1830 +3 1826 1822 1823 +3 1250 1826 1823 +3 1827 1826 1830 +3 1250 1830 1826 +3 1829 1248 1828 +3 1822 1826 1248 +3 349 139 892 +3 1831 1232 1833 +3 2014 2015 140 +3 1835 1363 442 +3 1835 1828 1249 +3 1828 1835 442 +3 1835 1249 1834 +3 1834 1363 1835 +3 1248 1829 1836 +3 1836 1822 1248 +3 1821 1246 1820 +3 1838 1839 1366 +3 1232 1837 1833 +3 1839 454 1366 +3 454 1839 1832 +3 2402 2403 1842 +3 1837 1840 1834 +3 1365 1840 1837 +3 1840 1363 1834 +3 318 1147 321 +3 1459 2018 143 +3 1365 1837 1838 +3 1837 1232 1838 +3 1842 2401 2402 +3 1838 1390 1845 +3 1365 1838 1845 +3 1842 1364 1843 +3 1841 1842 1843 +3 1832 1394 454 +3 441 1364 1842 +3 1841 1363 1840 +3 45 2409 1898 +3 2400 189 2399 +3 1844 1365 1845 +3 1846 365 736 +3 133 1847 1846 +3 1847 364 1846 +3 134 364 1847 +3 198 2006 2012 +3 1661 339 2013 +3 2460 2461 1026 +3 1112 861 2460 +3 861 2461 2460 +3 944 2639 1148 +3 2603 2602 1849 +3 1848 194 35 +3 1990 198 2011 +3 2003 1987 2002 +3 214 1685 894 +3 533 2692 527 +3 841 223 840 +3 1850 446 335 +3 932 49 1852 +3 333 932 1852 +3 335 1852 1851 +3 1853 333 1852 +3 334 333 1853 +3 335 90 1853 +3 1858 1860 19 +3 101 2511 2510 +3 526 2697 2692 +3 990 2167 2166 +3 164 71 165 +3 121 71 164 +3 119 70 121 +3 121 129 71 +3 473 20 119 +3 134 1847 1859 +3 1847 462 1859 +3 462 1847 133 +3 19 1857 1858 +3 1390 2404 1845 +3 1390 2405 2404 +3 177 525 2683 +3 525 177 559 +3 160 19 1443 +3 134 132 364 +3 1452 1445 369 +3 1733 832 1862 +3 834 489 835 +3 1866 241 833 +3 241 1866 832 +3 1864 832 1866 +3 1863 1864 390 +3 1865 1867 432 +3 1865 1864 1867 +3 86 1948 2208 +3 86 1950 1948 +3 148 479 1865 +3 491 834 835 +3 489 482 835 +3 2610 2608 2609 +3 1866 1867 1864 +3 1867 1868 432 +3 777 1525 778 +3 833 1868 1867 +3 833 151 1868 +3 833 836 151 +3 1121 187 443 +3 867 878 877 +3 877 878 755 +3 878 1869 755 +3 753 879 1342 +3 878 879 1869 +3 1342 879 878 +3 1162 752 1871 +3 1871 752 1870 +3 1233 1231 1824 +3 1872 756 1162 +3 1452 2682 1441 +3 191 2678 455 +3 1892 641 1891 +3 1896 641 1892 +3 1361 1351 636 +3 2386 747 582 +3 2303 1671 2302 +3 640 621 1877 +3 621 640 1881 +3 742 1888 1891 +3 662 657 658 +3 2223 468 2154 +3 640 875 1884 +3 1887 1886 639 +3 621 1883 1880 +3 1884 1882 640 +3 468 2153 2154 +3 2225 1302 1659 +3 748 868 869 +3 868 865 866 +3 869 868 866 +3 746 1880 1883 +3 918 1981 1980 +3 1010 2539 2538 +3 1879 1880 1885 +3 1880 746 1885 +3 621 1880 1879 +3 798 799 408 +3 1172 1171 687 +3 1886 1885 746 +3 1982 116 1981 +3 1663 2584 1386 +3 1886 1887 742 +3 1876 1897 1875 +3 1879 1890 1893 +3 1890 1891 1893 +3 1894 1893 641 +3 1893 1891 641 +3 1357 1896 1358 +3 1879 1893 1894 +3 1878 1879 1894 +3 1374 1367 1375 +3 2490 2489 1367 +3 1896 1892 1358 +3 586 656 1055 +3 1894 1897 1878 +3 1895 1896 620 +3 1895 620 1875 +3 1876 1875 637 +3 112 45 1898 +3 1895 641 1896 +3 2583 1385 2582 +3 1876 1878 1897 +3 1899 13 1900 +3 1900 13 1901 +3 1930 2453 1410 +3 1437 1930 1410 +3 108 1904 1903 +3 1905 293 1904 +3 108 1905 1904 +3 1903 1902 108 +3 2210 2209 1948 +3 2241 1048 2465 +3 1491 967 966 +3 1907 1906 693 +3 1907 1908 1906 +3 2632 692 1911 +3 2465 2239 2241 +3 1319 289 943 +3 943 289 944 +3 2495 139 2494 +3 2185 2723 2188 +3 1589 2288 2286 +3 694 1081 1910 +3 1909 1910 1911 +3 2538 2539 1106 +3 1046 2473 1112 +3 1907 1909 1908 +3 1909 695 1908 +3 1156 2325 2508 +3 626 669 631 +3 692 695 1909 +3 1918 1916 1915 +3 1148 943 944 +3 1104 1912 1105 +3 1912 945 1105 +3 1101 1915 1104 +3 1099 1098 1921 +3 292 1919 1101 +3 2149 988 2186 +3 2160 989 2156 +3 996 2162 995 +3 1097 1927 1919 +3 2184 2151 2183 +3 1095 290 1917 +3 1916 1917 290 +3 2107 359 358 +3 359 2614 358 +3 1098 350 1922 +3 1095 1917 1096 +3 1925 1928 1923 +3 1928 1925 1922 +3 1919 292 1920 +3 2189 2190 2640 +3 1927 1097 1925 +3 1927 1925 1926 +3 1919 1927 1918 +3 1928 1922 350 +3 42 15 8 +3 1922 1097 1921 +3 1096 1923 1924 +3 2523 15 2520 +3 1923 350 1924 +3 166 2520 2519 +3 2523 2520 166 +3 8 15 2523 +3 1926 1102 1927 +3 387 1418 1419 +3 413 1413 1929 +3 1412 1929 1413 +3 1615 1260 1931 +3 1616 1615 1931 +3 1185 1183 2315 +3 1185 1186 1183 +3 1932 1260 1259 +3 373 1616 1932 +3 1616 373 1270 +3 1616 1931 1932 +3 1931 1260 1932 +3 2519 2516 2515 +3 1270 373 1258 +3 348 63 2518 +3 1934 348 2518 +3 31 200 2305 +3 2419 31 2305 +3 2558 1559 2559 +3 62 1795 43 +3 672 2113 630 +3 1940 924 1938 +3 1940 1937 1560 +3 1940 1938 1937 +3 1560 43 1796 +3 2602 2603 18 +3 1560 1937 1936 +3 1938 1559 1937 +3 1560 1936 43 +3 1943 925 1942 +3 1945 1944 926 +3 1944 1945 1943 +3 1941 924 1940 +3 1561 1941 1940 +3 1796 1561 1560 +3 1793 1561 1796 +3 2210 85 2209 +3 926 2209 1945 +3 2208 2209 926 +3 2610 195 979 +3 18 1848 2602 +3 1848 18 2607 +3 169 1949 1947 +3 1946 169 1947 +3 419 2214 2215 +3 676 671 596 +3 1954 888 322 +3 1178 1177 322 +3 1177 1952 322 +3 80 81 1944 +3 80 1944 27 +3 1944 1943 27 +3 1945 925 1943 +3 2210 128 949 +3 85 925 1945 +3 1951 65 258 +3 2659 2660 301 +3 881 2660 2659 +3 1951 258 128 +3 1944 1946 926 +3 1944 81 1946 +3 949 85 2210 +3 1947 926 1946 +3 2196 779 2217 +3 169 81 168 +3 81 169 1946 +3 265 1466 86 +3 1466 1950 86 +3 169 170 1949 +3 1951 128 1950 +3 197 1691 1647 +3 1713 65 1951 +3 267 1713 1951 +3 87 1713 267 +3 267 1951 1950 +3 780 2213 2212 +3 783 2212 2213 +3 1955 1346 870 +3 579 1313 2236 +3 2233 578 1310 +3 1537 2570 2571 +3 1312 1311 1309 +3 1955 876 1346 +3 2573 2577 1957 +3 871 402 1956 +3 876 1955 402 +3 1955 1956 402 +3 2261 2581 290 +3 2581 2261 1914 +3 218 1960 1958 +3 1090 2415 5 +3 1959 1960 908 +3 1729 1730 911 +3 2416 1199 1655 +3 2416 1200 1209 +3 1199 2416 1209 +3 518 2416 1655 +3 2416 518 1200 +3 947 251 252 +3 948 891 947 +3 348 1961 1963 +3 247 348 1964 +3 63 348 247 +3 348 1963 1964 +3 1964 1963 41 +3 1964 1966 247 +3 1583 92 541 +3 1969 511 1550 +3 1968 1967 60 +3 247 1967 1968 +3 1967 248 60 +3 122 70 119 +3 248 1967 1966 +3 511 1969 1669 +3 2734 1549 2735 +3 1996 1980 919 +3 1334 1333 872 +3 2490 1383 2489 +3 1982 1981 918 +3 243 804 805 +3 1770 1769 624 +3 2307 2308 1186 +3 2593 2590 1601 +3 1979 1996 1997 +3 861 2462 2461 +3 907 2415 1090 +3 1024 2470 2468 +3 196 1990 2011 +3 1848 1990 196 +3 2011 198 2012 +3 1989 115 196 +3 35 1990 1848 +3 2007 2008 1989 +3 2008 2007 1988 +3 199 2010 201 +3 1979 918 1980 +3 1997 1996 1978 +3 2006 2001 1988 +3 2006 2002 2001 +3 96 971 970 +3 96 976 972 +3 1065 653 597 +3 917 1982 918 +3 1984 916 921 +3 1983 116 1993 +3 116 1982 1993 +3 2004 198 1991 +3 1642 2305 201 +3 1642 2419 2305 +3 2003 2002 2004 +3 61 977 978 +3 2005 1999 32 +3 202 1648 2417 +3 1662 2241 1047 +3 1961 1934 1935 +3 2007 2012 2006 +3 2004 2002 198 +3 1026 2462 1025 +3 2011 1989 196 +3 1992 1985 1983 +3 1985 1992 917 +3 1992 1982 917 +3 1467 1468 677 +3 2242 1467 677 +3 917 912 1985 +3 1977 1994 919 +3 1994 1996 919 +3 1998 1979 1997 +3 1998 972 1979 +3 2475 2469 1015 +3 2124 2123 2127 +3 1976 920 1977 +3 972 976 1979 +3 2473 861 1112 +3 1094 2259 859 +3 2474 1094 859 +3 2003 2005 32 +3 1978 1995 1987 +3 1995 2000 1987 +3 1995 920 2000 +3 2464 1907 693 +3 1909 1907 2492 +3 2413 904 2412 +3 978 977 1999 +3 1978 2003 32 +3 32 1997 1978 +3 2003 1978 1987 +3 977 61 985 +3 2000 920 1988 +3 2009 115 2008 +3 198 2002 2006 +3 852 1094 2474 +3 2005 2003 2004 +3 920 2008 1988 +3 1023 1047 1046 +3 1023 1046 854 +3 1632 1047 1023 +3 1565 1141 2371 +3 1029 1634 2129 +3 4 201 2010 +3 921 2010 2009 +3 2009 2010 115 +3 287 2720 2721 +3 862 2124 2127 +3 199 115 2010 +3 916 2010 921 +3 4 2010 916 +3 2272 2276 1464 +3 427 2276 2272 +3 2273 1464 2276 +3 26 1903 2021 +3 1903 294 2021 +3 2271 23 2274 +3 775 1495 1499 +3 113 2023 298 +3 2023 26 2022 +3 26 2024 1903 +3 1903 2024 1902 +3 2024 112 1902 +3 2025 112 2024 +3 426 112 2025 +3 112 426 45 +3 113 1464 2273 +3 2273 2025 113 +3 307 152 320 +3 2032 22 299 +3 299 295 2028 +3 2031 2032 2030 +3 2032 299 2030 +3 2031 2030 110 +3 343 215 344 +3 959 91 961 +3 2048 91 959 +3 205 204 2034 +3 473 157 20 +3 59 208 214 +3 208 59 2034 +3 22 1465 298 +3 1465 113 298 +3 152 303 2033 +3 2045 210 2041 +3 210 2045 2049 +3 2046 2042 903 +3 203 2037 1011 +3 204 2037 2036 +3 2038 2037 204 +3 1011 2037 2038 +3 2408 2407 1146 +3 2034 59 205 +3 2038 204 205 +3 7 2038 205 +3 24 1682 1684 +3 1389 1388 2411 +3 1388 1389 1366 +3 2043 2042 210 +3 214 2044 38 +3 543 211 542 +3 2044 209 38 +3 220 906 2043 +3 2041 2042 2046 +3 208 2040 2044 +3 2039 2040 208 +3 220 2054 954 +3 2041 2046 209 +3 2040 2041 209 +3 203 960 961 +3 157 156 20 +3 156 157 2063 +3 204 2035 2034 +3 2048 2045 91 +3 1301 1264 1140 +3 210 2049 2050 +3 2050 2051 2043 +3 2051 2050 952 +3 2050 2043 210 +3 543 951 2052 +3 952 543 2052 +3 952 2052 2051 +3 953 2053 951 +3 953 2054 2053 +3 2054 220 2053 +3 954 2056 955 +3 2035 208 2034 +3 206 59 207 +3 2058 92 965 +3 2060 221 963 +3 951 92 2058 +3 953 2057 2055 +3 11 58 206 +3 2058 965 221 +3 964 965 1583 +3 221 2057 2058 +3 953 2058 2057 +3 2648 2257 849 +3 2048 2062 2045 +3 2049 2062 958 +3 2045 2062 2049 +3 1301 225 2068 +3 1277 2066 1278 +3 2065 158 51 +3 2066 1277 1264 +3 2067 2066 1264 +3 1264 1301 2067 +3 1301 2068 2067 +3 1280 231 1279 +3 1281 2072 1297 +3 2071 229 2072 +3 1280 2071 2072 +3 2076 2075 1283 +3 2087 2088 224 +3 2073 1282 2069 +3 2068 2073 2069 +3 2071 2076 229 +3 1282 2075 2076 +3 2074 2075 1282 +3 1281 1280 2072 +3 231 1280 1281 +3 2069 2067 2068 +3 2068 1285 2073 +3 2086 2078 2079 +3 232 1296 285 +3 1282 2076 2071 +3 2087 2081 1288 +3 2081 2087 1290 +3 84 51 168 +3 227 2080 2081 +3 1285 2078 2077 +3 226 1057 2084 +3 1287 2082 2080 +3 2082 2081 2080 +3 2082 1288 2081 +3 1140 1264 1623 +3 1287 226 2082 +3 1287 1726 226 +3 2068 225 2079 +3 2068 2079 1285 +3 225 1577 2079 +3 1057 289 2084 +3 1320 289 1319 +3 2080 2078 1287 +3 297 2083 2084 +3 297 2085 2083 +3 2089 1678 171 +3 224 1290 2087 +3 82 169 168 +3 2088 1678 2089 +3 1677 171 1678 +3 171 224 2089 +3 2644 483 2643 +3 812 2644 810 +3 394 812 810 +3 810 2644 2090 +3 481 829 817 +3 1431 2111 475 +3 2111 2110 475 +3 2106 2102 362 +3 2098 2097 142 +3 771 2615 2618 +3 2464 2492 1907 +3 2464 694 2492 +3 302 359 880 +3 2662 302 880 +3 2499 1157 2324 +3 1854 2095 354 +3 1854 356 2095 +3 352 2097 2098 +3 354 2095 2096 +3 1472 1471 179 +3 2612 2613 385 +3 2096 2097 352 +3 2486 1378 2485 +3 2283 682 2278 +3 357 2092 2101 +3 1463 1462 142 +3 147 2269 428 +3 353 352 2098 +3 357 2101 2100 +3 2092 114 2101 +3 882 145 363 +3 2110 2093 2103 +3 155 2112 1683 +3 2112 268 1683 +3 300 2653 2655 +3 2112 155 1678 +3 2105 2096 144 +3 385 44 384 +3 2650 888 2659 +3 410 612 939 +3 2106 363 2102 +3 363 145 2102 +3 114 785 362 +3 242 809 2730 +3 2106 2267 146 +3 617 597 1770 +3 2651 889 2650 +3 301 2651 2650 +3 1492 1493 776 +3 2103 475 2110 +3 1678 269 2112 +3 268 269 97 +3 1116 2113 2114 +3 2113 672 2114 +3 650 1116 2114 +3 2115 1468 675 +3 2116 2115 675 +3 682 2280 2279 +3 2114 672 673 +3 2115 2114 673 +3 2246 2248 3 +3 1145 2248 2246 +3 704 2247 3 +3 650 2115 2116 +3 650 2114 2115 +3 1585 1587 1588 +3 1003 706 1115 +3 969 973 2117 +3 96 2117 973 +3 182 969 970 +3 2120 2119 860 +3 1044 854 1113 +3 293 109 2026 +3 1042 854 2118 +3 851 2647 2648 +3 2178 2179 2180 +3 287 995 2157 +3 1043 2119 2118 +3 862 1634 2125 +3 2121 860 1033 +3 2129 1634 862 +3 856 1031 1032 +3 2123 1041 2122 +3 1094 849 2259 +3 2125 854 1042 +3 2132 2134 863 +3 2131 1032 1031 +3 2138 2132 863 +3 2138 2133 2132 +3 2139 1639 1640 +3 2133 1030 2132 +3 2242 2256 2245 +3 2256 1145 2245 +3 1028 2136 1638 +3 2136 1034 1638 +3 1185 2307 1186 +3 1188 1187 2313 +3 1185 2306 2307 +3 1302 2225 1766 +3 1641 1639 2141 +3 1639 1641 853 +3 2142 286 943 +3 286 1319 943 +3 2144 942 2143 +3 2143 942 2142 +3 943 2143 2142 +3 2185 988 2722 +3 1861 19 1860 +3 2183 2151 2191 +3 2721 1924 287 +3 2229 2230 502 +3 2144 2145 942 +3 942 2146 465 +3 942 2145 2146 +3 2145 468 2146 +3 2660 882 301 +3 1387 2411 1367 +3 2411 2490 1367 +3 878 867 754 +3 2149 989 987 +3 2148 2149 987 +3 2165 993 2168 +3 950 1568 1569 +3 992 989 2160 +3 2151 988 2150 +3 2147 2153 2145 +3 702 1078 2524 +3 702 1079 1078 +3 2144 2143 288 +3 2150 2148 288 +3 2158 2183 2192 +3 2161 992 2160 +3 2193 776 1489 +3 2369 2368 2161 +3 1096 2721 991 +3 2541 815 2641 +3 814 2541 2641 +3 993 997 2168 +3 2171 2170 2169 +3 2174 2176 2175 +3 2176 1098 2171 +3 2512 2522 2511 +3 2163 2175 2167 +3 2163 2174 2175 +3 2510 2511 245 +3 1300 2376 1568 +3 2374 1137 1292 +3 2511 166 245 +3 291 1103 2170 +3 2378 2389 1174 +3 997 993 2170 +3 291 2171 1098 +3 2171 291 2170 +3 1618 1143 1276 +3 1965 1966 1964 +3 1617 1143 1618 +3 2173 2172 2162 +3 996 2173 2162 +3 994 2167 2175 +3 2176 994 2175 +3 8 100 102 +3 996 1924 2174 +3 2261 2260 1914 +3 2261 1913 2260 +3 2178 2180 1913 +3 827 2539 1010 +3 296 270 2363 +3 1095 2158 2177 +3 2157 2156 2190 +3 1095 2177 2178 +3 2146 468 2223 +3 353 2098 75 +3 2719 2720 2152 +3 1095 1096 991 +3 2158 1095 991 +3 2177 2179 2178 +3 1320 1319 270 +3 2181 2180 1912 +3 1793 1795 1792 +3 2603 1849 199 +3 2195 2194 1522 +3 2185 2188 2186 +3 97 269 271 +3 18 2603 2604 +3 1319 286 2366 +3 945 2191 2151 +3 1484 783 1486 +3 2545 1163 758 +3 2195 2196 150 +3 779 2544 2197 +3 2543 2544 779 +3 2216 2217 2197 +3 1429 431 1430 +3 1429 1430 1428 +3 2206 790 406 +3 2545 1158 1163 +3 2641 2642 814 +3 148 1865 432 +3 2200 779 2196 +3 2196 2217 150 +3 2197 2198 780 +3 2212 2197 780 +3 1159 2545 758 +3 392 1129 580 +3 2429 2431 587 +3 2541 2543 2542 +3 2541 2199 2543 +3 1437 413 1930 +3 148 432 1429 +3 2543 779 2542 +3 391 2202 481 +3 812 813 483 +3 2202 482 489 +3 481 2202 489 +3 830 481 489 +3 2204 2205 792 +3 801 792 2205 +3 2206 406 2205 +3 2203 791 2204 +3 2204 407 2203 +3 2205 2207 801 +3 791 2203 1129 +3 781 2215 2198 +3 266 87 267 +3 2208 1947 86 +3 1488 783 2213 +3 2610 979 35 +3 194 2610 35 +3 2208 1948 2209 +3 1484 2211 783 +3 118 119 20 +3 2217 2216 150 +3 150 2194 2195 +3 1784 2429 587 +3 2541 391 815 +3 2538 1906 2540 +3 2200 2196 2195 +3 781 419 2215 +3 2212 2216 2197 +3 2218 1438 1411 +3 486 1438 2218 +3 2183 2191 2219 +3 2192 2183 2219 +3 2182 2219 2191 +3 2192 2219 2182 +3 2118 2119 1042 +3 2120 1042 2119 +3 272 6 1152 +3 285 98 2365 +3 2364 2366 2365 +3 2366 2364 270 +3 2161 2368 2367 +3 990 2161 2367 +3 2497 1490 1486 +3 284 2364 2365 +3 2126 1042 2120 +3 1256 2226 2227 +3 2226 1271 2227 +3 563 1547 1744 +3 2302 2301 1548 +3 2302 2300 2301 +3 1671 2300 2302 +3 1548 2229 1668 +3 2229 502 1668 +3 527 2697 529 +3 2697 1850 529 +3 1956 1955 870 +3 2233 1310 2235 +3 404 2262 766 +3 695 2525 826 +3 2236 1312 1309 +3 1313 1312 2236 +3 745 1312 1313 +3 1047 2239 1046 +3 2469 1024 2468 +3 2469 2475 1024 +3 2462 861 2463 +3 2240 861 2473 +3 2472 2240 2473 +3 2465 1048 2466 +3 2327 708 2249 +3 2241 1564 1048 +3 2241 1662 1564 +3 708 2324 2249 +3 2328 1977 919 +3 2285 705 2286 +3 2247 2251 2250 +3 675 2253 2116 +3 1370 2290 2289 +3 2253 2251 2247 +3 382 361 1149 +3 1468 2252 675 +3 709 1144 677 +3 675 2251 2253 +3 1468 1467 2252 +3 1138 1570 2649 +3 1570 1571 2649 +3 2282 1585 1588 +3 2278 1584 2283 +3 2243 1144 2255 +3 2242 1144 2243 +3 677 1144 2242 +3 2242 2243 2256 +3 1974 570 1973 +3 1975 1974 1973 +3 2633 1603 2636 +3 1688 689 1975 +3 689 1974 1975 +3 689 1081 1080 +3 494 508 809 +3 2254 2255 2244 +3 2255 1144 2244 +3 2392 2393 2256 +3 2393 1145 2256 +3 2263 1311 766 +3 2263 581 1311 +3 2373 2372 1274 +3 2373 2371 2372 +3 1274 2375 1143 +3 1567 1140 2264 +3 1485 1489 775 +3 785 2266 2267 +3 785 428 2266 +3 146 2267 2266 +3 2267 2106 362 +3 785 2267 362 +3 2396 490 2398 +3 2025 2273 426 +3 2277 2273 2276 +3 2277 426 2273 +3 1464 1465 2265 +3 2274 23 2275 +3 426 2274 2275 +3 428 2269 2268 +3 427 2270 2271 +3 427 2277 2276 +3 2274 426 2277 +3 1460 75 1459 +3 45 426 2275 +3 2408 2409 45 +3 1011 2408 1146 +3 2411 1387 1389 +3 1387 1368 1389 +3 2491 1377 1395 +3 854 1046 1112 +3 2280 706 1003 +3 1588 706 2280 +3 2285 1586 1585 +3 2281 2116 2253 +3 2282 1588 2280 +3 1377 2485 2482 +3 1542 2575 2565 +3 507 1528 1501 +3 1157 2325 2324 +3 1965 1964 41 +3 2725 1965 41 +3 2328 1976 1977 +3 2503 2504 707 +3 2506 2503 707 +3 2396 1755 490 +3 834 1755 2396 +3 2266 428 2395 +3 617 624 2617 +3 2287 2288 713 +3 1589 1591 2288 +3 2289 1374 1375 +3 2291 1373 2292 +3 2407 2275 1146 +3 2275 2407 45 +3 136 382 379 +3 136 381 382 +3 1799 2456 2457 +3 2458 1799 2457 +3 1210 930 2296 +3 2458 2457 1223 +3 136 376 381 +3 563 2298 1671 +3 2297 931 49 +3 500 1556 508 +3 508 494 500 +3 2158 2159 2183 +3 2306 1184 2307 +3 563 1763 2298 +3 287 2157 2720 +3 525 2691 257 +3 2712 56 2709 +3 2299 2300 1671 +3 2299 2228 2300 +3 2687 2690 532 +3 445 444 187 +3 1630 846 222 +3 156 2304 105 +3 51 84 104 +3 2569 2567 1536 +3 2304 104 105 +3 2424 2425 1084 +3 1934 43 1936 +3 2603 200 2604 +3 2714 923 2711 +3 1758 2708 2707 +3 2707 2706 1758 +3 2306 1208 1184 +3 2306 2314 1208 +3 1193 2309 1184 +3 2309 2308 1184 +3 606 399 1194 +3 2309 1193 2313 +3 2707 2708 923 +3 1741 2707 923 +3 2507 1589 1590 +3 2314 1185 2315 +3 608 606 2321 +3 608 418 606 +3 2318 2317 2316 +3 425 2317 2318 +3 2316 2315 1183 +3 761 763 2450 +3 763 761 760 +3 425 608 2317 +3 1181 425 2318 +3 425 1181 1182 +3 2317 608 2321 +3 2321 2320 605 +3 2319 605 2320 +3 2317 2321 605 +3 2316 2317 605 +3 708 2326 2498 +3 2499 708 2498 +3 2322 2501 2500 +3 2322 709 2501 +3 2322 2500 2499 +3 2498 2322 2499 +3 708 2499 2324 +3 707 2507 2506 +3 709 2322 2323 +3 709 2323 1144 +3 2326 2244 1144 +3 2323 2326 1144 +3 1297 2331 372 +3 2072 229 1297 +3 229 2331 1297 +3 1284 2331 229 +3 315 316 236 +3 2332 230 2333 +3 2329 1439 2335 +3 312 313 2334 +3 1268 2329 2335 +3 315 233 316 +3 2343 2335 1440 +3 2344 1269 2345 +3 2336 2337 1347 +3 1268 2337 2336 +3 2340 1765 367 +3 2340 1255 1765 +3 2343 2342 1268 +3 1268 2335 2343 +3 1766 2338 1302 +3 2341 2334 230 +3 2333 230 2334 +3 2337 1268 2342 +3 310 1251 374 +3 2354 310 374 +3 2351 462 463 +3 462 2351 1861 +3 2340 2339 1255 +3 2342 368 2338 +3 1443 2350 2349 +3 2342 2344 368 +3 2343 2344 2342 +3 1267 2347 2348 +3 162 1444 1441 +3 2350 1861 2351 +3 2343 1269 2344 +3 2344 2347 368 +3 2346 2349 2353 +3 19 160 163 +3 163 160 159 +3 1442 1445 1444 +3 2354 2353 2357 +3 310 2354 2355 +3 368 2352 1302 +3 2338 368 1302 +3 2352 368 2347 +3 2347 1267 2352 +3 1444 162 1446 +3 1442 1444 1446 +3 1447 162 1303 +3 1267 2646 53 +3 2359 637 598 +3 637 2359 1876 +3 375 2352 2356 +3 375 1302 2352 +3 371 2353 2354 +3 310 2355 1002 +3 375 2356 1266 +3 2353 161 2357 +3 79 2698 2695 +3 1888 643 1892 +3 1628 874 2388 +3 2361 272 2360 +3 98 284 2365 +3 271 2363 2362 +3 2367 2162 2172 +3 990 2367 2172 +3 2365 286 285 +3 995 2368 2369 +3 2368 995 2162 +3 2368 2162 2367 +3 2156 995 2370 +3 2370 2160 2156 +3 1137 2373 1274 +3 1292 1569 2376 +3 1292 2376 2374 +3 2374 2376 1300 +3 1569 1568 2376 +3 993 2165 2166 +3 1300 1565 2371 +3 1568 1565 1300 +3 1141 2372 2371 +3 2373 2374 1300 +3 1141 2377 2372 +3 2377 1141 2264 +3 2389 2358 1174 +3 2388 2383 1628 +3 2383 873 1628 +3 2384 403 743 +3 2386 582 1314 +3 1628 873 1627 +3 745 2382 2386 +3 2382 2380 2386 +3 745 1313 2382 +3 643 2387 743 +3 643 741 2387 +3 1173 1172 2381 +3 2380 2382 403 +3 744 743 2382 +3 743 403 2382 +3 744 579 1067 +3 1313 744 2382 +3 2386 1314 745 +3 1877 2390 640 +3 2385 868 873 +3 2380 747 2386 +3 874 2389 2378 +3 2389 2390 2358 +3 2389 874 2390 +3 2390 638 2358 +3 1877 638 2390 +3 1887 2385 741 +3 874 640 2390 +3 639 2385 1887 +3 846 2391 1776 +3 2254 2392 2255 +3 428 2268 2395 +3 2395 2265 2266 +3 2401 1406 1369 +3 2397 831 489 +3 831 830 489 +3 834 2397 489 +3 2444 2445 829 +3 480 829 2445 +3 2398 1863 831 +3 2396 2398 831 +3 1114 2729 395 +3 2729 2728 395 +3 834 2396 2397 +3 1862 1863 2398 +3 490 1862 2398 +3 390 2445 2444 +3 439 2402 1369 +3 439 2403 2402 +3 439 1381 2403 +3 189 2400 2401 +3 2400 1406 2401 +3 1381 441 2403 +3 1368 2406 2405 +3 1406 2400 2404 +3 2400 2399 2404 +3 2409 7 13 +3 1898 2409 13 +3 2528 342 2529 +3 424 957 2412 +3 980 61 979 +3 905 2413 2412 +3 2415 907 1958 +3 2415 1958 905 +3 2414 2415 905 +3 2414 5 2415 +3 957 5 2414 +3 962 5 957 +3 1087 1106 2539 +3 1935 253 1961 +3 2418 2419 1642 +3 2418 31 2419 +3 2417 2418 1642 +3 250 85 252 +3 891 68 947 +3 1010 2540 1908 +3 827 1058 2422 +3 2504 710 1592 +3 2423 1085 825 +3 1085 1108 825 +3 1084 2425 2426 +3 681 2426 2425 +3 2420 1085 2423 +3 2420 2424 1085 +3 2426 1076 1084 +3 2432 2616 587 +3 2431 2432 587 +3 617 2617 2432 +3 681 2427 2426 +3 2427 1076 2426 +3 1784 680 2429 +3 1206 566 94 +3 2432 1074 1073 +3 783 2211 2212 +3 2323 2498 2326 +3 2433 1600 573 +3 1111 897 2437 +3 936 1167 415 +3 2438 897 2439 +3 1041 2124 2126 +3 936 415 937 +3 2443 936 937 +3 514 496 1202 +3 1600 1603 1602 +3 568 1600 2433 +3 1601 1600 568 +3 1690 2435 573 +3 2439 174 2438 +3 794 408 811 +3 2502 2724 1157 +3 2500 2502 1157 +3 1157 2724 2505 +3 2724 2503 2505 +3 1744 1742 563 +3 936 2443 767 +3 793 408 794 +3 799 2441 408 +3 1327 686 2439 +3 686 1327 765 +3 2440 2438 811 +3 2441 2440 811 +3 2440 2441 767 +3 2729 808 2728 +3 2442 1111 2437 +3 831 390 2444 +3 1863 390 831 +3 2444 830 831 +3 1304 2450 601 +3 2672 417 2671 +3 941 2672 2671 +3 769 2674 2668 +3 2674 2671 2668 +3 2671 2674 2667 +3 601 2450 1182 +3 1776 2391 2451 +3 1019 847 2451 +3 1182 2449 2448 +3 847 1776 2451 +3 1776 847 1775 +3 2450 2449 1182 +3 2450 763 2449 +3 2391 1020 2451 +3 2571 2570 16 +3 7 2452 13 +3 13 2452 1901 +3 2455 1802 1800 +3 1937 1559 2558 +3 252 85 949 +3 2558 1936 1937 +3 2455 1806 1802 +3 2457 2456 1800 +3 1221 1798 1223 +3 932 181 1210 +3 2457 1800 1223 +3 2459 1222 725 +3 2608 2607 9 +3 2459 725 1799 +3 1112 2460 1113 +3 2732 2259 1043 +3 2731 2732 1044 +3 861 2240 2463 +3 2466 1048 2467 +3 852 2474 2471 +3 2461 2462 1026 +3 1089 848 1090 +3 2468 2467 855 +3 2469 855 1021 +3 2468 855 2469 +3 1015 2469 1021 +3 1089 2471 1024 +3 2471 1089 852 +3 2239 1047 2241 +3 2472 2239 2465 +3 2466 2472 2465 +3 2466 2240 2472 +3 859 1026 1025 +3 2239 2472 1046 +3 848 2475 2476 +3 2475 848 1089 +3 848 2476 1014 +3 1738 1856 2478 +3 2700 2701 1192 +3 1741 2715 2716 +3 2480 1856 1747 +3 2480 2478 1856 +3 1756 2480 1747 +3 1756 1746 2480 +3 1746 2478 2480 +3 1151 383 44 +3 1953 302 883 +3 885 302 1953 +3 360 302 885 +3 1376 2484 2483 +3 2483 2484 1371 +3 1952 1953 883 +3 2289 2484 1376 +3 439 1378 2486 +3 1391 1372 2490 +3 2490 1372 1383 +3 1388 1391 2490 +3 2484 1375 2488 +3 2484 2488 1371 +3 2488 1383 1371 +3 2488 2489 1383 +3 2488 1375 2489 +3 1641 2663 853 +3 376 377 349 +3 377 2493 349 +3 165 131 134 +3 377 135 2493 +3 135 2494 2493 +3 2494 349 2493 +3 139 349 2494 +3 73 139 2495 +3 74 349 892 +3 270 1319 2366 +3 2514 2513 245 +3 2322 2498 2323 +3 710 2504 1594 +3 251 254 2725 +3 825 1107 1106 +3 251 2725 41 +3 41 1962 251 +3 1594 2502 2501 +3 2502 2500 2501 +3 947 254 251 +3 2503 2506 2505 +3 2505 2506 2325 +3 2509 1591 707 +3 713 1591 1592 +3 1591 1589 2507 +3 1156 2508 3 +3 709 674 710 +3 2504 2509 707 +3 1855 101 2510 +3 29 100 2512 +3 100 29 102 +3 345 2526 1708 +3 256 2512 101 +3 256 29 2512 +3 60 1855 2513 +3 245 2515 2514 +3 2515 246 2514 +3 245 2513 2510 +3 2513 1855 2510 +3 167 2519 2520 +3 167 2516 2519 +3 67 255 248 +3 2518 63 2517 +3 2516 246 2515 +3 167 62 2517 +3 167 2517 2516 +3 2517 63 2516 +3 255 256 101 +3 67 256 255 +3 2519 2515 245 +3 166 2519 245 +3 2518 62 43 +3 1934 2518 43 +3 1643 31 2418 +3 62 2518 2517 +3 2520 2521 167 +3 2521 2520 15 +3 15 42 2521 +3 2524 1078 703 +3 826 2524 703 +3 2536 2194 150 +3 578 1614 1131 +3 2525 695 572 +3 2527 345 1710 +3 1698 324 1705 +3 2532 2533 1697 +3 2530 2533 88 +3 2533 2530 2534 +3 1698 2526 2535 +3 341 1710 1709 +3 88 2529 2530 +3 343 344 2530 +3 2531 1698 2535 +3 2531 2532 1698 +3 1697 2533 2534 +3 1317 213 1316 +3 431 147 785 +3 1694 1696 325 +3 1317 1697 2534 +3 2534 1318 1317 +3 1318 2534 344 +3 344 2534 2530 +3 431 785 114 +3 431 114 1431 +3 1431 114 2111 +3 2537 503 484 +3 1428 1427 148 +3 2198 2544 2199 +3 1087 2539 2422 +3 243 2644 2643 +3 828 243 2643 +3 2544 2198 2197 +3 2199 781 2198 +3 2200 2542 779 +3 2207 406 802 +3 1905 1900 12 +3 1513 1511 2548 +3 2548 1511 2547 +3 2547 1511 1531 +3 1511 1528 1531 +3 2548 1515 1513 +3 2550 826 703 +3 2552 1403 1119 +3 2552 2553 1408 +3 1436 1408 2553 +3 1436 1409 1408 +3 2555 2554 1407 +3 2552 1119 2553 +3 1664 2554 1119 +3 2553 1119 2554 +3 1404 2552 1408 +3 1436 2553 2554 +3 308 306 307 +3 2557 1401 1402 +3 2454 433 1435 +3 2557 2556 1401 +3 2562 251 1962 +3 2559 1936 2558 +3 2560 1559 1939 +3 251 250 252 +3 2562 250 251 +3 2560 1939 250 +3 1935 2561 253 +3 2561 2560 253 +3 544 542 960 +3 2579 1552 1557 +3 1555 500 2572 +3 2564 2566 1537 +3 958 543 952 +3 1536 2567 1538 +3 2564 1537 2565 +3 2574 2575 2576 +3 2575 1542 2576 +3 79 546 234 +3 836 79 234 +3 2567 509 2568 +3 2571 2565 1537 +3 2571 2572 2565 +3 509 492 2568 +3 2565 2572 497 +3 2578 1557 2570 +3 2574 2573 498 +3 2574 2577 2573 +3 1915 2581 1914 +3 2569 1536 2578 +3 1540 509 1539 +3 1540 1539 2563 +3 2575 2574 498 +3 2574 1541 2577 +3 1541 1957 2577 +3 1541 1543 1957 +3 1732 1543 1541 +3 1537 2569 2580 +3 2581 1916 290 +3 2578 2579 1557 +3 1536 2579 2578 +3 2579 1536 1552 +3 2582 1380 10 +3 2583 2582 10 +3 1396 2583 10 +3 10 2491 1396 +3 2491 1395 1396 +3 440 1380 2585 +3 576 2588 2587 +3 1605 1604 2586 +3 1611 1605 2586 +3 576 2587 2589 +3 599 1607 1606 +3 2587 1612 1611 +3 699 700 572 +3 397 2596 2593 +3 2597 2593 1601 +3 2591 2589 700 +3 2592 2590 2591 +3 2589 2586 700 +3 2589 2587 2586 +3 1611 2586 2587 +3 2591 699 2592 +3 2597 1601 568 +3 2590 2592 571 +3 397 787 786 +3 2595 2596 576 +3 2595 576 2594 +3 397 2593 2597 +3 2594 2591 2590 +3 2595 2594 2590 +3 397 786 2596 +3 1135 398 1134 +3 1179 1134 603 +3 2598 94 788 +3 829 480 2638 +3 2601 1437 1410 +3 215 1686 1685 +3 2605 2606 2604 +3 2108 2612 385 +3 200 31 2605 +3 200 2605 2604 +3 2607 18 2606 +3 1849 2611 196 +3 2609 2608 9 +3 1647 1691 2609 +3 1691 195 2609 +3 2607 194 1848 +3 1647 2609 9 +3 979 978 35 +3 2608 2610 194 +3 2607 2608 194 +3 1691 1692 195 +3 2611 1848 196 +3 2099 2100 358 +3 2613 2614 385 +3 144 2099 2613 +3 359 44 2614 +3 360 44 359 +3 595 771 626 +3 2617 2616 2432 +3 2617 625 2616 +3 2617 624 625 +3 1490 1492 1486 +3 769 2665 2666 +3 769 2621 2665 +3 553 2619 1469 +3 1470 2619 553 +3 2669 2668 417 +3 1400 461 2677 +3 2668 2623 769 +3 460 2622 555 +3 555 2622 556 +3 552 768 1470 +3 1798 1221 2625 +3 2625 1221 715 +3 715 1222 2625 +3 1798 1222 2459 +3 1798 2625 1222 +3 2626 678 1785 +3 678 1786 1785 +3 683 1782 1781 +3 683 1359 2628 +3 1356 589 2628 +3 2592 2634 571 +3 1175 598 1176 +3 644 2627 743 +3 506 1556 1530 +3 781 813 782 +3 1556 506 508 +3 396 787 788 +3 1975 1973 690 +3 2630 569 2635 +3 1603 2633 2629 +3 1975 690 2635 +3 569 1688 2635 +3 2722 2718 2185 +3 1601 2590 2637 +3 2637 2590 571 +3 571 2636 2637 +3 397 2598 788 +3 397 2597 2598 +3 1600 2637 2636 +3 2636 1603 1600 +3 1608 574 570 +3 1104 2639 1101 +3 2718 2722 2184 +3 1920 1099 1921 +3 1101 2639 944 +3 2644 243 2090 +3 816 2642 2641 +3 2354 374 2645 +3 371 2354 2645 +3 53 2645 1253 +3 367 1253 1252 +3 1253 374 1252 +3 374 1253 2645 +3 851 962 2647 +3 1038 2648 850 +3 1038 2257 2648 +3 889 888 2650 +3 889 322 888 +3 146 2658 363 +3 2653 111 889 +3 2652 2655 2656 +3 880 145 2661 +3 2652 300 2655 +3 2652 22 300 +3 363 2657 882 +3 2652 2658 22 +3 2654 304 111 +3 2661 882 2660 +3 2660 881 2661 +3 1465 22 2658 +3 359 145 880 +3 2662 2661 881 +3 883 2662 881 +3 302 2662 883 +3 2664 1737 1736 +3 1748 2664 1736 +3 2664 1748 513 +3 2675 1407 436 +3 515 1734 1733 +3 2677 461 2678 +3 2672 823 2673 +3 1763 2713 2298 +3 941 2667 410 +3 2669 2623 2668 +3 416 941 939 +3 2667 2674 769 +3 2670 414 1402 +3 414 822 1402 +3 1758 1743 2708 +3 2673 2670 417 +3 2672 2673 417 +3 486 1416 1624 +3 823 414 2673 +3 191 1402 2677 +3 2677 1402 2676 +3 1398 2681 1397 +3 1397 2681 1386 +3 1398 2680 2681 +3 2680 1398 1399 +3 2680 436 2681 +3 1664 1386 2681 +3 737 739 309 +3 14 306 308 +3 1001 2357 161 +3 308 307 153 +3 533 2691 2692 +3 2694 2693 531 +3 239 2693 2694 +3 2697 185 1850 +3 526 185 2697 +3 2695 516 239 +3 2695 239 2694 +3 97 2704 274 +3 2704 97 1152 +3 2703 564 1190 +3 1191 2699 2703 +3 923 2710 2711 +3 2715 1741 923 +3 2711 2709 1673 +3 1745 562 2717 +3 1742 2717 2716 +3 2503 2724 2502 +3 2159 2720 2719 +3 991 2720 2159 +3 2720 991 2721 +3 2721 1096 1924 +3 2188 2723 2719 +3 2718 2719 2723 +3 386 2726 1434 +3 2728 808 810 +3 809 808 2730 +3 1666 1549 2733 +3 1026 859 2731 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_simple_hole.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_simple_hole.off new file mode 100644 index 00000000000..b4959a80fe6 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_simple_hole.off @@ -0,0 +1,8091 @@ +OFF +2700 5389 0 +0.262933 0.102269 0.138247 +0.0843142 0.0418575 -0.0419302 +0.0676609 -0.0308717 0.133371 +0.202895 0.468475 0.0802072 +0.113075 -0.465378 -0.0546734 +0.225577 -0.277149 -0.193776 +-0.146525 -0.22403 -0.169286 +-0.0249865 -0.129931 -0.13238 +-0.160965 -0.480027 -0.0707824 +0.0794063 -0.415277 -0.0839096 +0.0469116 -0.050008 0.252355 +-0.0998372 -0.193745 -0.16268 +-0.111131 -0.104825 -0.14166 +-0.061459 -0.0977343 -0.133353 +-0.247783 -0.131539 0.0722694 +-0.145972 -0.486627 -0.0633275 +0.0916759 0.0333604 -0.133002 +-0.184954 -0.325468 -0.133853 +0.0847778 -0.432659 -0.0978527 +-0.210776 -0.299151 0.0751516 +-0.151539 -0.388715 0.01282 +-0.154564 -0.438244 -0.0249412 +-0.123411 -0.0182656 0.0135824 +0.00773278 -0.053391 -0.0428874 +-0.0774524 -0.292395 -0.106335 +0.0201594 -0.263586 0.119859 +-0.105646 -0.0365155 -0.0770751 +-0.113391 -0.41896 -0.0906771 +-0.128213 -0.46259 -0.0994907 +-0.160526 -0.468057 -0.0393445 +0.197609 -0.127492 -0.0574767 +0.0757306 -0.449539 -0.0614557 +0.147148 -0.412461 -0.0801639 +0.103782 -0.333007 0.0288926 +0.108917 -0.401981 -0.00841926 +0.11392 -0.408931 -0.0973654 +0.129733 -0.31331 -0.0672325 +0.0904388 -0.356531 -0.0803906 +0.0359798 -0.255445 -0.113562 +-0.22312 -0.107007 -0.0611904 +-0.163408 -0.433458 -0.0704785 +-0.0915185 -0.473885 -0.0165533 +-0.141417 -0.474418 -0.0834065 +-0.0944539 -0.479454 -0.0663683 +-0.085985 -0.101282 0.158093 +-0.0225438 -0.0889567 -0.0848587 +0.092707 -0.109496 -0.114561 +-0.159213 -0.159272 -0.138793 +-0.24541 -0.230248 -0.110578 +0.183744 -0.231931 0.0176086 +0.294273 -0.0955008 0.116328 +-0.16477 -0.385872 -0.0413331 +-0.185303 -0.313456 -0.00374653 +-0.297084 -0.262835 -0.00415653 +0.167756 -0.128776 0.197921 +-0.0273811 0.0608812 -0.0989637 +0.208303 0.00452459 -0.0746544 +-0.150831 -0.448909 -0.0901866 +-0.0720206 -0.147118 -0.154796 +-0.0197986 -0.210658 -0.154154 +-0.130593 -0.498558 -0.021161 +0.129662 -0.373473 -0.0794411 +-0.120692 -0.481168 -0.0685411 +-0.108692 -0.494274 -0.0429275 +-0.0970902 -0.252938 -0.14843 +-0.0098054 -0.335319 -0.0147292 +0.0769246 -0.410346 -0.0391239 +-0.132409 -0.464154 -0.0197707 +-0.102806 -0.4217 0.00855496 +-0.0760332 -0.34128 0.100617 +-0.104435 -0.377391 0.0553722 +-0.14788 -0.33188 0.0922673 +-0.151409 -0.218926 0.165812 +-0.111518 -0.286925 0.148566 +-0.0458796 -0.210094 0.18627 +0.0439919 -0.147905 0.137964 +-0.0358575 -0.361749 0.0457868 +0.0284346 -0.311464 0.0537885 +0.0409609 -0.0869988 -0.085353 +0.118462 -0.0465078 -0.0483438 +-0.141108 -0.422593 -0.0846889 +-0.129145 -0.379198 -0.0712284 +-0.149426 -0.329507 -0.0473837 +-0.212723 -0.300322 -0.0706413 +-0.156151 -0.403775 -0.0651516 +-0.077704 -0.400019 -0.0437424 +-0.0783601 -0.342543 -0.0687412 +-0.0202922 -0.309739 -0.0758353 +0.0501325 -0.290557 -0.0430839 +0.0954448 -0.256567 0.0733017 +0.144565 -0.158299 0.0913557 +0.0562207 -0.179498 -0.140905 +0.16863 -0.175124 -0.176771 +0.121523 -0.241503 -0.138152 +0.196749 0.136407 0.00365942 +0.14057 0.277481 0.154966 +0.156168 -0.385879 -0.0324162 +-0.146564 -0.288069 -0.168907 +-0.212533 -0.256019 -0.170893 +0.0775241 -0.353084 -0.0221894 +-0.161054 -0.48311 -0.0516067 +-0.151386 -0.488726 -0.0297486 +-0.167299 -0.464731 -0.058517 +-0.167494 -0.44542 -0.0440266 +-0.166175 -0.416312 -0.0405929 +-0.155665 -0.409399 -0.0112037 +-0.130777 -0.428881 -0.00549876 +-0.162855 -0.460869 -0.0783452 +-0.0949104 -0.0628065 -0.118829 +-0.171364 -0.0681205 -0.104606 +-0.189411 -0.0391257 -0.0301772 +-0.201329 -0.0450332 0.0672375 +-0.0621659 -0.0595357 -0.0819357 +-0.0724451 -0.0386843 -0.0212262 +-0.0317016 -0.00827391 0.0812953 +0.125617 -0.445138 -0.086335 +0.16914 -0.45638 -0.0514974 +-0.188699 -0.102786 0.151505 +-0.127982 -0.406882 0.0143939 +-0.130706 -0.384 0.0373578 +-0.17253 -0.34721 0.0442322 +-0.136499 -0.357829 0.0655808 +-0.101729 -0.398953 0.0314689 +-0.06477 -0.393705 0.00175031 +-0.0683606 -0.382507 0.0422398 +-0.0619729 -0.361557 0.0725343 +-0.0129886 -0.329893 0.099078 +-0.0485077 -0.306718 0.14972 +-0.0586671 -0.359537 -0.0297503 +-0.105132 -0.354471 0.0834642 +-0.111953 -0.324339 0.110194 +-0.146952 -0.298663 0.122985 +-0.147935 -0.259899 0.146585 +-0.224685 -0.230598 0.12386 +-0.194785 -0.274899 0.125615 +-0.1144 -0.250007 0.185149 +-0.10665 -0.185071 0.204627 +-0.155805 -0.154327 0.174517 +-0.215755 -0.165279 0.142947 +-0.0743299 -0.277016 0.17853 +-0.0218198 -0.257755 0.16445 +0.000800113 -0.199671 0.138749 +-0.0254547 -0.133829 0.140633 +0.0635315 -0.20852 0.111271 +-0.0256804 -0.0569419 0.140514 +-0.0948894 -0.0414189 0.110395 +-0.0705488 -0.0374163 0.0415111 +-0.00760713 -0.0195458 0.0164934 +0.0499878 0.0289775 0.0673286 +0.140466 0.0718009 0.144428 +-0.00188983 0.0792593 -0.003093 +0.0559872 -0.0140882 -0.011506 +-0.227407 -0.0888195 0.0117762 +-0.273528 -0.167121 -0.0102922 +-0.0402782 -0.263586 -0.140793 +-0.137564 -0.296782 -0.109847 +-0.166109 -0.381665 -0.0120175 +-0.16983 -0.360755 0.0137933 +-0.16456 -0.354211 -0.0308766 +-0.185156 -0.334386 0.0190529 +-0.207978 -0.298552 0.0310885 +-0.252507 -0.243462 0.0511336 +-0.223388 -0.268692 -0.019703 +-0.193938 -0.322649 0.048456 +-0.175095 -0.332532 0.0736524 +-0.176111 -0.310734 0.103586 +-0.147337 -0.494175 -0.0467278 +-0.129359 -0.490613 -0.0537016 +-0.148829 -0.364106 -0.0543963 +-0.120087 -0.343197 -0.0662243 +-0.130345 -0.305692 -0.0722136 +-0.171529 -0.299424 -0.0833938 +-0.181343 -0.292949 -0.0416997 +0.207831 -0.217496 -0.0966998 +0.180453 0.174523 0.151623 +0.0997558 -0.44202 -0.0211251 +0.141829 -0.427452 -0.0246256 +0.231902 -0.0518172 0.0262484 +0.222165 -0.00765217 0.131632 +0.257605 0.0468554 0.0496674 +0.134457 -0.362329 0.00455646 +0.162364 -0.298449 0.0119315 +0.167632 -0.334853 -0.0258239 +0.166781 -0.258058 -0.0451734 +0.196618 -0.203737 -0.0367216 +0.204966 -0.148702 0.029823 +0.188775 -0.0899398 0.0842549 +0.118735 -0.0897053 0.120666 +0.108518 -0.0623755 0.19827 +0.0987744 0.0186293 0.19077 +0.164162 -0.016078 0.17849 +0.217401 -0.0732307 0.174029 +0.244384 -0.159022 0.158735 +0.0938974 -0.414078 -0.0986619 +0.0882094 -0.386204 -0.0874415 +0.110237 -0.433985 -0.106491 +0.0752909 -0.377302 -0.0545033 +0.136893 -0.424401 -0.103861 +0.101623 -0.446793 -0.0879738 +0.0803589 -0.447974 -0.0828166 +0.0955794 -0.458697 -0.0690652 +0.0852254 -0.472952 -0.043714 +0.0423481 -0.131534 -0.117698 +0.0102534 -0.163639 -0.135844 +-0.0294235 -0.16777 -0.154302 +-0.0581903 -0.19678 -0.162941 +-0.0495263 -0.23206 -0.157295 +0.0213258 -0.204668 -0.142847 +0.0591534 -0.221375 -0.128414 +0.094939 -0.204956 -0.158559 +0.102368 -0.149902 -0.152017 +0.161838 -0.127189 -0.119413 +0.0883157 -0.255475 -0.0965547 +0.00337956 -0.243572 -0.138992 +-0.00441584 -0.28038 -0.109802 +0.139454 -0.244447 -0.0884262 +0.17799 -0.253819 -0.13106 +0.239512 -0.249475 -0.139746 +0.239769 -0.199663 -0.201225 +0.139899 -0.220537 -0.184787 +0.188104 -0.214287 -0.208834 +0.241446 -0.186766 -0.139849 +0.209446 -0.161297 -0.101029 +-0.199048 -0.317265 -0.100601 +-0.293252 -0.31357 -0.122798 +-0.243299 -0.355691 -0.130502 +-0.247594 -0.319033 -0.0988683 +-0.291668 -0.287409 -0.0637038 +-0.248832 -0.272185 -0.0865389 +-0.259174 -0.220646 -0.0469428 +-0.282126 -0.263379 -0.124759 +-0.269731 -0.294935 -0.18724 +-0.247297 -0.165961 -0.0866554 +0.0601914 -0.0464014 -0.0549033 +-0.211085 -0.18579 -0.128927 +-0.200721 -0.132547 -0.108259 +-0.0634953 -0.15489 0.179525 +0.153912 -0.0887253 -0.0733484 +0.185145 -0.0471144 -0.0260532 +0.211443 0.0144377 0.0032337 +0.139575 0.0029693 0.000737671 +0.166751 0.0710484 -0.0323169 +0.107842 0.107181 0.0410238 +0.241648 0.0800111 -0.0150955 +-0.140262 -0.4992 -0.033581 +-0.123763 -0.497978 -0.0364981 +-0.108133 -0.495253 -0.0202341 +-0.1219 -0.481038 -0.0158085 +-0.110456 -0.461331 -0.014079 +-0.087635 -0.441699 -0.0445804 +-0.0916102 -0.451765 -0.0239283 +-0.0811529 -0.421697 -0.020421 +-0.0723115 -0.470105 -0.0423155 +-0.102577 -0.44033 -0.0062072 +-0.139118 -0.480546 -0.0199347 +-0.149266 -0.466768 -0.0254061 +0.222317 -0.0925366 -0.0161067 +-0.0417433 -0.361447 0.00632817 +-0.00965295 -0.347119 0.0218202 +0.0216724 -0.318231 0.010836 +-0.00474667 -0.341486 0.0613973 +0.0698488 -0.285166 0.0205835 +-0.108371 -0.29389 -0.0941984 +-0.11094 -0.279255 -0.127432 +-0.0852691 -0.31423 -0.083395 +-0.0516331 -0.309713 -0.0908278 +-0.0463843 -0.329032 -0.0615785 +-0.13427 -0.295211 -0.140976 +-0.16029 -0.312528 -0.151535 +-0.208046 -0.313472 -0.188061 +-0.177638 -0.29982 -0.178676 +-0.173332 -0.259819 -0.179118 +-0.186949 -0.225139 -0.161631 +-0.121077 -0.271737 -0.158365 +-0.222098 -0.229029 -0.143015 +-0.254895 -0.254361 -0.158387 +-0.119307 -0.241249 -0.168619 +-0.0940058 -0.224454 -0.161034 +-0.119452 -0.213541 -0.164903 +-0.133444 -0.181194 -0.153714 +-0.123212 -0.142937 -0.146434 +-0.154852 -0.114002 -0.127562 +-0.16919 -0.193253 -0.151916 +-0.202578 -0.281459 -0.18846 +-0.238459 -0.276537 -0.185897 +-0.240282 -0.308392 -0.197824 +-0.31592 -0.411023 -0.222975 +-0.28556 -0.354091 -0.210885 +-0.235315 -0.349789 -0.176342 +-0.247249 -0.413591 -0.205119 +-0.313616 -0.39085 -0.145549 +-0.265064 -0.38952 -0.162643 +-0.137308 -0.0765217 -0.126585 +-0.138269 -0.043252 -0.101811 +-0.149787 -0.024537 -0.0569204 +-0.190238 -0.325155 -0.164883 +-0.214126 -0.342005 -0.145019 +-0.11169 -0.0249744 -0.0351987 +-0.154494 -0.0206052 -0.0150451 +-0.170024 -0.0235376 0.033341 +-0.149964 -0.0212297 0.0915499 +-0.146292 -0.0570396 0.143171 +-0.204533 -0.050976 0.0222898 +-0.222839 -0.0748301 0.0497298 +-0.218112 -0.0836084 0.106186 +-0.241131 -0.10804 0.0423425 +-0.253857 -0.126023 0.000914005 +-0.268045 -0.155579 0.0359862 +-0.254096 -0.191499 0.0837602 +-0.284127 -0.206805 0.0257642 +-0.255388 -0.139415 -0.0455141 +-0.266486 -0.179542 -0.0496151 +-0.255448 -0.200689 -0.0776309 +-0.238672 -0.192995 -0.107883 +-0.225097 -0.163824 -0.109937 +-0.22995 -0.135947 -0.0896828 +-0.209528 -0.114818 -0.0862766 +-0.197715 -0.0771741 -0.074156 +-0.18152 -0.102481 -0.104911 +-0.212552 -0.0754645 -0.0336012 +-0.179069 -0.0426745 -0.0757348 +-0.191113 -0.0400122 0.118805 +0.0761558 -0.344791 -0.0536197 +0.0734921 -0.316433 -0.0291825 +0.0865869 -0.298841 -0.0691012 +0.0805876 -0.328744 0.0029047 +0.0952029 -0.361348 0.00820626 +0.11906 -0.273469 -0.0673767 +0.0841053 -0.310717 0.0264162 +0.125408 -0.292597 0.041066 +0.0878905 -0.285295 0.052224 +0.0491288 -0.272854 0.0806291 +0.143869 -0.242882 0.0528378 +0.117789 -0.207199 0.0870858 +0.169353 -0.193132 0.0552639 +0.0969256 -0.166289 0.115505 +0.054006 -0.288058 0.0505697 +0.0199581 -0.301066 0.0971587 +-0.00766116 -0.296894 0.132807 +0.0766599 -0.302889 0.00259846 +0.0459981 -0.299327 0.00649094 +0.0275534 -0.307808 -0.0222832 +0.0149271 -0.300169 -0.0594622 +0.0407712 -0.276916 -0.0798141 +0.0598138 -0.291021 -0.0166231 +0.105499 -0.310063 0.042044 +0.129965 -0.318676 0.0271739 +-0.0843085 -0.494264 -0.0321529 +-0.0752323 -0.238787 0.196776 +-0.295928 -0.43397 -0.176216 +0.0851801 -0.382062 -0.0130588 +0.0187394 -0.0952484 0.145146 +0.0700063 -0.10227 0.135872 +0.0221841 -0.0461712 0.144279 +0.0234739 0.0145751 0.123876 +-0.00955997 -0.0145334 0.135796 +-0.0455413 -0.0274983 0.116817 +-0.0630042 -0.0646849 0.123712 +-0.0996182 -0.0685448 0.139479 +-0.129134 -0.0937854 0.159793 +-0.112763 -0.133107 0.183753 +-0.0586283 -0.0384282 0.0801443 +-0.0976008 -0.0306336 0.0712047 +-0.187313 -0.236737 0.146886 +-0.186919 -0.194456 0.158247 +-0.276732 -0.200888 -0.0224537 +-0.291326 -0.23573 -0.0313163 +-0.262172 -0.26119 -0.0228289 +-0.244304 -0.258186 0.0138536 +-0.238049 -0.253808 -0.053252 +-0.278468 -0.245353 0.0237178 +-0.250374 -0.233381 -0.0762153 +-0.317786 -0.266287 -0.0397057 +-0.29694 -0.227134 0.00135872 +-0.28761 -0.282597 -0.0302299 +-0.0768305 -0.203891 0.202176 +-0.107975 -0.220055 0.202264 +-0.134773 -0.20066 0.190676 +-0.13214 -0.167949 0.192848 +-0.157713 -0.187173 0.17141 +-0.0792541 -0.17391 0.197354 +-0.103166 -0.157466 0.196315 +-0.0861693 -0.139966 0.183699 +-0.0642112 -0.126048 0.16286 +-0.0525585 -0.0978366 0.139755 +0.173523 -0.0454835 0.124705 +0.124762 -0.0100876 0.132612 +0.0801162 0.0231847 0.117816 +0.0903158 0.0691509 0.0824377 +0.111706 0.138719 0.113497 +0.109897 0.0476799 0.0291314 +0.0568194 0.0789592 0.018431 +0.166721 0.186565 0.0672199 +0.252858 0.160254 0.0700128 +0.103948 0.0891733 -0.0142249 +0.151331 0.103958 0.00831307 +0.156258 0.148984 0.0332697 +0.195526 0.176469 0.0301312 +0.246249 0.159404 0.0147221 +0.272985 0.107792 0.0403664 +0.220496 0.208803 0.0718273 +0.172006 0.242405 0.105809 +0.284857 0.213191 0.163319 +0.220004 0.262975 0.168971 +0.243752 0.187223 0.124992 +0.303317 0.156118 0.132187 +0.124557 0.160014 0.070217 +0.145476 0.178627 0.113721 +0.143822 0.145597 0.146983 +0.199699 0.112576 0.148784 +0.221259 0.0552492 0.134196 +0.124553 0.109697 0.139987 +0.100062 0.0751807 0.125633 +0.107686 0.0453443 0.15701 +0.152453 0.0251604 0.154394 +0.160741 0.1045 0.158385 +0.183054 0.0708926 0.1447 +0.188656 0.0314673 0.13741 +0.286002 0.0789154 0.0896861 +0.044874 0.0868553 -0.0397086 +0.0292084 0.0351428 -0.0773123 +-0.00652383 0.0868322 -0.0563984 +0.153395 -0.330946 0.00521793 +0.165687 0.227811 0.159326 +0.176713 -0.253714 -0.180764 +0.276141 0.126578 0.0974557 +-0.0329659 -0.0648403 -0.0508016 +-0.022748 -0.0460692 -0.0136176 +-0.0397109 -0.0394184 0.0195973 +0.00993129 -0.0278328 -0.0155697 +0.0270531 -0.00832198 0.0106523 +0.0103826 0.00500549 0.0538795 +0.0666135 0.0125544 0.0261568 +0.103369 0.00889595 0.155654 +0.11659 -0.0298082 0.170544 +0.153029 -0.0696813 0.168481 +0.113461 -0.0186162 0.216944 +0.10035 -0.0580327 0.251516 +0.150235 -0.084971 0.233939 +0.0719166 -0.0391569 0.214813 +0.10687 -0.103697 0.22877 +0.136543 -0.144876 0.235107 +0.147147 -0.0351617 0.149371 +0.1197 -0.0491892 0.122959 +0.148505 -0.0696344 0.112799 +0.152678 -0.114026 0.101195 +0.181641 -0.136376 0.0700095 +0.177794 -0.0667748 0.102185 +0.219377 -0.0856118 0.124697 +0.231869 -0.0572983 0.0801841 +0.250938 -0.00881912 0.0578761 +0.198815 -0.0628459 0.124187 +0.177363 -0.0676828 0.147605 +0.177944 -0.101552 0.169756 +0.213844 -0.114113 0.199683 +0.250347 -0.109904 0.165803 +0.259893 -0.130195 0.122038 +0.180633 -0.0723966 0.203599 +0.201886 -0.0333539 0.161782 +0.240288 -0.0485439 0.141813 +0.261312 -0.0227503 0.104643 +0.273982 -0.0593402 0.119899 +0.280362 -0.074792 0.0701015 +0.238595 0.0177583 0.0951404 +0.14643 -0.0478943 0.212489 +-0.227331 -0.265687 0.0979085 +-0.244646 -0.230401 0.0887962 +-0.293688 -0.268968 -0.164669 +-0.297979 -0.308788 -0.162348 +-0.312868 -0.346598 -0.144794 +-0.344082 -0.367401 -0.192127 +-0.317302 -0.337357 -0.184462 +-0.280828 -0.350074 -0.123607 +0.105148 0.105807 0.112878 +0.112708 0.122082 0.0774818 +0.133565 0.128779 0.0503619 +-0.153371 -0.370618 0.0324641 +0.254239 -0.0926281 0.0998171 +-0.0128437 0.0136567 0.10826 +0.0175667 0.0217155 0.0871281 +0.0477136 0.0340255 0.104217 +0.0750182 0.0489044 0.100742 +0.0776037 0.0433948 0.0700673 +0.0973389 0.0603657 0.0539823 +0.0861821 0.0686274 0.0252903 +0.0735784 0.0589072 -0.0094551 +0.0829016 0.102631 0.0164944 +0.0811061 0.0911963 0.0569078 +0.0940457 0.0476479 0.121838 +0.105428 0.0231317 0.131003 +0.0916425 -0.00738665 0.126455 +0.0604145 5.34629e-05 0.128347 +0.10359 0.0595398 0.00049955 +0.144344 0.0457444 0.00327488 +0.122523 0.0419513 -0.0300499 +0.11811 0.0162342 -0.0830375 +0.170091 0.0155571 -0.145681 +0.138389 0.0626357 -0.0743287 +0.165069 0.0235027 -0.0532363 +0.177768 0.0409007 -0.100742 +0.136707 0.0380317 -0.122381 +0.124141 0.00775387 -0.157586 +0.154959 -0.000810753 -0.105169 +0.105591 0.0562623 -0.100272 +0.0594242 0.0548004 -0.106957 +0.201162 -0.0168583 -0.120783 +0.0976411 0.0972697 0.0801317 +0.0943337 0.0848541 0.102457 +0.0890479 0.0650811 0.109825 +0.0389773 0.0745551 -0.0779593 +0.0138551 0.0593589 -0.108474 +0.0773146 0.0765993 -0.0629692 +0.118409 0.00125651 -0.11931 +0.14578 -0.0101392 -0.137264 +0.178622 -0.0192175 -0.148664 +0.15461 0.0388676 -0.0266866 +0.193622 0.0322602 -0.0272748 +0.1942 0.050466 -0.0642106 +0.173634 0.0303747 -0.00069076 +0.179101 -0.0110744 -0.00523936 +0.230507 0.0422098 -0.0173425 +0.202418 0.070871 -0.0135348 +0.22302 0.0184239 -0.0441485 +0.215157 -0.0248187 0.00288885 +0.233855 -0.00344678 0.0259658 +0.238719 0.033163 0.0205233 +0.25481 0.0672767 0.0179763 +0.222129 -0.0581209 -0.00731524 +0.227145 -0.0819987 0.0145053 +0.219253 -0.118982 0.0109807 +0.211654 -0.158762 -0.0192499 +0.210611 -0.101269 0.0490966 +0.200451 -0.190104 0.0116714 +0.203938 -0.0712158 -0.0282028 +0.173774 -0.0735362 -0.0475631 +0.2027 -0.10102 -0.0400541 +0.212795 -0.129107 -0.0298945 +0.206091 -0.151217 -0.0455168 +0.202467 -0.150775 -0.0745887 +0.209378 -0.187531 -0.0743719 +0.181149 -0.126003 -0.0892617 +0.205972 -0.177843 -0.0383337 +0.188301 -0.142819 -0.114464 +0.208779 -0.164491 -0.140437 +0.171227 -0.151151 -0.147387 +0.136617 -0.138704 -0.143839 +0.131975 -0.166643 -0.169617 +0.128263 -0.113939 -0.11894 +0.116875 -0.0858965 -0.091059 +0.0786764 -0.0829677 -0.090746 +0.187859 -0.214057 -0.0686071 +0.175679 -0.237132 -0.0957975 +0.178163 -0.10588 -0.0665832 +0.269129 0.0763722 0.0451229 +0.27889 0.058723 0.0679827 +0.267652 0.0453551 0.105512 +0.2613 0.0363273 0.0775663 +0.250278 0.0199214 0.0566543 +0.250269 0.00638094 0.0769677 +0.262967 -0.0160504 0.0796628 +0.285344 -0.0433845 0.0872574 +0.24971 -0.0386027 0.0640826 +0.229012 -0.0528564 0.0533874 +0.210073 -0.0746435 0.0657137 +0.221889 -0.0775407 0.0410909 +0.302572 -0.0710887 0.0949218 +0.236871 -0.0290995 0.0413907 +0.21774 0.0486965 -0.0445342 +0.224846 0.0339602 -0.0740774 +0.244042 0.0044793 -0.10874 +0.254336 0.102378 0.0100739 +0.220262 0.108437 -0.00385435 +0.184431 0.103867 -0.0063665 +0.227766 0.138272 0.00117268 +0.21603 0.168687 0.00560537 +0.214962 0.252952 4.36931e-05 +0.24674 0.211475 0.00674743 +0.208103 0.206716 0.00898043 +0.198252 0.239152 0.0425261 +0.241235 0.183275 -0.00372162 +0.24846 0.187657 0.0253371 +0.236173 0.217937 0.0406376 +0.208251 0.202717 0.0430183 +0.190765 0.204953 0.0676283 +0.199822 0.228771 0.0907818 +0.212055 0.262964 0.121847 +0.167888 0.20936 0.0941323 +0.230768 0.216285 0.106419 +0.226441 0.220307 0.1523 +0.160904 0.217518 0.126833 +0.151535 0.251202 0.133586 +0.158786 0.306935 0.0984538 +0.193903 0.396086 0.195106 +0.119767 0.364922 0.154966 +0.158434 0.284691 0.125614 +0.188265 0.327264 0.175224 +0.139712 0.323472 0.144742 +0.247398 0.226772 0.208026 +0.162628 0.357991 0.158091 +0.132463 0.334186 0.215838 +0.184892 0.418747 0.128073 +0.148158 0.405567 0.1589 +0.116952 0.392105 0.208798 +0.128904 0.307582 0.18276 +0.173163 0.280669 0.197839 +0.237808 0.190239 0.0542196 +0.242415 0.187695 0.0885314 +0.257589 0.159811 0.105872 +0.25799 0.149475 0.1552 +0.249199 0.167605 0.0439231 +0.270589 0.141138 0.0478035 +0.291007 0.120776 0.0668204 +0.27986 0.0943457 0.0648346 +0.262028 0.128688 0.0220064 +0.283888 0.104244 0.08796 +0.278117 0.09277 0.114653 +0.296211 0.119268 0.134225 +0.25745 0.0686993 0.129638 +0.231499 0.0874258 0.144645 +0.23624 0.121986 0.150481 +0.21822 0.158716 0.152133 +0.276736 0.0681718 0.110294 +0.286087 0.0545245 0.0921962 +0.114064 0.342002 0.184102 +0.184346 0.361594 0.187357 +0.161147 0.378013 0.229421 +0.186402 0.32651 0.232026 +0.224199 0.278314 0.231623 +0.178684 0.387524 0.165454 +0.207571 0.416517 0.162223 +0.115261 0.360345 0.210089 +0.111327 0.375408 0.183082 +0.123148 0.405595 0.17979 +0.161317 0.441861 0.200022 +0.134075 0.42215 0.208124 +0.166581 0.413272 0.221996 +0.184888 0.467555 0.155941 +0.139501 0.435526 0.173911 +0.158717 0.435906 0.144337 +0.167498 0.45215 0.103084 +0.137763 0.359978 0.22921 +0.165611 0.348074 0.227085 +0.15984 0.318857 0.217125 +0.185554 0.304169 0.211919 +0.205103 0.278784 0.204981 +0.244841 0.279219 0.196675 +0.226891 0.25345 0.209087 +0.216714 0.31142 0.225032 +0.18164 0.33693 0.20427 +0.203702 0.303717 0.18726 +0.193627 0.296232 0.146589 +0.191637 0.257284 0.18429 +0.157803 0.257523 0.177293 +0.175634 0.311565 0.125155 +0.161107 0.457828 0.173386 +0.194169 0.447882 0.185268 +0.194408 0.477711 0.118315 +0.219599 0.449898 0.13857 +0.135294 0.387364 0.228733 +0.145147 0.282789 0.187345 +0.143956 0.303159 0.203618 +0.177446 0.366384 0.212315 +0.179329 0.391491 0.217312 +0.18672 0.412483 0.210145 +0.202606 0.421792 0.189409 +0.174085 0.42914 0.210627 +0.153641 0.426813 0.21312 +0.144424 0.408706 0.223131 +0.190464 0.428693 0.201747 +0.178837 0.441581 0.19921 +0.169704 0.452082 0.187978 +0.180705 0.459908 0.173619 +0.202088 0.458198 0.166952 +0.151672 0.449754 0.186725 +0.142475 0.436806 0.198199 +0.127991 0.425256 0.188222 +0.210178 0.437176 0.172385 +0.119636 0.410278 0.199562 +0.206557 0.46857 0.145869 +0.215386 0.468035 0.123827 +0.207969 0.436894 0.106764 +0.212477 0.477963 0.10116 +0.128023 0.4054 0.215288 +0.223073 0.454408 0.0921651 +0.184017 0.321535 0.149004 +0.164058 0.339436 0.133054 +0.141763 0.356765 0.138374 +0.138767 0.331395 0.111494 +0.18387 0.5 0.0894472 +0.178253 0.341112 0.15974 +0.158692 0.397227 0.229447 +0.261987 0.258572 0.22454 +0.209557 0.191204 0.156985 +0.19703 0.220129 0.168363 +0.114158 0.395299 0.191384 +0.237163 0.239354 0.0176536 +0.22873 0.228755 -0.0079498 +0.204237 0.229854 -0.000985107 +0.191898 0.248869 0.0164149 +0.195144 0.299533 0.0501168 +0.211408 0.277777 0.0261684 +0.181525 0.269092 0.042102 +0.232338 -0.0296485 0.018274 +0.220704 0.448894 0.117889 +0.211836 0.430361 0.128709 +0.200007 0.22745 0.0221073 +0.206622 0.221816 0.0395427 +0.223655 0.239447 0.0484776 +0.206846 0.263872 0.061817 +0.192412 0.289403 0.0880222 +0.200823 -0.0669613 0.089238 +0.1998 0.487191 0.0879627 +0.178418 0.478766 0.0726805 +0.171907 0.478 0.098484 +0.179607 0.4432 0.070784 +0.215421 0.44036 0.0572748 +0.206111 0.438517 0.081171 +0.184196 0.432818 0.0953164 +0.172787 0.433405 0.115219 +0.16681 0.454422 0.128591 +0.158037 0.463512 0.080819 +0.300027 -0.106441 0.0798503 +0.301565 -0.138608 0.110073 +0.223785 -0.0676095 0.104371 +0.244386 -0.0720528 0.0937201 +0.25624 -0.0594904 0.0758547 +0.271472 -0.0437947 0.0690266 +0.283677 -0.0568988 0.0744319 +0.294284 -0.0698767 0.0795338 +0.293906 -0.0887216 0.0736412 +0.275743 -0.101071 0.0877101 +0.309738 -0.0894098 0.0874741 +0.287014 -0.123527 0.0945964 +0.311125 -0.118131 0.0991123 +0.298899 -0.117613 0.118193 +0.276193 -0.109289 0.135451 +0.270493 -0.137621 0.153632 +0.286312 -0.136798 0.132025 +0.257826 -0.0797919 0.144654 +0.303792 -0.0864306 0.104131 +0.28817 -0.0747287 0.113826 +0.276632 -0.0878111 0.128274 +0.30695 -0.103289 0.107245 +0.287682 -0.0559229 0.10414 +0.272738 -0.0407993 0.108633 +0.253435 -0.0365139 0.124117 +0.295415 -0.0573592 0.0898843 +0.270105 -0.0629299 0.0693418 +0.263375 -0.0783235 0.0820667 +-0.216962 -0.20051 0.140681 +-0.236047 -0.180496 0.115013 +-0.230292 -0.136771 0.112494 +-0.247625 -0.159292 0.0914591 +-0.209896 -0.129892 0.141237 +0.222682 0.288177 0.190351 +0.233778 0.296853 0.212089 +0.209365 0.287061 0.167624 +0.208618 0.271128 0.146657 +0.223776 0.247151 0.14266 +0.250594 0.280585 0.221005 +0.215525 0.238928 0.164607 +0.248724 0.243405 0.176599 +0.282927 0.23674 0.194658 +0.253819 0.208937 0.178714 +0.265424 0.184312 0.155732 +0.308614 0.169998 0.183237 +0.273365 0.179729 0.192265 +0.265912 0.204786 0.204674 +0.300509 0.203464 0.194384 +0.281969 0.151677 0.177526 +0.279246 0.127373 0.158699 +0.31079 0.143896 0.162421 +0.30954 0.171009 0.155179 +0.288086 0.1804 0.137744 +0.264265 0.175268 0.132545 +0.241184 0.168571 0.143536 +0.282052 0.162312 0.123541 +0.290218 0.138764 0.11928 +0.232003 0.191432 0.146429 +0.237199 0.211128 0.131059 +0.175486 0.13591 0.157401 +0.244193 0.0453066 0.121153 +0.216838 0.0295154 0.115567 +0.0778181 0.0182774 -0.0959304 +0.132697 0.385267 0.165833 +0.155812 0.38306 0.160495 +-0.00373338 0.0386319 -0.0871428 +0.0052284 0.0508015 -0.0521262 +-0.0272532 0.0521944 -0.0650671 +-0.0417118 0.0760468 -0.0274796 +0.0432101 0.0478592 -0.0430105 +0.0360437 0.064037 -0.0095129 +0.0264403 0.0878588 0.0105855 +0.0200841 0.0963175 -0.0204482 +0.0508265 0.0939603 -0.0091335 +0.0753367 0.087282 -0.0290458 +-0.0114666 0.0989277 -0.0268583 +0.189464 0.426182 0.111762 +-0.04038 -0.0265907 0.0536548 +0.188037 0.19051 0.048384 +0.170897 0.170857 0.0404072 +0.180803 0.154042 0.0195245 +0.168583 0.128396 0.0100026 +0.150344 0.161847 0.0580756 +0.146195 0.173828 0.0846654 +0.123104 0.163389 0.100752 +0.131952 0.158423 0.126057 +0.154039 0.169296 0.137953 +0.163282 0.191526 0.127822 +0.170691 0.206066 0.147249 +0.123979 0.136658 0.135 +0.136161 0.125537 0.148878 +0.153818 0.131557 0.161379 +0.111897 0.12133 0.126074 +0.111889 0.144276 0.0890707 +0.11658 0.140768 0.0690434 +0.119959 0.124948 0.0613596 +0.107779 0.107117 0.0626571 +0.122618 0.115267 0.0466942 +0.127454 0.104238 0.0219653 +0.136258 0.119892 0.0320023 +0.129073 0.0915077 -0.00265103 +0.130797 0.0780035 -0.0369633 +0.10768 0.094992 0.00979378 +0.163926 0.154671 0.152149 +0.0894836 0.0909923 0.00058556 +0.0689505 0.0963924 0.00171312 +0.0612997 0.100634 0.0224348 +0.0675451 0.0846698 0.038694 +0.0795109 0.103357 0.0384133 +0.0848094 0.0754581 0.0444653 +0.110567 0.10366 0.130086 +0.12281 0.0864143 0.139975 +0.117855 0.062854 0.143513 +0.13666 0.0472165 0.155281 +0.128164 0.0235742 0.176647 +0.163067 0.0498951 0.143567 +0.143932 0.0949004 0.145284 +0.179917 0.317727 0.0742859 +0.183725 0.275085 0.0676723 +0.16838 0.29297 0.0787056 +0.0930951 0.102542 0.05002 +0.100339 0.0681106 0.0373411 +0.102886 0.0622715 0.0197467 +0.121511 0.0540863 0.0117598 +0.124719 0.0242285 0.0166428 +0.0967861 -0.00310471 -0.0020113 +0.12138 0.0519179 -0.0102922 +0.0990646 0.0492208 -0.022422 +0.0873807 -0.0275369 -0.03209 +0.200694 -0.191636 -0.0546067 +0.206298 -0.170055 -0.0598788 +0.209964 -0.168421 -0.0791806 +0.221182 -0.183261 -0.0963771 +0.222775 -0.172837 -0.120159 +0.235715 -0.195921 -0.115182 +0.253933 -0.218526 -0.134037 +0.311213 -0.253911 -0.191866 +0.279294 -0.244732 -0.16099 +0.266185 -0.201338 -0.169529 +0.285572 -0.216415 -0.213382 +0.273765 -0.285731 -0.187819 +0.259679 -0.265381 -0.248632 +0.24894 -0.227823 -0.231771 +0.232153 -0.25966 -0.225227 +0.254118 -0.290735 -0.220386 +0.336364 -0.328047 -0.241676 +0.281317 -0.319577 -0.26697 +0.295033 -0.317038 -0.218433 +0.327766 -0.263669 -0.27537 +0.320681 -0.238904 -0.235706 +0.333487 -0.28367 -0.222752 +0.25789 -0.299076 -0.25318 +0.280382 -0.278404 -0.287734 +0.262726 -0.334272 -0.234674 +0.315714 -0.303377 -0.28762 +0.358898 -0.298323 -0.270079 +0.292961 -0.250812 -0.263064 +0.260427 0.269097 0.206442 +0.273912 0.251948 0.207483 +0.274266 0.226866 0.218876 +0.254508 0.262332 0.186312 +0.268737 0.247011 0.182676 +0.278883 0.230014 0.174886 +0.292676 0.216891 0.181537 +0.301666 0.196568 0.170643 +0.235991 0.25839 0.179999 +0.216996 0.262302 0.191107 +0.233602 0.240223 0.192553 +0.26623 0.217767 0.166603 +0.291208 0.219735 0.206357 +0.285626 0.200003 0.208179 +0.295054 0.181857 0.198439 +-0.119559 -0.0454446 0.130205 +-0.148541 -0.0288065 0.124554 +-0.122421 -0.0280036 0.104512 +-0.169628 -0.0428483 0.136658 +-0.192691 -0.0700149 0.138018 +-0.165949 -0.0805689 0.151606 +-0.157867 -0.111652 0.162619 +-0.182289 -0.134815 0.160033 +-0.171616 -0.0265274 0.119564 +-0.182821 -0.0294707 0.089096 +-0.207158 -0.0941133 0.130893 +-0.0813687 -0.408143 0.0168626 +-0.0493082 -0.255289 0.183439 +-0.0417823 -0.281988 0.16825 +-0.0232624 -0.242141 -0.150317 +0.237084 0.148575 0.150278 +0.21825 0.135883 0.152701 +0.196547 0.147262 0.152063 +0.248839 0.134889 0.149793 +0.25417 0.116897 0.146677 +0.154738 -0.248351 -0.113516 +0.149894 -0.252291 -0.14374 +0.127807 -0.247316 -0.112579 +0.100037 -0.239188 -0.118127 +0.171952 -0.258325 -0.155783 +0.206243 -0.267544 -0.164319 +0.152779 -0.244265 -0.170212 +0.238869 -0.271194 -0.164355 +0.19948 -0.240785 -0.114164 +0.228533 -0.228656 -0.117975 +0.0806348 -0.448964 -0.0364622 +0.092817 -0.46403 -0.0236687 +0.131465 -0.464547 -0.0186627 +0.111576 -0.45856 -0.0162136 +0.12236 -0.437795 -0.0167687 +0.116113 -0.473014 -0.0333379 +0.141834 -0.466374 -0.0462667 +0.15629 -0.45187 -0.0265272 +0.162053 -0.430562 -0.0436087 +0.170805 -0.433786 -0.074571 +0.150694 -0.440322 -0.089161 +0.142403 -0.453672 -0.0687084 +0.20922 0.0225383 -0.118012 +0.245897 0.00269769 -0.0710137 +-0.0868896 -0.445579 -0.0827631 +-0.0899978 -0.418668 -0.0662628 +-0.0919895 -0.382051 -0.0731611 +-0.286076 -0.18977 0.00251657 +0.166397 -0.235956 -0.0665238 +0.18289 -0.231659 -0.0402536 +0.183601 -0.256036 -0.0114407 +0.19304 -0.222737 -0.0114233 +0.168396 -0.264129 0.0198747 +0.175145 -0.292863 -0.0261367 +0.159612 -0.311932 -0.0502102 +0.151795 -0.349231 -0.058414 +0.168467 0.120276 0.165442 +0.179322 0.109989 0.151163 +0.191745 0.091503 0.1476 +0.207409 0.0731218 0.143583 +0.170472 0.088013 0.148441 +0.198308 0.0526608 0.137187 +-0.288444 -0.322548 -0.196751 +-0.258254 -0.336596 -0.201797 +-0.260706 -0.370334 -0.191889 +-0.262012 -0.38355 -0.234182 +0.169409 0.331718 0.106522 +-0.0883279 -0.427369 -0.00320489 +-0.0757242 -0.410706 -0.00350047 +-0.0694098 -0.396348 -0.0215868 +-0.339105 -0.28249 -0.133907 +0.14338 -0.190029 -0.185968 +0.113197 -0.189729 -0.178573 +0.161752 -0.208101 -0.1989 +0.163143 -0.233988 -0.192556 +0.187542 -0.24244 -0.20457 +0.214342 -0.231174 -0.221761 +0.200695 -0.263551 -0.191549 +0.0888974 -0.174918 -0.165344 +0.0728578 -0.155488 -0.148655 +0.0857975 -0.13271 -0.133069 +0.0496654 -0.153477 -0.133288 +0.208417 -0.252602 -0.211864 +0.214499 -0.20684 -0.209109 +0.212326 -0.182246 -0.176825 +0.196622 -0.193456 -0.194925 +-0.0366034 0.0848157 -0.0747335 +-0.0106036 0.0767347 -0.0825468 +-0.248014 -0.143811 -0.0711582 +0.156176 -0.353723 -0.00967102 +0.161881 -0.35946 -0.0354879 +0.154192 -0.374021 -0.054565 +0.153835 -0.401954 -0.0551512 +0.147106 -0.376782 -0.0111704 +0.141013 -0.401853 -0.0175381 +0.127378 -0.38782 -0.00428773 +0.152558 -0.410563 -0.0345712 +0.144573 -0.387551 -0.0699167 +0.129797 -0.395951 -0.0860393 +0.110844 -0.383365 -0.0877166 +0.111358 -0.362136 -0.0828181 +0.10863 -0.332992 -0.0757964 +0.131091 -0.348484 -0.0736181 +0.114528 -0.372564 0.00601769 +0.116893 -0.350867 0.0177725 +0.143657 -0.369483 -0.0686154 +0.0433039 -0.239647 0.0998892 +-0.318832 -0.357055 -0.211401 +-0.299837 -0.377374 -0.238049 +-0.340344 -0.383626 -0.224893 +-0.356366 -0.419986 -0.188103 +-0.285529 -0.404192 -0.228972 +-0.356375 -0.393121 -0.201407 +-0.349321 -0.392013 -0.165399 +-0.328811 -0.42272 -0.163607 +-0.345548 -0.417553 -0.216974 +-0.322795 -0.427865 -0.195551 +-0.33518 -0.363207 -0.161311 +-0.0812327 -0.396788 0.0342935 +-0.065289 -0.38943 0.0224745 +-0.0508718 -0.371639 0.0298172 +-0.260668 -0.216401 0.0653687 +-0.2704 -0.185201 0.0538295 +0.187032 0.486356 0.0996338 +0.279593 -0.136382 0.110973 +0.26837 -0.117918 0.105466 +0.248285 -0.109463 0.116456 +0.232397 -0.125931 0.141691 +0.210603 -0.141776 0.171116 +0.137574 -0.108705 0.207737 +0.169921 0.29167 0.0522744 +0.00992085 -0.113945 -0.0964453 +0.258261 -0.257702 -0.154872 +0.275321 -0.267702 -0.17038 +0.295633 -0.272896 -0.184932 +0.295815 -0.294739 -0.20199 +0.314713 -0.27743 -0.201437 +0.327332 -0.256197 -0.214678 +0.340385 -0.261017 -0.241446 +0.313356 -0.232789 -0.209684 +0.296344 -0.226073 -0.182212 +0.31592 -0.301772 -0.216769 +0.318635 -0.326842 -0.222796 +0.307178 -0.325937 -0.251416 +0.274745 -0.303144 -0.21295 +0.263287 -0.308346 -0.232527 +0.255382 -0.319889 -0.248754 +0.332002 -0.310475 -0.229091 +0.353636 -0.307458 -0.245121 +0.335859 -0.313851 -0.265914 +0.340499 -0.300896 -0.286697 +0.344989 -0.280039 -0.276203 +0.327449 -0.28026 -0.295194 +0.304942 -0.268737 -0.28762 +0.34983 -0.283684 -0.251927 +0.343136 -0.265469 -0.261534 +0.326713 -0.248963 -0.256716 +0.307917 -0.24034 -0.252462 +0.279159 -0.231625 -0.241522 +0.300353 -0.229376 -0.234338 +0.311358 -0.251222 -0.26759 +0.299024 -0.289572 -0.301481 +0.279907 -0.305571 -0.290358 +0.263002 -0.29286 -0.276914 +0.260616 -0.313748 -0.268771 +0.275922 -0.322371 -0.224156 +0.284975 -0.33259 -0.244221 +0.303023 -0.336946 -0.233483 +0.289605 -0.333838 -0.221905 +0.166435 0.39886 0.154509 +0.189152 0.404825 0.153461 +0.197133 0.400723 0.1737 +0.17424 0.413608 0.143911 +0.169142 0.426834 0.132439 +0.188725 0.386035 0.180698 +0.186219 0.378081 0.198788 +-0.267025 -0.372115 -0.138391 +-0.248022 -0.367522 -0.158602 +0.174505 0.292586 0.0990952 +0.186251 0.309263 0.0928235 +0.181697 0.30513 0.109614 +0.189499 0.279776 0.119317 +0.172647 0.294457 0.120787 +0.158057 0.303956 0.130265 +0.143476 0.291331 0.139139 +0.131312 0.30031 0.159002 +0.186095 0.298863 0.131041 +0.198975 0.28677 0.132576 +0.172236 0.277192 0.117866 +0.184313 0.260452 0.109718 +0.15755 0.265746 0.122578 +0.145983 0.269471 0.137935 +0.151234 0.256355 0.155644 +0.124293 0.323596 0.164277 +0.126678 0.342635 0.150186 +0.129524 0.341544 0.128525 +0.146576 0.349856 0.118779 +0.192269 0.30374 0.0759625 +0.202728 0.285813 0.0690781 +0.210479 0.281567 0.0483558 +0.222196 0.26209 0.0407369 +0.224073 0.261141 0.0186008 +0.162756 0.306191 0.114529 +0.149682 0.318744 0.121136 +0.152677 0.341974 0.100993 +0.164071 0.331208 0.0841361 +0.146523 0.323278 0.093798 +0.15695 0.312461 0.0714443 +0.22266 -0.203518 -0.100877 +0.262076 -0.292278 -0.202356 +0.249754 -0.28212 -0.183581 +0.242451 -0.284733 -0.203885 +0.229725 -0.273053 -0.211906 +0.243386 -0.275428 -0.225419 +0.255999 -0.283472 -0.239546 +-0.261873 -0.405224 -0.222848 +-0.280772 -0.420055 -0.201182 +-0.274389 -0.414773 -0.173401 +-0.298626 -0.411672 -0.158377 +-0.28738 -0.389898 -0.148508 +-0.300008 -0.369107 -0.135836 +-0.257381 -0.39915 -0.185758 +-0.257531 -0.421709 -0.186727 +-0.319983 -0.369357 -0.146016 +-0.25404 -0.39271 -0.206532 +-0.269186 -0.375948 -0.213104 +0.171129 0.312683 0.0555484 +0.186538 0.309469 0.0612947 +0.17697 0.322584 0.0897939 +0.180094 0.317456 0.102692 +0.0389455 -0.294719 0.0707663 +0.19085 0.129482 0.148059 +0.26893 -0.330546 -0.250405 +0.261495 -0.324416 -0.260179 +0.163955 0.0845671 -0.00775852 +0.172992 0.467003 0.114773 +0.17962 0.47069 0.135115 +0.167392 0.460661 0.148013 +0.0927702 -0.0102964 0.178794 +0.0791092 -0.00358862 0.211868 +0.0484002 -0.0727004 0.143042 +0.0857054 -0.0664246 0.132462 +0.170606 0.462905 0.162683 +0.107346 -0.291576 0.0507084 +0.123054 -0.26548 0.0555752 +0.1033 -0.273351 0.0618915 +-0.217347 -0.0684085 0.0793768 +-0.232534 -0.1003 0.0785864 +0.160705 0.203815 0.112095 +0.157448 0.189802 0.0951937 +0.163855 0.222961 0.107992 +0.178039 0.226994 0.0939715 +0.157779 0.236558 0.121407 +0.156862 0.233096 0.141593 +0.254115 0.147478 0.0328869 +0.246739 0.139758 0.0163119 +-0.313249 -0.26088 -0.138114 +-0.319034 -0.272336 -0.0954566 +-0.312031 -0.286413 -0.151154 +-0.318615 -0.301412 -0.127758 +-0.31358 -0.30952 -0.0911544 +-0.342054 -0.297563 -0.104135 +-0.285707 -0.289103 -0.098473 +-0.332554 -0.290038 -0.0650158 +0.224391 0.444149 0.0748945 +0.224127 0.466497 0.0733316 +0.00933378 -0.0890982 -0.073455 +-0.196836 -0.0544369 -0.0547609 +-0.268852 -0.35939 -0.204575 +-0.134821 -0.144762 0.184037 +-0.134018 -0.119846 0.172991 +-0.108849 -0.110436 0.169417 +-0.142893 -0.258813 -0.176858 +0.163435 0.422628 0.144619 +0.149105 0.425301 0.157986 +0.151653 0.445126 0.160854 +0.205634 0.453218 0.0682861 +0.196116 0.437078 0.0613117 +0.305429 0.136514 0.131635 +0.304223 0.128705 0.150462 +0.294739 0.1352 0.16485 +0.29983 0.148475 0.176204 +0.293633 0.16134 0.186506 +0.312816 0.146868 0.144611 +0.290574 0.119539 0.149687 +0.280449 0.10933 0.137413 +0.285959 0.112117 0.117297 +0.154398 0.116961 0.162863 +0.147042 0.108372 0.152274 +0.179394 0.214392 0.162515 +0.185651 0.194518 0.157404 +0.180628 0.232354 0.173507 +0.198969 0.238329 0.174545 +0.207694 0.253512 0.177641 +0.203869 0.264161 0.186147 +0.189501 0.273156 0.193533 +0.17312 0.263127 0.188581 +-0.206119 -0.0619918 0.116346 +-0.201545 -0.0465532 0.095691 +0.256266 0.152102 0.0503785 +0.264034 0.143148 0.0672501 +0.26342 0.152022 0.0867622 +0.269601 0.144159 0.103885 +0.281713 0.137095 0.0629023 +0.296165 0.127981 0.0376256 +0.300117 0.13462 0.0559043 +0.287642 0.140563 0.0456708 +0.278661 0.132147 0.0309413 +0.271646 0.118273 0.028754 +0.262921 0.1025 0.0261376 +0.261118 0.0855637 0.0169037 +0.25422 0.0767023 0.000233527 +0.237362 0.0575218 0.00198963 +0.283388 0.119704 0.0383643 +0.282941 0.112062 0.0540402 +0.249937 0.0937398 -0.00575339 +0.231931 0.0954578 -0.0107377 +0.210437 0.0914748 -0.0140972 +0.239252 0.109782 0.000233887 +0.191402 0.0870306 -0.0134669 +0.184376 0.0704441 -0.0225342 +0.184719 0.0606504 -0.044543 +0.166145 0.0578967 -0.0668264 +0.200251 0.061117 -0.0313226 +0.217304 0.057967 -0.0199728 +0.227686 0.12158 0.00370932 +0.20937 0.123042 0.000300618 +0.244333 0.124524 0.00810813 +0.295429 0.120597 0.0522453 +0.178132 0.0791963 -0.0112798 +0.177197 -0.279627 -0.000252101 +0.173639 -0.299787 -0.00606886 +0.172196 -0.313975 -0.0223573 +0.166117 -0.326159 -0.00858114 +0.168079 -0.321719 -0.0379096 +0.162521 -0.339731 -0.0445028 +0.151373 -0.32895 -0.0576036 +0.312369 -0.105021 0.0899766 +0.306 -0.11652 0.0866674 +0.301418 -0.129182 0.0942967 +0.290875 -0.135236 0.101483 +0.289966 -0.143698 0.1109 +0.295915 -0.13953 0.122573 +0.279108 -0.148197 0.122497 +0.27841 -0.152315 0.142258 +0.265867 -0.157983 0.158785 +0.256687 -0.14661 0.137703 +0.25422 -0.140442 0.172759 +0.232237 -0.161116 0.192798 +0.192807 -0.160413 0.202508 +0.178601 -0.140578 0.237092 +0.154384 -0.117167 0.24831 +0.17845 -0.105479 0.223698 +0.247464 -0.158843 0.179106 +0.226891 -0.158442 0.171794 +0.209982 -0.159856 0.187271 +0.217821 -0.141328 0.207646 +0.23745 -0.141109 0.186416 +0.229503 -0.142546 0.156329 +0.214657 -0.125289 0.155947 +0.193847 -0.12199 0.171057 +0.217246 -0.105649 0.140104 +0.198069 -0.0856194 0.142621 +0.193693 -0.14343 0.18682 +0.198045 -0.145975 0.222277 +0.178989 -0.164931 0.225321 +0.158831 -0.146831 0.218292 +-0.290841 -0.208347 -0.00770324 +-0.29533 -0.224009 -0.017137 +-0.30561 -0.24462 -0.0155011 +-0.278365 -0.220452 -0.0277869 +-0.267819 -0.241114 -0.0357093 +-0.286737 -0.259306 -0.0462551 +-0.310093 -0.264404 -0.0203987 +-0.307167 -0.250649 -0.0341839 +-0.307612 -0.281242 -0.0310235 +-0.321036 -0.286281 -0.0471544 +-0.310491 -0.270102 -0.0639157 +-0.311345 -0.301149 -0.0633156 +-0.297683 -0.291436 -0.0450671 +-0.294949 -0.304108 -0.0790095 +-0.285459 -0.27779 -0.0488974 +-0.296472 -0.275126 -0.0168658 +-0.276222 -0.270671 -0.00788631 +-0.246454 -0.248267 -0.0329014 +-0.244456 -0.252303 -0.00937036 +-0.304286 -0.259682 -0.0492577 +-0.294933 -0.27203 -0.0604957 +-0.300998 -0.278796 -0.0743602 +-0.316674 -0.274623 -0.0789273 +-0.337714 -0.280945 -0.0853892 +-0.325825 -0.275251 -0.0655092 +-0.332977 -0.302425 -0.0833069 +-0.293564 -0.290291 -0.0772666 +-0.298024 -0.281309 -0.0905074 +-0.293634 -0.272694 -0.109468 +-0.270428 -0.274072 -0.107657 +-0.256077 -0.253991 -0.120812 +-0.261078 -0.296954 -0.0999473 +-0.2381 -0.297373 -0.0849839 +-0.232752 -0.278906 -0.0645746 +-0.272041 -0.319246 -0.10842 +-0.21032 -0.284441 -0.0448701 +-0.256436 -0.341131 -0.11181 +-0.225098 -0.336223 -0.113241 +-0.200175 -0.288996 -0.0158483 +-0.223009 -0.317757 -0.0905879 +-0.301096 -0.262202 -0.123506 +-0.32405 -0.263071 -0.116908 +-0.292477 -0.257052 -0.14263 +-0.270149 -0.255918 -0.142108 +-0.275486 -0.258003 -0.162669 +-0.259523 -0.2674 -0.178244 +-0.251069 -0.250018 -0.0970302 +-0.24056 -0.260706 -0.172311 +-0.232499 -0.247239 -0.154361 +-0.34182 -0.274562 -0.107339 +-0.294559 -0.307923 -0.0994756 +-0.275844 -0.269552 -0.0355918 +-0.227344 -0.270897 -0.045083 +0.25093 0.170443 0.120028 +0.248384 0.184009 0.106523 +0.235777 0.198062 0.103222 +0.23641 0.211305 0.086191 +0.221152 0.226047 0.0898201 +0.223243 0.24123 0.111495 +0.203883 0.250541 0.105061 +0.226958 0.225862 0.123117 +0.219737 0.240254 0.12789 +0.214138 0.253162 0.132941 +0.232275 0.224561 0.138088 +0.109391 -0.247931 -0.0995264 +0.104952 -0.262437 -0.0820427 +0.080763 -0.274056 -0.0783487 +0.0604155 -0.262392 -0.0950373 +-0.227936 -0.329497 -0.190147 +-0.214125 -0.337031 -0.170051 +0.263325 -0.0528405 0.0685009 +0.251926 -0.0484757 0.0715634 +0.237277 -0.0480579 0.0658708 +0.244491 -0.055646 0.0790843 +0.239659 -0.0616442 0.0888399 +0.226162 -0.0616059 0.0920824 +0.21522 -0.0631162 0.0781895 +0.212545 -0.0629682 0.0966232 +0.196781 -0.0599901 0.105959 +0.210127 -0.0657511 0.11188 +0.250495 -0.0660959 0.0846797 +0.234672 -0.0671026 0.0978575 +0.237261 -0.0846396 0.108485 +0.25989 -0.0423809 0.0666642 +0.259987 -0.0257531 0.0664908 +0.247883 -0.0247631 0.0554477 +0.242689 -0.0135836 0.0440572 +0.246291 0.00496067 0.0457059 +0.245187 0.0234669 0.0372413 +0.250061 0.17416 0.133813 +0.259114 0.167602 0.148828 +0.26511 0.166925 0.171546 +0.238618 0.181672 0.138204 +0.229669 0.176644 0.149535 +0.262049 0.187134 0.176237 +0.261795 0.200868 0.165371 +0.276513 0.199318 0.153854 +0.292677 0.199982 0.157209 +0.302715 0.186361 0.157188 +0.308755 0.181779 0.171774 +0.305926 0.190608 0.185482 +0.312423 0.167782 0.169221 +0.31381 0.157653 0.158921 +0.310783 0.154703 0.171639 +0.301108 0.177938 0.144841 +0.293264 0.189309 0.147256 +0.279322 0.188458 0.145304 +0.262483 0.193127 0.192418 +0.274289 0.192768 0.20161 +0.254841 0.206509 0.193978 +0.245154 0.222549 0.189318 +0.253012 0.22552 0.174345 +0.265429 0.23121 0.17081 +-0.253206 -0.236908 -0.0443888 +0.149428 0.386275 0.232451 +0.147867 0.371017 0.232576 +0.152926 0.356705 0.229375 +0.149032 0.338169 0.225131 +0.166114 0.363727 0.223417 +0.172256 0.353426 0.215568 +0.179541 0.338962 0.221969 +0.181625 0.354174 0.201921 +0.186426 0.343494 0.187951 +0.192075 0.328517 0.215563 +0.192453 0.320313 0.195502 +0.17815 0.351274 0.174302 +0.17655 0.370022 0.172318 +0.165276 0.33179 0.225541 +0.00939661 -0.323412 0.0804555 +0.120353 -0.125008 0.233582 +0.05563 -0.0732275 0.247968 +0.0616189 -0.0543441 0.232231 +0.0811821 -0.0784737 0.231059 +0.0764784 -0.0353683 0.254905 +0.0608765 -0.028919 0.235586 +0.087271 -0.018263 0.234864 +0.113798 -0.076403 0.258582 +0.127442 -0.0600385 0.234949 +0.132794 -0.0953943 0.252522 +0.0606107 -0.0431898 0.263976 +0.0971312 -0.036293 0.245012 +0.110687 -0.0488392 0.23675 +0.126176 -0.0414728 0.221378 +0.136057 -0.0243951 0.201716 +0.122078 0.00127519 0.196707 +0.142291 0.00027007 0.178375 +0.0664164 -0.0191578 0.217877 +0.0802696 -0.0234954 0.199319 +0.0910082 -0.0454502 0.20083 +0.102454 0.00166634 0.210465 +0.0802091 -0.00534582 0.192641 +0.0863635 0.00814252 0.179895 +0.0946306 0.0282399 0.168655 +0.0981336 0.029523 0.148764 +0.101777 0.0395859 0.135111 +0.102082 0.0581642 0.134881 +0.0956437 0.0321468 0.122829 +0.0938658 0.0161985 0.122282 +0.107901 0.00369122 0.128399 +0.078491 0.00576055 0.124425 +0.0841199 0.0382034 0.11313 +0.0659972 0.0331947 0.109714 +0.0520056 0.0196069 0.12098 +0.108345 -0.0142416 0.126349 +0.0915975 -0.0313276 0.129913 +0.122833 -0.0287943 0.124051 +0.146418 -0.0426624 0.119895 +0.142658 -0.0228961 0.131632 +0.132595 -0.0194368 0.150249 +0.160419 -0.0327892 0.133975 +0.163125 -0.050543 0.147173 +0.060233 0.0422739 0.0970401 +0.0469107 0.0353785 0.0851224 +0.0330985 0.0252247 0.0760721 +0.0344131 0.0145341 0.0525338 +0.0185411 0.0141735 0.0691085 +-0.00651953 0.00766464 0.081092 +0.0314926 0.0314677 0.0951056 +0.0155266 0.0258059 0.107793 +0.11957 0.0050674 0.144577 +0.11348 -0.010764 0.15919 +0.0864989 0.00930931 0.196192 +0.112679 0.0343949 0.172228 +0.110056 0.0172326 0.144505 +-0.231861 -0.256194 -0.0373807 +-0.233847 -0.249852 -0.0220477 +-0.230235 -0.258784 -0.00973726 +-0.217151 -0.280061 0.00814621 +-0.228026 -0.273051 0.0389012 +-0.222798 -0.271648 -0.00409819 +-0.229682 -0.268052 0.0118625 +-0.212876 -0.279385 -0.0140325 +-0.214439 -0.277583 -0.0303969 +-0.199886 -0.285356 -0.0320197 +-0.187179 -0.295224 -0.0255156 +-0.167219 -0.315028 -0.0304058 +-0.156845 -0.302235 -0.0544314 +-0.236758 -0.254924 0.00227314 +0.0884351 -0.404348 -0.0195924 +0.0722252 -0.268984 0.0670772 +0.070147 -0.245252 0.0862941 +0.0966471 -0.229612 0.0882203 +0.0926053 -0.203806 0.103764 +0.0777673 -0.186021 0.118999 +0.0417862 -0.182948 0.126604 +0.0709209 -0.158179 0.128709 +0.095465 -0.128791 0.124296 +0.0102764 -0.16375 0.133447 +-0.0233099 -0.171526 0.153541 +-0.0499934 -0.0465621 -0.00582837 +-0.0749973 -0.0355191 0.0101971 +-0.0645299 -0.324704 -0.077104 +0.221779 0.470802 0.0892895 +0.219761 0.464582 0.1032 +0.246597 0.0246927 0.0795416 +0.253586 0.0320272 0.0977802 +0.252394 0.0305168 0.0670227 +0.261064 0.0424817 0.0637394 +0.267205 0.0556508 0.058182 +0.262106 0.0615289 0.0436471 +0.250683 0.0500973 0.0298185 +0.272972 0.0454164 0.0731281 +0.274554 0.0385023 0.090004 +0.285852 0.0505507 0.0780368 +0.287544 0.066644 0.0791877 +0.280213 0.0764884 0.0661465 +0.226162 0.0537579 -0.00800313 +0.231726 0.0372941 0.00212281 +0.226833 0.070796 -0.0125112 +-0.0228881 0.0822405 -0.0141151 +-0.0164496 0.062439 -0.0353807 +-0.0311204 0.09353 -0.0291259 +-0.0468617 0.0890411 -0.0503417 +-0.0192694 0.0958145 -0.0445491 +-0.0451838 0.0631149 -0.0497516 +-0.0349277 0.0970377 -0.0439657 +-0.0281121 0.0908295 -0.0597278 +-0.0422149 0.0875756 -0.0360098 +-0.0493018 0.0748281 -0.0407497 +-0.0508974 0.0756362 -0.0555946 +-0.045787 0.0616401 -0.0714534 +-0.0463878 0.0860458 -0.0643425 +-0.0469 0.0754389 -0.0734442 +-0.0361876 0.0721397 -0.0877453 +-0.0344753 0.0506229 -0.0835042 +-0.0209274 0.0429352 -0.0951495 +-0.00835098 0.0548898 -0.109767 +-0.0439408 0.0675081 -0.0809412 +-0.0384794 0.0604865 -0.0888934 +-0.0325578 0.0529818 -0.0938199 +-0.0250287 0.0507859 -0.100857 +-0.0171358 0.0586173 -0.103485 +-0.00108771 0.0669554 -0.09638 +0.0141047 0.0764389 -0.0789872 +-0.0166767 0.0687863 -0.0931008 +-0.0154196 0.0443974 -0.106822 +0.00804033 0.0334573 -0.118139 +-0.00353356 0.0420783 -0.115203 +0.00267945 0.0333406 -0.10199 +0.0284162 0.0260832 -0.102463 +0.0140719 0.0342408 -0.0876383 +0.01206 0.042083 -0.0690778 +0.0262722 0.0834922 -0.057317 +0.052314 0.0257381 -0.0888721 +0.0550064 0.0153199 -0.121681 +0.0742668 0.0307726 -0.0684202 +0.0254542 0.0462258 -0.0537161 +0.0192751 0.0579365 -0.0299961 +0.043388 0.0389601 -0.0621497 +0.0632571 0.0407552 -0.0511604 +0.0628168 0.0511918 -0.0295138 +-0.00769957 0.0468719 -0.0674097 +0.0356439 0.036944 -0.129564 +0.00985644 0.0486694 -0.11871 +0.0293481 0.0500299 -0.116265 +0.034304 0.0639803 -0.0982281 +0.0203799 0.0394103 -0.126099 +0.0274107 0.0238815 -0.120304 +-0.00989932 0.038173 -0.0977698 +0.0409915 0.0204434 -0.130582 +0.0603476 0.0361414 -0.135064 +0.0745924 0.0111822 -0.144256 +0.0995383 0.0164619 -0.152082 +0.079494 0.0098491 -0.119596 +0.109969 -0.00178903 -0.14121 +0.128369 -0.00667529 -0.145234 +0.147176 -0.000628591 -0.159936 +0.143478 0.0207956 -0.143584 +0.15945 -0.0140125 -0.151421 +0.167046 -0.013357 -0.130058 +0.175024 -0.000463673 -0.161193 +0.200548 0.00730904 -0.144289 +0.228188 0.00606999 -0.13371 +0.232374 -0.0225206 -0.12062 +0.217352 -0.0205681 -0.149989 +0.196446 -0.0094088 -0.159916 +0.0468892 0.0318746 -0.136603 +0.0588847 0.0194871 -0.141629 +0.0497176 0.0425705 -0.12546 +0.067316 0.0466181 -0.121528 +0.0829023 0.0554408 -0.10632 +0.0702884 0.0671402 -0.0864572 +0.0736048 0.0280122 -0.141966 +-0.0393368 0.0927115 -0.058201 +-0.074253 -0.462729 -0.0674302 +-0.0882268 -0.46748 -0.0836924 +-0.10265 -0.454789 -0.102517 +-0.100302 -0.434985 -0.0953132 +-0.123508 -0.439573 -0.0964816 +0.30376 -0.329009 -0.220778 +-0.34576 -0.287787 -0.1184 +-0.333412 -0.299886 -0.118936 +-0.318278 -0.306436 -0.109371 +-0.342798 -0.273541 -0.122349 +-0.330946 -0.265681 -0.13448 +-0.32759 -0.278136 -0.147142 +-0.313986 -0.269795 -0.152301 +-0.304937 -0.277784 -0.160852 +-0.289134 -0.290053 -0.171285 +-0.300398 -0.29313 -0.159904 +-0.305136 -0.304081 -0.143109 +-0.303823 -0.326091 -0.148763 +-0.297334 -0.338307 -0.131821 +-0.0297344 -0.320795 0.126249 +-0.0440833 -0.337561 0.102751 +-0.0635963 -0.3222 0.124646 +-0.0820192 -0.303394 0.145977 +-0.0280108 -0.346215 0.0792887 +0.190023 -0.166658 -0.160984 +0.187606 0.489479 0.0788413 +0.169798 0.492699 0.0805537 +0.160239 0.479513 0.0724411 +0.160997 0.477019 0.0876359 +0.167909 0.48647 0.0907839 +0.168839 0.465921 0.0685027 +0.185848 0.461592 0.0756332 +0.163713 0.449815 0.0719867 +0.171034 0.442192 0.0868531 +0.172622 0.439121 0.100638 +0.176648 -0.0540189 0.138439 +0.191763 0.435033 0.0761478 +0.150024 0.450095 0.173316 +0.142684 0.444609 0.180888 +0.134925 0.435737 0.185852 +0.0901553 -0.0455623 0.257862 +0.218445 0.190081 -0.00453558 +0.212983 0.187132 0.0158667 +0.234912 0.203072 -0.0090602 +0.217724 0.208098 -0.00630956 +0.209095 0.231498 0.0538229 +0.223398 0.222537 0.0510417 +0.229495 0.205818 0.051858 +0.241614 0.200114 0.0387668 +0.245196 0.212463 0.0252865 +0.232616 0.199508 0.066443 +0.245867 0.187445 0.0704899 +0.218046 0.211438 0.0580939 +0.206013 0.207163 0.0667587 +0.208167 0.217137 0.0808695 +0.189985 0.216171 0.0819923 +-0.328288 -0.282754 -0.0562593 +-0.321215 -0.270892 -0.0527491 +-0.321885 -0.294532 -0.0580289 +-0.324301 -0.301836 -0.070993 +-0.309665 -0.294095 -0.0515043 +-0.298437 -0.298535 -0.0585809 +-0.293755 -0.297175 -0.0685565 +-0.301865 -0.303693 -0.0670723 +-0.312242 -0.307406 -0.0760424 +0.113855 0.0103494 0.135894 +0.117356 -0.000872108 0.134011 +0.24192 0.231796 0.179613 +0.236568 0.24336 0.180529 +0.226028 0.250706 0.186633 +0.280884 -0.220307 -0.163899 +0.26654 -0.211351 -0.150233 +0.265056 -0.233891 -0.14678 +0.318482 -0.331697 -0.239506 +0.324395 -0.322699 -0.253479 +0.31194 -0.314679 -0.269415 +0.329739 -0.334727 -0.229668 +0.336703 -0.323152 -0.229076 +0.344428 -0.313085 -0.23571 +0.342498 -0.293727 -0.236916 +0.350543 -0.322922 -0.2465 +0.353252 -0.314 -0.261759 +0.347047 -0.326986 -0.235121 +0.0827363 -0.465408 -0.0592863 +0.0757733 -0.45735 -0.0483001 +0.0758332 -0.442944 -0.0486429 +0.0763754 -0.427162 -0.064874 +0.0810297 -0.429275 -0.0354104 +0.0760881 -0.402196 -0.0628009 +0.0803331 -0.462498 -0.0366385 +0.075746 -0.427719 -0.0496393 +0.213629 0.454927 0.154222 +0.216172 0.433851 0.152191 +0.213875 -0.163106 0.208849 +0.228479 0.0837143 -0.0171959 +0.214862 0.0777937 -0.0178642 +0.203914 0.0820668 -0.0169156 +0.213551 0.066976 -0.0133462 +-0.291696 -0.291685 -0.053913 +-0.288445 -0.286967 -0.0453936 +-0.283457 -0.280518 -0.0392925 +0.198493 0.267303 0.113918 +-0.00816198 -0.315253 0.11742 +0.312224 -0.337685 -0.224702 +0.0776115 -0.0114015 0.225043 +0.094616 -0.00802053 0.222738 +0.212523 -0.00317223 -0.153514 +0.228944 -0.0069181 -0.146501 +0.230166 -0.0223035 -0.138067 +0.212902 -0.0238532 -0.132712 +0.194522 -0.0219296 -0.138137 +0.240306 -0.00819778 -0.130311 +0.24497 -0.0122967 -0.113875 +0.221562 -0.0094445 -0.0973672 +0.242491 -0.00970392 -0.0927411 +-0.195428 -0.293105 -0.0588105 +-0.174639 -0.293714 -0.0615636 +-0.159198 -0.295096 -0.0708856 +-0.150745 -0.297027 -0.0916319 +-0.165094 -0.309633 -0.116063 +-0.129532 -0.293794 -0.0901166 +-0.12154 -0.29002 -0.105668 +-0.103655 -0.284754 -0.110478 +-0.083304 -0.273535 -0.126518 +-0.126229 -0.291149 -0.124142 +-0.0551206 -0.282297 -0.123125 +-0.0279253 -0.280704 -0.123568 +-0.0254074 -0.296918 -0.100527 +-0.143636 -0.296672 -0.0765836 +0.228772 0.249576 0.00807469 +0.246793 0.197559 -0.000456927 +0.249351 0.185655 0.00965958 +0.077471 -0.38535 -0.0716786 +0.0780138 -0.366405 -0.0698751 +0.0796117 -0.349597 -0.0694382 +0.0817673 -0.324046 -0.067713 +0.0920794 -0.339278 -0.0766687 +0.0745961 -0.308674 -0.0513846 +0.0686559 -0.285979 -0.0584538 +0.0701691 -0.296007 -0.0346939 +0.0958416 -0.324563 -0.0739969 +0.111686 -0.315208 -0.0712996 +0.118212 -0.295045 -0.0671537 +0.145789 -0.285221 -0.0572786 +0.142444 -0.258951 -0.0651148 +0.125807 -0.256448 -0.0777825 +0.0725557 -0.302564 -0.0188272 +0.0757738 -0.318738 -0.0113816 +0.0755625 -0.334153 -0.022547 +0.0716925 -0.292684 -0.00740334 +0.0574002 -0.292216 -0.00131701 +0.0442788 -0.29974 -0.0118635 +0.0322898 -0.309073 -0.00126775 +0.0158934 -0.319374 -0.00927168 +0.00270388 -0.318254 -0.036966 +0.00321031 -0.33353 0.006095 +0.0101246 -0.330737 0.0331595 +0.0571801 -0.291727 0.0142738 +0.0411549 -0.302632 0.0323113 +0.0568056 -0.290026 0.0325413 +0.0726196 -0.279494 0.0399911 +0.0843075 -0.293947 0.0355701 +0.0802412 -0.296732 0.0208207 +0.0757523 -0.290551 0.00911073 +0.0904109 -0.307387 0.0401159 +0.0937218 -0.321431 0.0333001 +0.0876185 -0.332554 0.0196986 +-0.261918 -0.356193 -0.123562 +-0.274572 -0.363058 -0.128675 +-0.283885 -0.374671 -0.137095 +0.0993425 -0.475253 -0.0345906 +0.105878 -0.470302 -0.022596 +0.161209 0.00758193 -0.157082 +0.162861 -0.00496129 -0.160125 +0.14622 0.0234899 0.00861402 +0.16407 0.00688456 0.00334424 +0.187476 0.0108016 -0.000104135 +0.198618 0.0267239 -0.00776275 +0.213159 0.032032 -0.0211609 +0.229764 0.0271876 -0.0288068 +0.229938 0.0432028 -0.0342052 +0.231973 0.0361819 -0.05417 +0.241585 0.0230077 -0.0674939 +0.235826 0.0200922 -0.0913851 +0.229532 0.00831192 -0.0604593 +0.228417 0.0182383 -0.11087 +0.214387 0.0313739 -0.095916 +0.23826 0.0319925 -0.0407356 +0.240603 0.0153722 -0.0478262 +0.185434 0.0390225 -0.0120783 +0.174046 0.035224 -0.0278333 +0.183039 0.0254835 -0.0435084 +0.185088 0.013208 -0.0664572 +0.184517 -0.00115634 -0.0944301 +0.15883 0.0112792 -0.0789407 +0.166768 0.0454452 -0.0125857 +0.149871 0.0473393 -0.0127261 +0.24097 0.0273212 -0.0523021 +0.244689 0.0183228 -0.0578172 +0.239121 0.00955592 -0.0564169 +0.23067 0.0133196 -0.0511149 +0.217815 0.013095 -0.0555127 +0.202953 0.0215885 -0.0445658 +0.223255 0.0309758 -0.00933388 +0.246338 0.00680161 -0.0920968 +-0.29666 -0.251794 -0.0420083 +-0.282377 -0.246563 -0.0382484 +-0.274248 -0.257163 -0.0411355 +0.121069 0.3764 0.220244 +0.124178 0.361607 0.222425 +0.12316 0.347289 0.21517 +0.120818 0.335014 0.200629 +0.131773 0.318764 0.203442 +0.240354 -0.189104 -0.174254 +0.226426 -0.17846 -0.157236 +0.25469 -0.197929 -0.186668 +0.262527 -0.207499 -0.20859 +0.275709 -0.206748 -0.189755 +0.268196 -0.218714 -0.226562 +0.252109 -0.214264 -0.221034 +0.231966 -0.219863 -0.222417 +0.16439 -0.290409 -0.045741 +0.174232 0.353361 0.161991 +0.167416 0.346038 0.151615 +0.153417 0.351454 0.147309 +0.141711 0.365653 0.160008 +0.174784 0.33351 0.146976 +0.172695 0.32064 0.137876 +0.171538 0.327653 0.122668 +-0.153467 -0.465689 -0.0917447 +-0.142244 -0.458217 -0.0978282 +-0.137315 -0.444624 -0.0945322 +-0.142546 -0.468457 -0.0929801 +-0.130113 -0.470071 -0.0887414 +-0.111868 -0.466578 -0.0912306 +-0.129822 -0.476932 -0.0773011 +-0.116192 -0.47396 -0.0799073 +-0.102072 -0.471199 -0.0816089 +0.0648327 -0.288276 0.006469 +0.290523 -0.14969 0.120852 +0.286341 -0.149084 0.132395 +0.276561 -0.154417 0.131433 +0.266874 -0.144863 0.128327 +0.266123 -0.155511 0.139202 +0.254682 -0.156501 0.14847 +0.243072 -0.144724 0.147014 +0.246658 -0.132891 0.13506 +0.271484 -0.158645 0.148826 +0.262513 -0.161728 0.150556 +0.255383 -0.163883 0.160093 +0.258182 -0.154155 0.170424 +0.247063 -0.165211 0.168804 +0.236375 -0.166699 0.177267 +0.223809 -0.16596 0.182974 +0.219971 -0.167303 0.19665 +0.224247 -0.15536 0.203023 +0.206877 -0.166582 0.198203 +0.201256 -0.167208 0.210293 +0.187949 -0.165778 0.214542 +0.175727 -0.151043 0.207983 +0.205839 -0.156778 0.218275 +0.191606 -0.158183 0.226132 +0.180969 -0.154585 0.235065 +0.174695 -0.121433 0.234619 +0.192199 -0.123695 0.219574 +0.158231 -0.157867 0.22927 +0.169715 -0.162656 0.235355 +0.0970603 -0.116879 0.246491 +-0.208269 -0.22401 0.141633 +-0.20692 -0.250284 0.132437 +0.0965268 -0.427234 -0.105996 +0.0991486 -0.439673 -0.0998914 +0.19126 -0.17619 0.0390751 +0.184715 -0.204433 0.0324441 +0.164304 -0.221583 0.0465757 +0.1444 -0.208807 0.0686986 +0.0226172 -0.0147867 0.137076 +-0.142255 -0.49298 -0.0216335 +0.233691 0.0208001 -0.0385404 +-0.192672 -0.315988 0.0839294 +-0.202286 -0.295403 0.104035 +-0.212462 -0.276423 0.111373 +-0.218066 -0.285356 0.0914372 +-0.230517 -0.270625 0.068595 +0.136055 0.0355608 0.0131192 +0.121886 0.0399552 0.0198872 +0.106186 0.0275039 0.0255554 +0.0928691 0.0373146 0.0446539 +0.107832 0.0113031 0.0106037 +0.0853288 0.00897116 0.0135994 +0.0648776 -0.00152148 0.00684991 +0.301901 0.1917 0.196837 +0.304498 0.181718 0.192274 +0.29757 0.171529 0.192207 +0.283611 0.170157 0.190984 +0.17589 0.332048 0.230978 +0.176274 0.318104 0.221305 +0.189786 0.308195 0.22975 +0.199452 0.291101 0.221444 +0.210647 0.278153 0.221165 +0.212403 0.290739 0.232707 +0.229872 0.295702 0.229994 +0.238851 0.283146 0.23072 +0.237981 0.260514 0.227763 +0.248013 0.243086 0.221386 +0.245976 0.271423 0.230129 +0.237201 0.240055 0.208931 +0.239318 0.292509 0.222434 +0.244312 0.28734 0.210021 +0.234086 0.289095 0.199595 +0.221914 0.298769 0.201947 +0.1778 0.322602 0.229777 +0.232474 0.299285 0.221376 +0.223334 0.304746 0.213608 +0.207337 0.311267 0.204764 +0.224642 0.304397 0.226583 +0.214619 0.302742 0.233384 +0.203769 0.313465 0.232857 +0.204968 0.319702 0.218324 +0.201735 0.298965 0.232154 +-0.0492057 -0.0812756 -0.10551 +-0.0710597 -0.075701 -0.12067 +-0.0879497 -0.0905516 -0.13677 +-0.0843511 -0.119489 -0.147588 +-0.0762899 -0.059326 -0.102542 +-0.0985707 -0.0477827 -0.098696 +-0.118275 -0.0536394 -0.113913 +-0.11441 -0.0717159 -0.128365 +0.179503 0.303256 0.0436704 +0.192013 0.290229 0.0290644 +0.17689 0.287515 0.0370015 +0.192038 0.271729 0.0156116 +0.209167 0.267708 0.00969983 +0.200133 0.255704 0.00478026 +-0.247504 -0.392344 -0.224787 +-0.247477 -0.405986 -0.218212 +-0.243099 -0.400741 -0.206484 +-0.246703 -0.405341 -0.193269 +-0.249065 -0.417066 -0.193806 +-0.263856 -0.417281 -0.202583 +-0.253854 -0.410374 -0.185389 +-0.264275 -0.407223 -0.177693 +-0.272044 -0.40206 -0.166216 +-0.284666 -0.409799 -0.163624 +-0.28689 -0.423019 -0.170791 +-0.283285 -0.428723 -0.186577 +-0.301536 -0.424549 -0.197331 +-0.276684 -0.426319 -0.176604 +-0.270204 -0.426002 -0.18843 +-0.267033 -0.421163 -0.178871 +-0.28572 -0.431162 -0.176917 +0.0984334 0.0428629 0.147655 +0.0984512 0.0370662 0.158757 +-0.324734 -0.278381 -0.0492733 +-0.319049 -0.278035 -0.0388895 +-0.314693 -0.271902 -0.0298211 +-0.0814975 -0.486596 -0.0514846 +-0.0716057 -0.47534 -0.0576231 +-0.0807984 -0.475501 -0.0687174 +-0.0782273 -0.46782 -0.0773567 +-0.0794515 -0.454639 -0.076562 +-0.0865219 -0.442019 -0.0638219 +-0.0826697 -0.456554 -0.0896798 +-0.0913604 -0.446861 -0.0969099 +-0.0924184 -0.432044 -0.0753911 +-0.098273 -0.416607 -0.0817744 +-0.111942 -0.395187 -0.0818225 +-0.0923505 -0.401008 -0.0727607 +-0.110463 -0.376831 -0.0757945 +-0.0955645 -0.358515 -0.0727168 +-0.0748788 -0.367775 -0.053732 +-0.099584 -0.336657 -0.0718408 +-0.0617229 -0.346951 -0.0508932 +-0.0372908 -0.340191 -0.0358611 +-0.187209 -0.0514446 0.134371 +-0.172275 -0.062062 0.144345 +-0.181772 -0.0387772 0.12984 +0.27325 0.225257 0.167666 +0.283037 0.221467 0.169903 +0.141164 -0.00931766 -0.150578 +0.223335 -0.262546 -0.149684 +0.199958 -0.258684 -0.141852 +0.218212 -0.249649 -0.131577 +-0.0730224 -0.485274 -0.0383372 +-0.0765985 -0.473674 -0.025717 +-0.0833487 -0.485599 -0.0202509 +-0.0969784 -0.487241 -0.0157338 +-0.106328 -0.475595 -0.0156679 +-0.107519 -0.486132 -0.0147883 +-0.117398 -0.491224 -0.0155421 +-0.11866 -0.497871 -0.0255495 +0.192205 -0.0198585 -0.151725 +0.281772 0.238327 0.210562 +0.269826 0.243309 0.222088 +0.243244 0.207816 -0.00325363 +0.239729 0.221932 -0.000908316 +0.243256 0.225044 0.0142927 +0.235434 0.23543 0.00346349 +0.158954 -0.447934 -0.074517 +0.164 -0.440163 -0.0849532 +0.160645 -0.422992 -0.0839209 +0.160099 -0.41995 -0.0633914 +0.170063 -0.432118 -0.0580684 +0.170775 -0.442201 -0.0470561 +0.167356 -0.452883 -0.036848 +0.157537 -0.464023 -0.0432353 +0.154265 -0.458207 -0.0582632 +0.146921 -0.466798 -0.0291891 +0.17099 -0.445942 -0.0649823 +0.152813 -0.426396 -0.0985179 +0.142833 -0.435406 -0.0989063 +0.126573 -0.436557 -0.100225 +0.120949 -0.42189 -0.103936 +0.130685 -0.411647 -0.0938972 +0.160351 -0.460975 -0.0324222 +0.164884 -0.460693 -0.0398836 +0.167083 -0.430709 -0.0834012 +0.161089 -0.432508 -0.0931652 +0.165433 -0.424956 -0.0749657 +0.155909 -0.417913 -0.0743018 +0.149825 -0.407366 -0.067413 +0.142015 -0.399818 -0.0764637 +0.153043 -0.435416 -0.0966096 +0.148842 -0.431897 -0.101759 +0.145045 -0.424265 -0.10134 +0.147732 -0.418014 -0.0911084 +0.138977 -0.417451 -0.0965307 +0.139635 -0.411036 -0.0878314 +0.14174 -0.430413 -0.104765 +0.134784 -0.434536 -0.101822 +0.135086 -0.440748 -0.0918112 +0.13766 -0.447456 -0.0800542 +0.122938 -0.455334 -0.0698495 +0.127914 -0.428797 -0.106691 +0.135671 -0.430083 -0.106069 +-0.0268041 -0.304928 0.142542 +-0.0182344 -0.281255 0.151927 +0.000262015 -0.258244 0.142866 +0.0151742 -0.229959 0.128466 +-0.00970849 -0.227931 0.154073 +0.0337917 -0.209923 0.115845 +0.0199495 -0.192987 0.125832 +-0.154293 -0.0335699 -0.082135 +-0.129631 -0.0324487 -0.0813475 +-0.120097 -0.027431 -0.0586998 +-0.0956922 -0.0340394 -0.0533561 +-0.0814148 -0.0448428 -0.0722969 +-0.0594432 -0.0515596 -0.0534184 +-0.160793 -0.0482086 -0.0989707 +-0.166155 -0.0307425 -0.0663998 +-0.169924 -0.0270352 -0.0414151 +-0.183311 -0.0375758 -0.0551581 +-0.174206 -0.0274939 -0.0203147 +-0.192353 -0.0397338 -0.00141151 +-0.170447 -0.0249801 0.0063437 +-0.211587 -0.0636911 -0.00501259 +-0.0018753 -0.187141 -0.149775 +0.0183103 -0.182965 -0.142326 +0.0322217 -0.167313 -0.134641 +0.0236675 -0.146992 -0.123167 +-0.00232452 -0.142332 -0.126149 +0.0375806 -0.18533 -0.140019 +0.0530379 -0.201545 -0.137283 +0.0772348 -0.20845 -0.140694 +0.0988175 -0.224384 -0.140468 +0.119251 -0.222512 -0.162731 +0.03788 -0.218276 -0.135529 +0.0772845 -0.19139 -0.155355 +0.080882 -0.225907 -0.127445 +0.0653619 -0.242778 -0.113036 +0.0731805 -0.173068 -0.155239 +0.0897045 -0.191329 -0.166141 +0.102707 -0.199007 -0.171074 +0.119058 -0.208637 -0.176942 +0.127514 -0.196293 -0.185172 +0.13998 -0.205302 -0.190755 +0.149824 -0.215626 -0.194546 +0.161245 -0.221969 -0.199237 +0.175364 -0.230409 -0.20401 +0.173584 -0.215336 -0.204853 +0.178202 -0.198362 -0.197173 +0.188397 -0.22907 -0.211289 +0.202734 -0.22056 -0.215065 +0.199745 -0.239634 -0.214151 +0.0815106 -0.18364 -0.162988 +-0.172104 -0.359269 -0.00938238 +-0.172319 -0.335226 -0.0164663 +-0.16873 -0.368903 -0.0231312 +-0.292266 -0.291505 -0.0889456 +-0.288266 -0.299574 -0.0955502 +-0.280983 -0.308012 -0.105167 +-0.278654 -0.297571 -0.101297 +-0.274336 -0.285615 -0.103446 +-0.260134 -0.28158 -0.0989442 +-0.257005 -0.265144 -0.10215 +-0.26942 -0.305285 -0.10276 +-0.257003 -0.309674 -0.100476 +-0.244993 -0.306014 -0.0938734 +-0.249351 -0.292113 -0.0926885 +-0.25954 -0.322424 -0.104282 +-0.267093 -0.332079 -0.111051 +-0.283312 -0.328944 -0.119574 +-0.249017 -0.331591 -0.10481 +-0.232981 -0.32784 -0.100164 +-0.240291 -0.342062 -0.113719 +-0.229688 -0.345883 -0.126712 +-0.23058 -0.352629 -0.145077 +-0.21352 -0.337371 -0.127344 +-0.269191 -0.344874 -0.117105 +-0.208623 -0.327937 -0.112241 +-0.191793 -0.321843 -0.117022 +-0.180909 -0.311277 -0.104708 +0.11012 0.10505 0.0238496 +0.213679 0.221732 0.163906 +-0.0357839 -0.0025294 0.108473 +-0.0312254 -0.0135193 0.128152 +-0.0238807 -0.033229 0.139313 +-0.00300831 -0.046529 0.144036 +-0.00364169 -0.0760125 0.145155 +-0.0103288 -0.10643 0.141831 +0.015326 -0.129347 0.142131 +-0.041062 -0.0443202 0.130625 +-0.0555252 -0.0465254 0.114753 +-0.0556686 -0.0325657 0.0996413 +-0.0768736 -0.0422105 0.0949058 +-0.0167984 0.000564353 0.123722 +0.00524698 0.0020139 0.129964 +-0.0281137 -0.0861213 0.139333 +-0.0785841 -0.0379469 0.0747431 +-0.0762529 -0.0505618 0.114297 +-0.032521 -0.108383 0.136839 +-0.0633754 -0.0458183 0.101476 +-0.0250298 0.00663901 0.112981 +-0.0219675 0.00393164 0.0935556 +-0.147404 -0.304789 -0.127071 +0.192111 0.473304 0.143665 +0.202701 0.475169 0.131787 +0.206558 0.475874 0.120017 +0.202492 0.480449 0.108775 +0.157654 -0.366957 -0.0205798 +0.26661 -0.307414 -0.281977 +0.270077 -0.295571 -0.288815 +0.283263 -0.291236 -0.297392 +0.290598 -0.279448 -0.297082 +0.304158 -0.276932 -0.29882 +0.315035 -0.2885 -0.301158 +0.307588 -0.298676 -0.297006 +0.297613 -0.307939 -0.283621 +0.293787 -0.301201 -0.295424 +0.318389 -0.297707 -0.296483 +0.328066 -0.301032 -0.289042 +0.324582 -0.309109 -0.276338 +0.33579 -0.291676 -0.2964 +0.346867 -0.288071 -0.287976 +0.353956 -0.299169 -0.28317 +0.345495 -0.307423 -0.274703 +0.352866 -0.288693 -0.277818 +0.351312 -0.284395 -0.265224 +0.355354 -0.294774 -0.257468 +0.360217 -0.304818 -0.260578 +0.35682 -0.308388 -0.269609 +0.359106 -0.312264 -0.252967 +0.356474 -0.316127 -0.245135 +0.351445 -0.319298 -0.237976 +-0.26647 -0.314705 -0.199507 +-0.27426 -0.329739 -0.204261 +-0.290128 -0.337563 -0.206145 +-0.303723 -0.332243 -0.195363 +-0.303858 -0.323407 -0.176279 +-0.302757 -0.349394 -0.210447 +-0.304665 -0.364526 -0.223447 +-0.321319 -0.375627 -0.232938 +-0.285437 -0.371465 -0.224735 +-0.28011 -0.37957 -0.242654 +-0.314609 -0.397575 -0.24523 +-0.31498 -0.344154 -0.199865 +-0.330892 -0.351901 -0.189469 +-0.332902 -0.388937 -0.243068 +-0.348245 -0.402805 -0.233911 +-0.328232 -0.404959 -0.235266 +-0.273541 -0.396265 -0.240028 +-0.293049 -0.39498 -0.245656 +-0.355214 -0.402159 -0.217135 +-0.360108 -0.415844 -0.205721 +-0.346381 -0.42668 -0.201491 +-0.340374 -0.436455 -0.180032 +-0.360217 -0.406031 -0.193698 +-0.356506 -0.391255 -0.182727 +-0.356512 -0.407116 -0.177427 +-0.347384 -0.421732 -0.172779 +-0.348669 -0.37532 -0.17511 +-0.341266 -0.408591 -0.160307 +-0.332592 -0.391247 -0.153464 +-0.323849 -0.407723 -0.153687 +-0.349384 -0.43169 -0.189135 +-0.335815 -0.43119 -0.192046 +-0.324454 -0.435806 -0.181733 +-0.331465 -0.433295 -0.170921 +-0.314528 -0.431132 -0.168412 +-0.260177 -0.397767 -0.235 +-0.252953 -0.401301 -0.227678 +-0.247407 -0.394723 -0.238053 +-0.24372 -0.401046 -0.225417 +-0.243948 -0.396615 -0.216223 +-0.258003 -0.38952 -0.247437 +-0.272162 -0.387844 -0.252537 +-0.287147 -0.384539 -0.255755 +-0.302942 -0.384129 -0.252391 +-0.315505 -0.382766 -0.24459 +-0.323099 -0.390444 -0.249836 +-0.312399 -0.390336 -0.253745 +-0.328503 -0.399215 -0.245058 +-0.340635 -0.398589 -0.24271 +-0.266346 -0.382624 -0.244488 +-0.267321 -0.391914 -0.245578 +-0.0266812 0.0695328 -0.0242573 +-0.00773299 0.0681739 -0.0184911 +0.0122858 0.0669077 -0.0123781 +0.0150035 0.0767227 0.00239352 +0.0141467 0.0954062 -0.00215996 +0.0325338 0.098411 -0.00617133 +0.0450676 0.0983028 0.010086 +0.0314473 0.0730983 0.00401189 +0.0505593 0.0686309 0.00292132 +0.0698817 0.067505 0.00832925 +0.145383 0.180744 0.0984363 +0.132189 0.17376 0.0925198 +0.121241 0.164951 0.0850023 +0.133425 0.169934 0.0774819 +0.11505 0.153676 0.07879 +-0.083942 -0.368893 -0.0674225 +-0.0809876 -0.385027 -0.0581697 +-0.0723248 -0.382058 -0.0416794 +-0.00904893 0.0914446 -0.0120745 +0.00504523 0.0987359 -0.0150796 +0.0060609 0.0932522 -0.034057 +0.0248461 0.0873188 -0.0377031 +0.0363994 0.089055 -0.023789 +0.00213821 0.0914225 -0.00482177 +0.0092558 0.0863088 0.00212053 +0.106375 0.0274106 0.14138 +-0.263884 -0.385451 -0.252252 +0.258755 0.24689 0.225661 +0.259085 0.23306 0.219814 +0.249971 0.25591 0.228242 +-0.322841 -0.345115 -0.164492 +-0.323706 -0.355326 -0.152393 +-0.279169 -0.265328 -0.0439542 +-0.285416 -0.267917 -0.0516616 +-0.294745 -0.263175 -0.0517725 +0.23393 -0.0149701 -0.10397 +0.219738 -0.0165453 -0.112039 +0.204608 -0.00981825 -0.104246 +0.187184 -0.00954937 -0.110855 +0.228145 0.230452 0.102316 +0.214447 0.238029 0.0983297 +0.23229 0.220992 0.0943503 +0.215398 0.247623 0.105271 +0.217938 0.25177 0.117669 +0.210276 0.258003 0.111405 +0.220949 0.241286 0.103103 +0.290344 -0.337843 -0.233955 +0.276226 -0.337233 -0.22831 +0.296573 -0.339782 -0.226215 +0.227663 0.461812 0.0838481 +0.234265 0.455281 0.0718225 +0.229698 0.445794 0.0603386 +0.225781 0.470182 0.0813133 +0.214396 0.4698 0.0788369 +0.208406 0.478123 0.0862021 +0.214031 0.460896 0.0711899 +0.217085 0.451741 0.0628259 +0.219354 0.474333 0.0827819 +0.21619 0.47758 0.0903862 +0.217994 0.472178 0.097233 +0.209525 0.481852 0.0939712 +0.227208 0.456115 0.0633709 +0.234329 0.451682 0.0642008 +0.23166 0.462658 0.0759848 +0.273713 -0.249314 -0.252993 +0.274317 -0.268417 -0.267071 +0.263304 -0.282613 -0.260934 +-0.240326 -0.404033 -0.2139 +-0.241182 -0.408607 -0.207233 +0.243855 0.194683 0.113624 +0.235959 0.206195 0.114609 +-0.329827 -0.30598 -0.098469 +-0.057071 -0.0425853 0.0117122 +-0.0551192 -0.0420888 0.0309046 +-0.0534835 -0.0402863 0.0500454 +-0.0435993 -0.0469165 0.00748095 +-0.0255629 -0.0374196 0.00481763 +-0.00817324 -0.0328811 -0.0061182 +-0.00350439 -0.0437548 -0.0255784 +-0.0349503 -0.0490115 -0.00492533 +-0.0419875 -0.0536475 -0.0293419 +-0.0139014 -0.0607747 -0.0378374 +-0.0105205 -0.0780801 -0.0585195 +-0.0335249 -0.0540562 -0.0180409 +-0.0278411 -0.0595083 -0.0313207 +0.193253 0.49569 0.0858481 +0.189805 0.494474 0.0949255 +0.179559 0.491992 0.0947812 +0.19709 0.487808 0.0978913 +0.174576 0.497081 0.0879734 +0.179584 0.496616 0.0784813 +0.175502 0.48892 0.0725035 +0.169475 0.481635 0.069206 +0.164994 0.474033 0.0669237 +0.155945 0.469227 0.0714265 +0.159639 0.459314 0.0671634 +0.160451 -0.0544036 0.113535 +0.179652 -0.262284 0.0054219 +0.186087 -0.244472 0.00347757 +0.246807 -0.00615903 -0.103541 +0.242297 -0.0135206 -0.100916 +0.240802 -0.0172339 -0.108388 +0.232593 -0.0188607 -0.112191 +0.240348 -0.0194541 -0.117278 +0.238974 -0.018297 -0.127651 +-0.164632 -0.397326 -0.024693 +0.0813645 -0.458079 -0.0716845 +0.302397 0.127887 0.0470846 +0.298473 0.138148 0.0455108 +0.292313 0.136477 0.0386335 +0.288054 0.130079 0.0326142 +0.28271 0.137427 0.0379629 +0.271939 0.136706 0.038053 +0.261008 0.14116 0.0404912 +0.28194 0.12422 0.0312108 +0.300876 0.126279 0.0551937 +0.295306 0.129324 0.0632115 +0.286846 0.130603 0.0706512 +0.282604 0.11846 0.0804122 +0.273418 0.134767 0.0747422 +0.296205 0.121995 0.0600976 +0.289869 0.116278 0.0576534 +0.283444 0.108666 0.0679441 +0.208186 0.435058 0.0678801 +0.218992 0.437774 0.0675136 +0.20517 0.444041 0.0615 +0.195457 0.447135 0.0675955 +0.224157 0.438328 0.0597838 +0.221367 0.446069 0.0584788 +0.168291 -0.443724 -0.076199 +-0.239169 -0.248023 -0.0426243 +-0.246509 -0.244281 -0.0523825 +-0.245933 -0.250709 -0.0701381 +-0.252213 -0.23035 -0.0598084 +-0.256922 -0.212794 -0.063622 +-0.26443 -0.20039 -0.048456 +-0.236601 -0.248665 -0.0331221 +-0.248238 -0.244973 -0.04299 +-0.257005 -0.243536 -0.0363368 +-0.264619 -0.253098 -0.0324677 +-0.260909 -0.234911 -0.0387305 +-0.270856 -0.228969 -0.0335016 +-0.268106 -0.214873 -0.0367573 +-0.255525 -0.250409 -0.0291707 +-0.246354 -0.252152 -0.0213798 +-0.25421 -0.258055 -0.0140562 +-0.253371 -0.258976 0.00135493 +-0.263391 -0.256528 0.0180325 +-0.264412 -0.265611 -0.0106557 +-0.268835 -0.263918 0.00476582 +-0.24972 -0.252323 0.0327963 +-0.239732 -0.259608 0.0493553 +-0.242639 -0.251027 0.0706418 +-0.27192 -0.270836 -0.02103 +-0.264888 -0.241199 0.0366373 +-0.279792 -0.22631 0.033251 +-0.274206 -0.207933 0.0474852 +-0.283361 -0.276288 -0.0174295 +-0.267659 -0.226048 0.0482271 +0.202151 0.274483 0.19338 +0.194908 0.283204 0.198963 +-0.157532 -0.273615 -0.179435 +-0.176899 -0.279729 -0.184503 +-0.188947 -0.290942 -0.187096 +-0.192598 -0.3074 -0.18306 +-0.203551 -0.297799 -0.190929 +-0.222085 -0.288246 -0.191352 +-0.217908 -0.303036 -0.194268 +-0.355074 -0.426501 -0.195973 +-0.354866 -0.423993 -0.205337 +-0.355569 -0.419108 -0.214528 +-0.353763 -0.412061 -0.224887 +-0.346029 -0.286085 -0.1062 +-0.341227 -0.288967 -0.0947058 +-0.336277 -0.278132 -0.0971269 +-0.328988 -0.269127 -0.105169 +-0.340297 -0.292656 -0.0831052 +-0.335578 -0.266756 -0.115188 +-0.339311 -0.299368 -0.0917431 +0.212569 0.261061 0.18216 +0.216886 0.255854 0.175009 +0.219484 0.251322 0.162982 +0.212289 0.247584 0.170006 +0.218513 0.26322 0.154269 +0.225667 0.261532 0.178216 +0.218436 0.276817 0.178562 +0.234042 0.273996 0.185236 +0.223426 0.242038 0.154678 +0.21181 0.288948 0.181391 +0.220498 0.257755 0.18435 +0.211254 0.266563 0.187703 +0.211739 0.26954 0.199826 +0.278409 -0.209413 -0.174692 +0.233056 0.457965 0.0658843 +0.227063 0.46182 0.0682472 +0.220168 0.458063 0.0666597 +-0.0481392 -0.0447802 0.0166181 +0.131516 0.0530135 0.000672445 +0.12038 0.0567042 0.000376152 +0.134766 0.046581 0.0097546 +0.0904091 -0.099649 0.239147 +-0.00884361 -0.0890856 -0.0728998 +-0.00654069 -0.102279 -0.0895079 +-0.0290648 -0.104665 -0.111248 +-0.0100257 -0.116287 -0.107029 +0.191386 -0.264049 -0.175252 +0.190045 -0.262732 -0.156889 +0.204589 -0.269071 -0.178679 +0.222111 -0.273266 -0.172895 +0.189235 0.0753918 -0.0129238 +0.0782752 -0.467624 -0.0498343 +0.0759673 -0.46177 -0.0555898 +0.0772195 -0.460605 -0.0642783 +0.151932 0.323656 0.079912 +0.153175 0.313215 0.0881136 +0.161272 0.302381 0.0857396 +0.163146 0.324848 0.0718597 +0.151557 0.334415 0.0880604 +0.142886 0.334889 0.0972586 +0.140662 0.34411 0.107021 +0.133598 0.347717 0.117582 +0.131314 0.355467 0.129074 +0.127988 0.361743 0.142546 +0.123763 0.348981 0.138438 +0.119822 0.353337 0.149718 +0.116288 0.351928 0.168204 +0.226419 0.174912 -0.00671405 +0.232006 0.15884 0.00199041 +0.243933 0.169091 0.00253819 +0.237571 0.172786 -0.00612936 +0.183717 0.142245 0.147062 +0.183533 0.157982 0.153224 +0.200684 0.169917 0.154336 +0.175927 0.14817 0.154877 +0.164064 0.143191 0.159694 +0.181391 0.132744 0.149775 +0.177453 0.123521 0.157312 +0.108424 0.0602759 0.0311611 +0.101691 0.0511896 0.042029 +0.297187 0.12858 0.124591 +0.286869 0.125817 0.115842 +0.279264 0.13651 0.11071 +0.277464 0.150893 0.114839 +0.267972 0.163015 0.116989 +0.29066 -0.215317 -0.195858 +-0.0439761 -0.143405 -0.149346 +0.0959309 0.0199379 0.158053 +0.0941358 0.00844127 0.16726 +0.273991 -0.158318 0.138404 +0.280108 -0.155995 0.136908 +0.28311 -0.154668 0.131232 +0.287165 -0.152142 0.126309 +0.291082 -0.145525 0.127381 +0.258354 -0.329753 -0.2515 +0.256649 -0.327468 -0.240856 +0.265642 -0.321399 -0.233195 +0.269005 -0.32965 -0.227653 +0.204877 0.287044 0.0357487 +0.289139 -0.339472 -0.226774 +0.282728 -0.335989 -0.224475 +0.283065 -0.327384 -0.221193 +0.28398 -0.316486 -0.219293 +0.289461 -0.305296 -0.210924 +0.2738 -0.310998 -0.221733 +0.2646 -0.301502 -0.221281 +0.282981 -0.339471 -0.231684 +0.275544 -0.336339 -0.239462 +0.259131 -0.2954 -0.232139 +0.281853 -0.296955 -0.202405 +0.287258 -0.287693 -0.192682 +0.301236 -0.282638 -0.194913 +0.23745 0.0270265 -0.0333549 +0.234865 0.0358956 -0.0292661 +0.240774 0.0243245 -0.0402136 +0.044992 -0.0647291 0.254151 +0.0435251 -0.0559756 0.262078 +0.20354 0.276522 0.016541 +-0.0980428 -0.240155 0.197738 +-0.0924965 -0.26196 0.186819 +-0.109853 -0.270124 0.168775 +-0.253582 -0.386742 -0.238773 +-0.0267016 0.0982672 -0.0374627 +0.214024 0.433945 0.0622105 +0.204736 0.432758 0.058829 +0.201109 0.433103 0.0655996 +0.201809 0.436011 0.073894 +0.193477 0.433855 0.0682907 +0.185218 0.436354 0.0703184 +0.180836 0.436291 0.0819631 +0.191166 0.440882 0.0659291 +0.187348 0.447071 0.070626 +0.179215 0.453739 0.0726364 +0.193028 0.454826 0.0736221 +0.173421 0.440644 0.0776765 +-0.147031 -0.496444 -0.028386 +-0.151597 -0.495421 -0.0374969 +-0.157627 -0.484775 -0.0397619 +-0.140246 -0.499465 -0.0256815 +-0.132401 -0.5 -0.0296698 +-0.132703 -0.497498 -0.0384881 +-0.126331 -0.494492 -0.0452588 +-0.11646 -0.490117 -0.0524448 +-0.101295 -0.487303 -0.0547567 +-0.136101 -0.494007 -0.0471871 +-0.13938 -0.490039 -0.0561432 +-0.133381 -0.483866 -0.0661423 +-0.15577 -0.492035 -0.0446482 +-0.153261 -0.490282 -0.0555144 +0.197755 0.272342 0.0690149 +0.190382 0.263313 0.0560052 +0.0686632 -0.292912 -0.0237205 +0.056243 -0.29127 -0.0303266 +0.0398126 -0.298058 -0.030698 +0.0315681 -0.295788 -0.0489563 +0.043708 -0.285681 -0.061727 +0.0621136 -0.289132 -0.040881 +0.0722108 -0.295077 -0.0484755 +0.0577034 -0.286988 -0.0524253 +0.0569935 -0.281989 -0.0659264 +0.064236 -0.290328 -0.0328163 +-0.0127838 0.0757233 -0.00921143 +0.0935192 0.0772038 0.0642915 +0.169714 0.302879 0.0497006 +0.163659 0.300165 0.0640716 +0.172929 0.295611 0.0434924 +0.049865 0.0913802 0.0221499 +0.0418831 0.0808731 0.013212 +0.0368549 0.0913191 0.0145569 +0.0319565 0.0968433 0.00544037 +0.310435 0.13526 0.142507 +0.026474 0.0305763 -0.129196 +0.017822 0.0292426 -0.122273 +0.0163904 0.0280919 -0.108702 +0.0350495 0.0278097 -0.132911 +0.178361 0.286185 0.0866978 +0.184473 0.288229 0.0959947 +0.0746028 -0.0119842 0.202652 +0.0770488 -0.00198153 0.201878 +0.0861829 0.00359659 0.206228 +0.0964676 0.00912576 0.20305 +0.110414 0.00821695 0.200752 +0.119478 0.0159283 0.18886 +-0.0749585 -0.470198 -0.0703816 +-0.0722579 -0.469101 -0.0627931 +-0.0775597 -0.45771 -0.0519849 +-0.0725204 -0.466379 -0.0530837 +-0.0822617 -0.458336 -0.0360309 +0.11796 -0.00196684 -0.151498 +0.110489 0.008862 -0.155734 +0.119387 0.0273131 -0.141295 +0.100036 0.00317869 -0.149099 +0.0946498 0.00360487 -0.130289 +0.0996271 0.00897841 -0.108462 +0.0876406 0.00969553 -0.149119 +0.0889673 0.0239205 -0.144401 +0.103773 0.0275171 -0.140968 +0.112143 0.0407687 -0.122665 +0.128275 -0.00210722 -0.155193 +0.136944 0.00690927 -0.158099 +0.1315 0.01712 -0.150046 +0.148823 0.0111196 -0.154092 +0.137878 -0.00286061 -0.157253 +0.0812501 0.0180999 -0.148671 +0.0723702 0.0199576 -0.146504 +0.0894465 0.0177562 -0.14994 +-0.244247 -0.411744 -0.197734 +0.0532101 -0.0425986 0.239458 +0.0614299 -0.034607 0.250277 +0.0718515 -0.0264935 0.244569 +0.0612036 -0.0408317 0.227838 +0.211416 0.21985 0.0506815 +0.209629 0.209187 0.0516229 +0.197715 0.200596 0.0531448 +0.210711 0.212673 0.041983 +0.209533 0.205981 0.0261421 +0.207685 0.214484 0.0320655 +0.204793 0.215907 0.019768 +0.207322 0.190012 0.0316877 +0.210424 0.206724 0.0353988 +0.209086 0.197885 0.0355421 +0.19948 0.191764 0.0420701 +0.206287 0.1798 0.0239909 +0.199532 0.162119 0.0159658 +0.0889829 0.0153312 0.187549 +0.0895058 0.0194699 0.175832 +0.0997882 0.0258376 0.180178 +0.0912633 -0.43583 -0.104962 +0.0893849 -0.44209 -0.0966632 +0.0818551 -0.438899 -0.0891003 +0.0775492 -0.435915 -0.0759439 +0.0805228 -0.426773 -0.087989 +0.0848008 -0.421093 -0.0971385 +0.0844397 -0.410175 -0.0930928 +0.0796444 -0.399052 -0.082153 +0.096306 -0.399151 -0.0928503 +0.0992866 -0.434977 -0.10667 +-0.038871 -0.095203 0.134909 +-0.0453136 -0.074362 0.132403 +-0.0642973 -0.0816285 0.135216 +0.128958 0.371237 0.164377 +0.114324 0.368213 0.169385 +0.110394 0.358489 0.182698 +0.119359 0.382173 0.172221 +0.244566 0.0274799 0.091132 +0.236517 0.0321023 0.108593 +0.228129 0.0154777 0.110489 +0.243652 -0.0044318 0.106704 +0.215089 0.0116198 0.126655 +0.193164 -0.00203925 0.149761 +0.295901 -0.145148 0.11649 +0.181002 0.326878 0.162405 +0.192626 0.308402 0.164847 +0.180295 0.335983 0.171005 +0.215019 0.222685 -0.0085752 +0.216226 0.238327 -0.00679645 +0.204842 0.243639 -0.00108745 +0.197086 0.237151 0.00943393 +0.207737 0.21475 -0.00125832 +0.200663 0.225332 0.00994825 +0.227239 0.239308 -0.00361834 +0.210369 0.205349 -0.000451507 +0.212421 0.195338 0.00658041 +0.0965367 0.0723068 0.0490018 +-0.263237 -0.382248 -0.20077 +-0.334935 -0.395374 -0.246716 +0.0666968 0.0983382 0.0352739 +0.0735768 0.104043 0.0256427 +0.0854137 0.105714 0.0280147 +0.0966684 0.103408 0.0197312 +-0.293219 -0.246559 0.00868918 +-0.284829 -0.260543 0.00656712 +0.231694 -0.239358 -0.229883 +0.249173 -0.248287 -0.23972 +-0.313753 -0.278534 -0.156686 +-0.167921 -0.0222432 0.100354 +-0.166557 -0.0217484 0.0804222 +-0.137191 -0.0189498 0.0544508 +-0.183157 -0.0297007 0.0652393 +-0.193717 -0.0386652 0.0428719 +-0.162262 -0.0205653 0.0563587 +-0.148465 -0.0201145 0.071316 +-0.122512 -0.0229086 0.0762312 +-0.112808 -0.0225311 0.0535636 +-0.15755 -0.0225071 0.112728 +-0.13968 -0.0242143 0.109228 +-0.128528 -0.0323847 0.121144 +-0.137944 -0.0426964 0.133983 +0.338353 -0.331842 -0.233 +0.197716 0.0369013 -0.0158252 +0.225598 0.0269623 0.107608 +0.227611 0.0352699 0.116368 +0.216481 0.0416846 0.126455 +0.20366 0.0291575 0.127785 +0.197706 0.0139181 0.138946 +0.177004 0.0154396 0.15063 +0.196436 0.0406475 0.130552 +0.183582 0.0465791 0.137895 +0.171962 0.0340634 0.144092 +0.209838 0.0350513 0.1214 +0.122018 -0.0147207 0.202688 +0.134625 -0.010294 0.190699 +0.150345 -0.0204184 0.190322 +0.171467 -0.0443352 0.191435 +0.124137 -0.0275222 0.21069 +0.115004 -0.0324307 0.220668 +0.103488 -0.0235525 0.230568 +-0.234966 -0.250492 -0.00657503 +0.230136 -0.0629922 0.010065 +0.22781 -0.0439028 0.0052695 +0.226758 -0.0758146 -0.00318988 +0.218119 -0.0755566 -0.0185995 +0.210925 -0.0881128 -0.0299059 +0.195391 -0.0835698 -0.0397083 +0.187049 -0.0970928 -0.0513544 +0.215909 -0.10623 -0.0275177 +0.221663 -0.111792 -0.00835326 +0.21689 -0.135734 -0.006698 +0.187289 -0.0668273 -0.0361071 +0.170089 -0.0549841 -0.0384156 +0.158135 -0.0292105 -0.0224101 +0.144698 -0.0631652 -0.0561794 +0.210349 -0.156804 0.00619425 +0.122465 -0.0210506 -0.020971 +0.25102 0.0827579 -0.00901225 +0.246076 0.0717907 -0.00732438 +0.248146 0.0653429 0.00439784 +0.245544 0.0538898 0.0151974 +0.255748 0.0868229 -0.000826293 +-0.125725 -0.258433 -0.170214 +0.151089 -0.0268375 0.140451 +0.244155 0.0131187 -0.0533056 +0.246127 0.0105937 -0.0612737 +0.239403 0.00492409 -0.0645919 +0.228547 -0.00190445 -0.0800819 +0.236042 0.000460551 -0.073323 +0.244455 -0.00400961 -0.0816292 +0.225173 0.00380285 -0.0703884 +0.247885 -0.00234363 -0.0902777 +0.247838 0.00379159 -0.0839495 +0.243353 0.0148187 -0.0838177 +0.236031 0.0244971 -0.0791546 +0.225616 0.0291453 -0.0875646 +-0.29518 -0.390079 -0.254006 +-0.303646 -0.394416 -0.248506 +-0.302477 -0.403327 -0.233435 +-0.298023 -0.412267 -0.217588 +-0.29425 -0.38151 -0.250683 +-0.302074 -0.390767 -0.254186 +0.191342 0.435898 0.0636941 +-0.0964353 -0.460913 -0.0144457 +0.137532 -0.0116873 0.139128 +0.343547 -0.294973 -0.292923 +0.137424 0.0947211 0.0118894 +0.147115 0.0902563 -0.00271409 +0.147874 0.0802052 -0.0226835 +0.255027 -0.310713 -0.257667 +0.257498 -0.300887 -0.266482 +0.220835 -0.0105204 -0.15317 +0.210403 -0.014095 -0.156518 +0.204562 -0.0228168 -0.148776 +-0.117774 -0.20207 0.202016 +3 572 1212 1222 +3 899 137 1163 +3 2071 17 2074 +3 1326 1325 327 +3 1028 1034 1029 +3 1232 1231 733 +3 983 1228 182 +3 529 531 185 +3 531 446 185 +3 1557 1539 1556 +3 671 672 636 +3 1127 1222 241 +3 278 6 279 +3 6 282 279 +3 618 951 952 +3 234 272 274 +3 2490 1715 2491 +3 2174 2173 2172 +3 11 205 277 +3 919 93 2029 +3 527 2648 2649 +3 2093 2095 2088 +3 1367 1369 763 +3 1354 1367 763 +3 1743 522 1842 +3 2551 1617 2550 +3 2280 2214 2281 +3 989 96 987 +3 103 21 104 +3 1649 1650 31 +3 1654 1650 1649 +3 2013 2014 294 +3 744 745 461 +3 594 1081 1083 +3 1000 2140 2139 +3 2133 1000 2139 +3 213 38 214 +3 2151 2154 470 +3 2650 256 2653 +3 215 551 941 +3 551 550 941 +3 1426 1425 443 +3 983 2103 96 +3 456 1019 1018 +3 958 1898 2459 +3 622 1483 1484 +3 1754 1759 515 +3 1555 2698 1955 +3 52 1454 1455 +3 2050 52 1455 +3 2310 2316 1373 +3 2003 1468 74 +3 328 325 1730 +3 930 931 176 +3 524 566 702 +3 1953 246 1952 +3 413 1915 1916 +3 850 541 184 +3 1133 353 351 +3 1845 1844 134 +3 5 975 1105 +3 1337 1335 723 +3 80 27 1568 +3 1458 1651 175 +3 1901 1902 2544 +3 21 105 104 +3 21 103 29 +3 2129 956 1161 +3 287 2129 1161 +3 293 1889 1890 +3 1723 1724 336 +3 693 1184 1182 +3 1183 693 1182 +3 1458 66 1651 +3 68 904 122 +3 259 1716 340 +3 1333 1334 449 +3 803 396 475 +3 1330 747 725 +3 1485 418 1484 +3 278 11 277 +3 276 278 277 +3 225 2069 2068 +3 257 258 76 +3 683 680 716 +3 1229 947 1227 +3 1566 1567 1927 +3 91 2022 974 +3 721 731 1230 +3 721 729 731 +3 47 280 279 +3 85 1931 2195 +3 206 154 64 +3 1949 1947 1948 +3 550 850 184 +3 76 260 1587 +3 258 260 76 +3 679 703 1473 +3 657 703 679 +3 295 17 296 +3 17 2071 296 +3 551 215 913 +3 380 382 381 +3 270 268 295 +3 268 17 295 +3 1079 653 1791 +3 115 198 195 +3 1053 1046 877 +3 1489 2499 2197 +3 211 547 237 +3 1929 1567 27 +3 363 72 364 +3 671 654 670 +3 82 168 158 +3 1130 638 1168 +3 801 800 397 +3 178 2587 458 +3 159 2049 157 +3 1625 1627 1626 +3 1627 1273 1626 +3 1468 141 1467 +3 2093 2086 2095 +3 357 2086 2093 +3 564 531 528 +3 64 263 273 +3 137 364 379 +3 378 137 379 +3 117 900 899 +3 376 375 136 +3 88 2491 2492 +3 83 1292 1299 +3 1787 689 1790 +3 1610 581 707 +3 642 599 1776 +3 500 497 499 +3 1823 1259 54 +3 1674 1549 514 +3 1166 1066 1065 +3 42 1793 1796 +3 21 67 106 +3 81 80 84 +3 20 105 118 +3 20 156 105 +3 67 21 255 +3 1012 257 1013 +3 258 257 65 +3 646 887 1633 +3 1970 116 1969 +3 1143 401 1144 +3 126 1584 1587 +3 164 1843 163 +3 120 164 163 +3 2699 377 376 +3 1764 1842 522 +3 507 508 412 +3 1140 751 304 +3 1253 1021 1256 +3 863 1784 1783 +3 2610 1784 863 +3 571 1219 1218 +3 1641 1035 1640 +3 158 168 51 +3 790 1529 1530 +3 747 727 462 +3 726 727 747 +3 993 995 61 +3 279 280 11 +3 916 93 915 +3 587 2249 1315 +3 1298 1447 1451 +3 68 122 118 +3 237 534 552 +3 138 364 900 +3 1505 1531 1504 +3 263 1688 267 +3 2028 2029 93 +3 6 272 282 +3 2479 63 245 +3 235 316 318 +3 40 84 80 +3 84 40 104 +3 775 1350 1349 +3 1352 775 1349 +3 170 262 264 +3 1935 170 264 +3 21 106 105 +3 941 183 1708 +3 941 942 183 +3 1843 164 165 +3 67 248 106 +3 282 234 47 +3 63 1954 245 +3 313 234 274 +3 434 435 188 +3 1714 1715 344 +3 1158 2373 2374 +3 2393 591 1099 +3 1453 1298 1451 +3 2 1133 1134 +3 1059 2444 2445 +3 1779 218 1777 +3 1704 994 1700 +3 263 267 273 +3 438 1398 1244 +3 523 2647 527 +3 2647 2646 527 +3 118 105 106 +3 164 120 121 +3 71 131 165 +3 63 246 1954 +3 1843 165 1844 +3 2003 2001 2002 +3 2234 2374 2235 +3 253 106 248 +3 253 68 106 +3 682 658 667 +3 1467 75 2084 +3 986 180 988 +3 262 24 264 +3 1970 1969 929 +3 1692 170 1456 +3 124 1013 76 +3 276 277 64 +3 430 151 429 +3 2174 2682 2138 +3 815 406 475 +3 1468 236 74 +3 1943 1545 2536 +3 2622 901 894 +3 901 896 894 +3 376 377 135 +3 132 72 363 +3 281 109 292 +3 109 281 318 +3 223 83 1299 +3 74 380 375 +3 2003 2002 141 +3 2175 2603 2173 +3 1131 1408 1407 +3 411 811 810 +3 2549 1609 706 +3 126 1587 260 +3 996 34 988 +3 896 1940 1938 +3 98 1308 274 +3 925 1735 928 +3 144 2080 2085 +3 23 233 78 +3 600 797 704 +3 336 1459 331 +3 1459 1460 331 +3 1341 1334 724 +3 1560 16 1559 +3 544 92 546 +3 2143 2175 2138 +3 2185 2507 2506 +3 377 72 135 +3 1764 1752 1842 +3 277 205 206 +3 170 82 1456 +3 264 24 265 +3 307 153 940 +3 309 307 940 +3 566 562 177 +3 266 1936 1471 +3 235 315 316 +3 1844 165 134 +3 1847 2330 1448 +3 163 159 120 +3 1433 1437 1432 +3 753 900 117 +3 138 900 753 +3 948 1228 983 +3 984 948 983 +3 2595 697 2597 +3 443 187 444 +3 1690 154 907 +3 255 21 29 +3 84 168 81 +3 1276 2328 2609 +3 2661 79 849 +3 146 362 2092 +3 1316 1317 2220 +3 68 118 106 +3 1040 1035 1641 +3 2698 1554 1673 +3 1228 1229 1227 +3 1330 726 747 +3 919 914 93 +3 822 394 821 +3 507 388 508 +3 760 1185 2077 +3 830 828 484 +3 557 1348 179 +3 557 1347 1348 +3 896 901 1940 +3 636 1130 1135 +3 671 636 1135 +3 1246 1240 1250 +3 2640 2639 1403 +3 499 496 500 +3 1658 1210 1209 +3 1335 449 1334 +3 1389 1022 441 +3 926 925 927 +3 1823 1822 1258 +3 1822 1825 1258 +3 2658 2661 240 +3 998 984 990 +3 2587 2633 190 +3 1439 2689 1428 +3 263 1685 1688 +3 263 1686 1685 +3 345 329 1136 +3 1134 1133 352 +3 1483 554 1484 +3 1994 115 1975 +3 143 1463 1464 +3 1456 1681 1692 +3 210 971 972 +3 318 317 109 +3 318 316 317 +3 2030 2026 208 +3 1012 123 257 +3 206 59 907 +3 1738 240 845 +3 854 221 1778 +3 543 854 1778 +3 87 342 1718 +3 618 912 619 +3 392 800 803 +3 974 973 972 +3 1965 989 931 +3 989 176 931 +3 1762 2669 2670 +3 277 206 64 +3 521 1660 1659 +3 2697 1670 2696 +3 1670 2697 1555 +3 1104 1102 1103 +3 189 2518 2519 +3 799 392 583 +3 1745 1751 1761 +3 473 813 389 +3 2108 1046 1045 +3 513 512 1545 +3 320 2006 2012 +3 473 474 506 +3 1177 770 1178 +3 550 184 942 +3 1224 1225 946 +3 1841 254 101 +3 1868 597 2207 +3 124 1011 1012 +3 272 98 274 +3 224 1581 1582 +3 48 312 313 +3 536 2653 2654 +3 2653 536 535 +3 1846 1845 465 +3 1778 1777 977 +3 791 2187 2186 +3 306 39 310 +3 39 306 319 +3 1500 1502 1507 +3 1552 1670 1551 +3 409 951 618 +3 538 851 852 +3 457 438 1245 +3 526 1480 2665 +3 1255 448 1254 +3 1645 2119 2124 +3 506 388 507 +3 1672 1671 1675 +3 1671 1552 1675 +3 1612 1613 581 +3 460 559 2585 +3 175 926 927 +3 261 1724 1723 +3 1724 261 1725 +3 379 72 377 +3 364 72 379 +3 128 2196 1934 +3 2457 135 2458 +3 128 1934 1936 +3 1118 2136 287 +3 888 1631 1370 +3 135 132 2458 +3 76 1013 257 +3 117 899 898 +3 132 135 72 +3 905 139 906 +3 125 76 1587 +3 76 125 124 +3 734 733 742 +3 30 538 540 +3 30 537 538 +3 394 823 821 +3 259 1719 1717 +3 340 1714 1721 +3 173 550 551 +3 1138 330 1136 +3 1724 1459 336 +3 2593 2592 697 +3 1719 1720 258 +3 229 1373 2319 +3 280 281 12 +3 2086 2087 2095 +3 1657 1820 1818 +3 585 1665 1080 +3 1066 1166 638 +3 1146 423 1085 +3 11 278 279 +3 916 1324 212 +3 1595 712 3 +3 2316 2310 2309 +3 178 2586 2632 +3 2043 2042 2041 +3 319 317 39 +3 317 316 39 +3 751 14 752 +3 6 271 272 +3 2121 1044 1048 +3 1055 2112 2111 +3 236 1468 142 +3 1767 520 1487 +3 588 692 778 +3 693 692 2077 +3 233 23 429 +3 797 717 680 +3 235 281 47 +3 234 235 47 +3 23 1159 2261 +3 2141 2603 2176 +3 2606 2605 829 +3 235 318 281 +3 814 389 805 +3 506 507 473 +3 1629 1443 489 +3 1271 1627 1625 +3 190 2640 2641 +3 1135 1130 1168 +3 832 837 411 +3 837 1181 411 +3 1847 1846 465 +3 138 753 751 +3 22 2018 299 +3 308 752 1015 +3 1619 583 586 +3 1144 1619 586 +3 1739 2658 240 +3 2658 1739 519 +3 378 379 377 +3 1717 1719 65 +3 1697 1696 196 +3 2041 2042 967 +3 299 2018 2017 +3 900 137 899 +3 25 331 999 +3 235 234 314 +3 1159 78 1024 +3 1160 317 319 +3 147 428 798 +3 359 358 301 +3 2234 1169 3 +3 634 666 674 +3 751 1140 14 +3 2631 2634 417 +3 1210 572 571 +3 1212 572 1210 +3 2135 2172 2141 +3 2306 715 2307 +3 532 184 541 +3 607 1194 393 +3 836 149 834 +3 953 149 836 +3 181 329 346 +3 671 1135 654 +3 339 325 328 +3 1400 1393 1604 +3 2589 1790 689 +3 173 551 921 +3 941 550 942 +3 532 541 530 +3 1708 215 941 +3 333 90 335 +3 2409 780 2414 +3 924 1735 926 +3 1260 309 940 +3 2413 949 780 +3 1141 589 1143 +3 926 175 924 +3 322 1699 1698 +3 2229 2241 2372 +3 1779 1781 1780 +3 1701 1703 2495 +3 221 854 855 +3 345 1136 1728 +3 806 805 389 +3 291 1070 1069 +3 1110 1908 1911 +3 1733 1732 1113 +3 2234 2235 1169 +3 1910 1009 286 +3 1722 77 1720 +3 506 817 841 +3 416 836 2635 +3 1256 1021 1248 +3 1432 1437 480 +3 2659 2657 534 +3 565 739 731 +3 2009 2008 297 +3 187 1134 352 +3 1408 1392 439 +3 466 133 750 +3 898 899 359 +3 899 1163 359 +3 589 1141 808 +3 151 233 429 +3 2270 712 2271 +3 1616 1611 1610 +3 495 783 2531 +3 1470 2621 146 +3 2624 145 895 +3 372 1919 1266 +3 1226 982 182 +3 383 236 142 +3 1022 1259 441 +3 1266 1268 1275 +3 897 1938 1190 +3 380 236 382 +3 836 834 414 +3 752 750 751 +3 138 751 750 +3 2644 436 1669 +3 786 1531 1505 +3 2529 2532 1542 +3 817 506 474 +3 777 2418 2419 +3 1181 837 415 +3 2642 1403 2638 +3 436 2642 2638 +3 1213 1216 1214 +3 393 1192 609 +3 237 547 548 +3 1203 526 1204 +3 1411 1441 2562 +3 1441 189 2562 +3 1746 1762 2670 +3 1079 1075 653 +3 1677 2215 2214 +3 495 494 1 +3 1232 732 1231 +3 523 524 702 +3 621 617 555 +3 392 586 583 +3 2077 1185 693 +3 498 494 495 +3 613 1201 1202 +3 822 511 795 +3 292 2012 293 +3 214 342 87 +3 850 851 541 +3 851 850 539 +3 2694 1057 1126 +3 211 544 545 +3 121 476 119 +3 781 617 410 +3 1313 607 1314 +3 418 615 621 +3 1487 2665 525 +3 409 950 951 +3 954 2634 2630 +3 1630 1439 1629 +3 616 2418 1171 +3 2597 705 2595 +3 890 768 884 +3 1394 2547 1668 +3 2255 2256 427 +3 1341 1335 1334 +3 524 525 1348 +3 453 435 452 +3 1672 1673 1554 +3 1671 1672 1554 +3 1849 845 1850 +3 1255 1253 453 +3 400 1316 1614 +3 421 2199 1522 +3 2199 421 1493 +3 665 663 668 +3 1438 479 478 +3 1418 1630 1629 +3 619 909 409 +3 841 2606 829 +3 452 1599 451 +3 460 745 744 +3 464 1403 2642 +3 732 1018 730 +3 906 2000 140 +3 1213 521 1216 +3 837 953 415 +3 407 808 1141 +3 736 737 735 +3 447 444 445 +3 2656 533 2651 +3 573 1220 1218 +3 458 2641 191 +3 595 2590 2589 +3 1141 1143 586 +3 624 1385 1386 +3 566 177 702 +3 1383 1384 648 +3 1767 1487 239 +3 1086 603 623 +3 1744 1217 520 +3 459 458 191 +3 1474 558 557 +3 191 457 454 +3 698 578 701 +3 670 673 633 +3 1019 1342 477 +3 2647 177 2646 +3 459 178 458 +3 608 1351 1350 +3 622 621 555 +3 2271 1590 2270 +3 1599 1429 385 +3 2652 534 2651 +3 745 178 459 +3 477 730 1018 +3 980 1512 1514 +3 528 531 529 +3 775 608 1350 +3 2532 2529 2530 +3 1432 482 148 +3 564 562 563 +3 745 459 461 +3 411 813 831 +3 740 743 461 +3 563 531 564 +3 603 660 1776 +3 1738 1739 240 +3 831 832 411 +3 419 795 511 +3 1423 1630 1418 +3 2255 427 2258 +3 760 2077 588 +3 622 555 1482 +3 474 473 389 +3 814 474 389 +3 1495 1492 1497 +3 1531 1490 788 +3 548 46 549 +3 697 2595 2594 +3 494 498 515 +3 787 1531 1521 +3 1209 571 1211 +3 1557 1556 1540 +3 2661 846 240 +3 1988 1973 1987 +3 123 128 257 +3 128 123 962 +3 1694 1695 579 +3 547 46 548 +3 273 2667 64 +3 1747 1749 2680 +3 1749 1750 2680 +3 500 503 497 +3 706 1609 578 +3 1532 1558 1556 +3 502 495 512 +3 2187 2188 391 +3 804 2192 2190 +3 815 474 814 +3 1558 1534 504 +3 1704 324 1705 +3 1499 1500 1494 +3 869 1049 1048 +3 1768 2678 2677 +3 531 186 446 +3 600 1066 718 +3 2590 650 684 +3 1482 556 1481 +3 1750 517 568 +3 2407 1695 398 +3 2673 2675 2672 +3 239 1741 1767 +3 1741 1742 1767 +3 750 749 138 +3 1 494 848 +3 1067 624 1386 +3 1068 624 1067 +3 741 740 461 +3 800 396 803 +3 1083 1081 1082 +3 401 1083 1082 +3 1017 456 1018 +3 851 537 541 +3 537 530 541 +3 808 807 174 +3 726 559 560 +3 1344 559 726 +3 728 746 565 +3 746 743 565 +3 1331 561 1343 +3 1330 1331 1343 +3 453 1253 54 +3 1195 2420 425 +3 814 2193 815 +3 238 527 533 +3 241 1222 1213 +3 1551 496 935 +3 50 734 742 +3 732 721 1231 +3 537 536 530 +3 536 537 30 +3 898 1939 897 +3 222 538 852 +3 538 537 851 +3 712 1589 3 +3 211 545 547 +3 542 540 538 +3 222 542 538 +3 2390 2389 1648 +3 542 543 544 +3 222 543 542 +3 1160 110 2015 +3 211 542 544 +3 942 943 183 +3 546 545 544 +3 2673 2672 2674 +3 216 914 917 +3 173 921 922 +3 852 539 853 +3 852 851 539 +3 46 202 549 +3 1078 95 659 +3 173 539 550 +3 149 953 837 +3 1474 557 1476 +3 739 50 742 +3 2674 1678 2676 +3 558 559 450 +3 179 1478 1477 +3 1476 557 179 +3 2499 150 2197 +3 662 635 690 +3 568 1746 2679 +3 724 748 477 +3 702 177 2647 +3 882 879 762 +3 177 562 564 +3 401 1319 584 +3 553 1485 1478 +3 1658 1659 1210 +3 739 742 731 +3 722 1232 733 +3 1367 766 1368 +3 1354 766 1367 +3 1336 563 562 +3 449 1336 562 +3 704 1063 600 +3 704 629 1063 +3 1073 653 1075 +3 581 1611 1612 +3 702 2647 523 +3 1319 401 1082 +3 1145 1083 401 +3 595 649 2590 +3 2561 2560 574 +3 770 608 911 +3 608 770 769 +3 911 619 912 +3 1874 1873 754 +3 677 694 602 +3 660 643 642 +3 729 721 730 +3 830 487 828 +3 674 666 633 +3 615 614 1179 +3 614 615 418 +3 841 487 506 +3 694 677 632 +3 563 710 186 +3 1067 592 1068 +3 1793 107 57 +3 811 408 810 +3 633 669 670 +3 2291 2290 1200 +3 897 117 898 +3 1203 570 1202 +3 655 676 672 +3 2578 1789 593 +3 409 618 619 +3 2663 2662 1204 +3 646 1633 888 +3 617 0 618 +3 677 675 632 +3 671 655 672 +3 595 2589 2591 +3 1775 599 1774 +3 695 707 581 +3 707 695 1093 +3 394 795 825 +3 1358 1365 1357 +3 1364 1365 1358 +3 408 2413 824 +3 1314 607 606 +3 1148 613 1220 +3 2126 2125 1041 +3 0 912 618 +3 2589 2590 684 +3 2597 2596 577 +3 730 721 732 +3 2662 1208 2666 +3 1339 451 1338 +3 2293 1206 1201 +3 842 2601 830 +3 2272 712 1594 +3 1148 1147 613 +3 2294 2286 1198 +3 2222 2223 585 +3 612 1485 553 +3 554 1485 1484 +3 741 50 740 +3 1142 1141 586 +3 1178 1179 616 +3 1179 1178 615 +3 2471 2470 1595 +3 617 618 410 +3 1367 1368 767 +3 404 1349 1313 +3 1352 1349 404 +3 145 2093 2088 +3 1346 450 1345 +3 1438 2090 354 +3 137 378 1162 +3 781 555 617 +3 667 690 635 +3 665 668 669 +3 2678 1747 2679 +3 1066 719 718 +3 651 1184 1185 +3 634 675 677 +3 1655 1656 657 +3 810 389 813 +3 668 664 655 +3 664 676 655 +3 2292 1192 610 +3 604 643 660 +3 662 592 663 +3 635 663 665 +3 708 1093 1092 +3 766 1354 1351 +3 755 1873 1874 +3 594 1083 1084 +3 1938 897 1939 +3 1180 1181 415 +3 705 578 698 +3 634 677 682 +3 669 668 655 +3 666 667 635 +3 633 666 665 +3 666 635 665 +3 634 667 666 +3 1868 1870 597 +3 813 411 810 +3 690 625 662 +3 1079 1074 1075 +3 633 665 669 +3 663 592 664 +3 1609 1610 707 +3 881 645 878 +3 1656 704 657 +3 634 682 667 +3 145 358 2093 +3 1857 1856 892 +3 703 657 704 +3 728 565 731 +3 718 719 639 +3 603 1086 1078 +3 1345 450 1344 +3 2101 679 1473 +3 854 543 222 +3 714 1596 2470 +3 1748 1765 2675 +3 744 743 560 +3 878 691 879 +3 1130 636 1129 +3 486 826 2605 +3 1517 1506 1533 +3 962 961 251 +3 487 841 829 +3 1172 1173 1177 +3 1526 1528 790 +3 2472 2467 1597 +3 1694 1607 1958 +3 989 987 176 +3 856 221 855 +3 1635 221 856 +3 729 462 728 +3 462 727 728 +3 563 186 531 +3 356 2079 2078 +3 462 729 730 +3 1359 765 1361 +3 743 746 560 +3 728 731 729 +3 740 565 743 +3 565 740 739 +3 1548 513 1943 +3 875 2113 2114 +3 770 1173 769 +3 953 836 416 +3 50 739 740 +3 1230 733 1231 +3 748 730 477 +3 900 364 137 +3 462 730 748 +3 748 725 747 +3 462 748 747 +3 749 364 138 +3 1871 1872 755 +3 1382 2591 1385 +3 572 802 94 +3 878 759 691 +3 1411 2426 1131 +3 884 883 762 +3 405 773 1364 +3 951 416 952 +3 587 1315 1316 +3 2586 178 2584 +3 137 1162 1163 +3 770 1177 1173 +3 619 911 908 +3 438 464 1397 +3 779 588 778 +3 762 890 884 +3 412 832 831 +3 806 810 408 +3 802 820 396 +3 1349 774 1313 +3 1017 1233 1234 +3 790 1527 1526 +3 2611 2610 863 +3 962 123 961 +3 700 1093 1094 +3 2266 1016 2265 +3 1526 420 1528 +3 285 2128 231 +3 1644 2125 2126 +3 353 2082 351 +3 392 799 800 +3 406 803 475 +3 951 953 416 +3 774 2422 1313 +3 1209 1208 243 +3 2187 2505 2186 +3 810 806 389 +3 1181 1180 811 +3 832 149 837 +3 475 818 816 +3 391 2504 2505 +3 1124 2415 950 +3 816 818 817 +3 815 816 474 +3 815 475 816 +3 802 395 820 +3 816 817 474 +3 1208 570 2666 +3 396 820 475 +3 394 822 795 +3 2185 826 794 +3 828 391 484 +3 2606 486 2605 +3 795 826 825 +3 953 950 415 +3 950 953 951 +3 2077 692 588 +3 1181 811 411 +3 1892 2501 1119 +3 484 843 842 +3 1853 1852 846 +3 539 850 550 +3 16 2533 1562 +3 1045 2109 2108 +3 1555 2697 2698 +3 853 222 852 +3 975 864 1105 +3 2143 2138 2683 +3 238 533 2656 +3 2244 2245 862 +3 2119 2115 1043 +3 1135 1168 654 +3 870 1052 1032 +3 1995 1994 933 +3 2083 2094 142 +3 1164 44 359 +3 872 2245 2695 +3 2114 2113 2116 +3 1048 1049 1031 +3 911 912 770 +3 305 14 1140 +3 620 910 909 +3 2620 2619 300 +3 2295 2296 611 +3 691 759 1869 +3 1855 1856 1360 +3 1139 303 1140 +3 903 117 897 +3 753 117 903 +3 928 1735 1734 +3 751 753 903 +3 213 907 59 +3 908 909 619 +3 1126 867 1125 +3 77 336 1123 +3 914 216 913 +3 914 913 915 +3 998 995 948 +3 1385 1786 1386 +3 1707 1708 183 +3 1072 1121 1122 +3 961 960 251 +3 1463 1465 1464 +3 2633 2587 2632 +3 395 2691 819 +3 820 395 819 +3 2636 414 2633 +3 416 2635 954 +3 1005 470 1002 +3 288 1070 957 +3 71 130 131 +3 2172 1001 2171 +3 1999 338 2000 +3 1594 712 1595 +3 2349 2146 2350 +3 2146 2349 2147 +3 1223 2276 945 +3 2603 2141 2173 +3 2375 2254 2251 +3 124 1012 1013 +3 247 254 60 +3 470 1000 1002 +3 2140 1000 470 +3 2290 610 1199 +3 1985 990 1984 +3 123 904 961 +3 904 123 1012 +3 1204 2664 2663 +3 1239 1806 1807 +3 923 1649 1648 +3 1106 862 1107 +3 865 1106 1107 +3 2269 1590 2268 +3 1034 1035 1040 +3 2693 2692 1127 +3 1935 264 86 +3 1933 1935 86 +3 2056 1291 2057 +3 2319 2317 1264 +3 1373 2317 2319 +3 2144 2178 2163 +3 1287 1150 1282 +3 992 61 991 +3 1249 1824 1657 +3 2062 1292 228 +3 2365 886 2363 +3 1267 1266 1262 +3 372 1266 1267 +3 1579 1580 1151 +3 1579 468 1580 +3 2069 225 2070 +3 2460 1493 1495 +3 1368 891 767 +3 2021 203 2022 +3 2526 2529 2527 +3 2526 1544 2529 +3 978 977 976 +3 978 976 220 +3 919 424 917 +3 424 919 967 +3 2091 2094 2083 +3 2575 2094 2091 +3 967 919 219 +3 113 2011 2009 +3 2385 918 1945 +3 1945 216 2385 +3 216 917 2385 +3 57 1794 1793 +3 2117 2120 2118 +3 207 2030 213 +3 767 2207 597 +3 2207 767 880 +3 2034 972 971 +3 546 971 210 +3 334 1837 1836 +3 1327 2033 212 +3 973 545 210 +3 2028 2027 209 +3 1723 336 1722 +3 1325 212 1324 +3 866 1640 1637 +3 280 58 11 +3 58 280 1887 +3 1783 1784 218 +3 1784 976 218 +3 1780 1783 218 +3 995 1229 948 +3 1946 1945 1944 +3 2043 2045 2042 +3 2045 2043 220 +3 2047 975 968 +3 975 970 968 +3 2042 2045 968 +3 2045 2047 968 +3 2047 2045 2046 +3 1588 544 543 +3 1945 918 1944 +3 2045 220 2046 +3 1789 598 1788 +3 1737 1546 1736 +3 1550 1737 1736 +3 922 921 1946 +3 981 315 232 +3 302 2617 2017 +3 2617 299 2017 +3 2078 2079 2096 +3 1498 1494 789 +3 1499 1498 1492 +3 726 560 727 +3 2653 256 2654 +3 2598 696 2593 +3 696 2592 2593 +3 1510 1509 55 +3 1505 1509 1510 +3 1502 1500 1499 +3 347 1920 1947 +3 1492 1501 1499 +3 2199 2200 1522 +3 2200 2199 793 +3 673 654 1601 +3 1602 673 1601 +3 1496 421 980 +3 2197 150 2202 +3 2198 2197 2202 +3 2618 2614 2619 +3 2618 2616 2614 +3 22 297 298 +3 2581 694 632 +3 784 2581 632 +3 2524 1921 2522 +3 1921 1922 2522 +3 315 39 316 +3 315 981 39 +3 981 310 39 +3 1386 1786 598 +3 37 194 1697 +3 2001 2003 140 +3 1117 2167 1898 +3 986 987 96 +3 987 986 988 +3 1652 9 1650 +3 995 998 61 +3 66 1654 1651 +3 987 927 176 +3 927 987 34 +3 927 930 176 +3 297 2008 294 +3 442 1429 1430 +3 442 2668 1429 +3 194 993 992 +3 2107 1046 2108 +3 1645 1644 1042 +3 982 180 986 +3 180 982 422 +3 332 89 1137 +3 332 1461 89 +3 692 1183 2411 +3 1183 174 2411 +3 2011 2010 2009 +3 988 34 987 +3 1667 1060 1637 +3 927 925 930 +3 33 346 345 +3 33 997 346 +3 1027 1029 857 +3 1027 2449 1029 +3 1835 2565 2574 +3 2565 1834 2574 +3 1158 2374 2234 +3 990 984 985 +3 984 96 985 +3 143 1460 1461 +3 1462 143 1461 +3 1462 333 335 +3 731 742 1230 +3 38 1327 343 +3 924 923 1653 +3 1647 4 201 +3 1999 127 1583 +3 127 1585 1583 +3 919 917 914 +3 194 37 993 +3 1699 1704 1700 +3 1725 328 1728 +3 350 34 996 +3 326 350 996 +3 771 1176 1362 +3 1230 742 733 +3 1460 999 331 +3 2490 88 2494 +3 322 196 99 +3 993 994 995 +3 996 988 180 +3 997 996 180 +3 997 326 996 +3 2089 355 2090 +3 1711 1710 323 +3 997 180 422 +3 346 997 422 +3 33 326 997 +3 984 998 948 +3 350 99 196 +3 1026 861 1027 +3 2698 1674 1955 +3 2530 2531 1543 +3 957 291 1114 +3 1070 291 957 +3 1908 1907 1111 +3 2221 1319 2223 +3 1951 248 247 +3 248 67 247 +3 2150 1003 2152 +3 2149 2159 2160 +3 1888 1884 1885 +3 1888 112 1884 +3 1502 979 1503 +3 1507 1502 1503 +3 2155 2152 2153 +3 70 124 125 +3 1011 124 70 +3 1977 991 1991 +3 1990 1977 1991 +3 2141 1002 2135 +3 1911 1909 1912 +3 1914 349 1909 +3 2136 958 2137 +3 77 1388 260 +3 41 1949 1948 +3 1011 904 1012 +3 122 904 1011 +3 70 122 1011 +3 349 1111 2162 +3 2158 2149 2153 +3 2158 2153 1003 +3 2593 697 2594 +3 141 2002 2005 +3 2270 2269 1589 +3 2270 1590 2269 +3 1007 2162 2157 +3 2248 1314 1315 +3 404 1314 2248 +3 703 704 680 +3 2250 1154 1571 +3 828 487 2604 +3 487 829 2604 +3 286 1009 1008 +3 1007 2155 2153 +3 1010 2140 470 +3 2154 1010 470 +3 2486 166 2485 +3 2150 2151 1005 +3 2152 2151 2150 +3 2311 2310 2312 +3 1845 1846 1844 +3 102 40 107 +3 2336 1276 53 +3 1276 2336 2332 +3 982 2103 983 +3 2025 2021 2022 +3 2025 207 2021 +3 307 309 1015 +3 752 307 1015 +3 307 752 14 +3 1816 1817 1247 +3 2287 1197 2288 +3 734 737 1235 +3 737 734 735 +3 1017 1018 732 +3 735 734 50 +3 50 741 735 +3 452 1255 453 +3 1330 1343 726 +3 477 1018 1019 +3 735 741 738 +3 455 735 738 +3 1809 1808 192 +3 1808 1809 1239 +3 1661 1659 1488 +3 1022 440 188 +3 1253 1252 1021 +3 451 448 1255 +3 925 928 1971 +3 928 929 1971 +3 2004 2005 2002 +3 2005 2004 1464 +3 335 1466 1465 +3 2626 1646 1641 +3 1640 2626 1641 +3 435 453 1022 +3 188 435 1022 +3 457 464 438 +3 699 1120 1090 +3 1023 839 840 +3 1090 1120 838 +3 1894 2503 1892 +3 2609 2326 370 +3 2326 2609 2328 +3 1495 1493 1496 +3 2462 2463 1170 +3 2201 793 2184 +3 1073 1122 653 +3 688 2265 2264 +3 701 839 1023 +3 341 1715 1716 +3 1715 340 1716 +3 1160 319 110 +3 189 2564 2562 +3 2014 2013 2015 +3 2028 93 916 +3 2027 2026 2031 +3 2026 91 2031 +3 1228 1227 182 +3 1646 2127 1642 +3 1045 2117 2116 +3 1644 2126 2127 +3 2126 1041 2127 +3 2434 2442 1038 +3 189 2519 2520 +3 376 136 2699 +3 871 1030 1029 +3 1678 2214 2279 +3 2278 1678 2279 +3 2107 1054 2106 +3 1054 2112 2106 +3 1233 732 1232 +3 1783 1780 1782 +3 496 1547 500 +3 2264 2265 711 +3 1589 2264 711 +3 381 1162 378 +3 1030 870 1032 +3 1030 1031 870 +3 1235 722 734 +3 858 1027 857 +3 1033 858 857 +3 1032 1033 857 +3 1887 2424 58 +3 858 1026 1027 +3 1278 2645 1457 +3 1769 1279 1267 +3 366 1769 1267 +3 934 1962 1970 +3 1641 1642 1040 +3 1393 1400 2547 +3 1400 1395 2547 +3 2110 1054 2109 +3 1034 868 1035 +3 28 1568 1566 +3 1798 28 1566 +3 1974 1993 1992 +3 2110 2111 2112 +3 2122 2121 1047 +3 2121 2122 876 +3 1092 700 2436 +3 1166 601 1167 +3 1166 1062 601 +3 968 424 967 +3 655 671 670 +3 785 601 1062 +3 628 785 1062 +3 656 2102 1016 +3 2102 2267 1016 +3 424 968 970 +3 1056 2104 2695 +3 865 1102 1104 +3 1106 865 1104 +3 35 1977 1976 +3 1977 197 1976 +3 2081 355 2080 +3 330 1724 1725 +3 1963 1981 1980 +3 1981 1964 1980 +3 1044 2120 2117 +3 1043 2115 2114 +3 1045 1046 869 +3 1802 1727 261 +3 870 1050 1052 +3 1683 155 1682 +3 2443 2442 1037 +3 2656 2651 534 +3 1673 1672 1553 +3 613 2291 1200 +3 237 540 211 +3 1044 869 1048 +3 2120 2121 876 +3 1047 1048 1031 +3 1676 1675 569 +3 2039 2038 964 +3 1649 31 1648 +3 2447 1028 2448 +3 1028 2449 2448 +3 2442 2434 1058 +3 2434 2435 1058 +3 1030 871 1031 +3 1031 1049 870 +3 1049 1050 870 +3 1049 1053 1050 +3 1052 860 1032 +3 1029 1030 857 +3 1030 1032 857 +3 1051 860 1052 +3 1046 2244 877 +3 2244 1046 873 +3 1916 1413 2425 +3 1053 1049 869 +3 1674 505 2217 +3 1549 1674 2217 +3 1782 860 1051 +3 1756 1758 1757 +3 1053 877 1050 +3 1965 1966 1982 +3 1051 1050 877 +3 2143 1008 2142 +3 2044 966 964 +3 2040 2041 967 +3 2040 966 2041 +3 2543 2541 2533 +3 2543 2532 2541 +3 2116 1043 2114 +3 2111 2110 875 +3 2569 2568 9 +3 1974 1987 1986 +3 1957 2206 2207 +3 880 1957 2207 +3 1001 2134 2136 +3 670 669 655 +3 937 1928 1925 +3 198 1835 195 +3 2694 872 2695 +3 1103 861 1026 +3 920 1103 1026 +3 2440 2442 1058 +3 637 1168 1167 +3 1168 638 1167 +3 2173 2141 2172 +3 2695 2104 1057 +3 2104 867 1057 +3 239 525 524 +3 1487 525 239 +3 219 2037 2039 +3 2037 2038 2039 +3 1984 990 985 +3 2048 2034 971 +3 2489 1710 1713 +3 2114 2115 875 +3 1962 1995 933 +3 934 1995 1962 +3 1652 1654 66 +3 628 1062 1063 +3 1064 628 1063 +3 664 1064 629 +3 1064 1063 629 +3 592 1064 664 +3 1088 2402 2400 +3 1167 638 1166 +3 1063 1065 600 +3 1063 1062 1065 +3 1167 632 637 +3 601 632 1167 +3 1883 1881 1861 +3 1877 1876 755 +3 1064 592 1067 +3 1065 1062 1166 +3 468 1581 1580 +3 1581 224 1580 +3 1064 1067 628 +3 2341 270 2342 +3 662 661 1068 +3 661 662 625 +3 2074 2075 223 +3 102 103 40 +3 709 1072 2514 +3 2513 709 2514 +3 609 398 580 +3 398 609 1147 +3 1073 1075 1071 +3 670 654 673 +3 1081 594 1075 +3 1112 1733 1113 +3 290 1112 1113 +3 650 1080 1079 +3 684 650 1079 +3 653 1792 1791 +3 1074 1079 1080 +3 1072 1122 1073 +3 1091 1090 709 +3 708 707 1093 +3 2223 2222 2221 +3 1091 699 1090 +3 581 1960 695 +3 1960 581 1613 +3 1084 1077 594 +3 1077 1084 95 +3 590 1084 1083 +3 590 1085 1084 +3 1075 1074 1081 +3 1176 1171 405 +3 1860 1387 642 +3 1860 1875 1387 +3 687 2397 1099 +3 1073 1071 2514 +3 1790 1791 685 +3 173 1101 539 +3 1088 1087 2402 +3 1096 596 1088 +3 687 1096 1088 +3 1498 1497 1492 +3 591 1095 1096 +3 1074 1082 1081 +3 2495 324 1701 +3 594 1077 1076 +3 1912 1909 1109 +3 423 652 1085 +3 1076 1077 596 +3 1077 1078 596 +3 2365 2364 754 +3 2364 2365 2363 +3 403 2364 2363 +3 757 650 756 +3 757 1080 650 +3 48 313 274 +3 1146 1085 590 +3 2514 1072 1073 +3 2513 2514 1071 +3 1082 1074 1665 +3 1143 1145 401 +3 1143 589 1145 +3 1609 708 578 +3 708 2488 578 +3 588 779 1323 +3 1143 1144 586 +3 1144 401 584 +3 1084 1085 95 +3 1085 652 95 +3 652 659 95 +3 1788 598 1787 +3 2240 2230 2307 +3 2235 2240 2307 +3 1496 979 1563 +3 959 1121 1098 +3 1200 1201 613 +3 1090 838 1072 +3 1088 596 1087 +3 596 1086 1087 +3 2403 1087 2404 +3 1100 2395 1119 +3 2392 2395 1100 +3 398 2406 2407 +3 2406 398 1148 +3 2009 2010 26 +3 791 2186 2181 +3 596 1078 1086 +3 600 718 797 +3 718 717 797 +3 2066 2063 2064 +3 2400 2402 2401 +3 686 2400 2401 +3 2402 1087 2403 +3 2401 2402 2403 +3 623 2404 1086 +3 685 1089 686 +3 1788 686 1789 +3 1096 1076 596 +3 1123 331 337 +3 331 25 337 +3 703 683 1473 +3 680 683 703 +3 699 1091 1092 +3 959 1097 1089 +3 1075 1076 1095 +3 1076 1075 594 +3 2491 1715 341 +3 1071 1095 591 +3 1071 1075 1095 +3 591 1096 1099 +3 2487 2488 708 +3 838 1121 1072 +3 1095 1076 1096 +3 1429 1599 1430 +3 1728 328 1729 +3 248 1951 2688 +3 253 248 2688 +3 1597 1598 639 +3 1597 717 1598 +3 922 1101 173 +3 1791 1792 685 +3 1122 1121 959 +3 674 1602 1603 +3 1180 812 811 +3 1472 2231 2236 +3 2237 1472 2236 +3 2642 2643 1402 +3 853 539 1101 +3 855 853 1101 +3 855 854 853 +3 855 1101 922 +3 855 922 856 +3 591 2393 2394 +3 1099 1096 687 +3 2503 1023 2501 +3 1639 1036 867 +3 1104 1103 5 +3 1105 1104 5 +3 2226 2439 2435 +3 2226 2438 2439 +3 2439 1058 2435 +3 1640 1035 1667 +3 2309 369 1444 +3 1963 933 1981 +3 518 1759 1753 +3 1782 1051 863 +3 1783 1782 863 +3 1577 1576 467 +3 1576 1577 2612 +3 1151 2612 1577 +3 1105 864 1106 +3 1104 1105 1106 +3 1027 2448 2449 +3 1274 2211 1664 +3 2211 1274 2212 +3 1793 8 107 +3 1905 1904 1114 +3 2134 2133 287 +3 1000 2133 2134 +3 2173 2174 2138 +3 2175 2173 2138 +3 88 2490 2491 +3 185 446 1836 +3 1171 777 405 +3 285 231 284 +3 1802 1721 1714 +3 116 1970 1972 +3 1970 1962 1972 +3 1903 1912 1109 +3 1801 1800 1798 +3 617 621 615 +3 2685 1001 2137 +3 796 1493 2460 +3 2159 2149 2158 +3 1113 1116 290 +3 2358 1187 1186 +3 1490 2179 1494 +3 8 102 107 +3 1115 1902 1904 +3 1903 1902 1115 +3 1004 2145 2144 +3 1113 472 1582 +3 1110 1905 1906 +3 1901 1900 1117 +3 1899 289 1108 +3 879 1956 762 +3 1904 1913 1115 +3 1414 1413 1915 +3 1005 2151 470 +3 893 2624 2625 +3 680 704 797 +3 2191 2190 2192 +3 672 1655 678 +3 636 672 678 +3 1494 1498 1499 +3 2471 1595 3 +3 2395 838 1119 +3 909 910 1124 +3 909 1124 409 +3 950 409 1124 +3 807 824 174 +3 824 2410 174 +3 2415 2414 780 +3 2415 1124 2414 +3 842 843 2416 +3 2294 2295 2299 +3 1226 182 1225 +3 182 1227 1225 +3 1066 638 719 +3 638 1130 719 +3 2269 2268 688 +3 719 1129 1128 +3 1129 719 1130 +3 360 382 1164 +3 1851 390 1850 +3 430 147 431 +3 1226 181 422 +3 2265 2267 711 +3 2267 2265 1016 +3 1128 656 1016 +3 1128 1129 656 +3 2641 457 191 +3 1133 2 353 +3 458 2587 190 +3 533 2650 2651 +3 481 482 1431 +3 481 388 482 +3 970 2386 2384 +3 2386 918 2384 +3 2090 1840 354 +3 1409 1669 436 +3 1885 1884 13 +3 354 491 1422 +3 345 1728 1729 +3 328 1726 339 +3 1815 192 1813 +3 1814 1815 1813 +3 1824 1821 1657 +3 1388 1123 337 +3 153 365 940 +3 365 1260 940 +3 1766 522 1742 +3 2621 2615 2620 +3 362 2621 2620 +3 895 2620 300 +3 94 802 801 +3 1191 111 1139 +3 630 1773 1772 +3 1705 994 1704 +3 1486 1205 1487 +3 520 1486 1487 +3 712 2270 1589 +3 579 2408 2405 +3 579 2407 2408 +3 111 303 1139 +3 302 303 2617 +3 111 1191 902 +3 1467 2084 142 +3 2085 356 2086 +3 303 305 1140 +3 152 305 303 +3 407 807 808 +3 2410 2412 2409 +3 910 2410 2409 +3 590 1145 1146 +3 589 1146 1145 +3 805 407 2190 +3 1145 590 1083 +3 591 2394 1071 +3 2393 1100 2394 +3 1527 2180 1490 +3 807 407 806 +3 806 407 805 +3 2224 2219 2221 +3 883 882 762 +3 1146 589 809 +3 589 808 809 +3 2094 384 383 +3 142 2094 383 +3 1194 607 1195 +3 2451 1744 520 +3 2649 2648 256 +3 56 2216 1677 +3 468 2132 1581 +3 226 2061 2060 +3 1577 1578 1579 +3 467 1578 1577 +3 313 312 232 +3 312 311 232 +3 1303 1302 230 +3 275 1303 1290 +3 1285 2355 2357 +3 48 371 312 +3 468 1579 1578 +3 2329 2330 161 +3 2333 2329 161 +3 224 1572 1152 +3 320 2015 2013 +3 1160 2015 320 +3 2210 469 2209 +3 1575 1151 1152 +3 1572 1571 1152 +3 1080 1665 1074 +3 2212 1274 1280 +3 1274 227 1280 +3 1580 224 1152 +3 1303 230 1290 +3 1299 1292 2061 +3 1270 1281 1282 +3 1281 1287 1282 +3 1662 1663 1272 +3 1663 1662 1274 +3 640 658 1772 +3 1375 658 640 +3 1272 1268 1624 +3 1271 1622 1623 +3 1153 1628 1285 +3 1284 1620 1621 +3 1284 1270 1282 +3 227 1281 1280 +3 227 1286 1281 +3 1919 1268 1266 +3 2289 2290 2288 +3 2240 2374 2373 +3 2374 2240 2235 +3 1962 2308 1972 +3 365 153 311 +3 2314 365 311 +3 369 2310 2311 +3 469 2210 1116 +3 1900 2246 2167 +3 2166 2246 1899 +3 2246 2166 2167 +3 1358 1359 772 +3 1163 1164 359 +3 360 1164 1163 +3 2155 2156 1006 +3 276 6 278 +3 276 1165 6 +3 442 1428 2668 +3 267 97 273 +3 818 820 819 +3 1427 1429 2668 +3 1429 1427 1426 +3 1002 2176 2142 +3 2108 1054 2107 +3 1868 2207 2206 +3 2118 1043 2690 +3 717 718 1598 +3 654 1168 1601 +3 1596 2472 1597 +3 2400 2399 1088 +3 2400 1089 2399 +3 1492 1563 1501 +3 425 2419 1179 +3 614 425 1179 +3 1193 2298 1196 +3 2298 1193 1194 +3 1178 0 615 +3 0 617 615 +3 1177 616 1172 +3 738 191 455 +3 1246 1250 1241 +3 1173 771 1174 +3 770 912 1178 +3 616 1177 1178 +3 459 191 738 +3 643 1860 642 +3 1860 643 1861 +3 768 1360 885 +3 626 1380 1859 +3 1875 626 1859 +3 1364 772 405 +3 1176 405 772 +3 1362 1176 772 +3 1409 2517 1669 +3 2515 1407 1406 +3 709 1090 1072 +3 1173 1172 771 +3 2418 616 1179 +3 2419 2418 1179 +3 2420 2421 777 +3 776 777 2421 +3 777 776 405 +3 98 271 283 +3 271 2341 283 +3 423 1184 652 +3 38 2033 1327 +3 491 490 1419 +3 1189 651 1188 +3 796 2460 1491 +3 809 1182 423 +3 1146 809 423 +3 1776 660 642 +3 809 1183 1182 +3 809 174 1183 +3 808 174 809 +3 1634 1636 858 +3 1186 651 1185 +3 2359 1186 2361 +3 881 2365 645 +3 644 1862 2339 +3 652 1184 1189 +3 2368 887 2358 +3 651 1186 1187 +3 269 2344 2343 +3 1190 903 897 +3 270 2340 97 +3 2359 2358 1186 +3 2368 2358 2359 +3 1188 2339 604 +3 651 1187 1188 +3 304 903 1190 +3 903 304 751 +3 651 1189 1184 +3 1885 108 1888 +3 1189 659 652 +3 604 659 1189 +3 659 604 660 +3 2381 1024 2383 +3 1539 2512 1556 +3 2512 1532 1556 +3 644 1863 1862 +3 1139 1140 304 +3 1190 1139 304 +3 2520 2564 189 +3 1442 2564 2520 +3 321 902 1191 +3 1191 1139 1190 +3 1193 393 1194 +3 912 0 1178 +3 2601 483 2500 +3 612 553 399 +3 1203 1202 553 +3 526 1203 553 +3 1202 399 553 +3 2160 349 2162 +3 2160 1910 349 +3 574 2405 2406 +3 573 574 2406 +3 802 396 801 +3 1192 393 1193 +3 2420 2419 425 +3 910 620 2411 +3 2561 574 94 +3 1600 716 717 +3 716 1600 2464 +3 1192 1193 610 +3 1193 1196 610 +3 613 2292 2291 +3 613 1147 2292 +3 525 2665 1480 +3 1206 1221 1207 +3 1221 2300 1207 +3 2191 406 2193 +3 83 1679 1295 +3 1293 83 1295 +3 1695 1694 576 +3 1613 576 1960 +3 1485 554 1478 +3 1218 1219 573 +3 1219 94 573 +3 610 1196 1199 +3 170 1684 262 +3 1348 525 1480 +3 1207 399 1206 +3 2692 2693 821 +3 2170 2145 2681 +3 2145 2170 2169 +3 567 1214 1216 +3 1214 567 517 +3 2664 1204 526 +3 1216 1661 1217 +3 1216 521 1661 +3 206 907 154 +3 1209 1210 571 +3 2300 1221 2299 +3 1201 399 1202 +3 1201 1206 399 +3 610 2291 2292 +3 2293 1200 2289 +3 1200 2290 2289 +3 398 1695 580 +3 498 1756 1755 +3 1920 1922 1921 +3 395 572 1127 +3 572 1222 1127 +3 2294 2299 1221 +3 1607 1694 579 +3 517 1215 1214 +3 494 515 1760 +3 2290 1199 2288 +3 241 1214 1215 +3 1205 2664 2665 +3 2664 526 2665 +3 276 2667 1165 +3 516 1753 1754 +3 1740 519 1739 +3 1215 822 241 +3 822 1215 497 +3 1972 2308 932 +3 241 1213 1214 +3 779 1320 1323 +3 56 1756 1757 +3 2556 2558 2553 +3 2556 2559 2558 +3 232 311 981 +3 1754 1753 1759 +3 1761 1752 1762 +3 567 1217 1744 +3 1220 613 570 +3 613 1202 570 +3 1744 2451 1751 +3 571 1218 1211 +3 1196 2298 2296 +3 1211 1220 570 +3 1220 1211 1218 +3 1208 1211 570 +3 418 621 622 +3 1484 418 622 +3 1147 1192 2292 +3 2389 1653 1648 +3 2235 2304 1169 +3 1663 1664 374 +3 1216 1217 567 +3 2301 612 1207 +3 2300 2301 1207 +3 1478 554 1481 +3 1233 722 1234 +3 946 943 1223 +3 183 943 946 +3 36 1229 995 +3 994 36 995 +3 871 1034 1040 +3 1223 1224 946 +3 1223 181 1224 +3 1120 699 1892 +3 737 736 1237 +3 1804 737 1237 +3 353 2 1840 +3 1226 1224 181 +3 1226 1225 1224 +3 1858 766 1351 +3 769 1858 1351 +3 920 1026 1025 +3 2127 1041 1642 +3 1229 36 947 +3 856 922 217 +3 922 1946 217 +3 921 216 1945 +3 1785 946 1227 +3 942 184 944 +3 1993 1997 1998 +3 1997 1993 1975 +3 2659 534 237 +3 1804 2430 2431 +3 1233 1017 732 +3 18 2567 2569 +3 1812 1807 1811 +3 1807 1812 1808 +3 1232 722 1233 +3 1240 1814 736 +3 1247 192 1815 +3 1359 1358 885 +3 1814 1246 1815 +3 1019 1810 1020 +3 456 1806 1239 +3 1810 1239 1809 +3 736 455 1240 +3 734 722 733 +3 2325 2328 2327 +3 2324 2325 2327 +3 1813 192 1808 +3 1251 192 1247 +3 184 532 944 +3 944 532 49 +3 532 1837 49 +3 1234 1236 1017 +3 1807 1806 1805 +3 1240 1246 1814 +3 191 454 455 +3 456 1239 1810 +3 1247 1248 1021 +3 338 2001 2000 +3 110 2014 2015 +3 1585 1586 130 +3 69 1585 130 +3 446 90 334 +3 1810 1809 1020 +3 2547 1394 2546 +3 1261 1263 366 +3 906 1999 2000 +3 1999 906 127 +3 1251 1809 192 +3 454 1250 455 +3 2477 60 2476 +3 1249 1250 454 +3 454 457 1245 +3 1245 438 1244 +3 1803 2430 1236 +3 2430 1803 2431 +3 1240 455 1250 +3 1465 1463 335 +3 2360 2361 760 +3 1270 1284 1621 +3 1858 1857 892 +3 1466 187 352 +3 2499 2179 2180 +3 1250 1819 1241 +3 2257 2256 429 +3 1659 1660 1210 +3 1660 1212 1210 +3 1659 1658 1488 +3 448 1019 1254 +3 1858 1175 1857 +3 1259 1823 1258 +3 1021 1251 1247 +3 452 451 1255 +3 90 446 445 +3 446 186 445 +3 1252 1251 1021 +3 1251 1252 1020 +3 186 447 445 +3 1253 1256 54 +3 1020 1254 1019 +3 1020 1252 1254 +3 1252 1253 1254 +3 1254 1253 1255 +3 1242 1256 1248 +3 1457 2325 1278 +3 2325 1457 368 +3 1249 454 1828 +3 1827 1243 1828 +3 1360 765 1359 +3 1856 765 1360 +3 2689 1427 2668 +3 1428 2689 2668 +3 25 2001 338 +3 1259 1258 1829 +3 1488 1658 243 +3 1658 1209 243 +3 1426 385 1429 +3 1291 2059 2060 +3 2163 2168 2459 +3 2178 2168 2163 +3 2317 2322 2318 +3 140 74 905 +3 74 140 2003 +3 337 25 338 +3 517 567 568 +3 2523 249 2525 +3 1667 1035 1569 +3 1450 1448 368 +3 56 1757 2216 +3 1260 1263 1261 +3 1263 1260 365 +3 373 1260 1261 +3 432 1854 430 +3 1001 2135 2134 +3 350 1458 34 +3 1265 1769 1770 +3 2321 229 2320 +3 229 2319 2320 +3 1275 2336 53 +3 370 2608 2609 +3 1289 2056 2057 +3 1626 1286 227 +3 1307 98 284 +3 374 1275 1268 +3 1272 374 1268 +3 466 465 133 +3 1014 466 308 +3 1015 1014 308 +3 2335 1014 1015 +3 2609 2608 53 +3 2658 2657 2659 +3 548 2659 237 +3 552 534 2652 +3 2056 1289 1288 +3 1155 2056 1288 +3 1156 1284 1283 +3 1284 1282 1283 +3 1266 1275 53 +3 1262 1266 53 +3 1285 1156 2355 +3 311 153 310 +3 2074 17 1683 +3 2068 2069 1297 +3 2343 270 295 +3 1281 1270 1280 +3 2071 2074 2073 +3 374 1272 1663 +3 1624 1625 1272 +3 1624 1271 1625 +3 372 1918 1919 +3 423 1182 1184 +3 713 1592 639 +3 1128 713 639 +3 287 2133 2130 +3 2133 2131 2130 +3 1353 775 1352 +3 368 2326 2325 +3 1977 35 991 +3 369 1293 1312 +3 158 2049 2050 +3 226 2067 1299 +3 825 486 2607 +3 52 160 1447 +3 1298 52 1447 +3 1033 2371 1634 +3 1263 2320 366 +3 2320 1263 2321 +3 2655 2660 530 +3 1264 2317 2318 +3 1770 1264 1771 +3 1264 2318 1771 +3 1149 1300 1302 +3 1300 230 1302 +3 314 313 232 +3 230 1300 1288 +3 2060 2063 226 +3 1770 1771 1265 +3 2485 166 2474 +3 1155 2053 2055 +3 1155 2052 2053 +3 1150 1283 1282 +3 981 311 310 +3 1678 1677 2214 +3 1302 1304 467 +3 1150 1287 1288 +3 288 1329 2070 +3 2326 2328 2325 +3 1329 296 2070 +3 1293 228 1292 +3 83 1293 1292 +3 1576 1302 467 +3 48 1290 1306 +3 2221 1318 2224 +3 1318 2221 2222 +3 1111 1112 290 +3 1572 2250 1571 +3 1574 1301 1149 +3 1009 2160 2159 +3 370 2326 2333 +3 1113 1732 472 +3 1299 2061 226 +3 1273 1286 1626 +3 1572 224 1310 +3 1153 1572 1310 +3 472 1732 1731 +3 162 1445 1444 +3 2610 969 1784 +3 975 969 2610 +3 2063 2060 1294 +3 1308 1307 275 +3 1308 1290 274 +3 274 1290 48 +3 1308 275 1290 +3 2025 91 2026 +3 91 2025 2022 +3 2170 2685 2137 +3 1312 1295 1452 +3 368 1448 2329 +3 2326 368 2329 +3 160 52 159 +3 466 750 308 +3 1938 1940 321 +3 540 552 30 +3 552 2652 30 +3 2338 1188 1187 +3 1006 2152 2155 +3 2055 2056 1155 +3 2056 2055 1291 +3 1283 2352 2355 +3 366 1770 1769 +3 1150 1288 1301 +3 1301 1288 1300 +3 1301 1300 1149 +3 47 279 282 +3 371 48 1306 +3 229 2312 1373 +3 1579 1151 1577 +3 1304 1302 1303 +3 234 313 314 +3 282 272 234 +3 2059 1294 2060 +3 98 1307 1308 +3 1304 275 1305 +3 275 1304 1303 +3 1628 1273 1627 +3 1305 1307 284 +3 1307 1305 275 +3 1294 2065 2064 +3 2064 2072 1296 +3 2072 1731 1296 +3 1007 2157 2155 +3 2352 2357 2355 +3 2576 2575 2091 +3 2354 2353 1150 +3 963 1152 1571 +3 1297 2069 2071 +3 1571 1154 1570 +3 2250 1285 2357 +3 1309 2351 2353 +3 2681 2145 2682 +3 644 2339 2338 +3 1350 774 1349 +3 1350 764 774 +3 908 775 620 +3 909 908 620 +3 608 908 911 +3 584 1618 1619 +3 802 572 395 +3 2412 780 2409 +3 949 2413 812 +3 404 1313 1314 +3 779 778 404 +3 2210 1010 1116 +3 1353 620 775 +3 1113 469 1116 +3 1315 1314 606 +3 1039 1126 2432 +3 1039 2694 1126 +3 2314 2321 365 +3 2321 1263 365 +3 2033 916 212 +3 1961 2598 1693 +3 1316 1315 606 +3 779 2248 2249 +3 1061 1569 868 +3 2223 1665 585 +3 2439 2440 1058 +3 1317 584 2219 +3 2342 283 2341 +3 2344 283 2342 +3 2023 974 2022 +3 974 2023 202 +3 2219 2218 1317 +3 403 2359 2360 +3 2359 2361 2360 +3 2488 2487 839 +3 2338 2339 1188 +3 1787 1790 685 +3 1323 1320 1321 +3 758 1323 1321 +3 1769 2213 1279 +3 2315 1444 1445 +3 915 1324 916 +3 1324 915 215 +3 1700 1698 1699 +3 2164 1899 1108 +3 77 1123 1388 +3 1725 1728 330 +3 1728 1136 330 +3 323 322 1712 +3 295 1329 269 +3 296 1329 295 +3 1035 868 1569 +3 1507 1503 1508 +3 725 1331 1330 +3 1333 1331 725 +3 1331 1333 1332 +3 1332 561 1331 +3 1332 566 561 +3 566 1332 562 +3 1339 1337 723 +3 561 1344 1343 +3 1344 561 1345 +3 449 1332 1333 +3 1332 449 562 +3 2117 2118 2690 +3 1342 1341 724 +3 448 1339 723 +3 952 954 410 +3 505 2216 2217 +3 451 1339 448 +3 1334 1340 724 +3 447 186 710 +3 1338 447 710 +3 1340 748 724 +3 449 1335 1336 +3 1342 724 477 +3 1336 710 563 +3 1337 710 1336 +3 710 1337 1338 +3 743 744 461 +3 460 2585 745 +3 2642 1402 464 +3 1337 1336 1335 +3 1340 725 748 +3 2585 178 745 +3 2584 178 2585 +3 1333 725 1340 +3 1333 1340 1334 +3 385 1338 451 +3 1338 1337 1339 +3 723 1335 1341 +3 723 1341 1342 +3 723 1342 448 +3 738 461 459 +3 738 741 461 +3 448 1342 1019 +3 1343 1344 726 +3 450 1346 1347 +3 1346 524 1347 +3 778 1353 1352 +3 410 2630 781 +3 566 1345 561 +3 1003 2150 2147 +3 494 1760 847 +3 884 885 402 +3 418 1485 612 +3 519 1740 523 +3 566 1346 1345 +3 450 1347 557 +3 558 450 557 +3 460 744 560 +3 773 405 776 +3 1372 882 883 +3 1355 1356 764 +3 1387 1859 641 +3 1859 1380 641 +3 1354 763 1355 +3 1545 1943 513 +3 587 1316 2220 +3 1350 1351 764 +3 1351 1354 764 +3 908 608 775 +3 608 769 1351 +3 1876 1871 755 +3 764 1354 1355 +3 885 1358 1357 +3 889 1356 1355 +3 1356 889 402 +3 1357 1356 402 +3 885 1357 402 +3 1174 769 1173 +3 763 889 1355 +3 771 1362 1363 +3 1174 771 1363 +3 1363 1361 765 +3 1175 1363 765 +3 1175 1174 1363 +3 1359 1361 772 +3 769 1174 1175 +3 2123 876 2122 +3 2123 2124 876 +3 2231 1158 2232 +3 2228 2231 1472 +3 1362 772 1361 +3 1363 1362 1361 +3 778 1352 404 +3 764 1356 1366 +3 706 705 2554 +3 1618 584 1317 +3 1614 605 1611 +3 1701 322 323 +3 1356 1357 1365 +3 2248 1315 2249 +3 764 1366 774 +3 1366 773 774 +3 1319 1665 2223 +3 1366 1356 1365 +3 1364 773 1365 +3 773 1366 1365 +3 1353 2411 620 +3 767 597 1369 +3 1367 767 1369 +3 1371 761 1372 +3 761 882 1372 +3 597 1370 1369 +3 1369 1370 763 +3 1231 721 1230 +3 1370 1371 763 +3 693 1183 692 +3 597 888 1370 +3 1025 1636 217 +3 551 216 921 +3 1371 1372 889 +3 763 1371 889 +3 1942 883 884 +3 1374 625 690 +3 667 1374 690 +3 1374 667 658 +3 1863 627 1864 +3 627 1865 1864 +3 1890 292 293 +3 1375 625 1374 +3 658 1375 1374 +3 2442 2443 1038 +3 2443 2446 1038 +3 977 218 976 +3 1777 218 977 +3 661 1381 1068 +3 648 1380 1383 +3 642 1377 599 +3 1069 1733 1112 +3 626 1383 1380 +3 626 1882 1383 +3 640 1772 1773 +3 641 1379 1378 +3 641 1380 1379 +3 625 1378 661 +3 641 1378 1376 +3 1376 1378 1375 +3 1378 625 1375 +3 1376 1375 640 +3 648 1381 1379 +3 1380 648 1379 +3 1883 1880 1881 +3 1880 647 1881 +3 2579 2578 593 +3 2579 2581 2578 +3 1584 1585 69 +3 1729 33 345 +3 641 1376 1377 +3 1878 1877 1874 +3 1384 1878 649 +3 595 1384 649 +3 595 1382 1384 +3 1381 1382 624 +3 1068 1381 624 +3 598 1786 1787 +3 1386 785 628 +3 1386 598 785 +3 289 1899 2247 +3 1381 661 1379 +3 1859 1387 1875 +3 1381 648 1382 +3 626 1875 1861 +3 1875 1860 1861 +3 635 662 663 +3 1382 648 1384 +3 1634 859 1635 +3 859 1634 2371 +3 2597 697 2596 +3 92 1588 978 +3 1385 624 1382 +3 1387 641 1377 +3 1872 759 878 +3 1637 1640 1667 +3 199 2566 198 +3 126 260 1388 +3 259 1722 1720 +3 2072 472 1731 +3 472 2072 2065 +3 1465 352 75 +3 1466 352 1465 +3 1865 1871 1876 +3 1402 1401 1397 +3 1445 2645 1278 +3 2645 1445 1446 +3 2090 355 1840 +3 1410 1411 1131 +3 906 139 127 +3 835 834 1442 +3 305 152 306 +3 25 999 2002 +3 1406 439 2548 +3 2079 2080 355 +3 382 383 44 +3 1037 2447 1102 +3 1586 1585 127 +3 1779 859 1781 +3 1867 2208 1869 +3 627 1867 1869 +3 917 424 2384 +3 10 1391 2453 +3 1391 1390 2453 +3 380 74 236 +3 1392 1391 439 +3 1394 1406 2548 +3 2626 1640 866 +3 2341 2340 270 +3 2263 2257 2260 +3 147 429 2256 +3 147 430 429 +3 352 1133 351 +3 1162 360 1163 +3 236 383 382 +3 188 440 1392 +3 348 74 375 +3 750 133 749 +3 133 1832 749 +3 2004 999 143 +3 2002 999 2004 +3 1831 2379 440 +3 576 580 1695 +3 2080 2079 2085 +3 1407 1410 1131 +3 438 1397 1398 +3 1397 1396 1398 +3 2209 2140 1010 +3 1775 1776 599 +3 1401 437 1397 +3 1401 1400 437 +3 2642 436 2643 +3 2639 2638 1403 +3 363 364 1832 +3 2453 2454 10 +3 835 2520 1405 +3 1404 2638 2639 +3 355 2089 2079 +3 440 1022 1389 +3 464 1402 1397 +3 442 1430 435 +3 1397 437 1396 +3 2455 1896 1895 +3 1896 2455 700 +3 1775 630 623 +3 2082 2081 144 +3 2346 285 2345 +3 108 1885 1886 +3 1395 1669 1668 +3 597 1870 888 +3 1668 1669 1132 +3 2545 2548 1391 +3 1862 1863 1864 +3 711 2239 2233 +3 2239 711 2267 +3 1671 2696 1670 +3 1868 1867 646 +3 2208 1867 1868 +3 2641 464 457 +3 66 350 196 +3 350 66 1458 +3 132 73 2458 +3 1408 434 188 +3 1428 434 1440 +3 439 1407 1408 +3 2577 44 384 +3 264 265 1471 +3 265 266 1471 +3 1469 2251 2254 +3 1407 439 1406 +3 1416 488 1420 +3 188 1392 1408 +3 1131 434 1408 +3 2518 1409 2519 +3 2150 1005 2147 +3 2576 2085 357 +3 2577 2576 357 +3 2426 2425 433 +3 1926 1565 1566 +3 2562 2563 1411 +3 433 1443 1439 +3 1419 490 1417 +3 2 490 491 +3 1414 488 1416 +3 489 1414 1416 +3 2520 835 1442 +3 2564 2563 2562 +3 2564 1412 2563 +3 412 488 1415 +3 412 508 488 +3 1415 833 412 +3 412 833 832 +3 413 833 1415 +3 488 1414 1415 +3 1416 1417 489 +3 1417 1418 489 +3 443 1424 1134 +3 482 388 483 +3 923 1648 1653 +3 387 1416 1420 +3 2523 2525 252 +3 1441 2517 2518 +3 189 1441 2518 +3 490 1418 1417 +3 482 483 1851 +3 1417 387 1419 +3 1423 1424 1425 +3 1131 2426 1440 +3 1420 508 481 +3 508 1420 488 +3 508 388 481 +3 1416 387 1417 +3 479 1436 478 +3 1915 1413 1916 +3 1420 481 1421 +3 1423 1418 490 +3 387 1422 1419 +3 387 1421 1422 +3 2419 2420 777 +3 1425 386 1423 +3 1424 2 1134 +3 548 79 2659 +3 549 79 548 +3 1855 1360 768 +3 1425 1424 443 +3 1851 483 2417 +3 777 1171 2418 +3 1427 386 1425 +3 1426 1427 1425 +3 1428 442 434 +3 1421 1431 480 +3 1421 481 1431 +3 1426 443 444 +3 518 1753 1741 +3 1317 2218 2220 +3 2218 587 2220 +3 1440 1439 1428 +3 1131 1440 434 +3 1439 1440 433 +3 2691 823 819 +3 2669 1752 1763 +3 936 2671 2673 +3 1762 1752 2669 +3 1421 480 1422 +3 1431 1432 480 +3 1438 354 1437 +3 479 1438 1437 +3 482 1432 1431 +3 616 2508 1172 +3 1171 2508 616 +3 827 826 2185 +3 2605 826 827 +3 391 2505 2187 +3 1435 1436 479 +3 939 1933 2194 +3 2204 1414 489 +3 1530 2187 791 +3 1434 430 431 +3 432 430 1434 +3 1435 431 1436 +3 60 2477 1954 +3 2477 245 1954 +3 1434 1433 148 +3 1424 490 2 +3 254 1841 60 +3 414 834 835 +3 354 1422 480 +3 1437 354 480 +3 479 1437 1433 +3 2082 2091 2083 +3 473 831 813 +3 473 412 831 +3 473 507 412 +3 1277 2316 2309 +3 2117 2690 2116 +3 2690 1043 2116 +3 2090 478 2089 +3 1438 478 2090 +3 1632 886 761 +3 2614 300 2619 +3 490 1424 1423 +3 2563 2426 1411 +3 2426 2563 2425 +3 2425 2563 1412 +3 833 149 832 +3 413 834 833 +3 413 1442 834 +3 834 149 833 +3 1680 171 1681 +3 2340 1165 97 +3 1165 2340 271 +3 1298 1454 52 +3 2214 2215 2281 +3 1445 162 1446 +3 66 196 1652 +3 2310 1373 2312 +3 369 2309 2310 +3 1295 1453 1452 +3 1312 162 1444 +3 1444 369 1312 +3 1851 2417 390 +3 2337 1014 2335 +3 19 1847 1448 +3 2331 161 2330 +3 1447 1448 1450 +3 1447 160 1448 +3 2648 528 256 +3 2675 1765 56 +3 927 34 175 +3 34 1458 175 +3 2311 2312 371 +3 1451 1452 1453 +3 1451 162 1452 +3 1684 1682 155 +3 1685 1684 155 +3 1298 1453 1454 +3 1453 172 1454 +3 2655 2654 529 +3 2252 1470 146 +3 2252 2251 1470 +3 147 2256 2255 +3 1535 1513 509 +3 1470 1469 113 +3 219 2029 2037 +3 2651 2650 535 +3 2334 2337 2335 +3 1446 1449 1457 +3 172 1455 1454 +3 1455 172 1456 +3 1014 2331 466 +3 161 2331 1014 +3 1680 1456 172 +3 1456 1680 1681 +3 1449 1450 1457 +3 2652 535 30 +3 535 536 30 +3 2652 2651 535 +3 533 2649 2650 +3 2649 256 2650 +3 1462 1461 333 +3 1022 54 1259 +3 1462 335 1463 +3 143 1462 1463 +3 2255 2258 2254 +3 2258 1469 2254 +3 26 2007 2008 +3 140 905 906 +3 429 23 2257 +3 1467 1464 75 +3 90 1466 335 +3 233 151 849 +3 445 187 1466 +3 90 445 1466 +3 1022 453 54 +3 1464 1467 2005 +3 1467 141 2005 +3 2085 2079 356 +3 2257 2263 427 +3 2087 114 361 +3 768 885 884 +3 2243 2244 862 +3 2243 877 2244 +3 2271 2272 1591 +3 2611 862 1106 +3 460 560 559 +3 1475 1482 555 +3 1482 1475 556 +3 463 558 1474 +3 556 1474 1476 +3 1348 1480 179 +3 520 1217 1486 +3 2078 2097 114 +3 2629 2628 2583 +3 2630 2629 781 +3 2582 1475 2583 +3 1475 781 2583 +3 1409 2638 1404 +3 2519 1409 1404 +3 2585 463 2584 +3 553 1479 526 +3 1478 1479 553 +3 1478 179 1479 +3 1477 1481 556 +3 1478 1481 1477 +3 2628 463 2583 +3 2628 2584 463 +3 1694 1958 576 +3 576 1958 1959 +3 1219 571 572 +3 2632 417 2633 +3 2630 782 2629 +3 554 1483 1481 +3 2377 2376 844 +3 1754 498 1755 +3 1479 1480 526 +3 179 1480 1479 +3 527 2646 2648 +3 2646 528 2648 +3 533 527 2649 +3 727 746 728 +3 727 560 746 +3 622 1482 1483 +3 1483 1482 1481 +3 2078 2096 2097 +3 450 559 1344 +3 1204 2666 1203 +3 2200 419 1522 +3 294 2007 2006 +3 803 2192 804 +3 392 803 804 +3 268 267 2098 +3 483 388 2500 +3 388 506 2500 +3 1530 485 2187 +3 407 1142 2189 +3 407 1141 1142 +3 144 2081 2080 +3 784 1789 2578 +3 1414 2204 1413 +3 1523 1528 420 +3 789 1489 1491 +3 2633 1405 190 +3 1514 1511 55 +3 1511 1510 55 +3 2171 2681 2686 +3 1515 1510 1511 +3 1505 1510 1515 +3 2180 2179 1490 +3 2616 902 2614 +3 2449 1028 1029 +3 2274 1596 720 +3 1497 789 1491 +3 580 1613 1612 +3 1496 1493 421 +3 302 152 303 +3 2615 2619 2620 +3 2622 300 2613 +3 1161 1118 287 +3 2602 1118 1161 +3 1501 979 1502 +3 1499 1501 1502 +3 433 2425 1443 +3 2006 2007 293 +3 298 297 294 +3 788 1494 1500 +3 2466 1600 2467 +3 1524 1539 1557 +3 1541 1524 1557 +3 1948 252 2525 +3 420 1520 1519 +3 2510 2509 1537 +3 2509 2510 1536 +3 786 1505 1538 +3 701 1023 1894 +3 979 980 1503 +3 2008 2007 294 +3 2466 2465 1600 +3 2013 2006 320 +3 1500 1508 1504 +3 1508 1500 1507 +3 2006 2013 294 +3 1886 1891 108 +3 281 280 47 +3 1691 214 87 +3 1515 1517 1538 +3 1520 786 1518 +3 2595 1897 2594 +3 1531 788 1504 +3 1556 1558 1540 +3 1512 1513 510 +3 1521 1526 787 +3 1094 575 1896 +3 575 1094 1693 +3 1516 1517 1533 +3 1517 1516 1518 +3 1529 790 1528 +3 1591 2273 1592 +3 2273 720 1592 +3 495 1 1525 +3 1515 1506 1517 +3 674 675 634 +3 674 1603 675 +3 510 1506 1512 +3 1891 12 292 +3 292 12 281 +3 1509 1508 55 +3 1512 1511 1514 +3 1512 1506 1511 +3 1514 55 1503 +3 1508 1503 55 +3 795 419 794 +3 421 1513 980 +3 509 1522 419 +3 1526 1527 787 +3 1886 1887 12 +3 420 1521 1520 +3 131 132 134 +3 1513 1512 980 +3 1051 877 2243 +3 1503 980 1514 +3 1509 1504 1508 +3 1505 1504 1509 +3 840 839 2513 +3 1534 1533 510 +3 1506 1515 1511 +3 509 419 511 +3 1536 1534 1532 +3 1534 1536 1533 +3 1560 2535 16 +3 1525 1 1529 +3 495 1525 783 +3 1895 1897 698 +3 2272 2273 1591 +3 320 2012 109 +3 1521 420 1526 +3 1548 1549 513 +3 1538 1505 1515 +3 1159 23 78 +3 2512 2509 1532 +3 2512 1537 2509 +3 1520 1521 786 +3 1168 637 1601 +3 421 1522 1513 +3 1527 1490 787 +3 2203 792 2183 +3 1117 1900 2167 +3 509 1513 1522 +3 1518 786 1538 +3 2534 16 2535 +3 2230 2306 2307 +3 233 549 78 +3 1118 958 2136 +3 1523 1519 1524 +3 2394 2502 840 +3 496 2539 1547 +3 2539 496 1736 +3 491 1419 1422 +3 479 1433 1435 +3 791 2181 1527 +3 793 2201 2200 +3 790 791 1527 +3 501 2526 2527 +3 2538 501 2527 +3 485 2188 2187 +3 1854 151 430 +3 1 1530 1529 +3 1 848 1530 +3 1530 848 485 +3 2012 2006 293 +3 1521 1531 786 +3 787 1490 1531 +3 503 1560 1561 +3 1519 1520 2511 +3 2511 2510 1537 +3 1539 1537 2512 +3 1519 1537 1524 +3 1524 1543 783 +3 1538 1517 1518 +3 2528 2538 2527 +3 1543 2531 783 +3 784 785 1789 +3 1523 420 1519 +3 1534 1535 504 +3 1535 1534 510 +3 1513 1535 510 +3 840 2513 1071 +3 2511 1537 1519 +3 979 1501 1563 +3 280 12 1887 +3 1536 1532 2509 +3 1539 1524 1537 +3 2425 1413 1443 +3 1524 1541 1543 +3 973 210 972 +3 2529 1544 2530 +3 504 1560 1559 +3 46 973 202 +3 513 502 512 +3 1542 2543 2533 +3 1551 1550 496 +3 681 2238 2237 +3 948 1229 1228 +3 1544 512 2530 +3 1758 502 1757 +3 2268 2266 688 +3 2236 2231 2232 +3 1747 2678 1768 +3 569 1747 1768 +3 205 204 59 +3 1546 2537 2539 +3 1736 1546 2539 +3 2536 2526 501 +3 69 129 125 +3 1552 1551 935 +3 2667 276 64 +3 1549 502 513 +3 217 1944 920 +3 1550 1736 496 +3 1676 2283 1675 +3 2584 782 2586 +3 1740 239 523 +3 239 524 523 +3 2119 1042 2115 +3 1061 868 2439 +3 237 552 540 +3 1227 946 1225 +3 873 2107 2106 +3 1777 1778 221 +3 859 1777 221 +3 976 969 2046 +3 969 2047 2046 +3 969 975 2047 +3 1785 1707 183 +3 2236 2232 2233 +3 1047 2121 1048 +3 2113 2109 2116 +3 2109 1045 2116 +3 845 1849 1848 +3 2299 2295 611 +3 2284 2051 51 +3 2284 156 2051 +3 183 946 1785 +3 575 1897 1896 +3 1589 711 3 +3 444 2275 1426 +3 2596 2599 577 +3 1677 2672 56 +3 1118 2602 1117 +3 514 1549 1548 +3 1554 2697 2696 +3 1293 1295 1312 +3 1675 1552 569 +3 1757 502 2217 +3 1749 1552 935 +3 540 542 211 +3 1197 1221 1206 +3 1532 1534 1558 +3 504 1535 1561 +3 1559 1558 504 +3 1540 1558 1559 +3 783 1523 1524 +3 504 1561 1560 +3 1523 783 1525 +3 601 785 784 +3 1523 1525 1528 +3 1525 1529 1528 +3 1557 1540 1562 +3 1559 1562 1540 +3 1559 16 1562 +3 2166 2165 1898 +3 1496 1563 1495 +3 1563 1492 1495 +3 2342 2343 2344 +3 2273 2272 2274 +3 1129 636 2099 +3 1927 1567 937 +3 1567 1928 937 +3 1929 1928 1567 +3 923 1651 1649 +3 1806 456 1017 +3 1153 1285 2250 +3 937 1925 1924 +3 1567 1568 27 +3 866 1637 1638 +3 2522 1564 2524 +3 2568 31 1650 +3 1796 1793 1794 +3 1797 28 1798 +3 1110 1906 1907 +3 1912 1903 1115 +3 2484 42 1799 +3 1568 1567 1566 +3 101 2475 2474 +3 2213 1280 1279 +3 1769 1265 2213 +3 1270 1279 1280 +3 1287 1155 1288 +3 1580 1152 1151 +3 2143 2176 2175 +3 205 58 204 +3 58 2424 204 +3 963 1574 1575 +3 963 1575 1152 +3 2036 2035 965 +3 2035 971 965 +3 2033 2032 916 +3 310 153 306 +3 955 468 1578 +3 231 955 1578 +3 1010 2156 1116 +3 1573 963 1570 +3 963 1571 1570 +3 2176 1002 2141 +3 1576 1149 1302 +3 1149 1576 1574 +3 1575 1574 1576 +3 143 999 1460 +3 1578 1305 231 +3 467 1305 1578 +3 1304 1305 467 +3 1010 2210 2209 +3 1586 127 139 +3 1957 880 1956 +3 500 2535 503 +3 1583 1585 1584 +3 125 1584 69 +3 1584 125 1587 +3 1732 1069 1731 +3 2699 136 378 +3 691 1957 879 +3 2206 1957 691 +3 1964 1982 1980 +3 73 1586 139 +3 73 132 131 +3 2163 2459 2165 +3 2459 1898 2165 +3 130 73 131 +3 130 1586 73 +3 129 69 130 +3 71 129 130 +3 1951 247 1952 +3 2594 1897 575 +3 2593 2594 575 +3 126 1583 1584 +3 216 551 913 +3 317 320 109 +3 141 1468 2003 +3 2459 2168 2177 +3 958 2459 2177 +3 2233 2232 3 +3 686 1089 2400 +3 2399 687 1088 +3 1603 1602 637 +3 674 673 1602 +3 673 674 633 +3 1601 637 1602 +3 469 1581 2209 +3 2469 2470 2471 +3 2305 2469 2471 +3 720 1597 639 +3 718 639 1598 +3 1599 385 451 +3 1593 1592 713 +3 1099 2397 2396 +3 2392 1099 2396 +3 1170 2468 2305 +3 959 1098 1097 +3 1098 2396 1097 +3 960 68 253 +3 719 1128 639 +3 1592 720 639 +3 1100 2393 2392 +3 2393 1099 2392 +3 1430 1599 452 +3 2504 827 2185 +3 2016 298 2014 +3 2019 2017 110 +3 2017 2019 302 +3 2016 2014 110 +3 2616 299 2617 +3 2381 45 2380 +3 152 2019 319 +3 319 2019 110 +3 111 2616 2617 +3 2304 2305 1169 +3 675 1603 637 +3 1590 1591 1592 +3 2132 2209 1581 +3 2206 2208 1868 +3 2206 691 2208 +3 2592 2596 697 +3 1869 2208 691 +3 1391 1392 1390 +3 1604 437 1400 +3 1405 1404 2639 +3 1317 1316 400 +3 1618 1317 400 +3 1142 392 804 +3 708 1609 707 +3 1284 1156 1620 +3 499 935 496 +3 400 1614 1616 +3 1617 400 1616 +3 1615 605 1614 +3 2484 62 167 +3 2559 799 2551 +3 1615 1614 1316 +3 1616 1614 1611 +3 605 609 580 +3 1612 605 580 +3 1610 1611 581 +3 582 2559 2551 +3 2552 2554 2557 +3 582 2552 2557 +3 583 1617 2551 +3 799 583 2551 +3 1615 393 609 +3 609 605 1615 +3 393 1615 606 +3 2423 1033 1032 +3 610 2290 2291 +3 606 1615 1316 +3 400 1617 1618 +3 1622 1624 1269 +3 1617 583 1619 +3 1617 1619 1618 +3 2489 1703 1710 +3 2350 1008 2349 +3 1270 1621 1279 +3 1268 1269 1624 +3 1156 1622 1620 +3 1620 1622 1269 +3 157 476 120 +3 159 157 120 +3 476 121 120 +3 2050 82 158 +3 1286 1287 1281 +3 1628 1627 1271 +3 1848 493 1738 +3 1622 1271 1624 +3 1623 1628 1271 +3 1919 1918 1268 +3 1322 585 757 +3 2049 159 2050 +3 159 52 2050 +3 1455 82 2050 +3 2066 226 2063 +3 1287 2052 1155 +3 1630 1423 386 +3 1443 1629 1439 +3 2073 1297 2071 +3 1628 1623 1285 +3 1439 1630 386 +3 1631 1371 1370 +3 1371 1631 761 +3 2367 2364 756 +3 2367 754 2364 +3 1632 888 1633 +3 888 1632 1631 +3 1632 761 1631 +3 2363 2359 403 +3 886 881 761 +3 2359 2363 2368 +3 1635 1636 1634 +3 1636 1635 856 +3 1782 1780 860 +3 1634 858 1033 +3 2611 1106 864 +3 1026 858 1025 +3 1636 856 217 +3 1364 1358 772 +3 858 1636 1025 +3 1645 2124 2123 +3 2125 1645 2123 +3 1638 1637 1036 +3 1041 1643 1642 +3 1643 1040 1642 +3 955 231 2128 +3 46 547 973 +3 1643 1047 1031 +3 1813 1238 1814 +3 2111 1639 867 +3 869 1046 1053 +3 1639 1638 1036 +3 2244 1056 2245 +3 1056 2244 873 +3 1092 2436 699 +3 1690 1689 154 +3 871 1643 1031 +3 2123 2122 1041 +3 2125 2123 1041 +3 1119 1120 1892 +3 1034 871 1029 +3 1042 1638 1639 +3 871 1040 1643 +3 1802 261 1721 +3 1638 1644 866 +3 1638 1042 1644 +3 2277 943 944 +3 943 942 944 +3 200 4 1647 +3 1641 1646 1642 +3 1967 116 1972 +3 516 1742 2627 +3 659 660 603 +3 2589 689 2591 +3 1839 90 333 +3 1655 657 678 +3 1697 196 322 +3 2493 2492 342 +3 386 1427 2689 +3 2568 1650 9 +3 199 198 200 +3 2285 199 200 +3 119 118 122 +3 249 938 85 +3 249 1925 938 +3 1948 1947 252 +3 678 657 679 +3 2572 194 2573 +3 1957 1956 879 +3 175 1651 923 +3 924 175 923 +3 1654 1652 1650 +3 32 1984 1983 +3 32 1985 1984 +3 1583 1666 1999 +3 1564 2523 2524 +3 1651 1654 1649 +3 1829 1258 1830 +3 1258 1826 1830 +3 1966 1972 932 +3 1816 1246 1241 +3 1872 878 645 +3 676 629 1656 +3 676 664 629 +3 676 1656 1655 +3 672 676 1655 +3 600 1065 1066 +3 1656 629 704 +3 1820 1248 1818 +3 1661 1488 1486 +3 1488 1205 1486 +3 1217 1661 1486 +3 521 1659 1661 +3 1740 1739 518 +3 935 1750 1749 +3 1664 1311 374 +3 1625 1662 1272 +3 1625 227 1662 +3 1626 227 1625 +3 1274 1662 227 +3 1664 1663 1274 +3 1056 873 2105 +3 1319 1082 1665 +3 1093 700 1092 +3 1666 337 338 +3 1666 1388 337 +3 126 1388 1666 +3 126 1666 1583 +3 1674 1673 505 +3 1293 369 2311 +3 1406 1668 1132 +3 1668 1406 1394 +3 1551 1670 1555 +3 1550 1551 1555 +3 1956 890 762 +3 880 890 1956 +3 1394 2548 2545 +3 949 812 1180 +3 1785 947 1707 +3 2218 2224 1318 +3 2224 2218 2219 +3 1647 201 2389 +3 1758 1756 498 +3 1552 1671 1670 +3 378 377 2699 +3 2663 243 2662 +3 1679 172 1453 +3 1295 1679 1453 +3 823 2076 819 +3 2424 7 204 +3 2658 2659 79 +3 2408 2407 2406 +3 2405 2408 2406 +3 830 2500 487 +3 830 2601 2500 +3 1211 1208 1209 +3 846 2661 849 +3 2654 528 529 +3 2283 1553 1672 +3 1675 2283 1672 +3 2215 1553 2281 +3 2283 2282 1553 +3 2229 2372 2242 +3 156 2049 2051 +3 2049 158 2051 +3 171 83 223 +3 171 1679 83 +3 242 819 2076 +3 818 819 242 +3 172 1679 1680 +3 82 1455 1456 +3 1700 994 993 +3 1689 1687 154 +3 1681 171 1682 +3 1687 64 154 +3 171 1680 1679 +3 1445 1278 2323 +3 698 2595 705 +3 82 170 169 +3 271 98 272 +3 17 268 1683 +3 820 818 475 +3 155 1688 1685 +3 2383 1024 2024 +3 2382 2381 2383 +3 1685 262 1684 +3 262 1685 1686 +3 1687 1686 263 +3 1687 24 1686 +3 64 1687 263 +3 24 262 1686 +3 2024 7 2383 +3 2382 2383 7 +3 208 2032 2033 +3 38 208 2033 +3 265 1689 1691 +3 1689 265 24 +3 265 1691 87 +3 2570 2569 9 +3 1690 213 214 +3 1689 1690 1691 +3 1726 1727 339 +3 1682 1692 1681 +3 1692 1682 1684 +3 1684 170 1692 +3 1094 695 1693 +3 2600 1605 1606 +3 1605 1607 579 +3 573 1148 1220 +3 573 2406 1148 +3 991 1985 1991 +3 1959 1607 696 +3 1959 1958 1607 +3 1607 1608 696 +3 1547 2528 500 +3 2119 1645 1042 +3 2121 2120 1044 +3 1987 1973 1986 +3 260 258 1720 +3 817 242 841 +3 1697 1698 37 +3 322 1698 1697 +3 324 1326 327 +3 1326 324 1702 +3 1704 1699 324 +3 1701 1699 322 +3 1712 322 99 +3 2179 2499 1489 +3 789 2179 1489 +3 2489 2490 2498 +3 2490 2489 344 +3 324 1706 1705 +3 1711 325 339 +3 93 914 915 +3 259 340 1722 +3 1711 323 1712 +3 36 1706 1707 +3 1698 1700 37 +3 37 1700 993 +3 38 343 214 +3 324 327 1706 +3 1701 323 1703 +3 1123 336 331 +3 2498 2490 2494 +3 1709 1324 215 +3 1038 2446 872 +3 212 1326 1327 +3 36 994 1705 +3 339 1713 1710 +3 344 1713 1714 +3 1709 1325 1324 +3 2671 2675 2673 +3 2675 2671 1748 +3 1705 1706 36 +3 1067 1386 628 +3 1385 689 1786 +3 1840 2 491 +3 1838 334 1839 +3 354 1840 491 +3 36 1707 947 +3 1709 327 1325 +3 1069 225 1731 +3 1707 1706 327 +3 1708 1707 327 +3 1709 1708 327 +3 913 215 915 +3 215 1708 1709 +3 2091 144 2576 +3 1710 1711 339 +3 325 1711 1712 +3 99 325 1712 +3 326 325 99 +3 1722 336 77 +3 1702 324 2495 +3 2494 88 2496 +3 2495 2494 2496 +3 1718 342 2492 +3 341 1718 2492 +3 1719 258 65 +3 259 1717 1716 +3 341 1716 1717 +3 1717 65 1718 +3 1718 341 1717 +3 2373 2372 2240 +3 326 99 350 +3 77 260 1720 +3 259 1720 1719 +3 340 1721 1722 +3 1721 1723 1722 +3 346 329 345 +3 1726 328 1725 +3 330 1138 1459 +3 1724 330 1459 +3 1138 89 1459 +3 1460 1459 89 +3 1461 1460 89 +3 1138 1137 89 +3 1721 261 1723 +3 945 329 181 +3 945 1137 329 +3 1818 1817 1241 +3 1818 1248 1817 +3 1969 1979 1978 +3 1979 1968 1978 +3 1967 1972 1966 +3 261 1727 1726 +3 261 1726 1725 +3 945 332 1137 +3 33 1730 326 +3 1730 325 326 +3 1730 33 1729 +3 328 1730 1729 +3 1582 472 2065 +3 1069 1070 225 +3 469 1113 1582 +3 40 103 104 +3 1112 291 1069 +3 4 928 1734 +3 1733 1069 1732 +3 1581 469 1582 +3 4 1734 201 +3 924 1653 201 +3 1734 924 201 +3 129 70 125 +3 928 4 929 +3 926 1735 925 +3 121 70 129 +3 1745 568 567 +3 546 92 964 +3 514 1737 1550 +3 1555 514 1550 +3 1737 514 1548 +3 1744 1745 567 +3 2583 781 2629 +3 2587 178 2632 +3 241 2693 1127 +3 493 518 1738 +3 1320 587 2218 +3 1346 566 524 +3 1741 1740 518 +3 1740 1741 239 +3 163 1843 19 +3 1742 522 1743 +3 1678 2672 1677 +3 527 238 523 +3 1754 515 498 +3 1205 1488 2663 +3 568 1745 1746 +3 2676 1678 2278 +3 1755 1756 1766 +3 2677 2674 2676 +3 1768 2677 2676 +3 568 2679 2680 +3 607 393 606 +3 499 497 1215 +3 935 499 1750 +3 1320 2218 1318 +3 2582 2583 463 +3 1744 1751 1745 +3 1474 2582 463 +3 1487 1205 2665 +3 1743 2451 520 +3 520 1767 1743 +3 381 382 360 +3 1208 2662 243 +3 1742 1743 1767 +3 1754 1755 516 +3 1757 2217 2216 +3 2278 2279 1676 +3 502 1758 495 +3 1549 2217 502 +3 498 495 1758 +3 499 517 1750 +3 518 493 1759 +3 1673 1674 2698 +3 1759 1760 515 +3 1759 493 1760 +3 2451 1743 2450 +3 2451 2450 1751 +3 2663 1488 243 +3 312 2313 2314 +3 2215 1677 2216 +3 1748 1763 1764 +3 1761 1762 1746 +3 1745 1761 1746 +3 1766 1742 516 +3 1755 1766 516 +3 1763 1752 1764 +3 56 1765 1756 +3 523 238 519 +3 522 1765 1764 +3 1764 1765 1748 +3 2677 2678 936 +3 1756 1765 1766 +3 522 1766 1765 +3 312 371 2313 +3 2211 2212 1265 +3 1265 1771 2211 +3 1267 1262 366 +3 371 2312 2313 +3 658 602 1772 +3 658 682 602 +3 2361 1185 760 +3 2536 1545 2526 +3 1772 602 630 +3 602 631 630 +3 630 1774 1773 +3 640 1773 1774 +3 640 1774 599 +3 1377 640 599 +3 685 959 1089 +3 1792 959 685 +3 1376 640 1377 +3 603 1776 1775 +3 1122 1792 653 +3 1777 859 1779 +3 705 2597 2555 +3 649 756 2590 +3 649 1874 754 +3 696 1608 2592 +3 977 1588 1778 +3 1778 1588 543 +3 104 2284 51 +3 217 920 1025 +3 218 1779 1780 +3 1784 969 976 +3 1051 1052 1050 +3 471 2131 2139 +3 1227 947 1785 +3 2238 1472 2237 +3 1477 556 1476 +3 1079 1791 684 +3 42 8 1793 +3 1077 95 1078 +3 686 1788 685 +3 1787 685 1788 +3 94 574 573 +3 631 602 694 +3 2581 631 694 +3 631 2581 2579 +3 661 1378 1379 +3 598 1789 785 +3 959 1792 1122 +3 1904 1901 1114 +3 1795 80 1568 +3 1928 938 1925 +3 80 57 40 +3 1795 57 80 +3 1799 1797 1800 +3 1799 62 2484 +3 1713 1802 1714 +3 1794 1795 28 +3 1795 1568 28 +3 291 1112 1906 +3 1795 1794 57 +3 1800 62 1799 +3 42 1796 1797 +3 1796 28 1797 +3 1796 1794 28 +3 1393 2546 1399 +3 2547 2546 1393 +3 1727 1713 339 +3 1713 1727 1802 +3 1837 1838 49 +3 1564 1924 1925 +3 57 107 40 +3 42 1797 1799 +3 100 2486 2485 +3 8 2486 100 +3 2475 100 2485 +3 102 29 103 +3 1800 1801 43 +3 78 202 1024 +3 2277 49 945 +3 2276 2277 945 +3 943 2277 2276 +3 1806 1017 1236 +3 1805 1806 1236 +3 532 1836 1837 +3 735 455 736 +3 1807 1808 1239 +3 456 1810 1019 +3 1812 1238 1813 +3 1812 1811 1238 +3 1809 1251 1020 +3 1226 422 982 +3 2428 1237 2427 +3 1237 1811 2427 +3 1804 1237 2428 +3 2428 2427 1805 +3 1817 1816 1241 +3 1815 1816 1247 +3 1242 1823 1256 +3 1812 1813 1808 +3 1811 1237 736 +3 1238 1811 736 +3 736 1814 1238 +3 1242 1248 1820 +3 78 549 202 +3 1969 1971 929 +3 346 422 181 +3 2088 2095 361 +3 2095 2087 361 +3 1817 1248 1247 +3 1819 1818 1241 +3 1819 1657 1818 +3 1250 1249 1819 +3 1249 1657 1819 +3 1815 1246 1816 +3 1256 1823 54 +3 1242 1821 1822 +3 1821 1242 1820 +3 1823 1242 1822 +3 332 333 1461 +3 1136 1137 1138 +3 329 1137 1136 +3 1249 1828 1257 +3 1828 1243 1257 +3 1825 1822 1821 +3 1824 1825 1821 +3 1820 1657 1821 +3 1257 1825 1824 +3 1243 1826 1257 +3 1826 1825 1257 +3 1249 1257 1824 +3 766 1858 892 +3 25 2002 2001 +3 1245 1828 454 +3 1245 1827 1828 +3 892 1856 1855 +3 435 1430 452 +3 348 139 905 +3 2000 2001 140 +3 1826 1258 1825 +3 317 1160 320 +3 1464 2004 143 +3 440 1389 1831 +3 45 2382 1884 +3 1832 364 749 +3 133 1833 1832 +3 1833 363 1832 +3 134 363 1833 +3 197 1992 1998 +3 1666 338 1999 +3 2432 2433 1039 +3 1125 874 2432 +3 874 2433 2432 +3 957 2602 1161 +3 2566 2565 1835 +3 1834 193 35 +3 1976 197 1997 +3 1989 1973 1988 +3 213 1690 907 +3 536 2655 530 +3 854 222 853 +3 1836 446 334 +3 945 49 1838 +3 332 945 1838 +3 334 1838 1837 +3 1839 332 1838 +3 333 332 1839 +3 334 90 1839 +3 1844 1846 19 +3 101 2474 2473 +3 529 2660 2655 +3 1003 2153 2152 +3 164 71 165 +3 121 71 164 +3 119 70 121 +3 121 129 71 +3 476 20 119 +3 134 1833 1845 +3 1833 465 1845 +3 465 1833 133 +3 19 1843 1844 +3 177 528 2646 +3 528 177 564 +3 160 19 1448 +3 134 132 363 +3 1457 1450 368 +3 1738 845 1848 +3 847 492 848 +3 1852 240 846 +3 240 1852 845 +3 1850 845 1852 +3 1849 1850 390 +3 1851 1853 432 +3 1851 1850 1853 +3 86 1934 2194 +3 86 1936 1934 +3 148 482 1851 +3 494 847 848 +3 492 485 848 +3 2573 2571 2572 +3 1852 1853 1850 +3 1853 1854 432 +3 790 1530 791 +3 846 1854 1853 +3 846 151 1854 +3 846 849 151 +3 1134 187 443 +3 880 891 890 +3 890 891 768 +3 891 1855 768 +3 766 892 1368 +3 891 892 1855 +3 1368 892 891 +3 1175 765 1857 +3 1857 765 1856 +3 1245 1244 1827 +3 1858 769 1175 +3 1457 2645 1446 +3 190 2641 458 +3 1878 647 1877 +3 1882 647 1878 +3 1387 1377 642 +3 2366 760 588 +3 2283 1676 2282 +3 646 627 1863 +3 627 646 1867 +3 755 1874 1877 +3 668 663 664 +3 2209 471 2140 +3 646 888 1870 +3 1873 1872 645 +3 627 1869 1866 +3 1870 1868 646 +3 471 2139 2140 +3 2211 1311 1664 +3 761 881 882 +3 881 878 879 +3 882 881 879 +3 759 1866 1869 +3 931 1967 1966 +3 1023 2502 2501 +3 1865 1866 1871 +3 1866 759 1871 +3 627 1866 1865 +3 811 812 408 +3 1185 1184 693 +3 1872 1871 759 +3 1968 116 1967 +3 1668 2547 1395 +3 1872 1873 755 +3 1862 1883 1861 +3 1865 1876 1879 +3 1876 1877 1879 +3 1880 1879 647 +3 1879 1877 647 +3 1383 1882 1384 +3 1865 1879 1880 +3 1864 1865 1880 +3 1882 1878 1384 +3 592 662 1068 +3 1880 1883 1864 +3 1881 1882 626 +3 1881 626 1861 +3 1862 1861 643 +3 112 45 1884 +3 1881 647 1882 +3 2546 1394 2545 +3 1862 1864 1883 +3 1885 13 1886 +3 1886 13 1887 +3 1916 2425 1412 +3 1442 1916 1412 +3 108 1890 1889 +3 1891 292 1890 +3 108 1891 1890 +3 1889 1888 108 +3 2196 2195 1934 +3 2227 1061 2437 +3 1496 980 979 +3 1893 1892 699 +3 1893 1894 1892 +3 2595 698 1897 +3 2437 2225 2227 +3 1328 288 956 +3 956 288 957 +3 2458 139 2457 +3 2171 2686 2174 +3 1594 2274 2272 +3 700 1094 1896 +3 1895 1896 1897 +3 2501 2502 1119 +3 1059 2445 1125 +3 1893 1895 1894 +3 1895 701 1894 +3 1169 2305 2471 +3 632 675 637 +3 698 701 1895 +3 447 2275 444 +3 1904 1902 1901 +3 1161 956 957 +3 1117 1898 1118 +3 1898 958 1118 +3 1114 1901 1117 +3 1112 1111 1907 +3 291 1905 1114 +3 2135 1001 2172 +3 2146 1002 2142 +3 1009 2148 1008 +3 1110 1913 1905 +3 2170 2137 2169 +3 1108 289 1903 +3 1902 1903 289 +3 2093 358 357 +3 358 2577 357 +3 1111 349 1908 +3 1108 1903 1109 +3 1911 1914 1909 +3 1914 1911 1908 +3 1905 291 1906 +3 2175 2176 2603 +3 1913 1110 1911 +3 1913 1911 1912 +3 1905 1913 1904 +3 1914 1908 349 +3 42 15 8 +3 1908 1110 1907 +3 1109 1909 1910 +3 2486 15 2483 +3 1909 349 1910 +3 166 2483 2482 +3 2486 2483 166 +3 8 15 2486 +3 1912 1115 1913 +3 387 1420 1421 +3 413 1415 1915 +3 1414 1915 1415 +3 1620 1269 1917 +3 1621 1620 1917 +3 1198 1196 2295 +3 1198 1199 1196 +3 1918 1269 1268 +3 372 1621 1918 +3 1621 372 1279 +3 1621 1917 1918 +3 1917 1269 1918 +3 2482 2479 2478 +3 1279 372 1267 +3 347 63 2481 +3 1920 347 2481 +3 31 199 2285 +3 2391 31 2285 +3 2521 1564 2522 +3 62 1800 43 +3 678 2099 636 +3 1926 937 1924 +3 1926 1923 1565 +3 1926 1924 1923 +3 1565 43 1801 +3 2565 2566 18 +3 1565 1923 1922 +3 1924 1564 1923 +3 1565 1922 43 +3 1929 938 1928 +3 1931 1930 939 +3 1930 1931 1929 +3 1927 937 1926 +3 1566 1927 1926 +3 1801 1566 1565 +3 1798 1566 1801 +3 2196 85 2195 +3 939 2195 1931 +3 2194 2195 939 +3 2573 194 992 +3 18 1834 2565 +3 1834 18 2570 +3 169 1935 1933 +3 1932 169 1933 +3 419 2200 2201 +3 682 677 602 +3 1940 901 321 +3 1191 1190 321 +3 1190 1938 321 +3 80 81 1930 +3 80 1930 27 +3 1930 1929 27 +3 1931 938 1929 +3 2196 128 962 +3 85 938 1931 +3 1937 65 257 +3 2622 2623 300 +3 894 2623 2622 +3 1937 257 128 +3 1930 1932 939 +3 1930 81 1932 +3 962 85 2196 +3 1933 939 1932 +3 2182 792 2203 +3 169 81 168 +3 81 169 1932 +3 264 1471 86 +3 1471 1936 86 +3 169 170 1935 +3 1937 128 1936 +3 196 1696 1652 +3 1718 65 1937 +3 266 1718 1937 +3 87 1718 266 +3 266 1937 1936 +3 793 2199 2198 +3 796 2198 2199 +3 1941 1372 883 +3 585 1322 2222 +3 2219 584 1319 +3 1542 2533 2534 +3 1321 1320 1318 +3 1941 889 1372 +3 2536 2540 1943 +3 884 402 1942 +3 889 1941 402 +3 1941 1942 402 +3 2247 2544 289 +3 2544 2247 1900 +3 217 1946 1944 +3 1103 2387 5 +3 1945 1946 921 +3 1734 1735 924 +3 2388 1212 1660 +3 2388 1213 1222 +3 1212 2388 1222 +3 521 2388 1660 +3 2388 521 1213 +3 960 250 251 +3 961 904 960 +3 347 1947 1949 +3 246 347 1950 +3 63 347 246 +3 347 1949 1950 +3 1950 1949 41 +3 1950 1952 246 +3 1588 92 544 +3 1955 514 1555 +3 1954 1953 60 +3 246 1953 1954 +3 1953 247 60 +3 122 70 119 +3 247 1953 1952 +3 514 1955 1674 +3 2697 1554 2698 +3 1982 1966 932 +3 1360 1359 885 +3 1968 1967 931 +3 242 817 818 +3 1775 1774 630 +3 2287 2288 1199 +3 2556 2553 1606 +3 1965 1982 1983 +3 874 2434 2433 +3 920 2387 1103 +3 1037 2442 2440 +3 195 1976 1997 +3 1834 1976 195 +3 1997 197 1998 +3 1975 115 195 +3 35 1976 1834 +3 1993 1994 1975 +3 1994 1993 1974 +3 198 1996 200 +3 1965 931 1966 +3 1983 1982 1964 +3 1992 1987 1974 +3 1992 1988 1987 +3 96 984 983 +3 96 989 985 +3 1078 659 603 +3 930 1968 931 +3 1970 929 934 +3 1969 116 1979 +3 116 1968 1979 +3 1990 197 1977 +3 1647 2285 200 +3 1647 2391 2285 +3 1989 1988 1990 +3 61 990 991 +3 1991 1985 32 +3 201 1653 2389 +3 1667 2227 1060 +3 1947 1920 1921 +3 1993 1998 1992 +3 1990 1988 197 +3 1039 2434 1038 +3 1997 1975 195 +3 1978 1971 1969 +3 1971 1978 930 +3 1978 1968 930 +3 1472 1473 683 +3 2228 1472 683 +3 930 925 1971 +3 1963 1980 932 +3 1980 1982 932 +3 1984 1965 1983 +3 1984 985 1965 +3 2447 2441 1028 +3 2110 2109 2113 +3 1962 933 1963 +3 985 989 1965 +3 2445 874 1125 +3 1107 2245 872 +3 2446 1107 872 +3 1989 1991 32 +3 1964 1981 1973 +3 1981 1986 1973 +3 1981 933 1986 +3 2436 1893 699 +3 1895 1893 2455 +3 2385 917 2384 +3 991 990 1985 +3 1964 1989 32 +3 32 1983 1964 +3 1989 1964 1973 +3 990 61 998 +3 1986 933 1974 +3 1995 115 1994 +3 197 1988 1992 +3 865 1107 2446 +3 1991 1989 1990 +3 933 1994 1974 +3 1036 1060 1059 +3 1036 1059 867 +3 1637 1060 1036 +3 1570 1154 2351 +3 1042 1639 2115 +3 4 200 1996 +3 934 1996 1995 +3 1995 1996 115 +3 286 2683 2684 +3 875 2110 2113 +3 198 115 1996 +3 929 1996 934 +3 4 1996 929 +3 2258 2262 1469 +3 427 2262 2258 +3 2259 1469 2262 +3 26 1889 2007 +3 1889 293 2007 +3 2257 23 2260 +3 788 1500 1504 +3 113 2009 297 +3 2009 26 2008 +3 26 2010 1889 +3 1889 2010 1888 +3 2010 112 1888 +3 2011 112 2010 +3 426 112 2011 +3 112 426 45 +3 113 1469 2259 +3 2259 2011 113 +3 306 152 319 +3 2018 22 298 +3 298 294 2014 +3 2017 2018 2016 +3 2018 298 2016 +3 2017 2016 110 +3 342 214 343 +3 972 91 974 +3 2034 91 972 +3 204 203 2020 +3 476 157 20 +3 59 207 213 +3 207 59 2020 +3 22 1470 297 +3 1470 113 297 +3 152 302 2019 +3 2031 209 2027 +3 209 2031 2035 +3 2032 2028 916 +3 202 2023 1024 +3 203 2023 2022 +3 2024 2023 203 +3 1024 2023 2024 +3 2381 2380 1159 +3 2020 59 204 +3 2024 203 204 +3 7 2024 204 +3 24 1687 1689 +3 2029 2028 209 +3 213 2030 38 +3 546 210 545 +3 2030 208 38 +3 219 919 2029 +3 2027 2028 2032 +3 207 2026 2030 +3 2025 2026 207 +3 219 2040 967 +3 2027 2032 208 +3 2026 2027 208 +3 202 973 974 +3 157 156 20 +3 156 157 2049 +3 203 2021 2020 +3 2034 2031 91 +3 1310 1273 1153 +3 209 2035 2036 +3 2036 2037 2029 +3 2037 2036 965 +3 2036 2029 209 +3 546 964 2038 +3 965 546 2038 +3 965 2038 2037 +3 966 2039 964 +3 966 2040 2039 +3 2040 219 2039 +3 967 2042 968 +3 2021 207 2020 +3 205 59 206 +3 2044 92 978 +3 2046 220 976 +3 964 92 2044 +3 966 2043 2041 +3 11 58 205 +3 2044 978 220 +3 977 978 1588 +3 220 2043 2044 +3 966 2044 2043 +3 2611 2243 862 +3 2034 2048 2031 +3 2035 2048 971 +3 2031 2048 2035 +3 1310 224 2054 +3 1286 2052 1287 +3 2051 158 51 +3 2052 1286 1273 +3 2053 2052 1273 +3 1273 1310 2053 +3 1310 2054 2053 +3 1289 230 1288 +3 1290 2058 1306 +3 2057 228 2058 +3 1289 2057 2058 +3 2062 2061 1292 +3 2073 2074 223 +3 2059 1291 2055 +3 2054 2059 2055 +3 2057 2062 228 +3 1291 2061 2062 +3 2060 2061 1291 +3 1290 1289 2058 +3 230 1289 1290 +3 2055 2053 2054 +3 2054 1294 2059 +3 2072 2064 2065 +3 231 1305 284 +3 1291 2062 2057 +3 2073 2067 1297 +3 2067 2073 1299 +3 84 51 168 +3 226 2066 2067 +3 1294 2064 2063 +3 225 1070 2070 +3 1296 2068 2066 +3 2068 2067 2066 +3 2068 1297 2067 +3 1153 1273 1628 +3 1296 225 2068 +3 1296 1731 225 +3 2054 224 2065 +3 2054 2065 1294 +3 224 1582 2065 +3 1070 288 2070 +3 1329 288 1328 +3 2066 2064 1296 +3 296 2069 2070 +3 296 2071 2069 +3 2075 1683 171 +3 223 1299 2073 +3 82 169 168 +3 2074 1683 2075 +3 1682 171 1683 +3 171 223 2075 +3 2607 486 2606 +3 825 2607 823 +3 394 825 823 +3 823 2607 2076 +3 484 842 830 +3 1436 2097 478 +3 2097 2096 478 +3 2092 2088 361 +3 2084 2083 142 +3 784 2578 2581 +3 2436 2455 1893 +3 2436 700 2455 +3 301 358 893 +3 2625 301 893 +3 2462 1170 2304 +3 1840 2081 353 +3 1840 355 2081 +3 351 2083 2084 +3 353 2081 2082 +3 1477 1476 179 +3 2575 2576 384 +3 2082 2083 351 +3 2269 688 2264 +3 356 2078 2087 +3 1468 1467 142 +3 147 2255 428 +3 352 351 2084 +3 356 2087 2086 +3 2078 114 2087 +3 895 145 362 +3 2096 2079 2089 +3 155 2098 1688 +3 2098 267 1688 +3 299 2616 2618 +3 2098 155 1683 +3 2091 2082 144 +3 384 44 383 +3 2613 901 2622 +3 410 618 952 +3 2092 362 2088 +3 362 145 2088 +3 114 798 361 +3 241 822 2693 +3 2092 2253 146 +3 623 603 1775 +3 2614 902 2613 +3 300 2614 2613 +3 1497 1498 789 +3 2089 478 2096 +3 1683 268 2098 +3 267 268 97 +3 1129 2099 2100 +3 2099 678 2100 +3 656 1129 2100 +3 2101 1473 681 +3 2102 2101 681 +3 688 2266 2265 +3 2100 678 679 +3 2101 2100 679 +3 2232 2234 3 +3 1158 2234 2232 +3 711 2233 3 +3 656 2101 2102 +3 656 2100 2101 +3 1590 1592 1593 +3 1016 713 1128 +3 982 986 2103 +3 96 2103 986 +3 182 982 983 +3 2106 2105 873 +3 1057 867 1126 +3 292 109 2012 +3 1055 867 2104 +3 864 2610 2611 +3 2164 2165 2166 +3 286 1008 2143 +3 1056 2105 2104 +3 875 1639 2111 +3 2107 873 1046 +3 2115 1639 875 +3 869 1044 1045 +3 2109 1054 2108 +3 1107 862 2245 +3 2111 867 1055 +3 2118 2120 876 +3 2117 1045 1044 +3 2124 2118 876 +3 2124 2119 2118 +3 2125 1644 1645 +3 2119 1043 2118 +3 2228 2242 2231 +3 2242 1158 2231 +3 1041 2122 1643 +3 2122 1047 1643 +3 1198 2287 1199 +3 1201 1200 2293 +3 1198 2286 2287 +3 1311 2211 1771 +3 1646 1644 2127 +3 1644 1646 866 +3 2128 285 956 +3 285 1328 956 +3 2130 955 2129 +3 2129 955 2128 +3 956 2129 2128 +3 2171 1001 2685 +3 1847 19 1846 +3 2169 2137 2177 +3 2684 1910 286 +3 2215 2216 505 +3 2130 2131 955 +3 955 2132 468 +3 955 2131 2132 +3 2131 471 2132 +3 2623 895 300 +3 891 880 767 +3 2135 1002 1000 +3 2134 2135 1000 +3 2151 1006 2154 +3 963 1573 1574 +3 1005 1002 2146 +3 2137 1001 2136 +3 2133 2139 2131 +3 708 1091 2487 +3 708 1092 1091 +3 2130 2129 287 +3 2136 2134 287 +3 2144 2169 2178 +3 2147 1005 2146 +3 2179 789 1494 +3 2349 2348 2147 +3 1109 2684 1004 +3 2504 828 2604 +3 827 2504 2604 +3 1006 1010 2154 +3 2157 2156 2155 +3 2160 2162 2161 +3 2162 1111 2157 +3 2475 2485 2474 +3 2149 2161 2153 +3 2149 2160 2161 +3 2473 2474 244 +3 1309 2356 1573 +3 2354 1150 1301 +3 2474 166 244 +3 290 1116 2156 +3 2358 2369 1187 +3 1010 1006 2156 +3 290 2157 1111 +3 2157 290 2156 +3 1623 1156 1285 +3 1951 1952 1950 +3 1622 1156 1623 +3 2159 2158 2148 +3 1009 2159 2148 +3 1007 2153 2161 +3 2162 1007 2161 +3 8 100 102 +3 1009 1910 2160 +3 2247 2246 1900 +3 2247 1899 2246 +3 2164 2166 1899 +3 840 2502 1023 +3 295 269 2343 +3 1108 2144 2163 +3 2143 2142 2176 +3 1108 2163 2164 +3 2132 471 2209 +3 352 2084 75 +3 2682 2683 2138 +3 1108 1109 1004 +3 2144 1108 1004 +3 2163 2165 2164 +3 1329 1328 269 +3 2167 2166 1898 +3 1798 1800 1797 +3 2566 1835 198 +3 2181 2180 1527 +3 2171 2174 2172 +3 97 268 270 +3 18 2566 2567 +3 1328 285 2346 +3 958 2177 2137 +3 1489 796 1491 +3 2508 1176 771 +3 2181 2182 150 +3 792 2507 2183 +3 2506 2507 792 +3 2202 2203 2183 +3 1434 431 1435 +3 1434 1435 1433 +3 2192 803 406 +3 2508 1171 1176 +3 2604 2605 827 +3 148 1851 432 +3 2186 792 2182 +3 2182 2203 150 +3 2183 2184 793 +3 2198 2183 793 +3 1172 2508 771 +3 392 1142 586 +3 2401 2403 593 +3 2504 2506 2505 +3 2504 2185 2506 +3 1442 413 1916 +3 148 432 1434 +3 2506 792 2505 +3 391 2188 484 +3 825 826 486 +3 2188 485 492 +3 484 2188 492 +3 843 484 492 +3 2190 2191 805 +3 814 805 2191 +3 2192 406 2191 +3 2189 804 2190 +3 2190 407 2189 +3 2191 2193 814 +3 804 2189 1142 +3 794 2201 2184 +3 265 87 266 +3 2194 1933 86 +3 1493 796 2199 +3 2573 992 35 +3 193 2573 35 +3 2194 1934 2195 +3 1489 2197 796 +3 118 119 20 +3 2203 2202 150 +3 150 2180 2181 +3 1789 2401 593 +3 2504 391 828 +3 2501 1892 2503 +3 2186 2182 2181 +3 794 419 2201 +3 2198 2202 2183 +3 2204 1443 1413 +3 489 1443 2204 +3 2169 2177 2205 +3 2178 2169 2205 +3 2168 2205 2177 +3 2178 2205 2168 +3 2104 2105 1055 +3 2106 1055 2105 +3 271 6 1165 +3 284 98 2345 +3 2344 2346 2345 +3 2346 2344 269 +3 2147 2348 2347 +3 1003 2147 2347 +3 2460 1495 1491 +3 283 2344 2345 +3 2112 1055 2106 +3 1265 2212 2213 +3 2212 1280 2213 +3 569 1552 1749 +3 2282 2281 1553 +3 2282 2280 2281 +3 1676 2280 2282 +3 1553 2215 1673 +3 2215 505 1673 +3 530 2660 532 +3 2660 1836 532 +3 1942 1941 883 +3 2219 1319 2221 +3 404 2248 779 +3 701 2488 839 +3 2222 1321 1318 +3 1322 1321 2222 +3 758 1321 1322 +3 1060 2225 1059 +3 2441 1037 2440 +3 2441 2447 1037 +3 2434 874 2435 +3 2226 874 2445 +3 2444 2226 2445 +3 2437 1061 2438 +3 2307 715 2235 +3 2227 1569 1061 +3 2227 1667 1569 +3 715 2304 2235 +3 2308 1963 932 +3 2271 712 2272 +3 2233 2237 2236 +3 681 2239 2102 +3 2239 2237 2233 +3 381 360 1162 +3 1473 2238 681 +3 716 1157 683 +3 681 2237 2239 +3 1473 1472 2238 +3 1151 1575 2612 +3 1575 1576 2612 +3 2268 1590 1593 +3 2264 1589 2269 +3 2229 1157 2241 +3 2228 1157 2229 +3 683 1157 2228 +3 2228 2229 2242 +3 1960 576 1959 +3 1961 1960 1959 +3 2596 1608 2599 +3 1693 695 1961 +3 695 1960 1961 +3 695 1094 1093 +3 497 511 822 +3 2240 2241 2230 +3 2241 1157 2230 +3 2372 2373 2242 +3 2373 1158 2242 +3 2249 1320 779 +3 2249 587 1320 +3 2353 2352 1283 +3 2353 2351 2352 +3 1283 2355 1156 +3 1572 1153 2250 +3 1490 1494 788 +3 798 2252 2253 +3 798 428 2252 +3 146 2253 2252 +3 2253 2092 361 +3 798 2253 361 +3 2376 493 2378 +3 2011 2259 426 +3 2263 2259 2262 +3 2263 426 2259 +3 1469 1470 2251 +3 2260 23 2261 +3 426 2260 2261 +3 428 2255 2254 +3 427 2256 2257 +3 427 2263 2262 +3 2260 426 2263 +3 1465 75 1464 +3 45 426 2261 +3 2381 2382 45 +3 1024 2381 1159 +3 867 1059 1125 +3 2266 713 1016 +3 1593 713 2266 +3 2271 1591 1590 +3 2267 2102 2239 +3 2268 1593 2266 +3 1547 2538 2528 +3 510 1533 1506 +3 1170 2305 2304 +3 385 1426 2275 +3 1951 1950 41 +3 2688 1951 41 +3 2308 1962 1963 +3 2466 2467 714 +3 2469 2466 714 +3 2376 1760 493 +3 847 1760 2376 +3 2252 428 2375 +3 623 630 2580 +3 2273 2274 720 +3 1594 1596 2274 +3 385 447 1338 +3 385 2275 447 +3 2380 2261 1159 +3 2261 2380 45 +3 136 381 378 +3 136 380 381 +3 1804 2428 2429 +3 2430 1804 2429 +3 1223 943 2276 +3 2430 2429 1236 +3 136 375 380 +3 569 2278 1676 +3 2277 944 49 +3 503 1561 511 +3 511 497 503 +3 2144 2145 2169 +3 2286 1197 2287 +3 569 1768 2278 +3 286 2143 2683 +3 528 2654 256 +3 2675 56 2672 +3 2279 2280 1676 +3 2279 2214 2280 +3 2650 2653 535 +3 445 444 187 +3 1635 859 221 +3 156 2284 105 +3 51 84 104 +3 2532 2530 1541 +3 2284 104 105 +3 2396 2397 1097 +3 1920 43 1922 +3 2566 199 2567 +3 2677 936 2674 +3 1763 2671 2670 +3 2670 2669 1763 +3 2286 1221 1197 +3 2286 2294 1221 +3 1206 2289 1197 +3 2289 2288 1197 +3 612 399 1207 +3 2289 1206 2293 +3 2670 2671 936 +3 1746 2670 936 +3 2470 1594 1595 +3 2294 1198 2295 +3 614 612 2301 +3 614 418 612 +3 2298 2297 2296 +3 425 2297 2298 +3 2296 2295 1196 +3 774 776 2422 +3 776 774 773 +3 425 614 2297 +3 1194 425 2298 +3 425 1194 1195 +3 2297 614 2301 +3 2301 2300 611 +3 2299 611 2300 +3 2297 2301 611 +3 2296 2297 611 +3 715 2306 2461 +3 2462 715 2461 +3 2302 2464 2463 +3 2302 716 2464 +3 2302 2463 2462 +3 2461 2302 2462 +3 715 2462 2304 +3 714 2470 2469 +3 716 2302 2303 +3 716 2303 1157 +3 2306 2230 1157 +3 2303 2306 1157 +3 1306 2311 371 +3 2058 228 1306 +3 228 2311 1306 +3 1293 2311 228 +3 314 315 235 +3 2312 229 2313 +3 2309 1444 2315 +3 311 312 2314 +3 1277 2309 2315 +3 314 232 315 +3 2323 2315 1445 +3 2324 1278 2325 +3 2316 2317 1373 +3 1277 2317 2316 +3 2320 1770 366 +3 2320 1264 1770 +3 2323 2322 1277 +3 1277 2315 2323 +3 1771 2318 1311 +3 2321 2314 229 +3 2313 229 2314 +3 2317 1277 2322 +3 309 1260 373 +3 2334 309 373 +3 2331 465 466 +3 465 2331 1847 +3 2320 2319 1264 +3 2322 367 2318 +3 1448 2330 2329 +3 2322 2324 367 +3 2323 2324 2322 +3 1276 2327 2328 +3 162 1449 1446 +3 2330 1847 2331 +3 2323 1278 2324 +3 2324 2327 367 +3 2326 2329 2333 +3 19 160 163 +3 163 160 159 +3 1447 1450 1449 +3 2334 2333 2337 +3 309 2334 2335 +3 367 2332 1311 +3 2318 367 1311 +3 2332 367 2327 +3 2327 1276 2332 +3 1449 162 1451 +3 1447 1449 1451 +3 1452 162 1312 +3 1276 2609 53 +3 2339 643 604 +3 643 2339 1862 +3 374 2332 2336 +3 374 1311 2332 +3 370 2333 2334 +3 309 2335 1015 +3 374 2336 1275 +3 2333 161 2337 +3 79 2661 2658 +3 1874 649 1878 +3 1633 887 2368 +3 2341 271 2340 +3 98 283 2345 +3 270 2343 2342 +3 2347 2148 2158 +3 1003 2347 2158 +3 2345 285 284 +3 1008 2348 2349 +3 2348 1008 2148 +3 2348 2148 2347 +3 2142 1008 2350 +3 2350 2146 2142 +3 1150 2353 1283 +3 1301 1574 2356 +3 1301 2356 2354 +3 2354 2356 1309 +3 1574 1573 2356 +3 1006 2151 2152 +3 1309 1570 2351 +3 1573 1570 1309 +3 1154 2352 2351 +3 2353 2354 1309 +3 1154 2357 2352 +3 2357 1154 2250 +3 2369 2338 1187 +3 2368 2363 1633 +3 2363 886 1633 +3 2364 403 756 +3 2366 588 1323 +3 1633 886 1632 +3 758 2362 2366 +3 2362 2360 2366 +3 758 1322 2362 +3 649 2367 756 +3 649 754 2367 +3 1186 1185 2361 +3 2360 2362 403 +3 757 756 2362 +3 756 403 2362 +3 757 585 1080 +3 1322 757 2362 +3 2366 1323 758 +3 1863 2370 646 +3 2365 881 886 +3 2360 760 2366 +3 887 2369 2358 +3 2369 2370 2338 +3 2369 887 2370 +3 2370 644 2338 +3 1863 644 2370 +3 1873 2365 754 +3 887 646 2370 +3 645 2365 1873 +3 859 2371 1781 +3 2240 2372 2241 +3 428 2254 2375 +3 2375 2251 2252 +3 2377 844 492 +3 844 843 492 +3 847 2377 492 +3 2416 2417 842 +3 483 842 2417 +3 2378 1849 844 +3 2376 2378 844 +3 1127 2692 395 +3 2692 2691 395 +3 847 2376 2377 +3 1848 1849 2378 +3 493 1848 2378 +3 390 2417 2416 +3 1392 440 2379 +3 2382 7 13 +3 1884 2382 13 +3 2491 341 2492 +3 424 970 2384 +3 993 61 992 +3 918 2385 2384 +3 2387 920 1944 +3 2387 1944 918 +3 2386 2387 918 +3 2386 5 2387 +3 970 5 2386 +3 975 5 970 +3 1100 1119 2502 +3 1921 252 1947 +3 2390 2391 1647 +3 2390 31 2391 +3 2389 2390 1647 +3 249 85 251 +3 904 68 960 +3 1023 2503 1894 +3 840 1071 2394 +3 2467 717 1597 +3 2395 1098 838 +3 1098 1121 838 +3 1097 2397 2398 +3 687 2398 2397 +3 2392 1098 2395 +3 2392 2396 1098 +3 2398 1089 1097 +3 2404 2579 593 +3 2403 2404 593 +3 623 2580 2404 +3 687 2399 2398 +3 2399 1089 2398 +3 1789 686 2401 +3 1219 572 94 +3 2404 1087 1086 +3 796 2197 2198 +3 2303 2461 2306 +3 2405 1605 579 +3 1124 910 2409 +3 949 1180 415 +3 2410 910 2411 +3 1054 2110 2112 +3 949 415 950 +3 2415 949 950 +3 517 499 1215 +3 1605 1608 1607 +3 574 1605 2405 +3 1606 1605 574 +3 1695 2407 579 +3 2411 174 2410 +3 807 408 824 +3 2465 2687 1170 +3 2463 2465 1170 +3 1170 2687 2468 +3 2687 2466 2468 +3 1749 1747 569 +3 949 2415 780 +3 806 408 807 +3 812 2413 408 +3 1353 692 2411 +3 692 1353 778 +3 2412 2410 824 +3 2413 2412 824 +3 2412 2413 780 +3 2692 821 2691 +3 2414 1124 2409 +3 844 390 2416 +3 1849 390 844 +3 2416 843 844 +3 1313 2422 607 +3 2635 417 2634 +3 954 2635 2634 +3 782 2637 2631 +3 2637 2634 2631 +3 2634 2637 2630 +3 607 2422 1195 +3 1781 2371 2423 +3 1032 860 2423 +3 1195 2421 2420 +3 860 1781 2423 +3 1781 860 1780 +3 2422 2421 1195 +3 2422 776 2421 +3 2371 1033 2423 +3 2534 2533 16 +3 7 2424 13 +3 13 2424 1887 +3 2427 1807 1805 +3 1923 1564 2521 +3 251 85 962 +3 2521 1922 1923 +3 2427 1811 1807 +3 2429 2428 1805 +3 1234 1803 1236 +3 945 181 1223 +3 2429 1805 1236 +3 2431 1235 737 +3 2571 2570 9 +3 2431 737 1804 +3 1125 2432 1126 +3 2695 2245 1056 +3 2694 2695 1057 +3 874 2226 2435 +3 2438 1061 2439 +3 865 2446 2443 +3 2433 2434 1039 +3 1102 861 1103 +3 2440 2439 868 +3 2441 868 1034 +3 2440 868 2441 +3 1028 2441 1034 +3 1102 2443 1037 +3 2443 1102 865 +3 2225 1060 2227 +3 2444 2225 2437 +3 2438 2444 2437 +3 2438 2226 2444 +3 872 1039 1038 +3 2225 2444 1059 +3 861 2447 2448 +3 2447 861 1102 +3 861 2448 1027 +3 1743 1842 2450 +3 2663 2664 1205 +3 1746 2678 2679 +3 2452 1842 1752 +3 2452 2450 1842 +3 1761 2452 1752 +3 1761 1751 2452 +3 1751 2450 2452 +3 1164 382 44 +3 1939 301 896 +3 898 301 1939 +3 359 301 898 +3 1938 1939 896 +3 1646 2626 866 +3 375 376 348 +3 376 2456 348 +3 165 131 134 +3 376 135 2456 +3 135 2457 2456 +3 2457 348 2456 +3 139 348 2457 +3 73 139 2458 +3 74 348 905 +3 269 1328 2346 +3 2477 2476 244 +3 2302 2461 2303 +3 717 2467 1600 +3 250 253 2688 +3 838 1120 1119 +3 250 2688 41 +3 41 1948 250 +3 1600 2465 2464 +3 2465 2463 2464 +3 960 253 250 +3 2466 2469 2468 +3 2468 2469 2305 +3 2472 1596 714 +3 720 1596 1597 +3 1596 1594 2470 +3 1169 2471 3 +3 716 680 717 +3 2467 2472 714 +3 1841 101 2473 +3 29 100 2475 +3 100 29 102 +3 344 2489 1713 +3 255 2475 101 +3 255 29 2475 +3 60 1841 2476 +3 244 2478 2477 +3 2478 245 2477 +3 244 2476 2473 +3 2476 1841 2473 +3 167 2482 2483 +3 167 2479 2482 +3 67 254 247 +3 2481 63 2480 +3 2479 245 2478 +3 167 62 2480 +3 167 2480 2479 +3 2480 63 2479 +3 254 255 101 +3 67 255 254 +3 2482 2478 244 +3 166 2482 244 +3 2481 62 43 +3 1920 2481 43 +3 1648 31 2390 +3 62 2481 2480 +3 2483 2484 167 +3 2484 2483 15 +3 15 42 2484 +3 2487 1091 709 +3 839 2487 709 +3 2499 2180 150 +3 584 1619 1144 +3 2488 701 578 +3 2490 344 1715 +3 1703 323 1710 +3 2495 2496 1702 +3 2493 2496 88 +3 2496 2493 2497 +3 1703 2489 2498 +3 340 1715 1714 +3 88 2492 2493 +3 342 343 2493 +3 2494 1703 2498 +3 2494 2495 1703 +3 1702 2496 2497 +3 1326 212 1325 +3 431 147 798 +3 1699 1701 324 +3 1326 1702 2497 +3 2497 1327 1326 +3 1327 2497 343 +3 343 2497 2493 +3 431 798 114 +3 431 114 1436 +3 1436 114 2097 +3 2500 506 487 +3 1433 1432 148 +3 2184 2507 2185 +3 1100 2502 2394 +3 242 2607 2606 +3 841 242 2606 +3 2507 2184 2183 +3 2185 794 2184 +3 2186 2505 792 +3 2193 406 815 +3 1891 1886 12 +3 1518 1516 2511 +3 2511 1516 2510 +3 2510 1516 1536 +3 1516 1533 1536 +3 2511 1520 1518 +3 2513 839 709 +3 2515 1406 1132 +3 2515 2516 1410 +3 1441 1410 2516 +3 1441 1411 1410 +3 2518 2517 1409 +3 2515 1132 2516 +3 1669 2517 1132 +3 2516 1132 2517 +3 1407 2515 1410 +3 1441 2516 2517 +3 307 305 306 +3 2520 1404 1405 +3 2426 433 1440 +3 2520 2519 1404 +3 2525 250 1948 +3 2522 1922 2521 +3 2523 1564 1925 +3 250 249 251 +3 2525 249 250 +3 2523 1925 249 +3 1921 2524 252 +3 2524 2523 252 +3 547 545 973 +3 2542 1557 1562 +3 1560 503 2535 +3 2527 2529 1542 +3 971 546 965 +3 1541 2530 1543 +3 2527 1542 2528 +3 2537 2538 2539 +3 2538 1547 2539 +3 79 549 233 +3 849 79 233 +3 2530 512 2531 +3 2534 2528 1542 +3 2534 2535 2528 +3 512 495 2531 +3 2528 2535 500 +3 2541 1562 2533 +3 2537 2536 501 +3 2537 2540 2536 +3 1901 2544 1900 +3 2532 1541 2541 +3 1545 512 1544 +3 1545 1544 2526 +3 2538 2537 501 +3 2537 1546 2540 +3 1546 1943 2540 +3 1546 1548 1943 +3 1737 1548 1546 +3 1542 2532 2543 +3 2544 1902 289 +3 2541 2542 1562 +3 1541 2542 2541 +3 2542 1541 1557 +3 2545 1391 10 +3 2546 2545 10 +3 1399 2546 10 +3 10 2454 1399 +3 439 1391 2548 +3 582 2551 2550 +3 1610 1609 2549 +3 1616 1610 2549 +3 582 2550 2552 +3 605 1612 1611 +3 2550 1617 1616 +3 705 706 578 +3 397 2559 2556 +3 2560 2556 1606 +3 2554 2552 706 +3 2555 2553 2554 +3 2552 2549 706 +3 2552 2550 2549 +3 1616 2549 2550 +3 2554 705 2555 +3 2560 1606 574 +3 2553 2555 577 +3 397 800 799 +3 2558 2559 582 +3 2558 582 2557 +3 397 2556 2560 +3 2557 2554 2553 +3 2558 2557 2553 +3 397 799 2559 +3 1148 398 1147 +3 1192 1147 609 +3 2561 94 801 +3 842 483 2601 +3 2564 1442 1412 +3 214 1691 1690 +3 2568 2569 2567 +3 2094 2575 384 +3 199 31 2568 +3 199 2568 2567 +3 2570 18 2569 +3 1835 2574 195 +3 2572 2571 9 +3 1652 1696 2572 +3 1696 194 2572 +3 2570 193 1834 +3 1652 2572 9 +3 992 991 35 +3 2571 2573 193 +3 2570 2571 193 +3 1696 1697 194 +3 2574 1834 195 +3 2085 2086 357 +3 2576 2577 384 +3 144 2085 2576 +3 358 44 2577 +3 359 44 358 +3 601 784 632 +3 2580 2579 2404 +3 2580 631 2579 +3 2580 630 631 +3 1495 1497 1491 +3 782 2628 2629 +3 782 2584 2628 +3 556 2582 1474 +3 1475 2582 556 +3 2632 2631 417 +3 1403 464 2640 +3 2631 2586 782 +3 463 2585 558 +3 558 2585 559 +3 555 781 1475 +3 1803 1234 2588 +3 2588 1234 722 +3 722 1235 2588 +3 1803 1235 2431 +3 1803 2588 1235 +3 2589 684 1790 +3 684 1791 1790 +3 689 1787 1786 +3 689 1385 2591 +3 1382 595 2591 +3 2555 2597 577 +3 1188 604 1189 +3 650 2590 756 +3 509 1561 1535 +3 794 826 795 +3 1561 509 511 +3 396 800 801 +3 1961 1959 696 +3 2593 575 2598 +3 1608 2596 2592 +3 1961 696 2598 +3 575 1693 2598 +3 2685 2681 2171 +3 1606 2553 2600 +3 2600 2553 577 +3 577 2599 2600 +3 397 2561 801 +3 397 2560 2561 +3 1605 2600 2599 +3 2599 1608 1605 +3 1613 580 576 +3 1117 2602 1114 +3 2681 2685 2170 +3 1906 1112 1907 +3 1114 2602 957 +3 2607 242 2076 +3 829 2605 2604 +3 2334 373 2608 +3 370 2334 2608 +3 53 2608 1262 +3 366 1262 1261 +3 1262 373 1261 +3 373 1262 2608 +3 864 975 2610 +3 1051 2611 863 +3 1051 2243 2611 +3 902 901 2613 +3 902 321 901 +3 146 2621 362 +3 2616 111 902 +3 2615 2618 2619 +3 893 145 2624 +3 2615 299 2618 +3 2615 22 299 +3 362 2620 895 +3 2615 2621 22 +3 2617 303 111 +3 2624 895 2623 +3 2623 894 2624 +3 1470 22 2621 +3 358 145 893 +3 2625 2624 894 +3 896 2625 894 +3 301 2625 896 +3 2627 1742 1741 +3 1753 2627 1741 +3 2627 1753 516 +3 434 442 435 +3 2638 1409 436 +3 518 1739 1738 +3 524 1348 1347 +3 2640 464 2641 +3 2635 836 2636 +3 1768 2676 2278 +3 954 2630 410 +3 2632 2586 2631 +3 416 954 952 +3 2630 2637 782 +3 2633 414 1405 +3 414 835 1405 +3 1763 1748 2671 +3 2636 2633 417 +3 2635 2636 417 +3 489 1418 1629 +3 836 414 2636 +3 190 1405 2640 +3 2640 1405 2639 +3 1401 2644 1400 +3 1400 2644 1395 +3 1401 2643 2644 +3 2643 1401 1402 +3 2643 436 2644 +3 1669 1395 2644 +3 750 752 308 +3 14 305 307 +3 1014 2337 161 +3 307 306 153 +3 536 2654 2655 +3 2657 2656 534 +3 238 2656 2657 +3 2660 185 1836 +3 529 185 2660 +3 2658 519 238 +3 2658 238 2657 +3 97 2667 273 +3 2667 97 1165 +3 2666 570 1203 +3 1204 2662 2666 +3 936 2673 2674 +3 2678 1746 936 +3 2674 2672 1678 +3 1750 568 2680 +3 1747 2680 2679 +3 2466 2687 2465 +3 2145 2683 2682 +3 1004 2683 2145 +3 2683 1004 2684 +3 2684 1109 1910 +3 2174 2686 2682 +3 2681 2682 2686 +3 386 2689 1439 +3 2691 821 823 +3 822 821 2693 +3 1671 1554 2696 +3 1039 872 2694 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_horizontal_hole.off similarity index 100% rename from Polygon_mesh_processing/test/Polygon_mesh_processing/data/w.off rename to Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_horizontal_hole.off diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_orthogonal_hole.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_orthogonal_hole.off new file mode 100644 index 00000000000..e96ace9a51a --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/w_orthogonal_hole.off @@ -0,0 +1,156 @@ +OFF +54 100 0 +519 0 100 +734 -817 0 +734 -817 100 +775 -636 0 +775 -636 100 +944 0 0 +944 0 100 +1131 0 0 +1131 0 100 +1463 -1062 0 +1463 -1062 100 +1288 -1062 0 +1288 -1062 100 +1106 -448 0 +1106 -448 100 +1045 -243 0 +1045 -243 100 +992 -446 0 +992 -446 100 +833 -1062 0 +833 -1062 100 +648 -1062 0 +648 -1062 100 +479 -440 0 +479 -440 100 +468 -400 0 +468 -400 100 +459 -366 0 +459 -366 100 +451 -334 0 +451 -334 100 +445 -307 0 +445 -307 100 +439 -284 0 +439 -284 100 +434 -263 0 +434 -263 100 +430 -247 0 +430 -247 100 +426 -234 0 +426 -234 100 +424 -225 0 +424 -225 100 +424 -221 0 +424 -221 100 +361 -449 0 +361 -449 100 +192 -1062 0 +192 -1062 100 +6 -1062 0 +6 -1062 100 +331 0 0 +331 0 100 +519 0 0 +3 2 1 0 +3 53 0 1 +3 4 3 2 +3 1 2 3 +3 6 5 4 +3 3 4 5 +3 8 7 6 +3 5 6 7 +3 12 11 10 +3 9 10 11 +3 16 15 14 +3 13 14 15 +3 18 17 16 +3 15 16 17 +3 20 19 18 +3 17 18 19 +3 22 21 20 +3 19 20 21 +3 24 23 22 +3 21 22 23 +3 26 25 24 +3 23 24 25 +3 28 27 26 +3 25 26 27 +3 30 29 28 +3 27 28 29 +3 32 31 30 +3 29 30 31 +3 34 33 32 +3 31 32 33 +3 36 35 34 +3 33 34 35 +3 38 37 36 +3 35 36 37 +3 40 39 38 +3 37 38 39 +3 42 41 40 +3 39 40 41 +3 44 43 42 +3 41 42 43 +3 46 45 44 +3 43 44 45 +3 48 47 46 +3 45 46 47 +3 50 49 48 +3 47 48 49 +3 52 51 50 +3 49 50 51 +3 0 53 52 +3 51 52 53 +3 50 48 46 +3 36 34 0 +3 52 44 0 +3 52 50 46 +3 38 36 0 +3 52 46 44 +3 44 42 40 +3 44 40 38 +3 44 38 0 +3 24 2 0 +3 26 24 0 +3 28 26 0 +3 30 28 0 +3 18 4 20 +3 32 30 0 +3 2 22 20 +3 14 10 8 +3 12 10 14 +3 14 8 16 +3 16 8 6 +3 24 22 2 +3 4 2 20 +3 16 6 18 +3 18 6 4 +3 34 32 0 +3 21 23 1 +3 11 13 9 +3 19 21 1 +3 17 5 15 +3 13 7 9 +3 5 7 15 +3 15 7 13 +3 3 5 17 +3 3 17 19 +3 1 3 19 +3 37 53 35 +3 35 53 33 +3 39 41 43 +3 39 43 37 +3 51 53 43 +3 43 53 37 +3 49 51 45 +3 49 45 47 +3 51 43 45 +3 33 53 31 +3 31 53 29 +3 29 53 27 +3 27 53 25 +3 25 53 23 +3 23 53 1 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index eab4b75e39d..51fb0945478 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include #include #include @@ -32,8 +32,9 @@ void detect_borders( Halfedge_around_facet_circulator done(hf_around_facet); do { - const bool insertion_ok = border_map.insert(*hf_around_facet).second; - assert(insertion_ok); + const bool is_insertion_ok = + border_map.insert(*hf_around_facet).second; + assert(is_insertion_ok); } while (++hf_around_facet != done); } } @@ -42,32 +43,41 @@ void detect_borders( // This test is inspired by the issue: https://github.com/CGAL/cgal/issues/4464. template< typename PolygonMesh, -typename GT> +typename GeomTraits> void test_triangulate_hole_with_cdt_2( const std::string kernel_name, - int argc, char **argv, const bool save) { + int argc, char **argv, + const std::string file_name, + const std::size_t num_borders, + const std::size_t num_patch_faces, + const bool verbose) { typedef typename boost::graph_traits::face_descriptor Face_handle; typedef typename boost::graph_traits::halfedge_descriptor Halfedge_handle; // Reading the file. - std::cout << "test with the " << kernel_name << " kernel:" << std::endl; + if (verbose) + std::cout << "test with the " << kernel_name << " kernel:" << std::endl; PolygonMesh pmesh; - std::string path = "data/w.off"; + std::string path = "data/" + file_name + ".off"; std::ifstream in(path.c_str(), std::ios_base::in); CGAL::set_ascii_mode(in); CGAL::read_off(in, pmesh); in.close(); - std::cout << "* finished reading the file" << std::endl; + if (verbose) + std::cout << "* finished reading the file" << std::endl; // Detecting the hole borders. std::vector borders; detect_borders(pmesh, borders); - assert(borders.size() == 2); + if (verbose) + std::cout << "* number of detected borders: " << + borders.size() << std::endl; + assert(borders.size() == num_borders); // Triangulating the holes. std::vector patch_faces; - for (Halfedge_handle h : borders) { + for (const Halfedge_handle h : borders) { patch_faces.clear(); CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( pmesh, @@ -75,19 +85,20 @@ void test_triangulate_hole_with_cdt_2( std::back_inserter(patch_faces), CGAL::Polygon_mesh_processing::parameters::vertex_point_map( get(CGAL::vertex_point, pmesh)). - geom_traits(GT())); + geom_traits(GeomTraits())); - assert(patch_faces.size() == 25); - std::cout << "* number of faces in the constructed patch: " << - patch_faces.size() << std::endl; + if (verbose) + std::cout << "* number of faces in the constructed patch: " << + patch_faces.size() << std::endl; + assert(patch_faces.size() == num_patch_faces); } assert(pmesh.is_valid() && is_closed(pmesh)); // Writing the file. - if (save) { + if (verbose) { path = ""; if (argc > 1) path = std::string(argv[1]); - path += "w-4464.off"; + path += "4464_" + file_name + ".off"; std::ofstream out(path.c_str(), std::ios_base::out); CGAL::set_ascii_mode(out); CGAL::write_off(out, pmesh); @@ -104,8 +115,37 @@ int main(int argc, char **argv) { typedef CGAL::Surface_mesh Surface_mesh_EI; typedef CGAL::Polyhedron_3 Polyhedron_3_EE; + // Checking on a data file with two planar, simple, and horizontal holes. test_triangulate_hole_with_cdt_2( - "exact_inexact", argc, argv, false); + "exact_inexact", argc, argv, "w_horizontal_hole", 2, 25, false); test_triangulate_hole_with_cdt_2( - "exact_exact", argc, argv, true); + "exact_exact", argc, argv, "w_horizontal_hole", 2, 25, false); + std::cout << + "test_triangulate_hole_with_cdt_2: horizontal hole SUCCESS" << std::endl; + + // Checking on a data file with two planar, simple, and orthogonal holes. + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, "w_orthogonal_hole", 2, 1, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, "w_orthogonal_hole", 2, 1, false); + std::cout << + "test_triangulate_hole_with_cdt_2: orthogonal hole SUCCESS" << std::endl; + + // Checking on a data file with one simple but not a planar hole. + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, "elephant_simple_hole", 1, 19, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, "elephant_simple_hole", 1, 19, false); + std::cout << + "test_triangulate_hole_with_cdt_2: simple hole SUCCESS" << std::endl; + + // Checking on a data file with one hole that is neither simple nor planar. + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, "elephant_nonsimple_hole", 1, 29, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, "elephant_nonsimple_hole", 1, 29, false); + std::cout << + "test_triangulate_hole_with_cdt_2: non simple hole SUCCESS" << std::endl; + + return EXIT_SUCCESS; } From 78b0715e1f74672540e51858b5fdc7a08bd6b59f Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 9 Jun 2020 10:31:56 +0200 Subject: [PATCH 035/317] unwanted comment removed --- .../test/Polygon_mesh_processing/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 0a8a9bc5b09..a39a1c71e32 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -118,14 +118,14 @@ if(OpenMesh_FOUND) target_link_libraries( remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES} ) endif() -# find_package(Ceres QUIET) -# if(TARGET ceres) -# target_compile_definitions( test_mesh_smoothing PRIVATE CGAL_PMP_USE_CERES_SOLVER ) -# target_link_libraries( test_mesh_smoothing PRIVATE ceres ) +find_package(Ceres QUIET) +if(TARGET ceres) + target_compile_definitions( test_mesh_smoothing PRIVATE CGAL_PMP_USE_CERES_SOLVER ) + target_link_libraries( test_mesh_smoothing PRIVATE ceres ) -# # target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) -# # target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) -# endif(TARGET ceres) +# target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) +# target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) +endif(TARGET ceres) if(BUILD_TESTING) set_tests_properties( From 3e7e281f282a5ef9d8d9043ed35058d5c538e4b5 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 9 Jun 2020 12:21:00 +0200 Subject: [PATCH 036/317] is_simple_2 can be omitted when using triangulate_face_with_cdt --- .../Polygon_mesh_processing/triangulate_faces.h | 16 ++++++++++++---- .../triangulate_hole_with_cdt_2_test.cpp | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 49100398d31..02dc6b163a5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -701,9 +701,9 @@ OutputIterator triangulate_hole_with_cdt_2( const P_traits p_traits(avg_normal); const bool is_simple = is_simple_2(polyline_3d.begin(), polyline_3d.end(), p_traits); - if (!is_simple) - return triangulate_hole( - pmesh, border_halfedge, out, np); + // if (!is_simple) // temporarily removed + // return triangulate_hole( + // pmesh, border_halfedge, out, np); // Adding the new face. typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -718,7 +718,15 @@ OutputIterator triangulate_hole_with_cdt_2( internal::Triangulate_modifier modifier(vpm, traits); const bool success_with_cdt_2 = modifier.triangulate_face(new_face, pmesh, use_cdt, out); - CGAL_assertion(success_with_cdt_2); + + if (!success_with_cdt_2) { + remove_face(new_face, pmesh); + do { + set_face(*circ, boost::graph_traits::null_face(), pmesh); + } while (++circ != done); + return triangulate_hole( + pmesh, border_halfedge, out, np); + } #endif return out; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 51fb0945478..17904efcbec 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -4,6 +4,8 @@ #include #include +#define CGAL_NO_CDT_2_WARNING + #include #include #include From 4921230f4555d49b8aa8c59f29093a9b3a19746a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 25 Jun 2020 15:19:18 +0200 Subject: [PATCH 037/317] WIP hole_filling_polyline_with_cdt --- .../CGAL/boost/graph/parameters_interface.h | 1 + BGL/test/BGL/test_cgal_bgl_named_params.cpp | 3 + .../Hole_filling/Triangulate_hole_polyline.h | 154 +++++++++++++++++- .../triangulate_hole.h | 22 ++- .../triangulate_hole_polyline_test.cpp | 9 +- 5 files changed, 183 insertions(+), 6 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 45aa9e56725..9f084c48844 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -47,6 +47,7 @@ CGAL_add_named_parameter(geom_traits_t, geom_traits, geom_traits) CGAL_add_named_parameter(vertex_incident_patches_t, vertex_incident_patches, vertex_incident_patches_map) CGAL_add_named_parameter(density_control_factor_t, density_control_factor, density_control_factor) CGAL_add_named_parameter(use_delaunay_triangulation_t, use_delaunay_triangulation, use_delaunay_triangulation) +CGAL_add_named_parameter(use_2d_constrained_delaunay_triangulation_t, use_2d_constrained_delaunay_triangulation, use_2d_constrained_delaunay_triangulation) CGAL_add_named_parameter(fairing_continuity_t, fairing_continuity, fairing_continuity) CGAL_add_named_parameter(sparse_linear_solver_t, sparse_linear_solver, sparse_linear_solver) CGAL_add_named_parameter(number_of_relaxation_steps_t, number_of_relaxation_steps, number_of_relaxation_steps) diff --git a/BGL/test/BGL/test_cgal_bgl_named_params.cpp b/BGL/test/BGL/test_cgal_bgl_named_params.cpp index 1d65c3cd1c2..e755d266646 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -58,6 +58,7 @@ void test(const NamedParameters& np) assert(get_parameter(np, CGAL::internal_np::vertex_incident_patches).v == 11); assert(get_parameter(np, CGAL::internal_np::density_control_factor).v == 12); assert(get_parameter(np, CGAL::internal_np::use_delaunay_triangulation).v == 13); + assert(get_parameter(np, CGAL::internal_np::use_2d_constrained_delaunay_triangulation).v == 4573); assert(get_parameter(np, CGAL::internal_np::fairing_continuity).v == 14); assert(get_parameter(np, CGAL::internal_np::sparse_linear_solver).v == 15); assert(get_parameter(np, CGAL::internal_np::number_of_relaxation_steps).v == 16); @@ -152,6 +153,7 @@ void test(const NamedParameters& np) check_same_type<11>(get_parameter(np, CGAL::internal_np::vertex_incident_patches)); check_same_type<12>(get_parameter(np, CGAL::internal_np::density_control_factor)); check_same_type<13>(get_parameter(np, CGAL::internal_np::use_delaunay_triangulation)); + check_same_type<4573>(get_parameter(np, CGAL::internal_np::use_2d_constrained_delaunay_triangulation)); check_same_type<14>(get_parameter(np, CGAL::internal_np::fairing_continuity)); check_same_type<15>(get_parameter(np, CGAL::internal_np::sparse_linear_solver)); check_same_type<16>(get_parameter(np, CGAL::internal_np::number_of_relaxation_steps)); @@ -290,6 +292,7 @@ int main() .vertex_incident_patches_map(A<11>(11)) .density_control_factor(A<12>(12)) .use_delaunay_triangulation(A<13>(13)) + .use_2d_constrained_delaunay_triangulation(A<4573>(4573)) .fairing_continuity(A<14>(14)) .sparse_linear_solver(A<15>(15)) .number_of_relaxation_steps(A<16>(16)) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 2fc28eec9a6..beade9d961a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -22,6 +22,15 @@ #include #include #endif + +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +#include +#include +#include +#include +#include +#endif + #include #include #include @@ -1194,7 +1203,150 @@ public: } }; -/*********************************************************************************** +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +/************************************************************************ + * Triangulate hole by using a cdt_2 + ************************************************************************/ +// /!\ points.first == points.last +// \todo poitns.size() should only be computed once + +template < + typename PointRange, //need size() + typename Tracer, + typename Traits +> +bool +triangulate_hole_polyline_with_cdt(const PointRange& points, + Tracer& tracer, + const Traits& traits) +{ + typedef typename Traits::FT FT; + typedef typename Traits::Point_3 Point_3; + typedef typename Traits::Vector_3 Vector_3; + typedef typename Traits::Collinear_3 Collinear_3; + typedef typename Traits::Compute_squared_length_3 Squared_length_3; + + // Compute an average normal of the hole. + const Squared_length_3 squared_length_3 = + traits.compute_squared_length_3_object(); + const Collinear_3 collinear_3 = + traits.collinear_3_object(); + + FT x = FT(0), y = FT(0), z = FT(0); + std::size_t num_normals = 0; + const Point_3& ref_point = points[0]; + for (std::size_t i = 1; i < points.size() - 1; ++i) { + const std::size_t ip = i + 1; + + const Point_3& p1 = ref_point; // 3 points, which form a triangle + const Point_3& p2 = points[i]; + const Point_3& p3 = points[ip]; + + // Skip in case we have collinear points. + if (collinear_3(p1, p2, p3)) + continue; + + // Computing the normal of a triangle. + Vector_3 tri_normal = CGAL::normal(p1, p2, p3); + const FT tri_normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); + if(tri_normal_length <= FT(0)) + return false; + tri_normal /= tri_normal_length; + + x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); + ++num_normals; + } + + if(num_normals < 1) + return false; + x /= static_cast(num_normals); + y /= static_cast(num_normals); + z /= static_cast(num_normals); + + // Setting the final normal. + const Vector_3 normal = Vector_3(x, y, z); + const FT normal_length = static_cast( + CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); + const Vector_3 avg_normal = normal / normal_length; + + // Checking the hole simplicity. + typedef Triangulation_2_projection_traits_3 P_traits; + const P_traits p_traits(avg_normal); + if(!is_simple_2(points.begin(), points.end()-1, p_traits)) + return false; + + Lookup_table_map lambda(static_cast(points.size())-1,-1); + //Create and fill the cdt_2 + typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + typedef CGAL::Triangulation_face_base_with_info_2 Fb1; + typedef CGAL::Constrained_triangulation_face_base_2 Fb; + typedef CGAL::Triangulation_data_structure_2 TDS; + typedef CGAL::Exact_intersections_tag Itag; + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; + P_traits cdt_traits(normal); + CDT cdt(cdt_traits); + + std::vector< std::pair > points_and_ids; + for(std::size_t i =0; i< points.size()-1; ++i) + points_and_ids.push_back( std::make_pair(points[i],i)); + + cdt.insert(points_and_ids.begin(), points_and_ids.end()); + cdt.insert_constraint(points.begin(), points.end()); + + // sets mark is_external + for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), + end = cdt.all_faces_end(); + fit != end; ++fit) + { + fit->info() = false; + } + std::queue face_queue; + face_queue.push(cdt.infinite_vertex()->face()); + while(! face_queue.empty() ) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + + if(fh->info()) + continue; + + fh->info() = true; + for(int i = 0; i <3; ++i) + { + if(!cdt.is_constrained(typename CDT::Edge(fh, i))) + { + face_queue.push(fh->neighbor(i)); + } + } + } + if(cdt.dimension() != 2 || + cdt.number_of_vertices() != points.size()-1) + return false; + + //fill the lambda + for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), + end = cdt.finite_faces_end(); + fit != end; ++fit) + { + if(!fit->info())//if ! is external + { + std::vector is(3); + for(int i=0; i<3; ++i) + { + is[i] = fit->vertex(i)->info(); + } + std::sort(is.begin(), is.end()); + lambda.put(is[0],is[2], is[1]); + } + } + + //call the tracer + tracer(lambda, 0, points.size()-2); + return true; +} +#endif +/******************************************************************************* * Internal entry point for both polyline and Polyhedron_3 triangulation functions ***********************************************************************************/ template < diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 350cfec4901..17373598d5d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -325,6 +325,9 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true`, use the constrained Delaunay triangulation + to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the + original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd \cgalNamedParamsEnd @@ -343,7 +346,13 @@ namespace Polygon_mesh_processing { using parameters::choose_parameter; using parameters::get_parameter; - bool use_dt3 = + bool use_cdt = +#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + false; +#else + choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); +#endif +bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 false; #else @@ -365,10 +374,19 @@ namespace Polygon_mesh_processing { typedef typename PointRange1::iterator InIterator; typedef typename std::iterator_traits::value_type Point; typedef typename CGAL::Kernel_traits::Kernel Kernel; - +//#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + if(!use_cdt || + !triangulate_hole_polyline_with_cdt( + points, + tracer, + choose_parameter(get_parameter(np, internal_np::geom_traits)))) + { + std::cerr<<"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< FAIL ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"<(get_parameter(np, internal_np::geom_traits))); + } CGAL_assertion(holes.empty()); return tracer.out; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp index 85af1d83e5c..a3243deb085 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp @@ -150,7 +150,8 @@ void test_1(const char* file_name, bool use_DT, bool save_output) { std::vector > tris; CGAL::Polygon_mesh_processing::triangulate_hole_polyline( points, std::back_inserter(tris), - CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT)); + CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT) + .use_2d_constrained_delaunay_triangulation(true)); check_triangles(points, tris); check_constructed_polyhedron(file_name, &tris, &points, save_output); @@ -168,7 +169,8 @@ void test_2(const char* file_name, bool use_DT, bool save_output) { std::vector > tris; CGAL::Polygon_mesh_processing::triangulate_hole_polyline( points, extras, std::back_inserter(tris), - CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT)); + CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT) + .use_2d_constrained_delaunay_triangulation(true)); check_triangles(points, tris); check_constructed_polyhedron(file_name, &tris, &points, save_output); @@ -185,7 +187,8 @@ void test_should_be_no_output(const char* file_name, bool use_DT) { std::vector > tris; CGAL::Polygon_mesh_processing::triangulate_hole_polyline( points, std::back_inserter(tris), - CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT)); + CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(use_DT) + .use_2d_constrained_delaunay_triangulation(true)); if(!tris.empty()) { std::cerr << " Error: patch should be empty" << std::endl; From 2b4dd26d225a98a7fab7c397d382009ca9f7a4a0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 26 Jun 2020 10:47:13 +0200 Subject: [PATCH 038/317] use indices for constraints --- .../Hole_filling/Triangulate_hole_polyline.h | 12 +++++++++++- .../CGAL/Polygon_mesh_processing/triangulate_hole.h | 7 ++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index beade9d961a..fb02aa89c68 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1252,6 +1252,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); if(tri_normal_length <= FT(0)) return false; + tri_normal /= tri_normal_length; x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); @@ -1260,6 +1261,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, if(num_normals < 1) return false; + x /= static_cast(num_normals); y /= static_cast(num_normals); z /= static_cast(num_normals); @@ -1288,11 +1290,17 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, CDT cdt(cdt_traits); std::vector< std::pair > points_and_ids; + std::vector > indices; for(std::size_t i =0; i< points.size()-1; ++i) + { points_and_ids.push_back( std::make_pair(points[i],i)); + indices.push_back(std::make_pair(i, (i+1)%points.size())); + } cdt.insert(points_and_ids.begin(), points_and_ids.end()); - cdt.insert_constraint(points.begin(), points.end()); + cdt.insert_constraints(points.begin(), points.end(), + indices.begin(), indices.end() ); + // sets mark is_external for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), @@ -1322,7 +1330,9 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, } if(cdt.dimension() != 2 || cdt.number_of_vertices() != points.size()-1) + { return false; + } //fill the lambda for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 17373598d5d..1a557d481f9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -374,19 +374,16 @@ bool use_dt3 = typedef typename PointRange1::iterator InIterator; typedef typename std::iterator_traits::value_type Point; typedef typename CGAL::Kernel_traits::Kernel Kernel; -//#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 if(!use_cdt || !triangulate_hole_polyline_with_cdt( points, tracer, choose_parameter(get_parameter(np, internal_np::geom_traits)))) - { - std::cerr<<"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< FAIL ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"<(get_parameter(np, internal_np::geom_traits))); - } CGAL_assertion(holes.empty()); return tracer.out; From e592ed17846237d6af261f1a8eb16b3fd2062702 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 26 Jun 2020 11:45:26 +0200 Subject: [PATCH 039/317] Fix constraints --- .../Hole_filling/Triangulate_hole_polyline.h | 30 ++++++++++++------- .../triangulate_hole.h | 2 ++ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index fb02aa89c68..4c20653cfcd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1208,7 +1208,7 @@ public: * Triangulate hole by using a cdt_2 ************************************************************************/ // /!\ points.first == points.last -// \todo poitns.size() should only be computed once + template < typename PointRange, //need size() @@ -1235,7 +1235,8 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; const Point_3& ref_point = points[0]; - for (std::size_t i = 1; i < points.size() - 1; ++i) { + std::size_t size = points.size()-1; + for (std::size_t i = 1; i < size; ++i) { const std::size_t ip = i + 1; const Point_3& p1 = ref_point; // 3 points, which form a triangle @@ -1278,7 +1279,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, if(!is_simple_2(points.begin(), points.end()-1, p_traits)) return false; - Lookup_table_map lambda(static_cast(points.size())-1,-1); + Lookup_table_map lambda(static_cast(size),-1); //Create and fill the cdt_2 typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; typedef CGAL::Triangulation_face_base_with_info_2 Fb1; @@ -1290,16 +1291,23 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, CDT cdt(cdt_traits); std::vector< std::pair > points_and_ids; - std::vector > indices; - for(std::size_t i =0; i< points.size()-1; ++i) + std::vector vertices(size); + for(std::size_t i =0; i< size; ++i) { points_and_ids.push_back( std::make_pair(points[i],i)); - indices.push_back(std::make_pair(i, (i+1)%points.size())); + } + cdt.insert(points_and_ids.begin(), points_and_ids.end()); + for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) + { + vertices[v->info()] = v; } - cdt.insert(points_and_ids.begin(), points_and_ids.end()); - cdt.insert_constraints(points.begin(), points.end(), - indices.begin(), indices.end() ); + for(std::size_t i = 0; i(get_parameter(np, internal_np::geom_traits)))) #endif + { triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, choose_parameter(get_parameter(np, internal_np::geom_traits))); + } CGAL_assertion(holes.empty()); return tracer.out; From 5c8b23987632e5319f6ba97aa0fea9f387a54d7f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 26 Jun 2020 14:17:04 +0200 Subject: [PATCH 040/317] WIP fixes for triangulate_hole_polygon_mesh --- .../Triangulate_hole_polygon_mesh.h | 10 +++++++++- .../Hole_filling/Triangulate_hole_polyline.h | 20 +++++++++++-------- .../triangulate_hole.h | 15 ++++++++++---- .../triangulate_hole_Polyhedron_3_test.cpp | 7 ++++--- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index f558eb76e68..f6536ec7a2e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -94,7 +94,8 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, OutputIterator out, VertexPointMap vpmap, bool use_delaunay_triangulation, - const Kernel& k) + const Kernel& k, + const bool use_cdt) { typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -173,6 +174,13 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, // fill hole using polyline function, with custom tracer for PolygonMesh Tracer_polyhedron tracer(out, pmesh, P_edges); + +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, k)) + { + return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); + } +#endif CGAL::internal::Weight_min_max_dihedral_and_area weight = triangulate_hole_polyline(P, Q, tracer, WC(is_valid), use_delaunay_triangulation, k) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 4c20653cfcd..09c87423726 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1232,16 +1232,21 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, const Collinear_3 collinear_3 = traits.collinear_3_object(); + std::vector P(boost::begin(points), boost::end(points)); + if(P.front() != P.back()){ + P.push_back(P.front()); + } + FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; - const Point_3& ref_point = points[0]; - std::size_t size = points.size()-1; + const Point_3& ref_point = P[0]; + std::size_t size = P.size()-1; for (std::size_t i = 1; i < size; ++i) { const std::size_t ip = i + 1; const Point_3& p1 = ref_point; // 3 points, which form a triangle - const Point_3& p2 = points[i]; - const Point_3& p3 = points[ip]; + const Point_3& p2 = P[i]; + const Point_3& p3 = P[ip]; // Skip in case we have collinear points. if (collinear_3(p1, p2, p3)) @@ -1276,9 +1281,10 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // Checking the hole simplicity. typedef Triangulation_2_projection_traits_3 P_traits; const P_traits p_traits(avg_normal); - if(!is_simple_2(points.begin(), points.end()-1, p_traits)) + if(!is_simple_2(P.begin(), P.end()-1, p_traits)) return false; + Lookup_table_map lambda(static_cast(size),-1); //Create and fill the cdt_2 typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; @@ -1294,7 +1300,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, std::vector vertices(size); for(std::size_t i =0; i< size; ++i) { - points_and_ids.push_back( std::make_pair(points[i],i)); + points_and_ids.push_back( std::make_pair(P[i],i)); } cdt.insert(points_and_ids.begin(), points_and_ids.end()); for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) @@ -1306,8 +1312,6 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, { cdt.insert_constraint(vertices[i], vertices[(i+1)%(size)]); } - //cdt.insert_constraints(points.begin(), points.end(), - // indices.begin(), indices.end() ); // sets mark is_external diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index edce26c2a1b..c499741fa6c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -64,6 +64,9 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the + original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd \cgalNamedParamsEnd @@ -99,13 +102,19 @@ namespace Polygon_mesh_processing { #endif CGAL_precondition(face(border_halfedge, pmesh) == boost::graph_traits::null_face()); + bool use_cdt = + #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + false; +#else + choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); +#endif return internal::triangulate_hole_polygon_mesh(pmesh, border_halfedge, out, choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits))).first; + choose_parameter(get_parameter(np, internal_np::geom_traits)),use_cdt).first; } template @@ -325,7 +334,7 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true`, use the constrained Delaunay triangulation + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd @@ -381,11 +390,9 @@ bool use_dt3 = tracer, choose_parameter(get_parameter(np, internal_np::geom_traits)))) #endif - { triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, choose_parameter(get_parameter(np, internal_np::geom_traits))); - } CGAL_assertion(holes.empty()); return tracer.out; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 6f549fcb8b5..d8b607d6bb1 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -109,7 +109,7 @@ void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_ for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; Weight w_algo = CGAL::Polygon_mesh_processing::internal::triangulate_hole_polygon_mesh( - poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel()).second; + poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel(), false).second; //todo test with and without cdt if(patch.empty()) { continue; } Weight w_test = calculate_weight_for_patch(poly, patch.begin(), patch.end()); @@ -256,6 +256,7 @@ void test_ouput_iterators_triangulate_hole(const char* file_name) { if(patch.size() != (std::size_t)(output_it - &*patch_2.begin())) { std::cerr << " Error: returned facet output iterator is not valid!" << std::endl; std::cerr << " " << patch.size() << " vs " << (output_it - &*patch_2.begin()) << std::endl; + assert(false); } } @@ -359,7 +360,7 @@ void generate_elephant_with_hole() int main() { generate_elephant_with_hole(); - +/* std::vector input_files; input_files.push_back("elephant_triangle_hole.off"); input_files.push_back("elephant_quad_hole.off"); @@ -375,7 +376,7 @@ int main() { test_triangulate_hole_weight(it->c_str(), false, 0); std::cout << "------------------------------------------------" << std::endl; } - +*/ test_triangulate_hole_should_be_no_output("data/non_manifold_vertex.off"); test_triangulate_hole_should_be_no_output("data/two_tris_collinear.off"); From 3d7aa243b8dac0254fe234ecbce813253f3e8dec Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 26 Jun 2020 14:31:54 +0200 Subject: [PATCH 041/317] WIP --- .../triangulate_hole_Polyhedron_3_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index d8b607d6bb1..fef13c98727 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -163,7 +163,8 @@ void test_triangulate_hole_should_be_no_output(const char* file_name) { for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(false)); + CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(false) + .use_2d_constrained_delaunay_triangulation(false)); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); From b91ba7f6c8d4b6e98ad07e20281c14455e47d5eb Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 29 Jun 2020 11:29:28 +0200 Subject: [PATCH 042/317] Add a check for validity to the polygon_mesh function --- .../internal/Hole_filling/Triangulate_hole_polygon_mesh.h | 2 +- .../internal/Hole_filling/Triangulate_hole_polyline.h | 4 ++++ .../CGAL/Polygon_mesh_processing/triangulate_hole.h | 7 +++++++ .../triangulate_hole_Polyhedron_3_test.cpp | 5 ++--- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index f6536ec7a2e..cba88c6c27f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -176,7 +176,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, k)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 09c87423726..90d81d16125 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1213,11 +1213,13 @@ public: template < typename PointRange, //need size() typename Tracer, + typename Validity_checker, typename Traits > bool triangulate_hole_polyline_with_cdt(const PointRange& points, Tracer& tracer, + const Validity_checker& is_valid, const Traits& traits) { typedef typename Traits::FT FT; @@ -1360,6 +1362,8 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, } std::sort(is.begin(), is.end()); lambda.put(is[0],is[2], is[1]); + if(!is_valid(P,is[0],is[1],is[2])) + return false; } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index c499741fa6c..e247ee1c4aa 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -384,10 +384,17 @@ bool use_dt3 = typedef typename std::iterator_traits::value_type Point; typedef typename CGAL::Kernel_traits::Kernel Kernel; #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + struct Always_valid{ + bool operator()(std::vector&, int,int,int) + {return true;} + }; + Always_valid is_valid; + if(!use_cdt || !triangulate_hole_polyline_with_cdt( points, tracer, + is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)))) #endif triangulate_hole_polyline(points, third_points, tracer, WC(), diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index fef13c98727..10ab39f28fe 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -109,7 +109,7 @@ void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_ for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; Weight w_algo = CGAL::Polygon_mesh_processing::internal::triangulate_hole_polygon_mesh( - poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel(), false).second; //todo test with and without cdt + poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel(), false).second; if(patch.empty()) { continue; } Weight w_test = calculate_weight_for_patch(poly, patch.begin(), patch.end()); @@ -361,7 +361,6 @@ void generate_elephant_with_hole() int main() { generate_elephant_with_hole(); -/* std::vector input_files; input_files.push_back("elephant_triangle_hole.off"); input_files.push_back("elephant_quad_hole.off"); @@ -369,6 +368,7 @@ int main() { // std::cerr.precision(15); for(std::vector::iterator it = input_files.begin(); it != input_files.end(); ++it) { test_triangulate_hole(it->c_str()); + //todo: add the np to triangulate_and_refine() test_triangulate_and_refine_hole(it->c_str()); test_triangulate_refine_and_fair_hole(it->c_str()); test_ouput_iterators_triangulate_and_refine_hole(it->c_str()); @@ -377,7 +377,6 @@ int main() { test_triangulate_hole_weight(it->c_str(), false, 0); std::cout << "------------------------------------------------" << std::endl; } -*/ test_triangulate_hole_should_be_no_output("data/non_manifold_vertex.off"); test_triangulate_hole_should_be_no_output("data/two_tris_collinear.off"); From 9625ed881acf349068916850ee2dabe4b7cb5f6a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 29 Jun 2020 11:51:54 +0200 Subject: [PATCH 043/317] add NPs and tests --- .../triangulate_hole.h | 6 ++ .../triangulate_hole_Polyhedron_3_test.cpp | 58 +++++++++++-------- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index e247ee1c4aa..db8db64c0c0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -169,6 +169,9 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the + original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd \cgalNamedParamsEnd @@ -238,6 +241,9 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the + original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()` \cgalParamEnd \cgalParamBegin{fairing_continuity} tangential continuity of the output surface patch \cgalParamEnd diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 10ab39f28fe..5796282cf22 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -97,7 +97,7 @@ CGAL::internal::Weight_min_max_dihedral_and_area } -void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_t nb_remaining_holes) { +void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_t nb_remaining_holes) { //don't test with cdt as we are testing the weights and there is no weight in the cdt version typedef CGAL::internal::Weight_min_max_dihedral_and_area Weight; std::cout << "test_triangulate_hole_weight + useDT: " << use_DT << std::endl; @@ -129,7 +129,7 @@ void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_ } /******************************************************************/ -void test_triangulate_hole(const char* file_name) { +void test_triangulate_hole(const char* file_name, bool use_cdt) { std::cout << "test_triangulate_hole:" << std::endl; std::cout << " File: "<< file_name << std::endl; Polyhedron poly; @@ -138,7 +138,8 @@ void test_triangulate_hole(const char* file_name) { for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch.empty()) { std::cerr << " Error: empty patch created." << std::endl; assert(false); @@ -153,7 +154,7 @@ void test_triangulate_hole(const char* file_name) { std::cout << " Done!" << std::endl; } -void test_triangulate_hole_should_be_no_output(const char* file_name) { +void test_triangulate_hole_should_be_no_output(const char* file_name, bool use_cdt) { std::cout << "test_triangulate_hole_should_be_no_output:" << std::endl; std::cout << " File: "<< file_name << std::endl; Polyhedron poly; @@ -164,7 +165,7 @@ void test_triangulate_hole_should_be_no_output(const char* file_name) { std::vector patch; CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), CGAL::Polygon_mesh_processing::parameters::use_delaunay_triangulation(false) - .use_2d_constrained_delaunay_triangulation(false)); + .use_2d_constrained_delaunay_triangulation(use_cdt)); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); @@ -181,7 +182,7 @@ void test_triangulate_hole_should_be_no_output(const char* file_name) { std::cout << " Done!" << std::endl; } -void test_triangulate_and_refine_hole(const char* file_name) { +void test_triangulate_and_refine_hole(const char* file_name, bool use_cdt) { std::cout << "test_triangulate_and_refine_hole:" << std::endl; std::cout << " File: "<< file_name << std::endl; Polyhedron poly; @@ -192,7 +193,8 @@ void test_triangulate_and_refine_hole(const char* file_name) { std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, *it, - back_inserter(patch_facets), back_inserter(patch_vertices)); + back_inserter(patch_facets), back_inserter(patch_vertices), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -208,7 +210,7 @@ void test_triangulate_and_refine_hole(const char* file_name) { std::cout << " Done!" << std::endl; } -void test_triangulate_refine_and_fair_hole(const char* file_name) { +void test_triangulate_refine_and_fair_hole(const char* file_name, bool use_cdt) { std::cout << "test_triangulate_refine_and_fair_hole:" << std::endl; std::cout << " File: "<< file_name << std::endl; Polyhedron poly; @@ -219,7 +221,8 @@ void test_triangulate_refine_and_fair_hole(const char* file_name) { std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices)); + *it, back_inserter(patch_facets), back_inserter(patch_vertices), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -235,7 +238,7 @@ void test_triangulate_refine_and_fair_hole(const char* file_name) { std::cout << " Done!" << std::endl; } -void test_ouput_iterators_triangulate_hole(const char* file_name) { +void test_ouput_iterators_triangulate_hole(const char* file_name, bool use_cdt) { std::cout << "test_ouput_iterators_triangulate_hole:" << std::endl; std::cout << " File: "<< file_name << std::endl; @@ -248,7 +251,8 @@ void test_ouput_iterators_triangulate_hole(const char* file_name) { std::vector::iterator it_2 = border_reps_2.begin(); for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); std::vector patch_2 = patch; Facet_handle* output_it = @@ -264,7 +268,7 @@ void test_ouput_iterators_triangulate_hole(const char* file_name) { std::cout << " Done!" << std::endl; } -void test_ouput_iterators_triangulate_and_refine_hole(const char* file_name) { +void test_ouput_iterators_triangulate_and_refine_hole(const char* file_name, bool use_cdt) { std::cout << "test_ouput_iterators_triangulate_and_refine_hole:" << std::endl; std::cout << " File: "<< file_name << std::endl; @@ -279,7 +283,8 @@ void test_ouput_iterators_triangulate_and_refine_hole(const char* file_name) { std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices)); + *it, back_inserter(patch_facets), back_inserter(patch_vertices), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); // create enough space to hold outputs std::vector patch_facets_2 = patch_facets; std::vector patch_vertices_2 = patch_vertices; @@ -287,7 +292,8 @@ void test_ouput_iterators_triangulate_and_refine_hole(const char* file_name) { std::pair output_its = CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly_2, - *it_2, &*patch_facets_2.begin(), &*patch_vertices_2.begin()); + *it_2, &*patch_facets_2.begin(), &*patch_vertices_2.begin(), + CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.size() != (std::size_t) (output_its.first - &*patch_facets_2.begin())) { std::cout << " Error: returned facet output iterator is not valid!" << std::endl; @@ -324,7 +330,7 @@ void test_triangulate_refine_and_fair_hole_compile() { (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices), CGAL::Polygon_mesh_processing::parameters::weight_calculator( CGAL::internal::Uniform_weight_fairing(poly)). - sparse_linear_solver(Default_solver())); + sparse_linear_solver(Default_solver()).use_2d_constrained_delaunay_triangulation(false)); // default solver read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); @@ -367,18 +373,24 @@ int main() { input_files.push_back("data/mech-holes-shark.off"); // std::cerr.precision(15); for(std::vector::iterator it = input_files.begin(); it != input_files.end(); ++it) { - test_triangulate_hole(it->c_str()); - //todo: add the np to triangulate_and_refine() - test_triangulate_and_refine_hole(it->c_str()); - test_triangulate_refine_and_fair_hole(it->c_str()); - test_ouput_iterators_triangulate_and_refine_hole(it->c_str()); - test_ouput_iterators_triangulate_hole(it->c_str()); + test_triangulate_hole(it->c_str(), true); + test_triangulate_hole(it->c_str(), false); + test_triangulate_and_refine_hole(it->c_str(), true); + test_triangulate_and_refine_hole(it->c_str(), false); + test_triangulate_refine_and_fair_hole(it->c_str(), true); + test_triangulate_refine_and_fair_hole(it->c_str(), false); + test_ouput_iterators_triangulate_and_refine_hole(it->c_str(), true); + test_ouput_iterators_triangulate_and_refine_hole(it->c_str(), false); + test_ouput_iterators_triangulate_hole(it->c_str(), true); + test_ouput_iterators_triangulate_hole(it->c_str(), false); test_triangulate_hole_weight(it->c_str(), true, 0); test_triangulate_hole_weight(it->c_str(), false, 0); std::cout << "------------------------------------------------" << std::endl; } - test_triangulate_hole_should_be_no_output("data/non_manifold_vertex.off"); - test_triangulate_hole_should_be_no_output("data/two_tris_collinear.off"); + test_triangulate_hole_should_be_no_output("data/non_manifold_vertex.off", true); + test_triangulate_hole_should_be_no_output("data/non_manifold_vertex.off", false); + test_triangulate_hole_should_be_no_output("data/two_tris_collinear.off", true); + test_triangulate_hole_should_be_no_output("data/two_tris_collinear.off", false); test_triangulate_refine_and_fair_hole_compile(); std::cout << "All Done!" << std::endl; From 16cf7568942d1582984c6926ae4487db98408c2a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 2 Jul 2020 12:29:01 +0200 Subject: [PATCH 044/317] fixes and clean-up --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 5 +++-- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 90d81d16125..774fc7df6cc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1259,7 +1259,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, const FT tri_normal_length = static_cast( CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); if(tri_normal_length <= FT(0)) - return false; + continue; tri_normal /= tri_normal_length; @@ -1293,12 +1293,13 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, typedef CGAL::Triangulation_face_base_with_info_2 Fb1; typedef CGAL::Constrained_triangulation_face_base_2 Fb; typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::Exact_intersections_tag Itag; + typedef CGAL::No_intersection_tag Itag; //If the polygon is simple, there should be no intersection. typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; P_traits cdt_traits(normal); CDT cdt(cdt_traits); std::vector< std::pair > points_and_ids; + points_and_ids.reserve(size); std::vector vertices(size); for(std::size_t i =0; i< size; ++i) { diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index db8db64c0c0..e9e13133f8c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -391,7 +391,7 @@ bool use_dt3 = typedef typename CGAL::Kernel_traits::Kernel Kernel; #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 struct Always_valid{ - bool operator()(std::vector&, int,int,int) + bool operator()(const std::vector&, int,int,int)const {return true;} }; Always_valid is_valid; From 4fb546925d7636346746a00686c2364bc301cce7 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 6 Jul 2020 16:22:46 +0200 Subject: [PATCH 045/317] cleanup + warnings fix --- .../doc/Polygon_mesh_processing/NamedParameters.txt | 7 +++++++ .../internal/Hole_filling/Triangulate_hole_polyline.h | 2 +- .../CGAL/Polygon_mesh_processing/triangulate_hole.h | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt index 5fe5a41c38f..6424c534b88 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt @@ -216,6 +216,13 @@ non-Delaunay triangulations search space to find a solution.\n Default: `true` \cgalNPEnd +\cgalNPBegin{use_2d_constrained_delaunay_triangulation} \anchor PMP_use_2d_constrained_delaunay_triangulation +enables the use of the 2D constrained Delaunay triangulation to triangulate the hole (the default is `true`), +if no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\n +Type: `bool` \n +Default: `true` +\cgalNPEnd + \cgalNPBegin{use_random_uniform_sampling} \anchor PMP_use_random_uniform_sampling is a parameter used in `sample_triangle_mesh()` to indicate that the points are picked in a random uniform way.\n diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 774fc7df6cc..57aef6bc3dc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1293,7 +1293,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, typedef CGAL::Triangulation_face_base_with_info_2 Fb1; typedef CGAL::Constrained_triangulation_face_base_2 Fb; typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::No_intersection_tag Itag; //If the polygon is simple, there should be no intersection. + typedef CGAL::No_constraint_intersection_tag Itag; //If the polygon is simple, there should be no intersection. typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; P_traits cdt_traits(normal); CDT cdt(cdt_traits); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index e9e13133f8c..319f44ccba4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -64,7 +64,7 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd @@ -169,7 +169,7 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd @@ -241,7 +241,7 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values @@ -340,7 +340,7 @@ namespace Polygon_mesh_processing { \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the constrained Delaunay triangulation + \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\cgalParamEnd \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd From 979e1d01a79b45a7070d61d08473ca71f94161d2 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 6 Jul 2020 17:58:53 +0200 Subject: [PATCH 046/317] multiple fixes --- .../Hole_filling/Triangulate_hole_polyline.h | 81 +++---- .../triangulate_faces.h | 215 +----------------- .../triangulate_hole.h | 6 +- .../triangulate_hole_with_cdt_2_test.cpp | 9 +- 4 files changed, 49 insertions(+), 262 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 57aef6bc3dc..cb5028507fa 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1235,14 +1235,14 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, traits.collinear_3_object(); std::vector P(boost::begin(points), boost::end(points)); - if(P.front() != P.back()){ + if (P.front() != P.back()) { P.push_back(P.front()); } FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; const Point_3& ref_point = P[0]; - std::size_t size = P.size()-1; + const std::size_t size = P.size() - 1; for (std::size_t i = 1; i < size; ++i) { const std::size_t ip = i + 1; @@ -1255,55 +1255,43 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, continue; // Computing the normal of a triangle. - Vector_3 tri_normal = CGAL::normal(p1, p2, p3); - const FT tri_normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); - if(tri_normal_length <= FT(0)) - continue; - - tri_normal /= tri_normal_length; - + const Vector_3 tri_normal = CGAL::normal(p1, p2, p3); x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); ++num_normals; } - if(num_normals < 1) + if (num_normals < 1) return false; + // Setting the final normal. x /= static_cast(num_normals); y /= static_cast(num_normals); z /= static_cast(num_normals); - - // Setting the final normal. - const Vector_3 normal = Vector_3(x, y, z); - const FT normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); - const Vector_3 avg_normal = normal / normal_length; + const Vector_3 avg_normal = Vector_3(x, y, z); // Checking the hole simplicity. typedef Triangulation_2_projection_traits_3 P_traits; const P_traits p_traits(avg_normal); - if(!is_simple_2(P.begin(), P.end()-1, p_traits)) + if (!is_simple_2(P.begin(), P.end() - 1, p_traits)) return false; - - Lookup_table_map lambda(static_cast(size),-1); - //Create and fill the cdt_2 + Lookup_table_map lambda(static_cast(size), -1); + // Create and fill the cdt_2. typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; - typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - typedef CGAL::Constrained_triangulation_face_base_2 Fb; + typedef CGAL::Triangulation_face_base_with_info_2 Fbi; + typedef CGAL::Constrained_triangulation_face_base_2 Fb; typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::No_constraint_intersection_tag Itag; //If the polygon is simple, there should be no intersection. + typedef CGAL::No_constraint_intersection_tag Itag; // If the polygon is simple, there should be no intersection. typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; - P_traits cdt_traits(normal); + P_traits cdt_traits(avg_normal); CDT cdt(cdt_traits); std::vector< std::pair > points_and_ids; points_and_ids.reserve(size); std::vector vertices(size); - for(std::size_t i =0; i< size; ++i) + for (std::size_t i = 0; i < size; ++i) { - points_and_ids.push_back( std::make_pair(P[i],i)); + points_and_ids.push_back(std::make_pair(P[i],i)); } cdt.insert(points_and_ids.begin(), points_and_ids.end()); for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) @@ -1311,64 +1299,61 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, vertices[v->info()] = v; } - for(std::size_t i = 0; iinfo() = false; } std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); - while(! face_queue.empty() ) + while (!face_queue.empty()) { typename CDT::Face_handle fh = face_queue.front(); face_queue.pop(); - if(fh->info()) + if (fh->info()) continue; fh->info() = true; - for(int i = 0; i <3; ++i) + for (std::size_t i = 0; i < 3; ++i) { - if(!cdt.is_constrained(typename CDT::Edge(fh, i))) + if (!cdt.is_constrained(typename CDT::Edge(fh, i))) { face_queue.push(fh->neighbor(i)); } } } - if(cdt.dimension() != 2 || - cdt.number_of_vertices() != size) + if (cdt.dimension() != 2 || + cdt.number_of_vertices() != size) { return false; } - //fill the lambda - for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), - end = cdt.finite_faces_end(); - fit != end; ++fit) + // Fill the lambda. + for (typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), + end = cdt.finite_faces_end(); fit != end; ++fit) { - if(!fit->info())//if ! is external + if (!fit->info()) // if !is external { std::vector is(3); - for(int i=0; i<3; ++i) + for (std::size_t i = 0; i < 3; ++i) { is[i] = fit->vertex(i)->info(); } std::sort(is.begin(), is.end()); lambda.put(is[0],is[2], is[1]); - if(!is_valid(P,is[0],is[1],is[2])) + if (!is_valid(P, is[0], is[1], is[2])) return false; } } - //call the tracer + // Call the tracer. tracer(lambda, 0, size - 1); return true; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 02dc6b163a5..fd6fa0349de 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -29,10 +29,6 @@ #include #endif -#include -#include -#include - #include #include #include @@ -85,15 +81,6 @@ public: } bool triangulate_face(face_descriptor f, PM& pmesh, bool use_cdt) - { - Emptyset_iterator out; - return triangulate_face(f, pmesh, use_cdt, out); - } - - // Default for out is Emptyset_iterator(), - // and out is only used for triangulate_with_cdt_2(). - template - bool triangulate_face(face_descriptor f, PM& pmesh, bool use_cdt, OutputIterator out) { typedef typename Traits::FT FT; @@ -131,29 +118,11 @@ public: FT p0p2 = CGAL::cross_product(p1-p0,p1-p2) * CGAL::cross_product(p3-p2,p3-p0); if(p0p2>p1p3) { - // CGAL::Euler::split_face(v0, v2, pmesh); - halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh); - face_descriptor fnew = add_face(pmesh); - CGAL::internal::insert_tip(hnew, v2, pmesh); - CGAL::internal::insert_tip(opposite(hnew, pmesh), v0, pmesh); - set_face(hnew, face(v0, pmesh), pmesh); - CGAL::internal::set_face_in_face_loop(opposite(hnew, pmesh), fnew, pmesh); - set_halfedge(face(hnew, pmesh), hnew, pmesh); - set_halfedge(face(opposite(hnew, pmesh), pmesh), opposite(hnew, pmesh), pmesh); - *out++ = fnew; + CGAL::Euler::split_face(v0, v2, pmesh); } else { - // CGAL::Euler::split_face(v1, v3, pmesh); - halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh); - face_descriptor fnew = add_face(pmesh); - CGAL::internal::insert_tip(hnew, v3, pmesh); - CGAL::internal::insert_tip(opposite(hnew, pmesh), v1, pmesh); - set_face(hnew, face(v1, pmesh), pmesh); - CGAL::internal::set_face_in_face_loop(opposite(hnew, pmesh), fnew, pmesh); - set_halfedge(face(hnew, pmesh), hnew, pmesh); - set_halfedge(face(opposite(hnew, pmesh), pmesh), opposite(hnew, pmesh), pmesh); - *out++ = fnew; + CGAL::Euler::split_face(v1, v3, pmesh); } } else @@ -174,19 +143,18 @@ public: Itag> CDT; P_traits cdt_traits(normal); CDT cdt(cdt_traits); - return triangulate_face_with_CDT(f, pmesh, cdt, out); + return triangulate_face_with_CDT(f, pmesh, cdt); } #else CGAL_USE(use_cdt); #endif - // Don't use out if no cdt. return triangulate_face_with_hole_filling(f, pmesh); } return true; } - template - bool triangulate_face_with_CDT(face_descriptor f, PM& pmesh, CDT& cdt, OutputIterator out) + template + bool triangulate_face_with_CDT(face_descriptor f, PM& pmesh, CDT& cdt) { std::size_t original_size = CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh).size(); @@ -299,13 +267,7 @@ public: set_next(h1, h2, pmesh); set_next(h2, h0, pmesh); - // Euler::fill_hole(h0, pmesh); - face_descriptor new_face = add_face(pmesh); - for (halfedge_descriptor hd : CGAL::halfedges_around_face(h0, pmesh)) { - set_face(hd, new_face, pmesh); - } - set_halfedge(new_face, h0, pmesh); - *out++ = new_face; + Euler::fill_hole(h0, pmesh); } } return true; @@ -474,16 +436,8 @@ bool triangulate_face(typename boost::graph_traits::face_descriptor //Option bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); - typedef typename internal_np::Lookup_named_param_def< - internal_np::output_iterator_t, - NamedParameters, - Emptyset_iterator>::type Output_iterator; - - Output_iterator out = choose_parameter( - get_parameter(np, internal_np::output_iterator), Emptyset_iterator()); - internal::Triangulate_modifier modifier(vpmap, traits); - return modifier.triangulate_face(f, pmesh, use_cdt, out); + return modifier.triangulate_face(f, pmesh, use_cdt); } template @@ -579,163 +533,10 @@ bool triangulate_faces(PolygonMesh& pmesh) return triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } -/*! - \ingroup hole_filling_grp - \brief triangulates a planar hole in a polygon mesh. - - If the hole is planar, this function uses the 2D constrained Delaunay triangulation - in order to close the hole. The constraints are the border edges of the hole. - - The hole must not contain any non-manifold vertex, nor self-intersections. - The patch generated does not introduce non-manifold edges nor degenerate triangles. - If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`. - - \tparam PolygonMesh a model of `MutableFaceGraph` - \tparam OutputIterator a model of `OutputIterator` holding - `boost::graph_traits::%face_descriptor` for patch faces. - \tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" - - \param pmesh polygon mesh which has the hole - \param border_halfedge a border halfedge incident to the hole - \param out iterator over patch faces - \param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below - - \cgalNamedParamsBegin - \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. - If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` should be available in `PolygonMesh` - \cgalParamEnd - \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd - \cgalNamedParamsEnd - - \return `out` -*/ -template< -typename PolygonMesh, -typename OutputIterator, -typename NamedParameters> -OutputIterator triangulate_hole_with_cdt_2( - PolygonMesh& pmesh, - typename boost::graph_traits::halfedge_descriptor border_halfedge, - OutputIterator out, - const NamedParameters& np) { - - #ifdef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 - - return triangulate_hole( - pmesh, border_halfedge, out, np); - - #else - - typedef typename GetGeomTraits::type Traits; - const Traits traits = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::geom_traits), Traits()); - - typedef typename Traits::FT FT; - typedef typename Traits::Point_3 Point_3; - typedef typename Traits::Vector_3 Vector_3; - typedef typename Traits::Collinear_3 Collinear_3; - typedef typename Traits::Compute_squared_length_3 Squared_length_3; - - typedef typename GetVertexPointMap::const_type VPM; - const VPM vpm = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::vertex_point), - get_const_property_map(boost::vertex_point, pmesh)); - - typedef Halfedge_around_face_circulator Hedge_around_face_circulator; - Hedge_around_face_circulator circ(border_halfedge, pmesh); - Hedge_around_face_circulator done(circ); - - // Getting the hole boundary. - std::vector polyline_3d; - do { - polyline_3d.push_back(get(vpm, target(*circ, pmesh))); - } while (++circ != done); - CGAL_assertion( - polyline_3d.size() >= 3); - - // Compute an average normal of the hole face. - const Squared_length_3 squared_length_3 = - traits.compute_squared_length_3_object(); - const Collinear_3 collinear_3 = - traits.collinear_3_object(); - - FT x = FT(0), y = FT(0), z = FT(0); - std::size_t num_normals = 0; - const Point_3& ref_point = polyline_3d[0]; - for (std::size_t i = 1; i < polyline_3d.size() - 1; ++i) { - const std::size_t ip = i + 1; - - const Point_3& p1 = ref_point; // 3 points, which form a triangle - const Point_3& p2 = polyline_3d[i]; - const Point_3& p3 = polyline_3d[ip]; - - // Skip in case we have collinear points. - if (collinear_3(p1, p2, p3)) - continue; - - // Computing the normal of a triangle. - Vector_3 tri_normal = CGAL::normal(p1, p2, p3); - const FT tri_normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(tri_normal)))); - CGAL_assertion(tri_normal_length > FT(0)); - tri_normal /= tri_normal_length; - - x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); - ++num_normals; - } - - CGAL_assertion(num_normals >= 1); - x /= static_cast(num_normals); - y /= static_cast(num_normals); - z /= static_cast(num_normals); - - // Setting the final normal. - const Vector_3 normal = Vector_3(x, y, z); - const FT normal_length = static_cast( - CGAL::sqrt(CGAL::to_double(squared_length_3(normal)))); - const Vector_3 avg_normal = normal / normal_length; - - // Checking the hole simplicity. - typedef Triangulation_2_projection_traits_3 P_traits; - const P_traits p_traits(avg_normal); - const bool is_simple = - is_simple_2(polyline_3d.begin(), polyline_3d.end(), p_traits); - // if (!is_simple) // temporarily removed - // return triangulate_hole( - // pmesh, border_halfedge, out, np); - - // Adding the new face. - typedef typename boost::graph_traits::face_descriptor face_descriptor; - face_descriptor new_face = add_face(pmesh); - set_halfedge(new_face, border_halfedge, pmesh); - do { - set_face(*circ, new_face, pmesh); - } while (++circ != done); - - // Triangulating. - const bool use_cdt = true; - internal::Triangulate_modifier modifier(vpm, traits); - const bool success_with_cdt_2 = - modifier.triangulate_face(new_face, pmesh, use_cdt, out); - - if (!success_with_cdt_2) { - remove_face(new_face, pmesh); - do { - set_face(*circ, boost::graph_traits::null_face(), pmesh); - } while (++circ != done); - return triangulate_hole( - pmesh, border_halfedge, out, np); - } - - #endif - return out; -} - } // end namespace Polygon_mesh_processing } // end namespace CGAL #include -#endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H +#endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H \ No newline at end of file diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 319f44ccba4..171c2c48f05 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -42,9 +42,9 @@ namespace Polygon_mesh_processing { /*! \ingroup hole_filling_grp triangulates a hole in a polygon mesh. - The hole must not contain any non-manifold vertex, - nor self-intersections. - The patch generated does not introduce non-manifold edges nor degenerate triangles. + The hole must not contain any non-manifold vertex, nor self-intersections. + When using the 2D constrained Delaunay triangulation, the non-manifold vertex is + not an issue. The patch generated does not introduce non-manifold edges nor degenerate triangles. If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`. @tparam PolygonMesh a model of `MutableFaceGraph` diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 17904efcbec..557a3460321 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include template< class PolygonMesh, @@ -81,12 +81,13 @@ void test_triangulate_hole_with_cdt_2( std::vector patch_faces; for (const Halfedge_handle h : borders) { patch_faces.clear(); - CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2( + CGAL::Polygon_mesh_processing::triangulate_hole( pmesh, h, std::back_inserter(patch_faces), CGAL::Polygon_mesh_processing::parameters::vertex_point_map( get(CGAL::vertex_point, pmesh)). + use_2d_constrained_delaunay_triangulation(true). geom_traits(GeomTraits())); if (verbose) @@ -127,9 +128,9 @@ int main(int argc, char **argv) { // Checking on a data file with two planar, simple, and orthogonal holes. test_triangulate_hole_with_cdt_2( - "exact_inexact", argc, argv, "w_orthogonal_hole", 2, 1, false); + "exact_inexact", argc, argv, "w_orthogonal_hole", 2, 2, false); test_triangulate_hole_with_cdt_2( - "exact_exact", argc, argv, "w_orthogonal_hole", 2, 1, false); + "exact_exact", argc, argv, "w_orthogonal_hole", 2, 2, false); std::cout << "test_triangulate_hole_with_cdt_2: orthogonal hole SUCCESS" << std::endl; From d3dd4ad0ace49ebc4ec975bfa4b87b293dc73a25 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 7 Jul 2020 11:31:18 +0200 Subject: [PATCH 047/317] missing line --- .../include/CGAL/Polygon_mesh_processing/triangulate_faces.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index fd6fa0349de..8284c79d118 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -539,4 +539,4 @@ bool triangulate_faces(PolygonMesh& pmesh) #include -#endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H \ No newline at end of file +#endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H From 8bfdf2b9a2e69bdd3274beb6e8ee0c246e41c4e8 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 24 Jul 2020 17:30:43 +0200 Subject: [PATCH 048/317] positive avg normal + hole orientation (not finished) --- .../Triangulate_hole_polygon_mesh.h | 2 +- .../Hole_filling/Triangulate_hole_polyline.h | 58 ++++++++++++++++--- .../triangulate_hole.h | 1 + 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index cba88c6c27f..9341f0e8eec 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -176,7 +176,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, Q, tracer, is_valid, k)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index cb5028507fa..84b86c5f7e0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1204,23 +1204,25 @@ public: }; #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + /************************************************************************ * Triangulate hole by using a cdt_2 ************************************************************************/ // /!\ points.first == points.last - template < - typename PointRange, //need size() + typename PointRange1, // need size() + typename PointRange2, typename Tracer, typename Validity_checker, typename Traits > bool -triangulate_hole_polyline_with_cdt(const PointRange& points, - Tracer& tracer, - const Validity_checker& is_valid, - const Traits& traits) +triangulate_hole_polyline_with_cdt(const PointRange1& points, + const PointRange2& third_points, + Tracer& tracer, + const Validity_checker& is_valid, + const Traits& traits) { typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; @@ -1235,9 +1237,15 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, traits.collinear_3_object(); std::vector P(boost::begin(points), boost::end(points)); + std::vector Q(boost::begin(third_points), boost::end(third_points)); + if (P.front() != P.back()) { P.push_back(P.front()); + if (!Q.empty() && P.size() > Q.size()) { + Q.push_back(Q.front()); + } } + CGAL_assertion(P.size() == Q.size()); FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; @@ -1255,19 +1263,53 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, continue; // Computing the normal of a triangle. - const Vector_3 tri_normal = CGAL::normal(p1, p2, p3); - x += tri_normal.x(); y += tri_normal.y(); z += tri_normal.z(); + const Vector_3 n = CGAL::normal(p1, p2, p3); + // If it is a positive normal -> + if ( + ( n.x() > FT(0) ) || + ( n.x() == FT(0) && n.y() > FT(0) ) || + ( n.x() == FT(0) && n.y() == FT(0) && n.z() > FT(0) )) { + x += n.x(); y += n.y(); z += n.z(); + } else { // otherwise invert -> + x -= n.x(); y -= n.y(); z -= n.z(); + } ++num_normals; } if (num_normals < 1) return false; + // Find non-collinear the hole boundary points in order + // to check the hole orientation. + std::vector pts; + pts.reserve(3); + pts.push_back(ref_point); + for (std::size_t i = 1; i < size; ++i) { + const std::size_t ip = i + 1; + const Point_3& p1 = ref_point; + const Point_3& p2 = P[i]; + const Point_3& p3 = P[ip]; + if (!collinear_3(p1, p2, p3)) { + pts.push_back(p2); + pts.push_back(p3); + break; + } + } + + // Not sure about that! + if (CGAL::orientation(pts[0], pts[1], pts[2], Q[0]) != CGAL::NEGATIVE) { + // std::cout << "positive" << std::endl; + } else { + // std::cout << "negative" << std::endl; + x = -x; y = -y; z = -z; + } + // Setting the final normal. x /= static_cast(num_normals); y /= static_cast(num_normals); z /= static_cast(num_normals); const Vector_3 avg_normal = Vector_3(x, y, z); + // std::cout << "avg: " << avg_normal << std::endl; // Checking the hole simplicity. typedef Triangulation_2_projection_traits_3 P_traits; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 171c2c48f05..21e542f434d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -399,6 +399,7 @@ bool use_dt3 = if(!use_cdt || !triangulate_hole_polyline_with_cdt( points, + third_points, tracer, is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)))) From 3ae852b246ae10b77819a935d71fe0131cc70970 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 3 Aug 2020 17:35:39 +0200 Subject: [PATCH 049/317] improved planarity test + normal estimation + new tests --- .../NamedParameters.txt | 617 -- .../Triangulate_hole_polygon_mesh.h | 2 +- .../Hole_filling/Triangulate_hole_polyline.h | 191 +- .../triangulate_hole.h | 178 +- ...ple_hole.off => elephant_complex_hole.off} | 0 .../data/elephant_concave_hole.off | 8299 +++++++++++++++++ ...mple_hole.off => elephant_curved_hole.off} | 0 .../data/elephant_flat_hole.off | 8240 ++++++++++++++++ .../triangulate_hole_with_cdt_2_test.cpp | 35 +- 9 files changed, 16804 insertions(+), 758 deletions(-) delete mode 100644 Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt rename Polygon_mesh_processing/test/Polygon_mesh_processing/data/{elephant_nonsimple_hole.off => elephant_complex_hole.off} (100%) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_concave_hole.off rename Polygon_mesh_processing/test/Polygon_mesh_processing/data/{elephant_simple_hole.off => elephant_curved_hole.off} (100%) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/elephant_flat_hole.off diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt deleted file mode 100644 index 6424c534b88..00000000000 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt +++ /dev/null @@ -1,617 +0,0 @@ -/*! -\defgroup pmp_namedparameters Named Parameters for Polygon Mesh Processing -\ingroup PkgPolygonMeshProcessingRef - -In this package, all functions optional parameters are implemented as BGL optional -named parameters (see \ref BGLNamedParameters for more information on how to use them). -Since the parameters of the various polygon mesh processing functions defined -in this package are redundant, their long descriptions are centralized below. -The sequence of named parameters starts with `CGAL::parameters::`. -`CGAL::parameters::all_default()` can be used to indicate -that default values of optional named parameters shall be used. - -In the following, we assume that the following types are provided as template parameters -of polygon mesh processing functions and classes. Note that, for some of these functions, -the type is more specific: -

    -
  • `PolygonMesh` is a model of the concept `FaceGraph`
  • . -
  • `GeomTraits` a geometric traits class in which constructions are performed and - predicates evaluated. Everywhere in this package, a \cgal `Kernel` fulfills the requirements.
  • -
- -The following named parameters, offered by the package \ref PkgBGL -(see \ref bgl_namedparameters), are used in this package: - -\cgalNPTableBegin -\cgalNPBegin{vertex_point_map} \anchor PMP_vertex_point_map -is the property map with the points associated to the vertices of the polygon mesh `pmesh`.\n -Type: a class model of `ReadablePropertyMap` with -`boost::graph_traits::%vertex_descriptor` as key type and -`GeomTraits::Point_3` as value type. \n -Default: \code boost::get(CGAL::vertex_point, pmesh) \endcode -\cgalNPEnd - -\cgalNPBegin{vertex_index_map} \anchor PMP_vertex_index_map -is the property map associating a unique index to each vertex of a polygon mesh, -between `0` and `num_vertices(g)-1`. -If this parameter is not passed, internal machinery will create and initialize a vertex index -property map, either using the internal property map if it exists or using an external map. The latter -might result in - slightly - worsened performance in case of non-constant complexity for index access.\n -Type: a class model of `ReadablePropertyMap` with -`boost::graph_traits::%vertex_descriptor` as key type and the value type -\code typename boost::property_traits::type>::value_type \endcode -Default: an initialized vertex index property map -\cgalNPEnd - -\cgalNPBegin{face_index_map} \anchor PMP_face_index_map -is the property map associating a unique index to each face of a polygon mesh, -between `0` and `num_faces(g)-1`. -If this parameter is not passed, internal machinery will create and initialize a face index -property map, either using the internal property map if it exists or using an external map. The latter -might result in - slightly - worsened performance in case of non-constant complexity for index access.\n -Type: a class model of `ReadablePropertyMap` with -`boost::graph_traits::%face_descriptor` as key type and the value type: -\code typename boost::property_traits::type>::value_type \endcode -Default: an initialized face index property map -\cgalNPEnd - -\cgalNPBegin{edge_is_constrained_map} \anchor PMP_edge_is_constrained_map -is the property map containing information about edges of the input polygon mesh -being marked or not. In `isotropic_remeshing()` and `connected_components()`, -the marked edges are constrained.\n -Type: a class model of `ReadWritePropertyMap` with -`boost::graph_traits::%edge_descriptor` as key type and -`bool` as value type. It must be default constructible.\n -Default: a default property map where no edge is constrained -\cgalNPEnd -\cgalNPTableEnd - -In addition to these named parameters, this package offers the following named parameters: - -\cgalNPTableBegin -\cgalNPBegin{geom_traits} \anchor PMP_geom_traits -is the geometric traits instance used for the mesh processing operation.\n -Type: a Geometric traits class.\n -Default: -\code typename CGAL::Kernel_traits< - typename boost::property_traits< - typename boost::property_map::type>::value_type>::Kernel \endcode -\cgalNPEnd - -\cgalNPBegin{point_map} \anchor PMP_point_map - is the property map containing the points associated to the elements of the point range `points`.\n -\b Type: a class model of `ReadablePropertyMap` with -`PointRange::iterator::value_type` as key type and -`geom_traits::Point_3` as value type. \n -Default value: \code CGAL::Identity_property_map\endcode -\cgalNPEnd - -\cgalNPBegin{vertex_incident_patches_map} \anchor PMP_vertex_incident_patches_map -is the property map containing the surface patches incident to each vertex of the input polygon mesh.\n -Type: a class model of `LvaluePropertyMap` with -`boost::graph_traits::%vertex_descriptor` as key type. Its value type -must be a container of `boost::property_traits::%value_type` and have a function `insert()`. -A `std::set` or a `boost::unordered_set` are recommended, as a patch index may be -inserted several times.\n -Default: \code boost::get(CGAL::vertex_incident_patches_t, pmesh)\endcode -\cgalNPEnd - -\cgalNPBegin{vertex_feature_degree_map} \anchor PMP_vertex_feature_degree_map -is the property map containing the number of feature edges being incident to the vertices of the polygon mesh `pmesh`.\n -Type: a class model of `ReadWritePropertyMap` with -`boost::graph_traits::%vertex_descriptor` as key type and -`int` as value type. It must be default constructible.\n -Default: \code boost::get(CGAL::vertex_feature_degree_t(), pmesh) \endcode -\cgalNPEnd - -\cgalNPBegin{vertex_is_constrained_map} \anchor PMP_vertex_is_constrained_map -is the property map containing information about vertices of the input polygon mesh being constrained or not. -Constrained vertices may be replaced by new vertices, but the number and location -of vertices remain unchanged.\n -Type: a class model of `ReadWritePropertyMap` with -`boost::graph_traits::%vertex_descriptor` as key type and -`bool` as value type. It must be default constructible.\n -Default: a default property map where no vertex is constrained is provided. -\cgalNPEnd - -\cgalNPBegin{face_patch_map} \anchor PMP_face_patch_map -is a property map containing information about faces. -It is particularly well-suited for preserving surface patch IDs, -or face colors. -The edges at the interface between surface patches are treated similarly -to the ones of `edge_is_constrained_map`.\n -Type: a class model of `ReadWritePropertyMap` with -`boost::graph_traits::%face_descriptor` as key type and -the desired property, model of `CopyConstructible` as value type.\n -Default: a default property map where each face is associated with the ID of -the connected component it belongs to. Connected components are -computed with respect to the constrained edges listed in the property map -`edge_is_constrained_map` -\cgalNPEnd - -\cgalNPBegin{first_index} \anchor PMP_first_index -is the index of the first surface patch.\n -Type: `std::size_t`\n -Default: 1 -\cgalNPEnd - -\cgalNPBegin{density_control_factor} \anchor PMP_density_control_factor -controls the density of the mesh generated by refinement, with larger values causing denser refinements. -The density of vertices in the refined region is this factor times higher than before refinement.\n -Type: floating scalar value\n -Default: `CGAL::sqrt(2)` -\cgalNPEnd - -\cgalNPBegin{fairing_continuity} \anchor PMP_fairing_continuity -controls the tangential continuity of the output surface in `fair()`. -The possible values are 0, 1 and 2, refering to the C0, C1 -and C2 continuity.\n -Type: \c unsigned \c int between 0 and 2\n -Default: `1` -\cgalNPEnd - -\cgalNPBegin{sparse_linear_solver} \anchor PMP_sparse_linear_solver -is the solver used.\n -Type: a class model of `SparseLinearAlgebraWithFactorTraits_d`.\n -Default: if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and -`CGAL_EIGEN3_ENABLED` is defined, then the following overload of `Eigen_solver_traits` -is provided as default value:\n -in `fair()`:\n -\code CGAL::Eigen_solver_traits::EigenType, Eigen::COLAMDOrdering > > \endcode -in `smooth_shape()`:\n -\code CGAL::Eigen_solver_traits::EigenType, Eigen::IncompleteLUT > > \endcode -\cgalNPEnd - -\cgalNPBegin{number_of_iterations} \anchor PMP_number_of_iterations -is the number of iterations of the sequence of iterations performed in `isotropic_remeshing()`.\n -Type: \c unsigned \c int \n -Default: `1` -\cgalNPEnd - -\cgalNPBegin{protect_constraints} \anchor PMP_protect_constraints -enables the protection of constraints listed by \ref PMP_edge_is_constrained_map -"edge_is_constrained_map" and boundary edges -in `isotropic_remeshing()`. If `true`, constraint edges cannot be modified at all -during the remeshing process.\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{collapse_constraints} \anchor PMP_collapse_constraints -enables the collapse of constraints listed by \ref PMP_edge_is_constrained_map -"edge_is_constrained_map" and boundary edges -in `isotropic_remeshing()`. If `false`, constraint edges cannot be collapsed -during the remeshing process.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{relax_constraints} \anchor PMP_relax_constraints -enables the tangential relaxation step in `isotropic_remeshing()` -to be performed on vertices that are endpoints of constraints listed -by \ref PMP_edge_is_constrained_map "edge_is_constrained_map", and boundary edges. -The vertices move along the constrained polylines they belong to. -Corners (i.e. vertices incident to more than 2 constraints, and vertices listed in -\ref PMP_vertex_is_constrained_map "vertex_is_constrained_map") are not allowed -to move at all. -If \ref PMP_protect_constraints "protect_constraints" is -set to `true`, this parameter is ignored.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{number_of_relaxation_steps} \anchor PMP_number_of_relaxation_steps -is the number of iterations of tangential relaxation that are performed at each iteration -of `isotropic_remeshing()`. A larger number of relaxation steps lead to -a more isotropic mesh.\n -Type: \c unsigned \c int \n -Default: `1` -\cgalNPEnd - -\cgalNPBegin{use_delaunay_triangulation} \anchor PMP_use_delaunay_triangulation -enables the use of the Delaunay triangulation facet search space for hole filling functions. -If no valid triangulation can be found in this search space, the algorithm falls back to the -non-Delaunay triangulations search space to find a solution.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{use_2d_constrained_delaunay_triangulation} \anchor PMP_use_2d_constrained_delaunay_triangulation -enables the use of the 2D constrained Delaunay triangulation to triangulate the hole (the default is `true`), -if no valid triangulation can be found, the algorithm falls back to the original algorithm to find a solution.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{use_random_uniform_sampling} \anchor PMP_use_random_uniform_sampling -is a parameter used in `sample_triangle_mesh()` to indicate that the points are picked -in a random uniform way.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{use_grid_sampling} \anchor PMP_use_grid_sampling -is a parameter used in `sample_triangle_mesh()` to indicate that the points are picked -on a grid in each face.\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{use_monte_carlo_sampling} \anchor PMP_use_monte_carlo_sampling -is a parameter used in `sample_triangle_mesh()` to indicate that the points are picked -using a Monte-Carlo approach.\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{sample_edges} \anchor PMP_sample_edges -is a parameter used in `sample_triangle_mesh()` to indicate if a dedicated sampling -of edges is done.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{sample_vertices} \anchor PMP_sample_vertices -is a parameter used in `sample_triangle_mesh()` to indicate that triangle vertices are -copied in the output iterator.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{sample_faces} \anchor PMP_sample_faces -is a parameter used in `sample_triangle_mesh()` to indicate if the interior of faces -is considered for the sampling.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{number_of_points_on_faces} \anchor PMP_number_of_points_on_faces -is a parameter used in `sample_triangle_mesh()` to set the number of points picked -using the random uniform method on faces.\n -Type: `std::size_t` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{number_of_points_on_edges} \anchor PMP_number_of_points_on_edges -is a parameter used in `sample_triangle_mesh()` to set the number of points picked -using the random uniform method on edges.\n -Type: `std::size_t` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{number_of_points_per_face} \anchor PMP_number_of_points_per_face -is a parameter used in `sample_triangle_mesh()` to set the number of points picked -per face using the Monte-Carlo method.\n -Type: `std::size_t` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{number_of_points_per_edge} \anchor PMP_number_of_points_per_edge -is a parameter used in `sample_triangle_mesh()` to set the number of points picked -per edge using the Monte-Carlo method.\n -Type: `std::size_t` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{grid_spacing} \anchor PMP_grid_spacing -is a parameter used in `sample_triangle_mesh()` to set the grid spacing when using -the grid sampling method.\n -Type: `double` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{number_of_points_per_area_unit} \anchor PMP_number_of_points_per_area_unit -is a parameter used in `sample_triangle_mesh()` to set the number of points per -area unit to be picked up in faces for the random uniform sampling and -Monte-Carlo methods.\n -Type: `double` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{number_of_points_per_distance_unit} \anchor PMP_number_of_points_per_distance_unit -is a parameter used in `sample_triangle_mesh()` to set the number of points per -distance unit to be picked up on edges for the random uniform sampling and -Monte-Carlo methods.\n -Type: `double` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{do_project} \anchor PMP_do_project -is a parameter used in `random_perturbation()` to set whether vertices are re-projected -to the input surface after their geometric perturbation.\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{random_seed} \anchor PMP_random_seed -is a parameter used in `random_perturbation()` to choose a seed to initialize -the random number generator `CGAL::Random()`. -If this parameter is not provided, the perturbation is not deterministic -(i.e. not reproducible from one run to the other).\n -Type: `unsigned int` \n -Default: the random number generator is initialized with `CGAL::Random()` -\cgalNPEnd - -\cgalNPBegin{outward_orientation} \anchor PMP_outward_orientation -Parameter used in orientation functions to choose between an outward or inward orientation. -\n -Type: `bool` \n -Default: `true` - -\cgalNPBegin{do_overlap_test_of_bounded_sides} \anchor PMP_do_overlap_test_of_bounded_sides -Parameter used in intersection test functions to indicate whether overlapping tests of bounded sides -of close meshes are done in addition to surface intersection tests. -\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{projection_functor} \anchor PMP_projection_functor -Parameter used in `isotropic_remeshing()` to specify an alternative vertex projection method. -\n -Type: Unary function object with vertex descriptor as argument type. \n -Default: A function object projecting vertices on the input surface. -\cgalNPEnd - -\cgalNPBegin{apply_per_connected_component} \anchor PMP_apply_per_connected_component -Parameter used to indicate whether an algorithm should consider each connected component -of a mesh independently.\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{visitor} \anchor PMP_visitor -Parameter used to pass a visitor class to a function. Its type and behavior depend on the visited function. -\n -Type: `A class` \n -Default: Specific to the function visited -\cgalNPEnd - -\cgalNPBegin{throw_on_self_intersection} \anchor PMP_throw_on_self_intersection -Parameter used in corefinement-related functions to make the functions throw an exception in -case some faces involved in the intersection of the input are self-intersecting -and make the operation impossible with the current version of the code. -\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 -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{use_compact_clipper} \anchor PMP_use_compact_clipper -Parameter used in `clip()` functions to indicate whether the boundary of the clipper -should be considered as part of the clipping volume or not. -\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{output_iterator} \anchor PMP_output_iterator -Parameter to pass an output iterator. -\n -\b Type : a model of `OutputIterator` \n -\b Default : `#CGAL::Emptyset_iterator` -\cgalNPEnd - -\cgalNPBegin{erase_all_duplicates} \anchor PMP_erase_all_duplicates -Parameter used in the function `merge_duplicate_polygons_in_polygon_soup()` to indicate, -when multiple faces are duplicates, whether all the duplicate faces should be removed -or if one (arbitrarily chosen) face should be kept. -\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{require_same_orientation} \anchor PMP_require_same_orientation -Parameter used in the function `merge_duplicate_polygons_in_polygon_soup()` to indicate -if orientation should matter when determining whether two faces are duplicates. -\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{snapping_tolerance} \anchor PMP_snapping_tolerance -Parameter used in the function `locate_in_face()` to to snap barycentric coordinates. Depending on the geometric traits used, -the computation of the barycentric coordinates might be an inexact construction, thus leading -to sometimes surprising values (e.g. a triplet `[0.5, 0.5, -1-e17]` for a point at the middle -of an edge). The coordinates will be snapped towards `0` and `1` if the difference is smaller than the tolerance value, while -still ensuring that the total sum of the coordinates is `1`. -\n -Type: `Kernel::FT` \n -Default: `0` -\cgalNPEnd - -\cgalNPBegin{use_angle_smoothing} \anchor PMP_use_angle_smoothing -Parameter used in the function `smooth_mesh()` to indicate if angle-based smoothing should be used. -When this type of smoothing is used, the algorithm attempts to equalize angles incident to each vertex. -\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{use_area_smoothing} \anchor PMP_use_area_smoothing -Parameter used in the function `smooth_mesh()` to indicate if area-based smoothing should be used. -When this type of smoothing is used, the algorithm attempts to equalize the areas of the triangles -incident to each vertex. Since this can create elongated triangles, a second phase uses Delaunay-based -flips to recover good shapes, unless specified otherwise (see below). -\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{do_orientation_tests} \anchor PMP_do_orientation_tests -Parameter used in `volume_connected_components()` to indicate if a surface orientation test -must be performed to decide whether a surface connected component belong to a volume or not. -\n -\b Type : `bool` \n -\b Default value is `true` -\cgalNPEnd - -\cgalNPBegin{do_self_intersection_tests} \anchor PMP_do_self_intersection_tests -Parameter used in `volume_connected_components()` to indicate if the input triangle mesh -might contains self-intersections that must be taken into account while detecting volume -connected components. -\n -\b Type : `bool` \n -\b Default value is `false` -\cgalNPEnd - -\cgalNPBegin{error_codes} \anchor PMP_error_codes -a reference to an object that must be a model of the `BackInsertionSequence` concept, -holding the classification of a volume connected component identified by its id. -The size of the container is exactly the number of volume connected components and the -object at position `k` in the container corresponds to the classification of the volume connected component -assigned the id `k`. -\n -\b Type: a `reference_wrapper` (either from `boost` or the standard library) - over an object of type `container` \n -\b Default: None -\cgalNPEnd - -\cgalNPBegin{face_connected_component_map} \anchor PMP_face_connected_component_map -a property map that will contain for each face the id -of its surface connected component in the range -`[0, number of connected components - 1[`. -\n -Type: a class model of `WritablePropertyMap` with -`boost::graph_traits::%face_descriptor` as key type and `std::size_t` as value type\n -\b Default: None -\cgalNPEnd - -\cgalNPBegin{volume_inclusions} \anchor PMP_volume_inclusions -a reference to a container holding a container of id of surface connected components. -The container must be a model of the `BackInsertionSequence` concept, -with a value type being a model of `BackInsertionSequence` of ids, -both types having the functions `reserve()` and `push_back()`. -The size of the container is exactly the number of surface connected components of the triangle mesh considered -The container at position `k` contains the id of each surface connected components -that is the first intersected by a ray with source on the surface connected component `k` -and directed outside the finite volume enclosed by the surface connected component `k`. -\n -\b Type: a `reference_wrapper` (either from `boost` or the standard library) - over an object of type `container< container >` \n -\b Default: None -\cgalNPEnd - -\cgalParamBegin{connected_component_id_to_volume_id} \anchor PMP_connected_component_id_to_volume_id -a `reference_wrapper` (either from `boost` or the standard library) containing -a reference to an object that must be a model of the `BackInsertionSequence` concept, -with a value_type being `std::size_t`. -The size of the container is exactly the number of connected components. -For each connected component identified using its id `ccid`, the id of the volume it contributes -to is the value at the position `ccid` in the parameter container. -\n -\b Type: a `reference_wrapper` (either from `boost` or the standard library) - over an object of type `container` \n -\b Default: None -\cgalParamEnd - -\cgalParamBegin{nesting_levels} \anchor PMP_nesting_levels -a `reference_wrapper` (either from `boost` or the standard library) containing -a reference to an object that must be a model of the `BackInsertionSequence` concept, -with a value_type being `std::size_t`. -The size of the container is exactly the number of connected components. -For each connected component identified using its id `ccid`, the container contains the number of -connected components containing on their bounded side this component. -\n -\b Type: a `reference_wrapper` (either from `boost` or the standard library) - over an object of type `container` \n -\b Default: None -\cgalParamEnd - -\cgalParamBegin{is_cc_outward_oriented} \anchor PMP_is_cc_outward_oriented -a `reference_wrapper` (either from `boost` or the standard library) containing -a reference to an object that must be a model of the `BackInsertionSequence` concept, -with a value_type being `bool`. -The size of the container is exactly the number of connected components. -For each connected component identified using its id `ccid`, the output of `is_outward_oriented` -called on the submesh corresponding to this connected component -is the value at the position `ccid` in the parameter container. -\n -\b Type: a `reference_wrapper` (either from `boost` or the standard library) - over an object of type `container` \n -\b Default: None -\cgalParamEnd - -\cgalParamBegin{intersecting_volume_pairs_output_iterator} \anchor PMP_intersecting_volume_pairs_output_iterator -Output iterator into which pairs of ids (id must be convertible to `std::size_t`) can be put. -Each pair of connected components intersecting will be reported using their ids. -If `do_self_intersection_tests` named parameter is set to `false`, nothing will be reported. -\b Type : a model of `OutputIterator` \n -\b Default : `#CGAL::Emptyset_iterator` -\cgalParamEnd - -\cgalNPBegin{use_Delaunay_flips} \anchor PMP_use_Delaunay_flips -Parameter used in the function `smooth_mesh()` to indicate if Delaunay-based flips should be used -after area-based smoothing has been performed. A user wishing to preserve combinatorial information -can set this parameter to `false`, but the mesh might have elongated elements. -\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{use_safety_constraints} \anchor PMP_use_safety_constraints -Parameter used in the function `smooth_mesh()` to indicate if some sanity checks should be used to decide -if the move of a vertex should be applied or rejected. These sanity checks consists of checking that -no face incident to the vertex becomes inverted and that the minimum angle of the incident faces -is not decreased by the move. -\n -Type: `bool` \n -Default: `true` -\cgalNPEnd - -\cgalNPBegin{face_size_map} \anchor PMP_face_size_map -Parameter used in the functions `keep_large_connected_components()` and -`keep_largest_connected_components()` to pass a property map that gives the size of a face when -evaluating the size of a connected component (which is defined as the sum of the sizes of its faces). -\n -Type: a class model of `ReadablePropertyMap` with -`boost::graph_traits::%face_descriptor` as key type and -a value type supporting construction from `0`, `operator+=()`, and comparison operators. \n -Default: `CGAL::Constant_property_map` with value `1` -\cgalNPEnd - -\cgalNPBegin{area_threshold} \anchor PMP_area_threshold -Parameter used in the function `remove_connected_components_of_negligible_size()` -to pass a threshold value such that all connected components with an area smaller -than this value are removed from the mesh. -\n -Type: `Kernel::FT` \n -Default: The square of one percent of the length of the diagonal of the bounding box of the mesh. -\cgalNPEnd - -\cgalNPBegin{volume_threshold} \anchor PMP_volume_threshold -Parameter used in the function `remove_connected_components_of_negligible_size()` -to pass a threshold value such that all (closed) connected components with a volume smaller -than this value are removed from the mesh. -\n -Type: `Kernel::FT` \n -Default: The third power of one percent of the length of the diagonal of the bounding box of the mesh. -\cgalNPEnd - - -\cgalNPBegin{dry_run} \anchor PMP_dry_run -Parameter that tells a function not to alter the input, but rather to only return the expected result. -It is for example used in the fucntion `keep_large_connected_components()`. -\n -Type: `bool` \n -Default: `false` -\cgalNPEnd - -\cgalNPBegin{maximum_number_of_faces} \anchor PMP_maximum_number_of_faces - -Parameter that specifies the maximum number of faces that a component -of a mesh can have to be considered reversible \n -If it is left default, then it is ignored and all components are considered reversible. \n -Type: `size_type` \n -Default: 0 -\cgalNPEnd - -\cgalNPTableEnd - -*/ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index 9341f0e8eec..cba88c6c27f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -176,7 +176,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, Q, tracer, is_valid, k)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 84b86c5f7e0..f876f839488 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1210,16 +1210,87 @@ public: ************************************************************************/ // /!\ points.first == points.last +template +bool is_planar_2( + const std::vector& points, + const typename Traits::Vector_3& avg_normal, + const typename Traits::FT max_distance, + const Traits& traits) { + + typedef typename Traits::FT FT; + typedef typename Traits::Point_3 Point_3; + typedef typename Traits::Plane_3 Plane_3; + typedef typename Traits::Compute_squared_distance_3 Squared_distance_3; + + const Squared_distance_3 squared_distance_3 = + traits.compute_squared_distance_3_object(); + + const std::size_t n = points.size() - 1; // the first equals to the last + if (n < 3) + return false; // cant be a plane! + + // Compute centroid. + FT cx = FT(0), cy = FT(0), cz = FT(0); + for (std::size_t i = 0; i < n; ++i) { + const Point_3& p = points[i]; + cx += p.x(); + cy += p.y(); + cz += p.z(); + } + cx /= static_cast(n); + cy /= static_cast(n); + cz /= static_cast(n); + const Point_3 centroid = Point_3(cx, cy, cz); + + // Compute covariance matrix. + FT xx = FT(0), yy = FT(0), zz = FT(0); + FT xy = FT(0), xz = FT(0), yz = FT(0); + for (std::size_t i = 0; i < n; ++i) { + const Point_3& p = points[i]; + const FT dx = p.x() - cx; + const FT dy = p.y() - cy; + const FT dz = p.z() - cz; + xx += dx * dx; yy += dy * dy; zz += dz * dz; + xy += dx * dy; xz += dx * dz; yz += dy * dz; + } + + // Check the planarity. + const FT x = yy * zz - yz * yz; + const FT y = xx * zz - xz * xz; + const FT z = xx * yy - xy * xy; + FT maxv = -FT(1); + maxv = (CGAL::max)(maxv, x); + maxv = (CGAL::max)(maxv, y); + maxv = (CGAL::max)(maxv, z); + if (maxv <= FT(0)) + return false; // a good plane does not exist for sure! + + const Plane_3 plane = Plane_3(centroid, avg_normal); + FT avg_sq_distance = FT(0); + for (std::size_t i = 0; i < n; ++i) { + const Point_3& p = points[i]; + const Point_3 q = plane.projection(p); + avg_sq_distance += squared_distance_3(p, q); + } + avg_sq_distance /= static_cast(n); + // std::cout << "avg squared distance: " << avg_sq_distance << std::endl; + + const FT sq_tolerance = max_distance * max_distance; + if (avg_sq_distance > sq_tolerance) + return false; // the user distance criteria are not satisfied! + + // std::cout << "The hole seems to be near planar." << std::endl; + return true; +} + template < - typename PointRange1, // need size() - typename PointRange2, + typename PointRange, // need size() typename Tracer, typename Validity_checker, typename Traits > bool -triangulate_hole_polyline_with_cdt(const PointRange1& points, - const PointRange2& third_points, +triangulate_hole_polyline_with_cdt(const PointRange& points, Tracer& tracer, const Validity_checker& is_valid, const Traits& traits) @@ -1228,30 +1299,21 @@ triangulate_hole_polyline_with_cdt(const PointRange1& points, typedef typename Traits::Point_3 Point_3; typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Collinear_3 Collinear_3; - typedef typename Traits::Compute_squared_length_3 Squared_length_3; // Compute an average normal of the hole. - const Squared_length_3 squared_length_3 = - traits.compute_squared_length_3_object(); const Collinear_3 collinear_3 = traits.collinear_3_object(); std::vector P(boost::begin(points), boost::end(points)); - std::vector Q(boost::begin(third_points), boost::end(third_points)); - - if (P.front() != P.back()) { + CGAL_assertion(P.size() >= 3); + if (P.front() != P.back()) P.push_back(P.front()); - if (!Q.empty() && P.size() > Q.size()) { - Q.push_back(Q.front()); - } - } - CGAL_assertion(P.size() == Q.size()); FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; const Point_3& ref_point = P[0]; const std::size_t size = P.size() - 1; - for (std::size_t i = 1; i < size; ++i) { + for (std::size_t i = 1; i < size - 1; ++i) { const std::size_t ip = i + 1; const Point_3& p1 = ref_point; // 3 points, which form a triangle @@ -1279,37 +1341,17 @@ triangulate_hole_polyline_with_cdt(const PointRange1& points, if (num_normals < 1) return false; - // Find non-collinear the hole boundary points in order - // to check the hole orientation. - std::vector pts; - pts.reserve(3); - pts.push_back(ref_point); - for (std::size_t i = 1; i < size; ++i) { - const std::size_t ip = i + 1; - const Point_3& p1 = ref_point; - const Point_3& p2 = P[i]; - const Point_3& p3 = P[ip]; - if (!collinear_3(p1, p2, p3)) { - pts.push_back(p2); - pts.push_back(p3); - break; - } - } - - // Not sure about that! - if (CGAL::orientation(pts[0], pts[1], pts[2], Q[0]) != CGAL::NEGATIVE) { - // std::cout << "positive" << std::endl; - } else { - // std::cout << "negative" << std::endl; - x = -x; y = -y; z = -z; - } - // Setting the final normal. x /= static_cast(num_normals); y /= static_cast(num_normals); z /= static_cast(num_normals); const Vector_3 avg_normal = Vector_3(x, y, z); - // std::cout << "avg: " << avg_normal << std::endl; + // std::cout << "avg normal: " << avg_normal << std::endl; + + // Checking the hole planarity. + const FT max_distance = FT(2) / FT(100); + if (!is_planar_2(P, avg_normal, max_distance, traits)) + return false; // Checking the hole simplicity. typedef Triangulation_2_projection_traits_3 P_traits; @@ -1318,88 +1360,81 @@ triangulate_hole_polyline_with_cdt(const PointRange1& points, return false; Lookup_table_map lambda(static_cast(size), -1); + // Create and fill the cdt_2. typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; typedef CGAL::Triangulation_face_base_with_info_2 Fbi; typedef CGAL::Constrained_triangulation_face_base_2 Fb; - typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::No_constraint_intersection_tag Itag; // If the polygon is simple, there should be no intersection. + typedef CGAL::Triangulation_data_structure_2 TDS; + // If the polygon is simple, there should be no intersection. + typedef CGAL::No_constraint_intersection_tag Itag; typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; P_traits cdt_traits(avg_normal); CDT cdt(cdt_traits); - std::vector< std::pair > points_and_ids; + std::vector< std::pair > points_and_ids; points_and_ids.reserve(size); - std::vector vertices(size); for (std::size_t i = 0; i < size; ++i) - { - points_and_ids.push_back(std::make_pair(P[i],i)); - } + points_and_ids.push_back(std::make_pair(P[i], i)); + + std::vector vertices(size); cdt.insert(points_and_ids.begin(), points_and_ids.end()); for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) - { vertices[v->info()] = v; + + for (std::size_t i = 0; i < size; ++i) { + const std::size_t ip = (i + 1) % size; + if (vertices[i] != vertices[ip]) + cdt.insert_constraint(vertices[i], vertices[ip]); } - for (std::size_t i = 0; i < size; ++i) - { - cdt.insert_constraint(vertices[i], vertices[(i + 1) % (size)]); - } - - // Sets mark is_external. + // Mark external faces. for (typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), - end = cdt.all_faces_end(); fit != end; ++fit) - { + end = cdt.all_faces_end(); fit != end; ++fit) fit->info() = false; - } + std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); - while (!face_queue.empty()) - { + while (!face_queue.empty()) { + typename CDT::Face_handle fh = face_queue.front(); face_queue.pop(); - if (fh->info()) continue; fh->info() = true; for (std::size_t i = 0; i < 3; ++i) - { if (!cdt.is_constrained(typename CDT::Edge(fh, i))) - { face_queue.push(fh->neighbor(i)); - } - } } - if (cdt.dimension() != 2 || - cdt.number_of_vertices() != size) - { + + if (cdt.dimension() != 2 || cdt.number_of_vertices() != size) return false; - } // Fill the lambda. for (typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), - end = cdt.finite_faces_end(); fit != end; ++fit) - { - if (!fit->info()) // if !is external - { + end = cdt.finite_faces_end(); fit != end; ++fit) { + if (!fit->info()) { // if it is not external + std::vector is(3); for (std::size_t i = 0; i < 3; ++i) - { is[i] = fit->vertex(i)->info(); - } + std::sort(is.begin(), is.end()); - lambda.put(is[0],is[2], is[1]); + lambda.put(is[0], is[2], is[1]); if (!is_valid(P, is[0], is[1], is[2])) return false; } } - // Call the tracer. + // Call the tracer. It correctly orients the patch faces. + // std::cout << "CDT is being used!" << std::endl; tracer(lambda, 0, size - 1); return true; } + #endif + /******************************************************************************* * Internal entry point for both polyline and Polyhedron_3 triangulation functions ***********************************************************************************/ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 21e542f434d..80ac30259b4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -50,24 +50,37 @@ namespace Polygon_mesh_processing { @tparam PolygonMesh a model of `MutableFaceGraph` @tparam OutputIterator a model of `OutputIterator` holding `boost::graph_traits::%face_descriptor` for patch faces. - @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh containing the hole @param border_halfedge a border halfedge incident to the hole @param out iterator over patch faces - @param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin - \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. - If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` must be available in `PolygonMesh`\cgalParamEnd - \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. - If no valid triangulation can be found in this search space, the algorithm falls back to the - non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation - to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the - original algorithm to find a solution.\cgalParamEnd - \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{a property map associating points to the vertices of `pmesh`} + \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + as key type and `%Point_3` as value type} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + must be available in `PolygonMesh`.} + \cgalParamNEnd + + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + + \cgalParamNBegin{use_delaunay_triangulation} + \cgalParamDescription{If `true`, use the Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution.} + \cgalParamNEnd \cgalNamedParamsEnd @return `out` @@ -152,27 +165,45 @@ namespace Polygon_mesh_processing { holding `boost::graph_traits::%face_descriptor` for patch faces. @tparam VertexOutputIterator model of `OutputIterator` holding `boost::graph_traits::%vertex_descriptor` for patch vertices. - @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole @param face_out output iterator over patch faces @param vertex_out output iterator over patch vertices without including the boundary - @param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin - \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. - If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` should be available in `PolygonMesh`\cgalParamEnd - \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values - cause denser refinements, as in `refine()` \cgalParamEnd - \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. - If no valid triangulation can be found in this search space, the algorithm falls back to the - non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation - to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the - original algorithm to find a solution.\cgalParamEnd - \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{a property map associating points to the vertices of `pmesh`} + \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + as key type and `%Point_3` as value type} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + must be available in `PolygonMesh`.} + \cgalParamNEnd + + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + + \cgalParamNBegin{use_delaunay_triangulation} + \cgalParamDescription{If `true`, use the Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution.} + \cgalParamNEnd + + \cgalParamNBegin{density_control_factor} + \cgalParamDescription{factor to control density of the ouput mesh, + where larger values cause denser refinements, as in `refine()`} + \cgalParamType{double} + \cgalParamDefault{\f$ \sqrt{2}\f$} + \cgalParamNEnd \cgalNamedParamsEnd @return pair of `face_out` and `vertex_out` @@ -225,30 +256,63 @@ namespace Polygon_mesh_processing { holding `boost::graph_traits::%face_descriptor` for patch faces @tparam VertexOutputIterator model of `OutputIterator` holding `boost::graph_traits::%vertex_descriptor` for patch vertices - @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole @param face_out output iterator over patch faces @param vertex_out output iterator over patch vertices without including the boundary - @param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin - \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. - If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` should be available in `PolygonMesh` - \cgalParamEnd - \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. - If no valid triangulation can be found in this search space, the algorithm falls back to the - non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation - to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the - original algorithm to find a solution.\cgalParamEnd - \cgalParamBegin{density_control_factor} factor to control density of the ouput mesh, where larger values - cause denser refinements, as in `refine()` \cgalParamEnd - \cgalParamBegin{fairing_continuity} tangential continuity of the output surface patch \cgalParamEnd - \cgalParamBegin{sparse_linear_solver} an instance of the sparse linear solver used for fairing \cgalParamEnd - \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{a property map associating points to the vertices of `pmesh`} + \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + as key type and `%Point_3` as value type} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + must be available in `PolygonMesh`.} + \cgalParamNEnd + + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + + \cgalParamNBegin{use_delaunay_triangulation} + \cgalParamDescription{If `true`, use the Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution.} + \cgalParamNEnd + + \cgalParamNBegin{density_control_factor} + \cgalParamDescription{factor to control density of the ouput mesh, + where larger values cause denser refinements, as in `refine()`} + \cgalParamType{double} + \cgalParamDefault{\f$ \sqrt{2}\f$} + \cgalParamNEnd + + \cgalParamNBegin{fairing_continuity} + \cgalParamDescription{A value controling the tangential continuity of the output surface patch. + The possible values are 0, 1 and 2, refering to the C0, C1 + and C2 continuity.} + \cgalParamType{unsigned int} + \cgalParamDefault{`1`} + \cgalParamExtra{The larger `fairing_continuity` gets, the more fixed vertices are required.} + \cgalParamNEnd + + \cgalParamNBegin{sparse_linear_solver} + \cgalParamDescription{an instance of the sparse linear solver used for fairing} + \cgalParamType{a class model of `SparseLinearAlgebraWithFactorTraits_d`} + \cgalParamDefault{If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and + `CGAL_EIGEN3_ENABLED` is defined, then the following overload of `Eigen_solver_traits` + is provided as default value:\n + `CGAL::Eigen_solver_traits::%EigenType, Eigen::COLAMDOrdering > >`} + \cgalParamNEnd \cgalNamedParamsEnd @return tuple of @@ -328,22 +392,29 @@ namespace Polygon_mesh_processing { and the corresponding value type `type` must have a constructor `type(int p0, int p1, int p2)` available. The indices correspond to the ones of input points in `points`. - @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param points the range of input points @param third_points the range of third points @param out iterator over output patch triangles, described by indices of points in `points` - @param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin - \cgalParamBegin{use_delaunay_triangulation} if `true`, use the Delaunay triangulation facet search space. - If no valid triangulation can be found in this search space, the algorithm falls back to the - non-Delaunay triangulations search space to find a solution \cgalParamEnd - \cgalParamBegin{use_2d_constrained_delaunay_triangulation} if `true` (the default), use the 2D constrained Delaunay triangulation - to triangulate the hole. If no valid triangulation can be found, the algorithm falls back to the - original algorithm to find a solution.\cgalParamEnd - \cgalParamBegin{geom_traits} a geometric traits class instance \cgalParamEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + + \cgalParamNBegin{use_delaunay_triangulation} + \cgalParamDescription{If `true`, use the Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution.} + \cgalParamNEnd \cgalNamedParamsEnd \todo handle islands @@ -399,7 +470,6 @@ bool use_dt3 = if(!use_cdt || !triangulate_hole_polyline_with_cdt( points, - third_points, tracer, is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)))) @@ -426,7 +496,7 @@ bool use_dt3 = /*! \ingroup hole_filling_grp - same as above but the range of third points is omitted. They are not + Same as above but the range of third points is omitted. They are not taken into account in the cost computation that leads the hole filling. */ template #include #include +#include template< class PolygonMesh, @@ -96,6 +97,8 @@ void test_triangulate_hole_with_cdt_2( assert(patch_faces.size() == num_patch_faces); } assert(pmesh.is_valid() && is_closed(pmesh)); + assert(CGAL::Polygon_mesh_processing::is_outward_oriented(pmesh, + CGAL::parameters::all_default())); // Writing the file. if (verbose) { @@ -124,7 +127,7 @@ int main(int argc, char **argv) { test_triangulate_hole_with_cdt_2( "exact_exact", argc, argv, "w_horizontal_hole", 2, 25, false); std::cout << - "test_triangulate_hole_with_cdt_2: horizontal hole SUCCESS" << std::endl; + "test_triangulate_hole_with_cdt_2: horizontal planar hole SUCCESS" << std::endl; // Checking on a data file with two planar, simple, and orthogonal holes. test_triangulate_hole_with_cdt_2( @@ -132,23 +135,39 @@ int main(int argc, char **argv) { test_triangulate_hole_with_cdt_2( "exact_exact", argc, argv, "w_orthogonal_hole", 2, 2, false); std::cout << - "test_triangulate_hole_with_cdt_2: orthogonal hole SUCCESS" << std::endl; + "test_triangulate_hole_with_cdt_2: orthogonal planar hole SUCCESS" << std::endl; + + // Checking on a data file with two planar, simple, and horizontal holes. + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, "elephant_flat_hole", 1, 17, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, "elephant_flat_hole", 1, 17, false); + std::cout << + "test_triangulate_hole_with_cdt_2: near flat hole SUCCESS" << std::endl; + + // Checking on a data file with two planar, simple, and horizontal holes. + test_triangulate_hole_with_cdt_2( + "exact_inexact", argc, argv, "elephant_concave_hole", 1, 24, false); + test_triangulate_hole_with_cdt_2( + "exact_exact", argc, argv, "elephant_concave_hole", 1, 24, false); + std::cout << + "test_triangulate_hole_with_cdt_2: concave hole SUCCESS" << std::endl; // Checking on a data file with one simple but not a planar hole. test_triangulate_hole_with_cdt_2( - "exact_inexact", argc, argv, "elephant_simple_hole", 1, 19, false); + "exact_inexact", argc, argv, "elephant_curved_hole", 1, 19, false); test_triangulate_hole_with_cdt_2( - "exact_exact", argc, argv, "elephant_simple_hole", 1, 19, false); + "exact_exact", argc, argv, "elephant_curved_hole", 1, 19, false); std::cout << - "test_triangulate_hole_with_cdt_2: simple hole SUCCESS" << std::endl; + "test_triangulate_hole_with_cdt_2: curved hole SUCCESS" << std::endl; // Checking on a data file with one hole that is neither simple nor planar. test_triangulate_hole_with_cdt_2( - "exact_inexact", argc, argv, "elephant_nonsimple_hole", 1, 29, false); + "exact_inexact", argc, argv, "elephant_complex_hole", 1, 29, false); test_triangulate_hole_with_cdt_2( - "exact_exact", argc, argv, "elephant_nonsimple_hole", 1, 29, false); + "exact_exact", argc, argv, "elephant_complex_hole", 1, 29, false); std::cout << - "test_triangulate_hole_with_cdt_2: non simple hole SUCCESS" << std::endl; + "test_triangulate_hole_with_cdt_2: complex hole SUCCESS" << std::endl; return EXIT_SUCCESS; } From ddf82f11d2f8f669f1080344fb7d9b21b41cd91e Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 3 Aug 2020 18:32:42 +0200 Subject: [PATCH 050/317] andreas review fixes --- .../Hole_filling/Triangulate_hole_polyline.h | 92 ++++++++++++------- .../triangulate_hole.h | 2 +- .../triangulate_hole_with_cdt_2_test.cpp | 14 ++- 3 files changed, 67 insertions(+), 41 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index f876f839488..7b31d96b06f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -24,6 +24,7 @@ #endif #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +#include #include #include #include @@ -1210,6 +1211,15 @@ public: ************************************************************************/ // /!\ points.first == points.last +template +struct Pair_from_point { + typedef Point_3 argument_type; + typedef std::pair result_type; + result_type operator() (const argument_type& p) const { + return std::make_pair(p, FT(1)); + } +}; + template bool is_planar_2( const std::vector& points, @@ -1226,30 +1236,25 @@ bool is_planar_2( traits.compute_squared_distance_3_object(); const std::size_t n = points.size() - 1; // the first equals to the last - if (n < 3) + if (n < 3) { return false; // cant be a plane! + } // Compute centroid. - FT cx = FT(0), cy = FT(0), cz = FT(0); - for (std::size_t i = 0; i < n; ++i) { - const Point_3& p = points[i]; - cx += p.x(); - cy += p.y(); - cz += p.z(); - } - cx /= static_cast(n); - cy /= static_cast(n); - cz /= static_cast(n); - const Point_3 centroid = Point_3(cx, cy, cz); + const Point_3 centroid = CGAL::barycenter( + boost::make_transform_iterator( + points.begin(), Pair_from_point()), + boost::make_transform_iterator( + points.end() - 1, Pair_from_point())); // Compute covariance matrix. FT xx = FT(0), yy = FT(0), zz = FT(0); FT xy = FT(0), xz = FT(0), yz = FT(0); for (std::size_t i = 0; i < n; ++i) { const Point_3& p = points[i]; - const FT dx = p.x() - cx; - const FT dy = p.y() - cy; - const FT dz = p.z() - cz; + const FT dx = p.x() - centroid.x(); + const FT dy = p.y() - centroid.y(); + const FT dz = p.z() - centroid.z(); xx += dx * dx; yy += dy * dy; zz += dz * dz; xy += dx * dy; xz += dx * dz; yz += dy * dz; } @@ -1262,8 +1267,9 @@ bool is_planar_2( maxv = (CGAL::max)(maxv, x); maxv = (CGAL::max)(maxv, y); maxv = (CGAL::max)(maxv, z); - if (maxv <= FT(0)) + if (maxv <= FT(0)) { return false; // a good plane does not exist for sure! + } const Plane_3 plane = Plane_3(centroid, avg_normal); FT avg_sq_distance = FT(0); @@ -1275,9 +1281,10 @@ bool is_planar_2( avg_sq_distance /= static_cast(n); // std::cout << "avg squared distance: " << avg_sq_distance << std::endl; - const FT sq_tolerance = max_distance * max_distance; - if (avg_sq_distance > sq_tolerance) + const FT sq_tolerance = CGAL::square(max_distance); + if (avg_sq_distance > sq_tolerance) { return false; // the user distance criteria are not satisfied! + } // std::cout << "The hole seems to be near planar." << std::endl; return true; @@ -1306,8 +1313,9 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, std::vector P(boost::begin(points), boost::end(points)); CGAL_assertion(P.size() >= 3); - if (P.front() != P.back()) + if (P.front() != P.back()) { P.push_back(P.front()); + } FT x = FT(0), y = FT(0), z = FT(0); std::size_t num_normals = 0; @@ -1321,8 +1329,9 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, const Point_3& p3 = P[ip]; // Skip in case we have collinear points. - if (collinear_3(p1, p2, p3)) + if (collinear_3(p1, p2, p3)) { continue; + } // Computing the normal of a triangle. const Vector_3 n = CGAL::normal(p1, p2, p3); @@ -1338,8 +1347,9 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, ++num_normals; } - if (num_normals < 1) + if (num_normals < 1) { return false; + } // Setting the final normal. x /= static_cast(num_normals); @@ -1350,14 +1360,16 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // Checking the hole planarity. const FT max_distance = FT(2) / FT(100); - if (!is_planar_2(P, avg_normal, max_distance, traits)) + if (!is_planar_2(P, avg_normal, max_distance, traits)) { return false; + } // Checking the hole simplicity. typedef Triangulation_2_projection_traits_3 P_traits; const P_traits p_traits(avg_normal); - if (!is_simple_2(P.begin(), P.end() - 1, p_traits)) - return false; + if (!is_simple_2(P.begin(), P.end() - 1, p_traits)) { + return false; + } Lookup_table_map lambda(static_cast(size), -1); @@ -1374,24 +1386,28 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, std::vector< std::pair > points_and_ids; points_and_ids.reserve(size); - for (std::size_t i = 0; i < size; ++i) + for (std::size_t i = 0; i < size; ++i) { points_and_ids.push_back(std::make_pair(P[i], i)); + } std::vector vertices(size); cdt.insert(points_and_ids.begin(), points_and_ids.end()); - for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) + for (typename CDT::Vertex_handle v : cdt.finite_vertex_handles()) { vertices[v->info()] = v; + } for (std::size_t i = 0; i < size; ++i) { const std::size_t ip = (i + 1) % size; - if (vertices[i] != vertices[ip]) + if (vertices[i] != vertices[ip]) { cdt.insert_constraint(vertices[i], vertices[ip]); + } } // Mark external faces. for (typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), - end = cdt.all_faces_end(); fit != end; ++fit) + end = cdt.all_faces_end(); fit != end; ++fit) { fit->info() = false; + } std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); @@ -1399,31 +1415,37 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, typename CDT::Face_handle fh = face_queue.front(); face_queue.pop(); - if (fh->info()) + if (fh->info()) { continue; + } fh->info() = true; - for (std::size_t i = 0; i < 3; ++i) - if (!cdt.is_constrained(typename CDT::Edge(fh, i))) + for (std::size_t i = 0; i < 3; ++i) { + if (!cdt.is_constrained(typename CDT::Edge(fh, i))) { face_queue.push(fh->neighbor(i)); + } + } } - if (cdt.dimension() != 2 || cdt.number_of_vertices() != size) + if (cdt.dimension() != 2 || cdt.number_of_vertices() != size) { return false; + } // Fill the lambda. for (typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), - end = cdt.finite_faces_end(); fit != end; ++fit) { + end = cdt.finite_faces_end(); fit != end; ++fit) { if (!fit->info()) { // if it is not external std::vector is(3); - for (std::size_t i = 0; i < 3; ++i) + for (std::size_t i = 0; i < 3; ++i) { is[i] = fit->vertex(i)->info(); + } std::sort(is.begin(), is.end()); lambda.put(is[0], is[2], is[1]); - if (!is_valid(P, is[0], is[1], is[2])) + if (!is_valid(P, is[0], is[1], is[2])) { return false; + } } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 80ac30259b4..7f9dab5fb5a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -496,7 +496,7 @@ bool use_dt3 = /*! \ingroup hole_filling_grp - Same as above but the range of third points is omitted. They are not + same as above but the range of third points is omitted. They are not taken into account in the cost computation that leads the hole filling. */ template ::halfedge_descriptor Halfedge_handle; // Reading the file. - if (verbose) + if (verbose) { std::cout << "test with the " << kernel_name << " kernel:" << std::endl; + } PolygonMesh pmesh; std::string path = "data/" + file_name + ".off"; std::ifstream in(path.c_str(), std::ios_base::in); CGAL::set_ascii_mode(in); CGAL::read_off(in, pmesh); in.close(); - if (verbose) + if (verbose) { std::cout << "* finished reading the file" << std::endl; + } // Detecting the hole borders. std::vector borders; detect_borders(pmesh, borders); - if (verbose) + if (verbose) { std::cout << "* number of detected borders: " << borders.size() << std::endl; + } assert(borders.size() == num_borders); // Triangulating the holes. @@ -91,14 +94,15 @@ void test_triangulate_hole_with_cdt_2( use_2d_constrained_delaunay_triangulation(true). geom_traits(GeomTraits())); - if (verbose) + if (verbose) { std::cout << "* number of faces in the constructed patch: " << patch_faces.size() << std::endl; + } assert(patch_faces.size() == num_patch_faces); } assert(pmesh.is_valid() && is_closed(pmesh)); assert(CGAL::Polygon_mesh_processing::is_outward_oriented(pmesh, - CGAL::parameters::all_default())); + CGAL::parameters::all_default())); // Writing the file. if (verbose) { From 22c110e22a1da67c82f4f3e82de029c3c975f562 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 4 Aug 2020 09:49:37 +0200 Subject: [PATCH 051/317] using traits functor for projection --- .../Hole_filling/Triangulate_hole_polyline.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 7b31d96b06f..83ba81e9c08 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1224,14 +1224,17 @@ template bool is_planar_2( const std::vector& points, const typename Traits::Vector_3& avg_normal, - const typename Traits::FT max_distance, + const typename Traits::FT max_sq_distance, const Traits& traits) { typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; typedef typename Traits::Plane_3 Plane_3; + typedef typename Traits::Construct_projected_point_3 Projection_3; typedef typename Traits::Compute_squared_distance_3 Squared_distance_3; + const Projection_3 projection_3 = + traits.construct_projected_point_3_object(); const Squared_distance_3 squared_distance_3 = traits.compute_squared_distance_3_object(); @@ -1275,14 +1278,13 @@ bool is_planar_2( FT avg_sq_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { const Point_3& p = points[i]; - const Point_3 q = plane.projection(p); + const Point_3 q = projection_3(plane, p); avg_sq_distance += squared_distance_3(p, q); } avg_sq_distance /= static_cast(n); // std::cout << "avg squared distance: " << avg_sq_distance << std::endl; - const FT sq_tolerance = CGAL::square(max_distance); - if (avg_sq_distance > sq_tolerance) { + if (avg_sq_distance > max_sq_distance) { return false; // the user distance criteria are not satisfied! } @@ -1359,8 +1361,8 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // std::cout << "avg normal: " << avg_normal << std::endl; // Checking the hole planarity. - const FT max_distance = FT(2) / FT(100); - if (!is_planar_2(P, avg_normal, max_distance, traits)) { + const FT max_sq_distance = FT(4) / FT(10000); + if (!is_planar_2(P, avg_normal, max_sq_distance, traits)) { return false; } From 15282ab3fa5686a3fffd52df63ca72624577732e Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 21 Aug 2020 11:21:50 +0200 Subject: [PATCH 052/317] barycenter changed to centroid from PCA with LGPL --- .../Hole_filling/Triangulate_hole_polyline.h | 18 +++--------------- .../Polygon_mesh_processing/dependencies | 1 + 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 83ba81e9c08..d73b5d44b5e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -24,7 +24,7 @@ #endif #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 -#include +#include #include #include #include @@ -1211,15 +1211,6 @@ public: ************************************************************************/ // /!\ points.first == points.last -template -struct Pair_from_point { - typedef Point_3 argument_type; - typedef std::pair result_type; - result_type operator() (const argument_type& p) const { - return std::make_pair(p, FT(1)); - } -}; - template bool is_planar_2( const std::vector& points, @@ -1244,11 +1235,8 @@ bool is_planar_2( } // Compute centroid. - const Point_3 centroid = CGAL::barycenter( - boost::make_transform_iterator( - points.begin(), Pair_from_point()), - boost::make_transform_iterator( - points.end() - 1, Pair_from_point())); + const Point_3 centroid = + CGAL::centroid(points.begin(), points.end() - 1); // Compute covariance matrix. FT xx = FT(0), yy = FT(0), zz = FT(0); diff --git a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies index 560b9907715..e0691224967 100644 --- a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies +++ b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies @@ -21,6 +21,7 @@ Modular_arithmetic Number_types Polygon Polygon_mesh_processing +Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From e4ff67650353c452082bc664f9bf8ab6be5769ab Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 30 Sep 2020 13:26:37 +0300 Subject: [PATCH 053/317] 1st revision --- .../oriented_side.cpp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp new file mode 100644 index 00000000000..9805b412b74 --- /dev/null +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp @@ -0,0 +1,45 @@ +/*! \file oriented_side.cpp + * Compute the oriented side of a point and a polygon with holes. + */ + +#include +#include + +typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef Kernel::Point_2 Point_2; +typedef CGAL::Polygon_2 Polygon_2; +typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; + +# define nice(os) ((os == CGAL::ON_ORIENTED_BOUNDARY) ? "on boundary" : \ + (os == CGAL::POSITIVE) ? "inside" : "outside") + +int main() { + Polygon_2 hole_pgn; + hole_pgn.push_back(Point_2(1, 1)); + hole_pgn.push_back(Point_2(1, 2)); + hole_pgn.push_back(Point_2(2, 2)); + hole_pgn.push_back(Point_2(2, 1)); + + Polygon_2 out_pgn; + out_pgn.push_back(Point_2(0, 0)); + out_pgn.push_back(Point_2(3, 0)); + out_pgn.push_back(Point_2(3, 3)); + out_pgn.push_back(Point_2(0, 3)); + + Polygon_with_holes_2 pwh(out_pgn, &hole_pgn, &hole_pgn+1); + std::cout << pwh << std::endl; + + auto os = CGAL::oriented_side(Point_2(0, 0), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + os = CGAL::oriented_side(Point_2(0.5, 0.5), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + os = CGAL::oriented_side(Point_2(1, 1), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + os = CGAL::oriented_side(Point_2(2.5, 2.5), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + os = CGAL::oriented_side(Point_2(3, 3), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + os = CGAL::oriented_side(Point_2(3.5, 3.5), pwh); + std::cout << "(0,0) is : " << nice(os) << std::endl; + return 0; +} From bd1501e184aeafd9771899135f8fdef6f3d4dc30 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 30 Sep 2020 13:32:54 +0300 Subject: [PATCH 054/317] Cleaned up --- .../oriented_side.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp index 9805b412b74..80a4f3ff66f 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/oriented_side.cpp @@ -14,19 +14,19 @@ typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; (os == CGAL::POSITIVE) ? "inside" : "outside") int main() { - Polygon_2 hole_pgn; - hole_pgn.push_back(Point_2(1, 1)); - hole_pgn.push_back(Point_2(1, 2)); - hole_pgn.push_back(Point_2(2, 2)); - hole_pgn.push_back(Point_2(2, 1)); + Polygon_2 hole; + hole.push_back(Point_2(1, 1)); + hole.push_back(Point_2(1, 2)); + hole.push_back(Point_2(2, 2)); + hole.push_back(Point_2(2, 1)); - Polygon_2 out_pgn; - out_pgn.push_back(Point_2(0, 0)); - out_pgn.push_back(Point_2(3, 0)); - out_pgn.push_back(Point_2(3, 3)); - out_pgn.push_back(Point_2(0, 3)); + Polygon_2 out; + out.push_back(Point_2(0, 0)); + out.push_back(Point_2(3, 0)); + out.push_back(Point_2(3, 3)); + out.push_back(Point_2(0, 3)); - Polygon_with_holes_2 pwh(out_pgn, &hole_pgn, &hole_pgn+1); + Polygon_with_holes_2 pwh(out, &hole, &hole+1); std::cout << pwh << std::endl; auto os = CGAL::oriented_side(Point_2(0, 0), pwh); From 8eace7b066ae0accffe31236558683c545ad1fd0 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 1 Oct 2020 00:01:58 +0300 Subject: [PATCH 055/317] Construct opposite only if CGAL_ALWAYS_LEFT_TO_RIGHT --- Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 6d61db9e61e..941bbb0333a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -852,9 +852,11 @@ public: if (x_seg != nullptr) { X_monotone_subcurve_2 seg = *x_seg; +#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT // If for some reason the subcurve intersection // results in left oriented curve. if (cmp_seg_endpts(seg) == LARGER) seg = construct_opposite(seg); +#endif ocv.push_back(seg); } From 7e7ee4d4a3a52dca8636307767aad0aee69c9568 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 1 Oct 2020 02:13:11 +0300 Subject: [PATCH 056/317] An uplift --- .../CGAL/Boolean_set_operations_2.h | 1277 +++++++++-------- 1 file changed, 665 insertions(+), 612 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 4f1ed78e348..11f006379e7 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -1,176 +1,171 @@ namespace CGAL { -/*! -\addtogroup boolean_complement Complement Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_complement +/*! \addtogroup boolean_complement Complement Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_complement + * + * The `complement` function is overloaded. Depending on the type of polygon + * `pgn` the complement is either a single (general) polygon with holes, or + * several (general) poylgons with holes. In the latter case the `complement + * function` writes them into an output iterator `oi`. + * + * \param pgn The input polygon for the `complement` function. It may be of the + * type `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or + * `General_polygon_with_holes_2`. + * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + * \sa \link boolean_intersection `CGAL::intersection()` \endlink + * \sa \link boolean_join `CGAL::join()` \endlink + * \sa \link boolean_difference `CGAL::difference()` \endlink + * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink + */ -The `complement` function is overloaded. Depending on the -type of polygon `pgn` the complement is either a single (general) polygon with -holes, or several (general) poylgons with holes. In the latter case -the `complement function` writes them into an output iterator -`oi`. - -\param pgn The input polygon for the `complement` function. It may be of the type -`Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or -`General_polygon_with_holes_2`. - - - -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink -\sa \link boolean_intersection `CGAL::intersection()` \endlink -\sa \link boolean_join `CGAL::join()` \endlink -\sa \link boolean_difference `CGAL::difference()` \endlink -\sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink -*/ /// @{ -/*! - writes the complement of the polygon `pgn` into the polygon with holes `res`. +/*! writes the complement of the polygon `pgn` into the polygon with holes `res`. */ -template -void complement(const Polygon_2 & pgn, Polygon_with_holes_2 & res); +template +void complement(const Polygon_2& pgn, + Polygon_with_holes_2& res); -/*! - writes the complement of the general polygon `pgn` into the general polygon with holes `res`. +/*! writes the complement of the general polygon `pgn` into the general polygon + * with holes `res`. */ -template -void complement(const General_polygon_2 & pgn, General_polygon_with_holes_2 & res); +template +void complement(const General_polygon_2& pgn, + General_polygon_with_holes_2& res); -/*! - writes the complement of the polygon with holes `pgn` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the complement of the polygon with holes `pgn` into the output + * iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator complement(const Polygon_with_holes_2 & pgn, OutputIterator oi); +template +OutputIterator complement(const Polygon_with_holes_2& pgn, + OutputIterator oi); -/*! - writes the complement of the general polygon with holes `pgn` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the complement of the general polygon with holes `pgn` into the + * output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator complement(const General_polygon_with_holes_2 > & pgn, OutputIterator oi); +template +OutputIterator complement(const General_polygon_with_holes_2 >& pgn, OutputIterator oi); /// @} } /* namespace CGAL */ namespace CGAL { -/*! -\addtogroup boolean_difference Difference Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_difference - -Each one of these functions computes the difference between two given -polygons `p1` and `p2`, and inserts the resulting polygons -with holes into an output container through the output iterator `oi`. -The value type of the `OutputIterator` is either -`Polygon_with_holes_2` or -`General_polygon_with_holes_2`. - -The signature of the function is: - - `%OutputIterator %difference(const Type1 & p1, const Type2 & p2, %OutputIterator oi);` - - -\cgalHeading{Parameters} - -The types of the parameters of the `difference()` function are any of the following combinations. - -
- - - - - - - - - - -
Type1Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink -\sa \link boolean_intersection `CGAL::intersection()` \endlink -\sa \link boolean_join `CGAL::join()` \endlink -\sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink - -*/ - +/*! \addtogroup boolean_difference Difference Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_difference + * + * Each one of these functions computes the difference between two given + * polygons `p1` and `p2`, and inserts the resulting polygons + * with holes into an output container through the output iterator `oi`. + * The value type of the `OutputIterator` is either + * `Polygon_with_holes_2` or + * `General_polygon_with_holes_2`. + * + * The signature of the function is: + * - `%OutputIterator %difference(const Type1& p1, const Type2& p2, %OutputIterator oi);` + * + * \cgalHeading{Parameters} + * + * The types of the parameters of the `difference()` function are any of the + * following combinations. + * + *
+ * + * + * + * + * + * + * + * + * + * + *
Type1Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
+ * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + * \sa \link boolean_intersection `CGAL::intersection()` \endlink + * \sa \link boolean_join `CGAL::join()` \endlink + * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink + */ /// @{ -/*! - writes the difference of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. + +/*! writes the difference of the polygons `p1` and `p2` into the output iterator + * `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator difference(const Polygon_2 & p1, - const Polygon_2 & p2, +template +OutputIterator difference(const Polygon_2& p1, + const Polygon_2& p2, OutputIterator oi); -/*! - writes the difference of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the difference of the polygons `p1` and `p2` into the output iterator + * `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator difference(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2, +template +OutputIterator difference(const Polygon_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -/*! - writes the difference of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the difference of the polygons `p1` and `p2` into the output iterator + * `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator difference(const Polygon_with_holes_2 & p1, - const Polygon_2 & p2, +template +OutputIterator difference(const Polygon_with_holes_2& p1, + const Polygon_2& p2, OutputIterator oi); -/*! - writes the difference of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the difference of the polygons `p1` and `p2` into the output iterator + * `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator difference(const Polygon_with_holes_2 & p1, - const Polygon_with_holes_2 & p2, +template +OutputIterator difference(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -/*! - writes the difference of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the difference of the general polygons `p1` and `p2` into the output + * iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator difference(const General_polygon_2 & p1, - const General_polygon_2 & p2, +template +OutputIterator difference(const General_polygon_2& p1, + const General_polygon_2& p2, OutputIterator oi); -/*! - writes the difference of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the difference of the general polygons `p1` and `p2` into the output + * iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator difference(const General_polygon_with_holes_2 > & p1, - const General_polygon_2 & p2, +template +OutputIterator difference(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2, OutputIterator oi); - -/*! - writes the difference of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the difference of the general polygons `p1` and `p2` into the output + * iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator difference(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2, +template +OutputIterator difference(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2, OutputIterator oi); - -/*! - writes the difference of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the difference of the general polygons `p1` and `p2` into the output + * iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator difference(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2, +template +OutputIterator difference(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2, OutputIterator oi); /// @} @@ -178,120 +173,109 @@ OutputIterator difference(const General_polygon_with_holes_2 & p1, namespace CGAL { -/*! -\addtogroup boolean_do_intersect Intersection Testing Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_do_intersect - -Each one of these functions computes if the interior of two given -polygons `p1` and `p2` intersect. - -The signature of the function is: - - `bool do_intersect(const Type1 & p1, const Type2 & p2);` - - -\cgalHeading{Parameters} - -The types of the parameters of the \link ref_bso_do_intersect `do_intersect()` \endlink function are any of the following combinations. - -
- - - - - - - - - - -
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- - -\sa \link boolean_intersection `CGAL::intersection()` \endlink -\sa \link boolean_join `CGAL::join()` \endlink -\sa \link boolean_difference `CGAL::difference()` \endlink -\sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink - -*/ +/*! \addtogroup boolean_do_intersect Intersection Testing Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_do_intersect + * + * Each one of these functions computes if the interior of two given + * polygons `p1` and `p2` intersect. + * + * The signature of the function is: + * - `bool do_intersect(const Type1& p1, const Type2& p2);` + * + * \cgalHeading{Parameters} + * + * The types of the parameters of the \link ref_bso_do_intersect + * `do_intersect()` \endlink function are any of the following combinations. + * + *
+ * + * + * + * + * + * + * + * + * + * + *
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
+ * + * \sa \link boolean_intersection `CGAL::intersection()` \endlink + * \sa \link boolean_join `CGAL::join()` \endlink + * \sa \link boolean_difference `CGAL::difference()` \endlink + * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink + */ /// @{ -/*! - returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. */ -template -bool do_intersect(const Polygon_2 & p1, - const Polygon_2 & p2); +template +bool do_intersect(const Polygon_2& p1, + const Polygon_2& p2); -/*! - returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. */ -template -bool do_intersect(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2); +template +bool do_intersect(const Polygon_2& p1, + const Polygon_with_holes_2& p2); -/*! - returns `true` if the polygons `p1` and `p2` intersect in their interior. - returns `true` if the interior of polygons `p1` and `p2` intersect. +/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. */ -template -bool do_intersect(const Polygon_with_holes_2 & p1, - const Polygon_2 & p2); - -/*! - returns `true` if the polygons `p1` and `p2` intersect in their interior. +template +bool do_intersect(const Polygon_with_holes_2& p1, + const Polygon_2& p2); +/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. */ -template -bool do_intersect(const Polygon_with_holes_2 & p1, - const Polygon_with_holes_2 & p2); +template +bool do_intersect(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2); -/*! - returns `true` if the general polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the general polygons `p1` and `p2` intersect in their + * interior. */ -template -bool do_intersect(const General_polygon_2 & p1, - const General_polygon_2 & p2); +template +bool do_intersect(const General_polygon_2& p1, + const General_polygon_2& p2); -/*! - returns `true` if the general polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the general polygons `p1` and `p2` intersect in their + * interior. */ -template -bool do_intersect(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2); +template +bool do_intersect(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2); -/*! - returns `true` if the general polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the general polygons `p1` and `p2` intersect in their + * interior. */ -template -bool do_intersect(const General_polygon_with_holes_2 > & p1, - const General_polygon_2 & p2); +template +bool do_intersect(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2); -/*! - returns `true` if the general polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the general polygons `p1` and `p2` intersect in their + * interior. */ -template -bool do_intersect(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2); +template +bool do_intersect(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2); - /*! - returns `true`, if the set of general polygons (or general - polygons with holes) in the given range intersect in their interior, - and `false` otherwise. (The value type of the input iterator is - used to distinguish between the two). - */ -template +/*! returns `true`, if the set of general polygons (or general polygons with + * holes) in the given range intersect in their interior, and `false` + * otherwise. (The value type of the input iterator is used to distinguish + * between the two). + */ +template bool do_intersect(InputIterator begin, InputIterator end); - /*! - returns `true`, if the set of general polygons and general - polygons with holes in the given two ranges respectively intersect in - their interior, and `false` otherwise. - */ -template +/*! returns `true`, if the set of general polygons and general polygons with + * holes in the given two ranges respectively intersect in their interior, and + * `false` otherwise. + */ +template bool do_intersect(InputIterator1 pgn_begin1, InputIterator1 pgn_end1, InputIterator2 pgn_begin2, @@ -301,160 +285,144 @@ bool do_intersect(InputIterator1 pgn_begin1, namespace CGAL { -/*! -\addtogroup boolean_intersection Intersection Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_intersection - -Each one of these functions computes the intersection of two given -polygons `p1` and `p2`, inserts the resulting polygons with -holes into an output container through a given output iterator -`oi`, and returns the output iterator. The value type of the -`OutputIterator` is either `Polygon_with_holes_2` or -`General_polygon_with_holes_2`. - - -The signature of the function is: - - `%OutputIterator %intersection(const Type1 & p1, const Type2 & p2, %OutputIterator oi);` - - - -\cgalHeading{Parameters} - -The types of the parameters of the `intersection()` function are any of the following combinations. - - -
- - - - - - - - - - -
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- - -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink -\sa \link boolean_join `CGAL::join()` \endlink -\sa \link boolean_difference `CGAL::difference()` \endlink -\sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink - -*/ - +/*! \addtogroup boolean_intersection Intersection Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_intersection + * + * Each one of these functions computes the intersection of two given + * polygons `p1` and `p2`, inserts the resulting polygons with + * holes into an output container through a given output iterator + * `oi`, and returns the output iterator. The value type of the + * `OutputIterator` is either `Polygon_with_holes_2` or + * `General_polygon_with_holes_2`. + * + * The signature of the function is: + * - `%OutputIterator %intersection(const Type1& p1, const Type2& p2, + * %OutputIterator oi);` + * + * \cgalHeading{Parameters} + * + * The types of the parameters of the `intersection()` function are any of the + * following combinations. + * + *
+ * + * + * + * + * + * + * + * + * + * + *
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
+ * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + * \sa \link boolean_join `CGAL::join()` \endlink + * \sa \link boolean_difference `CGAL::difference()` \endlink + * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink + * + */ /// @{ -/*! - writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -OutputIterator intersection(const Type1 & p1, const Type2 & p2, +OutputIterator intersection(const Type1& p1, const Type2& p2, OutputIterator oi); -/*! - writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator intersection(const Polygon_2 & p1, - const Polygon_2 & p2, +template +OutputIterator intersection(const Polygon_2& p1, + const Polygon_2& p2, OutputIterator oi); -/*! - writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator intersection(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2, +template +OutputIterator intersection(const Polygon_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -/*! - writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator intersection(const Polygon_with_holes_2 & p1, - const Polygon_2 & p2, +template +OutputIterator intersection(const Polygon_with_holes_2& p1, + const Polygon_2& p2, OutputIterator oi); -/*! - writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `Polygon_with_holes_2`. +/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. */ -template -OutputIterator intersection(const Polygon_with_holes_2 & p1, - const Polygon_with_holes_2 & p2, +template +OutputIterator intersection(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -/*! - writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator intersection(const General_polygon_2 & p1, -const General_polygon_2 & p2, -OutputIterator oi); - -/*! - writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. - */ -template -OutputIterator intersection(const General_polygon_with_holes_2 > & p1, - const General_polygon_2 & p2, +template +OutputIterator intersection(const General_polygon_2& p1, + const General_polygon_2& p2, OutputIterator oi); -/*! - writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator intersection(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2, +template +OutputIterator intersection(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2, OutputIterator oi); -/*! - writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. - The value type of `oi` is `General_polygon_with_holes_2`. +/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. */ -template -OutputIterator intersection(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2, +template +OutputIterator intersection(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2, + OutputIterator oi); + +/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. + */ +template +OutputIterator intersection(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2, OutputIterator oi); -/*! - computes the intersection of the general polygons (or general polygons with - holes) in the given range. (The value type of the input iterator is - used to distinguish between the two.) The result, represented by a set - of general polygon with holes, is written into the output iterator `oi`. - The output iterator is returned. The value type of the `OutputIterator` is - `Traits::Polygon_with_holes_2`. -*/ -template +/*! computes the intersection of the general polygons (or general polygons with + * holes) in the given range. (The value type of the input iterator is used to + * distinguish between the two.) The result, represented by a set of general + * polygon with holes, is written into the output iterator `oi`. The output + * iterator is returned. The value type of the `OutputIterator` is + * `Traits::Polygon_with_holes_2`. + */ +template OutputIterator intersection(InputIterator begin, InputIterator end, OutputIterator oi); -/*! - computes the intersection of the general polygons and general polygons - with holes in the given two ranges. The result, represented by a set - of general polygon with holes, is written into the output iterator `oi`. - The output iterator is returned. The value type of the `OutputIterator` is - `Traits::Polygon_with_holes_2`. -*/ -template +/*! computes the intersection of the general polygons and general polygons with + * holes in the given two ranges. The result, represented by a set of general + * polygon with holes, is written into the output iterator `oi`. The output + * iterator is returned. The value type of the `OutputIterator` is + * `Traits::Polygon_with_holes_2`. + */ +template OutputIterator intersection(InputIterator1 pgn_begin1, -InputIterator1 pgn_end1, -InputIterator2 pgn_begin2, -InputIterator2 pgn_end2, -OutputIterator oi); + InputIterator1 pgn_end1, + InputIterator2 pgn_begin2, + InputIterator2 pgn_end2, + OutputIterator oi); /// @} @@ -462,366 +430,452 @@ OutputIterator oi); namespace CGAL { -/*! -\addtogroup boolean_join Union Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_union - -Each one of these functions computes the union of two given polygons -`p1` and `p2`. If the two given polygons overlap, it returns -`true`, and places the resulting polygon in `p`. Otherwise, it -returns `false`. - - -The signature of the function is: - - `bool join(const Type1 & p1, const Type2 & p2, General_polygon_with_holes_2 & res);` - - -\cgalHeading{Parameters} - -The types of the parameters of the `join()` function are any of the following combinations. - -
- - - - - - - - - - -
Type1 Type2
Polygon_2Polygon_2
Polygon_2polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink -\sa \link boolean_intersection `CGAL::intersection()` \endlink -\sa \link boolean_difference `CGAL::difference()` \endlink -\sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink - -*/ +/*! \addtogroup boolean_join Union Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_union + * + * Each one of these functions computes the union of two given polygons `p1` and + * `p2`. If the two given polygons overlap, it returns `true`, and places the + * resulting polygon in `p`. Otherwise, it returns `false`. + * + * The signature of the function is: + * - `bool join(const Type1& p1, const Type2& p2, General_polygon_with_holes_2& res);` + * + * \cgalHeading{Parameters} + * + * The types of the parameters of the `join()` function are any of the following combinations. + * + *
+ * + * + * + * + * + * + * + * + * + * + *
Type1 Type2
Polygon_2Polygon_2
Polygon_2polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
+ * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + * \sa \link boolean_intersection `CGAL::intersection()` \endlink + * \sa \link boolean_difference `CGAL::difference()` \endlink + * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink + */ /// @{ -/*! - writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const Polygon_2 & p1, - const Polygon_2 & p2, - General_polygon_with_holes_2 > & res); +template +bool join(const Polygon_2& p1, + const Polygon_2& p2, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2, - General_polygon_with_holes_2 > & res); +template +bool join(const Polygon_2& p1, + const Polygon_with_holes_2& p2, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const Polygon_with_holes_2 & p2, - const Polygon_2 & p1, - General_polygon_with_holes_2 > & res); +template +bool join(const Polygon_with_holes_2& p2, + const Polygon_2& p1, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const Polygon_with_holes_2 & p2, - const Polygon_with_holes_2 & p1, - General_polygon_with_holes_2 > & res); +template +bool join(const Polygon_with_holes_2& p2, + const Polygon_with_holes_2& p1, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const General_polygon_2 & p1, - const General_polygon_2 & p2, - General_polygon_with_holes_2 > & res); +template +bool join(const General_polygon_2& p1, + const General_polygon_2& p2, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2, - General_polygon_with_holes_2 > & res); +template +bool join(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const General_polygon_with_holes_2 > & p2, - const General_polygon_2 & p1, - General_polygon_with_holes_2 > & res); +template +bool join(const General_polygon_with_holes_2 >& p2, + const General_polygon_2& p1, + General_polygon_with_holes_2 >& res); -/*! - writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. - Returns `true` if the two given polygons overlap. +/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. + * Returns `true` if the two given polygons overlap. */ -template -bool join(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2, - Traits::Polygon_with_holes_2 & res); +template +bool join(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2, + Traits::Polygon_with_holes_2& res); - -/*! - computes the union of the general polygons (or general polygons with - holes) in the given range. (The value type of the input iterator is - used to distinguish between the two.) The result, represented by a set - of general polygon with holes, is written into the output iterator `oi`. - The output iterator is - returned. The value type of the `OutputIterator` is - `Traits::Polygon_with_holes_2`. -*/ -template +/*! computes the union of the general polygons (or general polygons with holes) + * in the given range. (The value type of the input iterator is used to + * distinguish between the two.) The result, represented by a set of general + * polygon with holes, is written into the output iterator `oi`. The output + * iterator is returned. The value type of the `OutputIterator` is + * `Traits::Polygon_with_holes_2`. + */ +template OutputIterator join(InputIterator begin, InputIterator end, -OutputIterator oi); + OutputIterator oi); - /*! - computes the union of the general polygons and general polygons - with holes in the given two ranges. The result, represented by a set - of general polygon with holes, is written into the output iterator `oi`. - The output iterator is - returned. The value type of the `OutputIterator` is - `Traits::Polygon_with_holes_2`. - */ -template +/*! computes the union of the general polygons and general polygons with holes + * in the given two ranges. The result, represented by a set of general polygon + * with holes, is written into the output iterator `oi`. The output iterator is + * returned. The value type of the `OutputIterator` is + * `Traits::Polygon_with_holes_2`. + */ +template OutputIterator join(InputIterator1 pgn_begin1, InputIterator1 pgn_end1, -InputIterator2 pgn_begin2, InputIterator2 pgn_end2, -OutputIterator oi); + InputIterator2 pgn_begin2, InputIterator2 pgn_end2, + OutputIterator oi); /// @} } /* namespace CGAL */ namespace CGAL { -/*! -\addtogroup boolean_oriented_side Oriented Side Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_oriented_side - -Each one of these functions returns `ON_POSITIVE_SIDE` if the two -given polygons `p1` and `p2` intersect in their interior, -`ON_NEGATIVE_SIDE` if `p1` and `p2` do not intersect at -all, and `ON_ORIENTED_BOUNDARY` if `p1` and `p2` intersect -only in their boundaries. - -The signature of the function is: - - `Oriented_side oriented_side(const Type1 & p1, const Type2 & p2);` - -\cgalHeading{Parameters} - -The types of the parameters of the `oriented_side()` function are any of the following combinations. - -
- - - - - - - - - - -
Type1Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink - -*/ - +/*! \addtogroup boolean_oriented_side Oriented Side Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_oriented_side + * + * `Oriented_side()` refers to a group of overloaded functions, divided into + * two subgroups. + * + * \cgalHeading{Oriented Side of two Polygons} + * + * The functions in the first subgroup accept two polygons `pgn1` and `pgn2`. + * Each function in this group returns `ON_POSITIVE_SIDE` if the two + * given polygons `pgn1` and `pgn2` intersect in their interiors, + * `ON_NEGATIVE_SIDE` if `pgn1` and `pgn2` do not intersect at all, and + * `ON_ORIENTED_BOUNDARY` if `pgn1` and `pgn2` intersect only in their + * boundaries. + * + * This group is further divided into two sub-subgroups. + * A function in the first sub-subgroup has one of the two following signatures: + * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` + * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` + * + * The types of `pgn1` and `pgn2` must be convertible to one of the two types `Polygon_2` or Polygon_with_holes_2`. + * + * A function in the second sub-subgroup has one of the two following signatures: + * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` + * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` + * + * The types of `pgn1` and `pgn2` must be convertible to one of the two types `General_polygon_2<%ArrTraits>` or `General_polygon_with_holes_2 >`. + * + * \cgalHeading{Oriented Side of a Point and a Polygon} + * + * The functions in the second group accept a point `p` and a polygon `pgn`. + * Each function in this group returns `ON_POSITIVE_SIDE` if the point `p` + * is in the interior of `pgn`, `ON_NEGATIVE_SIDE` if `p` is in the exterior + * of `pgn`, and `ON_ORIENTED_BOUNDARY` if `p` is on the boundary of `pgn`. + * This group is also further divided into two sub-subgroups. + * A function in the first sub-subgroup has one of the two following signatures: + * - `template Oriented_side oriented_side(const Point_2& p, const Type& pgn);` + * - `template Oriented_side oriented_side(const Point_2& p, const Type& pgn, const GpsTraits& traits);` + * + * `Type` must be convertible to one of `Polygon_2` or `Polygon_with_holes_2`. + * + * A function in the second sub-subgroup has one of the two following signatures: + * - `template Oriented_side oriented_side(const Point_2& p, const Type2& pgn);` + * - `template Oriented_side oriented_side(const Point_2& p, const Type2& pgn, const GpsTraits& traits);` + * `Type` must be convertible to one of `General_polygon_2<%ArrTraits>` or `General_polygon_with_holes_2 >`. + * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + */ /// @{ -template -Oriented_side oriented_side(const Polygon_2 & p1, - const Polygon_2 & p2); +// Polygon--Polygon Traits-less +template +Oriented_side oriented_side(const Polygon_2& p1, + const Polygon_2& p2); -template -Oriented_side oriented_side(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2); +template +Oriented_side oriented_side(const Polygon_2& p1, + const Polygon_with_holes_2& p2); -template -Oriented_side oriented_side(const Polygon_with_holes_2 & p1, - const Polygon_2 & p2); +template +Oriented_side oriented_side(const Polygon_with_holes_2& p1, + const Polygon_2& p2); -template -Oriented_side oriented_side(const Polygon_with_holes_2 & p1, - const Polygon_with_holes_2 & p2); +template +Oriented_side oriented_side(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2); -template -Oriented_side oriented_side(const General_polygon_2 & p1, - const General_polygon_2 & p2); +template +Oriented_side oriented_side(const General_polygon_2& p1, + const General_polygon_2& p2); -template -Oriented_side oriented_side(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2); +template +Oriented_side oriented_side(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2); -template -Oriented_side oriented_side(const General_polygon_with_holes_2 > & p1, - const General_polygon_2 & p2); +template +Oriented_side oriented_side(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2); -template -Oriented_side oriented_side(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2); +template +Oriented_side oriented_side(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2); + +// Polygon--Polygon With Traits +template +Oriented_side oriented_side(const Polygon_2& p1, + const Polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Polygon_2& p1, + const Polygon_with_holes_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Polygon_with_holes_2& p1, + const Polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const General_polygon_2& p1, + const General_polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2, + const GpsTraits& traits); + +// Point--Polygon Traits-less +template +Oriented_side oriented_side(const Point_2& p1, + const Polygon_2& p2); + + +template +Oriented_side oriented_side(const Point_2& p1, + const Polygon_with_holes_2& p2); + + +template +Oriented_side oriented_side(const Point_2& p1, + const General_polygon_2& p2); + + +template +Oriented_side oriented_side(const Point_2& p1, + const General_polygon_with_holes_2 >& p2); + +// Point--Polygon With Traits +template +Oriented_side oriented_side(const Point_2& p1, + const Polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Point_2& p1, + const Polygon_with_holes_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Point_2& p1, + const General_polygon_2& p2, + const GpsTraits& traits); + + +template +Oriented_side oriented_side(const Point_2& p1, + const General_polygon_with_holes_2 >& p2, + const GpsTraits& traits); /// @} } /* namespace CGAL */ namespace CGAL { -/*! -\addtogroup boolean_symmetric_difference Symmetric Difference Functions -\ingroup PkgBooleanSetOperations2Ref -\anchor ref_bso_symmetric_difference - -Each one of these functions computes the symmetric difference between -two given polygons `p1` and `p2`, and inserts the resulting -polygons with holes into an output container through the output -iterator `oi`. The value type of the `OutputIterator` is either -`Polygon_with_holes_2` or -`General_polygon_with_holes_2`. - -The signature of the function is: - - `%OutputIterator symmetric_difference(const Type1 & p1, const Type2 & p2, %OutputIterator oi);` - -\cgalHeading{Parameters} - -The types of the parameters of the `symmetric_difference()` function are any of the following combinations. - -
- - - - - - - - - - -
Arg 1 typeArg 2 type
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
-
- - -\sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink -\sa \link boolean_intersection `CGAL::intersection()` \endlink -\sa \link boolean_join `CGAL::join()` \endlink -\sa \link boolean_difference `CGAL::difference()` \endlink - -*/ +/*! \addtogroup boolean_symmetric_difference Symmetric Difference Functions + * \ingroup PkgBooleanSetOperations2Ref + * \anchor ref_bso_symmetric_difference + * + * Each one of these functions computes the symmetric difference between + * two given polygons `p1` and `p2`, and inserts the resulting + * polygons with holes into an output container through the output + * iterator `oi`. The value type of the `OutputIterator` is either + * `Polygon_with_holes_2` or + * `General_polygon_with_holes_2`. + * + * The signature of the function is: + * - `%OutputIterator symmetric_difference(const Type1& p1, const Type2& p2, %OutputIterator oi);` + * + * \cgalHeading{Parameters} + * + * The types of the parameters of the `symmetric_difference()` function are any of the following combinations. + * + *
+ * + * + * + * + * + * + * + * + * + * + *
Arg 1 typeArg 2 type
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
+ * + * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink + * \sa \link boolean_intersection `CGAL::intersection()` \endlink + * \sa \link boolean_join `CGAL::join()` \endlink + * \sa \link boolean_difference `CGAL::difference()` \endlink + * + */ /// @{ -OutputIterator symmetric_difference(const Type1 & p1, const Type2 & p2, +OutputIterator symmetric_difference(const Type1& p1, const Type2& p2, OutputIterator oi); -template -OutputIterator symmetric_difference(const Polygon_2 & p1, - const Polygon_2 & p2, +template +OutputIterator symmetric_difference(const Polygon_2& p1, + const Polygon_2& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const Polygon_2 & p1, - const Polygon_with_holes_2 & p2, +symmetric_difference(const Polygon_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const Polygon_with_holes_2 & p1, - const Polygon_2 & p2, +symmetric_difference(const Polygon_with_holes_2& p1, + const Polygon_2& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const Polygon_with_holes_2 & p1, - const Polygon_with_holes_2 & p2, +symmetric_difference(const Polygon_with_holes_2& p1, + const Polygon_with_holes_2& p2, OutputIterator oi); -template -OutputIterator symmetric_difference(const General_polygon_2 & p1, - const General_polygon_2 & p2, +template +OutputIterator symmetric_difference(const General_polygon_2& p1, + const General_polygon_2& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const General_polygon_with_holes_2 > & p1, - const General_polygon_2 & p2, +symmetric_difference(const General_polygon_with_holes_2 >& p1, + const General_polygon_2& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const General_polygon_2 & p1, - const General_polygon_with_holes_2 > & p2, +symmetric_difference(const General_polygon_2& p1, + const General_polygon_with_holes_2 >& p2, OutputIterator oi); -template +template OutputIterator -symmetric_difference(const General_polygon_with_holes_2 & p1, - const General_polygon_with_holes_2 & p2, +symmetric_difference(const General_polygon_with_holes_2& p1, + const General_polygon_with_holes_2& p2, OutputIterator oi); - /*! - computes the symmetric difference of the general polygons (or general - polygons with holes) in the given range. A point is contained in the - symmetric difference, if and only if it is contained in an odd number of - input polygons. (The value type of the input iterator is used to - distinguish between the two.) The result, represented by a set - of general polygon with holes, is inserted into an output container - through a given output iterator `oi`. The output iterator is - returned. The value type of the `OutputIterator` is - `Traits::Polygon_with_holes_2`. - */ -template +/*! computes the symmetric difference of the general polygons (or general + * polygons with holes) in the given range. A point is contained in the + * symmetric difference, if and only if it is contained in an odd number of + * input polygons. (The value type of the input iterator is used to distinguish + * between the two.) The result, represented by a set of general polygon with + * holes, is inserted into an output container through a given output iterator + * `oi`. The output iterator is returned. The value type of the `OutputIterator` + * is `Traits::Polygon_with_holes_2`. + */ +template OutputIterator symmetric_difference(InputIterator begin, InputIterator end, OutputIterator oi); - /*! - computes the symmetric difference of the general polygons and general polygons - with holes in the given two ranges. A point is contained in the - symmetric difference, if and only if it is contained in an odd number of - input polygons. The result, represented by a set of general polygon with - holes, is inserted into an output container through a given output - iterator `oi`. The output iterator is returned. The value type of - the `OutputIterator` is `Traits::Polygon_with_holes_2`. - */ -template +/*! computes the symmetric difference of the general polygons and general + * polygons with holes in the given two ranges. A point is contained in the + * symmetric difference, if and only if it is contained in an odd number of + * input polygons. The result, represented by a set of general polygon with + * holes, is inserted into an output container through a given output iterator + * `oi`. The output iterator is returned. The value type of the `OutputIterator` + * is `Traits::Polygon_with_holes_2`. + */ +template OutputIterator symmetric_difference(InputIterator1 pgn_begin1, InputIterator1 pgn_end1, InputIterator2 pgn_begin2, @@ -830,4 +884,3 @@ OutputIterator symmetric_difference(InputIterator1 pgn_begin1, /// @} } /* namespace CGAL */ - From 460faca82feb7489f83f0c92eb394d2cb05ce66a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 1 Oct 2020 02:35:42 +0300 Subject: [PATCH 057/317] Fixed complement() doc --- .../CGAL/Boolean_set_operations_2.h | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 11f006379e7..d9767797cf2 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -22,6 +22,7 @@ namespace CGAL { /// @{ +// Traits-less /*! writes the complement of the polygon `pgn` into the polygon with holes `res`. */ template @@ -49,6 +50,41 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, */ template OutputIterator complement(const General_polygon_with_holes_2 >& pgn, OutputIterator oi); + +// With Traits +/*! writes the complement of the polygon `pgn` into the polygon with holes `res`. + */ + template +void complement(const Polygon_2& pgn, + Polygon_with_holes_2& res, + const GpsTraits& traits); + +/*! writes the complement of the general polygon `pgn` into the general polygon + * with holes `res`. + */ +template +void complement(const General_polygon_2& pgn, + General_polygon_with_holes_2& res, + const GpsTraits& traits); + +/*! writes the complement of the polygon with holes `pgn` into the output + * iterator `oi`. + * The value type of `oi` is `Polygon_with_holes_2`. + */ +template +OutputIterator complement(const Polygon_with_holes_2& pgn, + OutputIterator oi, + const GpsTraits& traits); + +/*! writes the complement of the general polygon with holes `pgn` into the + * output iterator `oi`. + * The value type of `oi` is `General_polygon_with_holes_2`. + */ +template +OutputIterator complement(const General_polygon_with_holes_2 >& pgn, + OutputIterator oi, + const GpsTraits& traits); + /// @} } /* namespace CGAL */ @@ -568,7 +604,7 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_oriented_side * - * `Oriented_side()` refers to a group of overloaded functions, divided into + * `Oriented_side()` refers to a group of overloaded functions divided into * two subgroups. * * \cgalHeading{Oriented Side of two Polygons} From ed58eccc0fe81c020842e7f9da04f1aa07644a4d Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 1 Oct 2020 03:27:15 +0300 Subject: [PATCH 058/317] Fixed complement() --- .../CGAL/Boolean_set_operations_2.h | 106 +++++++++++++----- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index d9767797cf2..3217ece8c79 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -4,14 +4,19 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_complement * - * The `complement` function is overloaded. Depending on the type of polygon + * There are several overloaded functions called `complement` that computes + * the complement of a given polygon `pgn` . Depending on the type of polygon * `pgn` the complement is either a single (general) polygon with holes, or * several (general) poylgons with holes. In the latter case the `complement * function` writes them into an output iterator `oi`. * - * \param pgn The input polygon for the `complement` function. It may be of the - * type `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or - * `General_polygon_with_holes_2`. + * \param pgn The input polygon for the `complement` function. Its type must + * be convertible to one of the types `Polygon_2`, `General_polygon_2`, + * `Polygon_with_holes_2`, or `General_polygon_with_holes_2`. + * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink @@ -23,62 +28,86 @@ namespace CGAL { /// @{ // Traits-less -/*! writes the complement of the polygon `pgn` into the polygon with holes `res`. + +/*! Computes the complement of a polygon. + * \param pgn the input polygon + * \param res the complement of \p pgn. */ template void complement(const Polygon_2& pgn, Polygon_with_holes_2& res); -/*! writes the complement of the general polygon `pgn` into the general polygon - * with holes `res`. +/*! Computes the complement of a general polygon. + * \param pgn the input polygon + * \param res the complement of \p pgn */ template void complement(const General_polygon_2& pgn, General_polygon_with_holes_2& res); -/*! writes the complement of the polygon with holes `pgn` into the output - * iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! Computes the complement of a polygon with holes. + * \param pgn the input polygon + * \param oi the output iterator for the result. + * Its dereference type is `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ -template +template OutputIterator complement(const Polygon_with_holes_2& pgn, OutputIterator oi); -/*! writes the complement of the general polygon with holes `pgn` into the - * output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! Computes the complement of a general polygon with holes. + * \param pgn the input polygon + * \param oi the output iterator for the result. + * Its dereference type is + * `General_polygon_with_holes_2< >`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator complement(const General_polygon_with_holes_2 >& pgn, OutputIterator oi); +OutputIterator complement(const General_polygon_with_holes_2 >& pgn, + OutputIterator oi); // With Traits -/*! writes the complement of the polygon `pgn` into the polygon with holes `res`. + +/*! Computes the complement of a polygon. + * \param pgn the input polygon + * \param res the complement of \p pgn + * \param traits a model of `GeneralPolygonSetTraits_2` */ - template +template void complement(const Polygon_2& pgn, Polygon_with_holes_2& res, const GpsTraits& traits); -/*! writes the complement of the general polygon `pgn` into the general polygon - * with holes `res`. +/*! Computes the complement of a general polygon. + * \param pgn the input polygon + * \param res the complement of \p pgn + * \param traits a model of `GeneralPolygonSetTraits_2` */ template void complement(const General_polygon_2& pgn, General_polygon_with_holes_2& res, const GpsTraits& traits); -/*! writes the complement of the polygon with holes `pgn` into the output - * iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! Computes the complement of a polygon with holes. + * \param pgn the input polygon + * \param oi the output iterator for the result. + * Its dereference type is `Polygon_with_holes_2`. + * \param traits a model of `GeneralPolygonSetTraits_2` + * \return the past-the-end iterator of the output container. */ -template +template OutputIterator complement(const Polygon_with_holes_2& pgn, OutputIterator oi, const GpsTraits& traits); -/*! writes the complement of the general polygon with holes `pgn` into the - * output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! Computes the complement of the general polygon with holes. + * \param pgn the input polygon + * \param oi the output iterator for the result. + * Its dereference type is + * `General_polygon_with_holes_2< >`. + * \param traits a model of `GeneralPolygonSetTraits_2` + * \return the past-the-end iterator of the output container. */ template OutputIterator complement(const General_polygon_with_holes_2 >& pgn, @@ -124,6 +153,10 @@ namespace CGAL { * * * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink @@ -238,6 +271,10 @@ namespace CGAL { * * * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -355,6 +392,10 @@ namespace CGAL { * * * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -495,6 +536,10 @@ namespace CGAL { * * * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -604,8 +649,9 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_oriented_side * - * `Oriented_side()` refers to a group of overloaded functions divided into - * two subgroups. + * There are several overloaded functions called `Oriented_side()` that computes + * the relative position of two polygons or of a point and a polygon. This group + * of functions is divided into two subgroups. * * \cgalHeading{Oriented Side of two Polygons} * @@ -825,6 +871,10 @@ namespace CGAL { * * * + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink From 15ef09b5983f9de457b2b5136a2f1565345c500d Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 1 Oct 2020 17:37:38 +0300 Subject: [PATCH 059/317] ifference() --- .../CGAL/Boolean_set_operations_2.h | 907 ++++++++++++------ .../include/CGAL/Boolean_set_operations_2.h | 2 +- 2 files changed, 605 insertions(+), 304 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 3217ece8c79..fb9701bd5c7 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -4,19 +4,16 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_complement * - * There are several overloaded functions called `complement` that computes - * the complement of a given polygon `pgn` . Depending on the type of polygon - * `pgn` the complement is either a single (general) polygon with holes, or - * several (general) poylgons with holes. In the latter case the `complement - * function` writes them into an output iterator `oi`. + * There are several overloaded function templates called `complement()` that + * compute the \e complement of a given polygon `pgn`. Depending on the type of + * the polygon `pgn` the complement is either a single (general) polygon with + * holes, or several (general) poylgons with holes. In the latter case the + * `complement()` function template inserts the resulting poylgons with holes into + * a container via an output iterator. * - * \param pgn The input polygon for the `complement` function. Its type must - * be convertible to one of the types `Polygon_2`, `General_polygon_2`, - * `Polygon_with_holes_2`, or `General_polygon_with_holes_2`. - * - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * \param pgn The input polygon. Its type must be convertible to one of the + * types `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or + * `General_polygon_with_holes_2`. * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink @@ -30,25 +27,27 @@ namespace CGAL { // Traits-less /*! Computes the complement of a polygon. - * \param pgn the input polygon - * \param res the complement of \p pgn. + * \param pgn the input polygon. + * \param res the resulting complement of \p pgn. */ template void complement(const Polygon_2& pgn, Polygon_with_holes_2& res); /*! Computes the complement of a general polygon. - * \param pgn the input polygon - * \param res the complement of \p pgn + * \param pgn the input polygon. + * \param res the complement of \p pgn. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. */ template void complement(const General_polygon_2& pgn, - General_polygon_with_holes_2& res); + General_polygon_with_holes_2 >& res); /*! Computes the complement of a polygon with holes. - * \param pgn the input polygon + * \param pgn the input polygon. * \param oi the output iterator for the result. - * Its dereference type is `Polygon_with_holes_2`. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. * \return the past-the-end iterator of the output container. */ template @@ -56,11 +55,12 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, OutputIterator oi); /*! Computes the complement of a general polygon with holes. - * \param pgn the input polygon + * \param pgn the input polygon. * \param oi the output iterator for the result. - * Its dereference type is + * Its dereference type must be convertible to * `General_polygon_with_holes_2< >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator complement(const General_polygon_with_holes_2 >& pgn, @@ -69,9 +69,10 @@ OutputIterator complement(const General_polygon_with_holes_2 void complement(const Polygon_2& pgn, @@ -79,21 +80,26 @@ void complement(const Polygon_2& pgn, const GpsTraits& traits); /*! Computes the complement of a general polygon. - * \param pgn the input polygon - * \param res the complement of \p pgn - * \param traits a model of `GeneralPolygonSetTraits_2` + * \param pgn the input polygon. + * \param res the resulting complement of \p pgn + * \param traits a traits object. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. */ template void complement(const General_polygon_2& pgn, - General_polygon_with_holes_2& res, + General_polygon_with_holes_2 >& res, const GpsTraits& traits); /*! Computes the complement of a polygon with holes. - * \param pgn the input polygon + * \param pgn the input polygon. * \param oi the output iterator for the result. - * Its dereference type is `Polygon_with_holes_2`. - * \param traits a model of `GeneralPolygonSetTraits_2` + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \param traits a traits object. * \return the past-the-end iterator of the output container. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -102,15 +108,18 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, const GpsTraits& traits); /*! Computes the complement of the general polygon with holes. - * \param pgn the input polygon + * \param pgn the input polygon. * \param oi the output iterator for the result. - * Its dereference type is + * Its dereference type must be convertible to * `General_polygon_with_holes_2< >`. - * \param traits a model of `GeneralPolygonSetTraits_2` + * \param traits a traits object. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. */ -template -OutputIterator complement(const General_polygon_with_holes_2 >& pgn, +template +OutputIterator complement(const General_polygon_with_holes_2& pgn, OutputIterator oi, const GpsTraits& traits); @@ -124,39 +133,29 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_difference * - * Each one of these functions computes the difference between two given - * polygons `p1` and `p2`, and inserts the resulting polygons - * with holes into an output container through the output iterator `oi`. - * The value type of the `OutputIterator` is either - * `Polygon_with_holes_2` or - * `General_polygon_with_holes_2`. + * There are several overloaded function templates called `difference()` that + * computes the \e difference between two polygons `pgn1` and `pgn2` and inserts + * the resulting polygons with holes into a container via the output iterator `oi`. * - * The signature of the function is: - * - `%OutputIterator %difference(const Type1& p1, const Type2& p2, %OutputIterator oi);` + * \param oi the output iterator for the result. * - * \cgalHeading{Parameters} - * - * The types of the parameters of the `difference()` function are any of the - * following combinations. + * The types `Type1` and `Type2` of the parameters must be convertible to the types specified in a row in the table below, respectively. + * The 3rd column specifies the corresponding dereference type of the output iterator. * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Type1Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2` %Dereference Type of `oi`
`Polygon_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_2` `General_polygon_with_holes_2``General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink @@ -165,77 +164,257 @@ namespace CGAL { /// @{ -/*! writes the difference of the polygons `p1` and `p2` into the output iterator - * `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +//////// Traits-less + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const Polygon_2& p1, - const Polygon_2& p2, +OutputIterator difference(const Polygon_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); -/*! writes the difference of the polygons `p1` and `p2` into the output iterator - * `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const Polygon_2& p1, - const Polygon_with_holes_2& p2, +OutputIterator difference(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! writes the difference of the polygons `p1` and `p2` into the output iterator - * `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const Polygon_with_holes_2& p1, - const Polygon_2& p2, +OutputIterator difference(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); -/*! writes the difference of the polygons `p1` and `p2` into the output iterator - * `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2, +OutputIterator difference(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! writes the difference of the general polygons `p1` and `p2` into the output - * iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const General_polygon_2& p1, - const General_polygon_2& p2, +OutputIterator difference(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); -/*! writes the difference of the general polygons `p1` and `p2` into the output - * iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2, +OutputIterator difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); -/*! writes the difference of the general polygons `p1` and `p2` into the output - * iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2, +OutputIterator difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); -/*! writes the difference of the general polygons `p1` and `p2` into the output - * iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template -OutputIterator difference(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2, +OutputIterator difference(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, OutputIterator oi); + +//////// With Traits + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ + template +OutputIterator difference(const Polygon_2& pgn1, + const Polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the difference of the polygons and inserts the resulting polygon + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertibe to + * `General_polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator difference(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); /// @} } /* namespace CGAL */ @@ -247,10 +426,10 @@ namespace CGAL { * \anchor ref_bso_do_intersect * * Each one of these functions computes if the interior of two given - * polygons `p1` and `p2` intersect. + * polygons `pgn1` and `pgn2` intersect. * * The signature of the function is: - * - `bool do_intersect(const Type1& p1, const Type2& p2);` + * - `bool do_intersect(const Type1& pgn1, const Type2& pgn2);` * * \cgalHeading{Parameters} * @@ -283,58 +462,58 @@ namespace CGAL { /// @{ -/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. */ template -bool do_intersect(const Polygon_2& p1, - const Polygon_2& p2); +bool do_intersect(const Polygon_2& pgn1, + const Polygon_2& pgn2); -/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. */ template -bool do_intersect(const Polygon_2& p1, - const Polygon_with_holes_2& p2); +bool do_intersect(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2); -/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. */ template -bool do_intersect(const Polygon_with_holes_2& p1, - const Polygon_2& p2); +bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2); -/*! returns `true` if the polygons `p1` and `p2` intersect in their interior. +/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. */ template -bool do_intersect(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2); +bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2); -/*! returns `true` if the general polygons `p1` and `p2` intersect in their +/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their * interior. */ template -bool do_intersect(const General_polygon_2& p1, - const General_polygon_2& p2); +bool do_intersect(const General_polygon_2& pgn1, + const General_polygon_2& pgn2); -/*! returns `true` if the general polygons `p1` and `p2` intersect in their +/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their * interior. */ template -bool do_intersect(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2); +bool do_intersect(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2); -/*! returns `true` if the general polygons `p1` and `p2` intersect in their +/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their * interior. */ template -bool do_intersect(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2); +bool do_intersect(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2); -/*! returns `true` if the general polygons `p1` and `p2` intersect in their +/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their * interior. */ template -bool do_intersect(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2); +bool do_intersect(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2); /*! returns `true`, if the set of general polygons (or general polygons with * holes) in the given range intersect in their interior, and `false` @@ -363,14 +542,14 @@ namespace CGAL { * \anchor ref_bso_intersection * * Each one of these functions computes the intersection of two given - * polygons `p1` and `p2`, inserts the resulting polygons with + * polygons `pgn1` and `pgn2`, inserts the resulting polygons with * holes into an output container through a given output iterator * `oi`, and returns the output iterator. The value type of the * `OutputIterator` is either `Polygon_with_holes_2` or * `General_polygon_with_holes_2`. * * The signature of the function is: - * - `%OutputIterator %intersection(const Type1& p1, const Type2& p2, + * - `%OutputIterator %intersection(const Type1& pgn1, const Type2& pgn2, * %OutputIterator oi);` * * \cgalHeading{Parameters} @@ -405,74 +584,74 @@ namespace CGAL { /// @{ -/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `Polygon_with_holes_2`. */ -OutputIterator intersection(const Type1& p1, const Type2& p2, +OutputIterator intersection(const Type1& pgn1, const Type2& pgn2, OutputIterator oi); -/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `Polygon_with_holes_2`. */ template -OutputIterator intersection(const Polygon_2& p1, - const Polygon_2& p2, +OutputIterator intersection(const Polygon_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); -/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `Polygon_with_holes_2`. */ template -OutputIterator intersection(const Polygon_2& p1, - const Polygon_with_holes_2& p2, +OutputIterator intersection(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `Polygon_with_holes_2`. */ template -OutputIterator intersection(const Polygon_with_holes_2& p1, - const Polygon_2& p2, +OutputIterator intersection(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); -/*! writes the intersection of the polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `Polygon_with_holes_2`. */ template -OutputIterator intersection(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2, +OutputIterator intersection(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `General_polygon_with_holes_2`. */ template -OutputIterator intersection(const General_polygon_2& p1, - const General_polygon_2& p2, +OutputIterator intersection(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); -/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `General_polygon_with_holes_2`. */ template -OutputIterator intersection(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2, +OutputIterator intersection(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); -/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `General_polygon_with_holes_2`. */ template -OutputIterator intersection(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2, +OutputIterator intersection(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); -/*! writes the intersection of the general polygons `p1` and `p2` into the output iterator `oi`. +/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. * The value type of `oi` is `General_polygon_with_holes_2`. */ template -OutputIterator intersection(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2, +OutputIterator intersection(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, OutputIterator oi); @@ -511,12 +690,12 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_union * - * Each one of these functions computes the union of two given polygons `p1` and - * `p2`. If the two given polygons overlap, it returns `true`, and places the + * Each one of these functions computes the union of two given polygons `pgn1` and + * `pgn2`. If the two given polygons overlap, it returns `true`, and places the * resulting polygon in `p`. Otherwise, it returns `false`. * * The signature of the function is: - * - `bool join(const Type1& p1, const Type2& p2, General_polygon_with_holes_2& res);` + * - `bool join(const Type1& pgn1, const Type2& pgn2, General_polygon_with_holes_2& res);` * * \cgalHeading{Parameters} * @@ -548,75 +727,75 @@ namespace CGAL { /// @{ -/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const Polygon_2& p1, - const Polygon_2& p2, +bool join(const Polygon_2& pgn1, + const Polygon_2& pgn2, General_polygon_with_holes_2 >& res); -/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const Polygon_2& p1, - const Polygon_with_holes_2& p2, +bool join(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, General_polygon_with_holes_2 >& res); -/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const Polygon_with_holes_2& p2, - const Polygon_2& p1, +bool join(const Polygon_with_holes_2& pgn2, + const Polygon_2& pgn1, General_polygon_with_holes_2 >& res); -/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const Polygon_with_holes_2& p2, - const Polygon_with_holes_2& p1, +bool join(const Polygon_with_holes_2& pgn2, + const Polygon_with_holes_2& pgn1, General_polygon_with_holes_2 >& res); -/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const General_polygon_2& p1, - const General_polygon_2& p2, +bool join(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, General_polygon_with_holes_2 >& res); -/*! writes the union of the polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2, +bool join(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, General_polygon_with_holes_2 >& res); -/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const General_polygon_with_holes_2 >& p2, - const General_polygon_2& p1, +bool join(const General_polygon_with_holes_2 >& pgn2, + const General_polygon_2& pgn1, General_polygon_with_holes_2 >& res); -/*! writes the union of the general polygons `p1` and `p2` into the polygon with holes `res`. +/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. * Returns `true` if the two given polygons overlap. */ template -bool join(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2, +bool join(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, Traits::Polygon_with_holes_2& res); /*! computes the union of the general polygons (or general polygons with holes) @@ -649,31 +828,38 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_oriented_side * - * There are several overloaded functions called `Oriented_side()` that computes - * the relative position of two polygons or of a point and a polygon. This group - * of functions is divided into two subgroups. + * There are several overloaded function templatess called `Oriented_side()` + * that computes the relative position of either (i) two polygons or (ii) a + * point and a polygon. This group of function templates is divided into two + * subgroups. * * \cgalHeading{Oriented Side of two Polygons} * - * The functions in the first subgroup accept two polygons `pgn1` and `pgn2`. - * Each function in this group returns `ON_POSITIVE_SIDE` if the two - * given polygons `pgn1` and `pgn2` intersect in their interiors, - * `ON_NEGATIVE_SIDE` if `pgn1` and `pgn2` do not intersect at all, and - * `ON_ORIENTED_BOUNDARY` if `pgn1` and `pgn2` intersect only in their - * boundaries. + * Every function template in the first subgroup accepts two polygons `pgn1` and + * `pgn2`. It returns `ON_POSITIVE_SIDE` if the two given polygons `pgn1` and + * `pgn2` intersect in their interiors, `ON_NEGATIVE_SIDE` if `pgn1` and `pgn2` + * do not intersect at all, and `ON_ORIENTED_BOUNDARY` if `pgn1` and `pgn2` + * intersect only in their boundaries. * - * This group is further divided into two sub-subgroups. - * A function in the first sub-subgroup has one of the two following signatures: - * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` - * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` + * A function template in this subgroup has one of the two following signatures: + * - `Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` + * - `Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` * - * The types of `pgn1` and `pgn2` must be convertible to one of the two types `Polygon_2` or Polygon_with_holes_2`. + * The types `Type1` and `Type2` of the parameters must be convertible to the types specified in a row in the following table, respectively. * - * A function in the second sub-subgroup has one of the two following signatures: - * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` - * - `template Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` - * - * The types of `pgn1` and `pgn2` must be convertible to one of the two types `General_polygon_2<%ArrTraits>` or `General_polygon_with_holes_2 >`. + *
+ * + * + * + * + * + * + * + * + * + * + *
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
* * \cgalHeading{Oriented Side of a Point and a Polygon} * @@ -681,21 +867,16 @@ namespace CGAL { * Each function in this group returns `ON_POSITIVE_SIDE` if the point `p` * is in the interior of `pgn`, `ON_NEGATIVE_SIDE` if `p` is in the exterior * of `pgn`, and `ON_ORIENTED_BOUNDARY` if `p` is on the boundary of `pgn`. - * This group is also further divided into two sub-subgroups. - * A function in the first sub-subgroup has one of the two following signatures: - * - `template Oriented_side oriented_side(const Point_2& p, const Type& pgn);` - * - `template Oriented_side oriented_side(const Point_2& p, const Type& pgn, const GpsTraits& traits);` * - * `Type` must be convertible to one of `Polygon_2` or `Polygon_with_holes_2`. + * A function in this subgroup has one of the two following signatures: + * - `Oriented_side oriented_side(const Point_2& p, const Type& pgn);` + * - `Oriented_side oriented_side(const Point_2& p, const Type& pgn, const GpsTraits& traits);` * - * A function in the second sub-subgroup has one of the two following signatures: - * - `template Oriented_side oriented_side(const Point_2& p, const Type2& pgn);` - * - `template Oriented_side oriented_side(const Point_2& p, const Type2& pgn, const GpsTraits& traits);` - * `Type` must be convertible to one of `General_polygon_2<%ArrTraits>` or `General_polygon_with_holes_2 >`. - * - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * `Type` must be convertible to one of + * `Polygon_2`, + * `Polygon_with_holes_2`, + * `General_polygon_2`, or + * `General_polygon_with_holes_2`. * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink */ @@ -703,135 +884,255 @@ namespace CGAL { /// @{ // Polygon--Polygon Traits-less + +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + */ template -Oriented_side oriented_side(const Polygon_2& p1, - const Polygon_2& p2); - +Oriented_side oriented_side(const Polygon_2& pgn1, + const Polygon_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + */ template -Oriented_side oriented_side(const Polygon_2& p1, - const Polygon_with_holes_2& p2); - +Oriented_side oriented_side(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + */ template -Oriented_side oriented_side(const Polygon_with_holes_2& p1, - const Polygon_2& p2); - +Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + */ template -Oriented_side oriented_side(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2); - +Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 1st the input polygon. + * \param pgn2 the 2nd input polygon. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + */ template -Oriented_side oriented_side(const General_polygon_2& p1, - const General_polygon_2& p2); - +Oriented_side oriented_side(const General_polygon_2& pgn1, + const General_polygon_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + */ template -Oriented_side oriented_side(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2); - +Oriented_side oriented_side(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + */ template -Oriented_side oriented_side(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2); - +Oriented_side oriented_side(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2); +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + */ template -Oriented_side oriented_side(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2); +Oriented_side oriented_side(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2); // Polygon--Polygon With Traits + +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Polygon_2& p1, - const Polygon_2& p2, +Oriented_side oriented_side(const Polygon_2& pgn1, + const Polygon_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Polygon_2& p1, - const Polygon_with_holes_2& p2, +Oriented_side oriented_side(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Polygon_with_holes_2& p1, - const Polygon_2& p2, +Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2, +Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * + */ template -Oriented_side oriented_side(const General_polygon_2& p1, - const General_polygon_2& p2, +Oriented_side oriented_side(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * + */ template -Oriented_side oriented_side(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2, +Oriented_side oriented_side(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * + */ template -Oriented_side oriented_side(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2, +Oriented_side oriented_side(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, const GpsTraits& traits); - +/*! computes the relative position of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2, +Oriented_side oriented_side(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, const GpsTraits& traits); // Point--Polygon Traits-less + +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + */ template -Oriented_side oriented_side(const Point_2& p1, - const Polygon_2& p2); - +Oriented_side oriented_side(const Point_2& p, + const Polygon_2& pgn); +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + */ template -Oriented_side oriented_side(const Point_2& p1, - const Polygon_with_holes_2& p2); - +Oriented_side oriented_side(const Point_2& p, + const Polygon_with_holes_2& pgn); +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + */ template -Oriented_side oriented_side(const Point_2& p1, - const General_polygon_2& p2); +Oriented_side oriented_side(const Point_2& p, + const General_polygon_2& pgn); - -template -Oriented_side oriented_side(const Point_2& p1, - const General_polygon_with_holes_2 >& p2); +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + */ +template +Oriented_side oriented_side(const Point_2& p, + const General_polygon_with_holes_2& pgn); // Point--Polygon With Traits + +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Point_2& p1, - const Polygon_2& p2, +Oriented_side oriented_side(const Point_2& p, + const Polygon_2& pgn, const GpsTraits& traits); - +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ template -Oriented_side oriented_side(const Point_2& p1, - const Polygon_with_holes_2& p2, +Oriented_side oriented_side(const Point_2& p, + const Polygon_with_holes_2& pgn, const GpsTraits& traits); - +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + * \param traits a traits object. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. + * + */ template -Oriented_side oriented_side(const Point_2& p1, - const General_polygon_2& p2, +Oriented_side oriented_side(const Point_2& p, + const General_polygon_2& pgn, const GpsTraits& traits); - -template -Oriented_side oriented_side(const Point_2& p1, - const General_polygon_with_holes_2 >& p2, +/*! computes the relative position of a point and a polygon. + * \param p the input point. + * \param pgn the input polygon. + * \param traits a traits object. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +Oriented_side oriented_side(const Point_2& p, + const General_polygon_with_holes_2& pgn, const GpsTraits& traits); /// @} @@ -844,14 +1145,14 @@ namespace CGAL { * \anchor ref_bso_symmetric_difference * * Each one of these functions computes the symmetric difference between - * two given polygons `p1` and `p2`, and inserts the resulting + * two given polygons `pgn1` and `pgn2`, and inserts the resulting * polygons with holes into an output container through the output * iterator `oi`. The value type of the `OutputIterator` is either * `Polygon_with_holes_2` or * `General_polygon_with_holes_2`. * * The signature of the function is: - * - `%OutputIterator symmetric_difference(const Type1& p1, const Type2& p2, %OutputIterator oi);` + * - `%OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, %OutputIterator oi);` * * \cgalHeading{Parameters} * @@ -884,60 +1185,60 @@ namespace CGAL { /// @{ -OutputIterator symmetric_difference(const Type1& p1, const Type2& p2, +OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, OutputIterator oi); template -OutputIterator symmetric_difference(const Polygon_2& p1, - const Polygon_2& p2, +OutputIterator symmetric_difference(const Polygon_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const Polygon_2& p1, - const Polygon_with_holes_2& p2, +symmetric_difference(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const Polygon_with_holes_2& p1, - const Polygon_2& p2, +symmetric_difference(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const Polygon_with_holes_2& p1, - const Polygon_with_holes_2& p2, +symmetric_difference(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, OutputIterator oi); template -OutputIterator symmetric_difference(const General_polygon_2& p1, - const General_polygon_2& p2, +OutputIterator symmetric_difference(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const General_polygon_with_holes_2 >& p1, - const General_polygon_2& p2, +symmetric_difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const General_polygon_2& p1, - const General_polygon_with_holes_2 >& p2, +symmetric_difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); template OutputIterator -symmetric_difference(const General_polygon_with_holes_2& p1, - const General_polygon_with_holes_2& p2, +symmetric_difference(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, OutputIterator oi); /*! computes the symmetric difference of the general polygons (or general diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h index 6d96107a443..8d854a38de4 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h @@ -809,7 +809,7 @@ OutputIterator complement (const Polygon_with_holes_2& pgn, } template -OutputIterator complement (const General_polygon_with_holes_2& pgn, +OutputIterator complement (const General_polygon_with_holes_2 >& pgn, OutputIterator oi, Traits& tr) { General_polygon_set_2 gps(tr); From e189cf5bde29b944064c3d27e429efeae3583fff Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Fri, 2 Oct 2020 12:52:36 +0300 Subject: [PATCH 060/317] Updated intersection() --- .../CGAL/Boolean_set_operations_2.h | 491 ++++++++++++------ 1 file changed, 337 insertions(+), 154 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index fb9701bd5c7..e17668a7816 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -8,8 +8,8 @@ namespace CGAL { * compute the \e complement of a given polygon `pgn`. Depending on the type of * the polygon `pgn` the complement is either a single (general) polygon with * holes, or several (general) poylgons with holes. In the latter case the - * `complement()` function template inserts the resulting poylgons with holes into - * a container via an output iterator. + * `complement()` function template inserts the resulting poylgons with holes + * into a container via an output iterator. * * \param pgn The input polygon. Its type must be convertible to one of the * types `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or @@ -37,7 +37,8 @@ void complement(const Polygon_2& pgn, /*! Computes the complement of a general polygon. * \param pgn the input polygon. * \param res the complement of \p pgn. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template void complement(const General_polygon_2& pgn, @@ -60,7 +61,8 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, * Its dereference type must be convertible to * `General_polygon_with_holes_2< >`. * \return the past-the-end iterator of the output container. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator complement(const General_polygon_with_holes_2 >& pgn, @@ -83,9 +85,9 @@ void complement(const Polygon_2& pgn, * \param pgn the input polygon. * \param res the resulting complement of \p pgn * \param traits a traits object. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. */ template void complement(const General_polygon_2& pgn, @@ -114,9 +116,9 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, * `General_polygon_with_holes_2< >`. * \param traits a traits object. * \return the past-the-end iterator of the output container. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. */ template OutputIterator complement(const General_polygon_with_holes_2& pgn, @@ -135,12 +137,20 @@ namespace CGAL { * * There are several overloaded function templates called `difference()` that * computes the \e difference between two polygons `pgn1` and `pgn2` and inserts - * the resulting polygons with holes into a container via the output iterator `oi`. + * the resulting polygons with holes into a container via the output iterator + * `oi`. * * \param oi the output iterator for the result. * - * The types `Type1` and `Type2` of the parameters must be convertible to the types specified in a row in the table below, respectively. - * The 3rd column specifies the corresponding dereference type of the output iterator. + * A function template in this subgroup has one of the two following signatures: + * - `OutputIterator difference(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi);` + * - `OutputIterator difference(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi, const GpsTraits& traits);` + * + * The types `Type1` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. The 3rd column + * specifies the corresponding dereference type of the output iterator. * *
* @@ -166,7 +176,7 @@ namespace CGAL { //////// Traits-less -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -180,7 +190,7 @@ OutputIterator difference(const Polygon_2& pgn1, const Polygon_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -194,7 +204,7 @@ OutputIterator difference(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -208,7 +218,7 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -222,50 +232,56 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertibe to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator difference(const General_polygon_2& pgn1, const General_polygon_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertibe to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator difference(const General_polygon_with_holes_2 >& pgn1, const General_polygon_2& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertibe to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator difference(const General_polygon_2& pgn1, const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons with holes and inserts the + * resulting general polygons with holes into a container via an output + * iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. @@ -280,7 +296,7 @@ OutputIterator difference(const General_polygon_with_holes_2& pgn1, //////// With Traits -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -297,7 +313,7 @@ OutputIterator difference(const Polygon_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -314,7 +330,7 @@ OutputIterator difference(const Polygon_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon +/*! computes the difference of two polygons and inserts the resulting polygons * with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -331,8 +347,8 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two polygons with holes and inserts the resulting + * polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. @@ -348,8 +364,8 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. @@ -357,6 +373,8 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, * `General_polygon_with_holes_2 >`. * \param traits a traits object. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -365,8 +383,8 @@ OutputIterator difference(const General_polygon_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. @@ -374,6 +392,8 @@ OutputIterator difference(const General_polygon_2& pgn1, * `General_polygon_with_holes_2 >`. * \param traits a traits object. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -382,8 +402,8 @@ OutputIterator difference(const General_polygon_with_holes_2 >`. * \param traits a traits object. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -399,8 +421,8 @@ OutputIterator difference(const General_polygon_2& pgn1, OutputIterator oi, const GpsTraits& traits); -/*! computes the difference of the polygons and inserts the resulting polygon - * with holes into a container via an output iterator. +/*! computes the difference of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param oi the output iterator for the result. @@ -438,22 +460,18 @@ namespace CGAL { * *
*
- * - * - * - * - * - * - * + * + * + * + * + * + * + * * * *
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
*
* - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -462,76 +480,125 @@ namespace CGAL { /// @{ -/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const Polygon_2& pgn1, const Polygon_2& pgn2); -/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2); -/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2); -/*! returns `true` if the polygons `pgn1` and `pgn2` intersect in their interior. +/*! determines whether two polygons with holes intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2); -/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their - * interior. +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const General_polygon_2& pgn1, const General_polygon_2& pgn2); -/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their - * interior. +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const General_polygon_2& pgn1, const General_polygon_with_holes_2 >& pgn2); -/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their - * interior. +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const General_polygon_with_holes_2 >& pgn1, const General_polygon_2& pgn2); - -/*! returns `true` if the general polygons `pgn1` and `pgn2` intersect in their +/*! determines whether two general polygons with holes intersect in their * interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. */ template bool do_intersect(const General_polygon_with_holes_2& pgn1, const General_polygon_with_holes_2& pgn2); -/*! returns `true`, if the set of general polygons (or general polygons with - * holes) in the given range intersect in their interior, and `false` - * otherwise. (The value type of the input iterator is used to distinguish - * between the two). +/*! Given a range of polygons or a range of polygons with holes (resp. a range + * of general polygons or a range of general polygons with holes) determines + * whether the open polygons (resp. general polygons) in the range have a common + * point. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \return `true` if the pairwise intersections of all open polygons or polygons + * with holes (resp. general polygons or general polygons with holes) in + * the range [*begin,*end) overlap, and `false` otherwise. */ template bool do_intersect(InputIterator begin, InputIterator end); -/*! returns `true`, if the set of general polygons and general polygons with - * holes in the given two ranges respectively intersect in their interior, and - * `false` otherwise. +/*! Given a range of polygons (resp. general polygons) and a range of polygons + * with holes (resp. general polygons with holes) determines whether the open + * polygons (resp. general polygons) in the two ranges have a common point. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \return `true` if the pairwise intersections of all open polygons (resp. + * general polygons) and polygons with holes (resp. general polygons with + * holes) in the ranges [*begin1,*end1) and [*begin2,*end2), + * respectively, overlap, and `false` otherwise. */ template -bool do_intersect(InputIterator1 pgn_begin1, - InputIterator1 pgn_end1, - InputIterator2 pgn_begin2, - InputIterator2 pgn_end2); +bool do_intersect(InputIterator1 begin1, + InputIterator1 end1, + InputIterator2 begin2, + InputIterator2 end2); /// @} } /* namespace CGAL */ @@ -559,22 +626,18 @@ namespace CGAL { * *
* - * - * - * - * - * - * - * + * + * + * + * + * + * + * * * *
Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
*
* - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -584,70 +647,112 @@ namespace CGAL { /// @{ -/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. - */ -OutputIterator intersection(const Type1& pgn1, const Type2& pgn2, - OutputIterator oi); - -/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the intersection of two polygons and inserts the resulting polygons + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const Polygon_2& pgn1, const Polygon_2& pgn2, OutputIterator oi); -/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the intersection of two polygons and inserts the resulting polygons + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the intersection of two polygons and inserts the resulting polygons + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2, OutputIterator oi); -/*! computes the intersection of the polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `Polygon_with_holes_2`. +/*! computes the intersection of two polygons and inserts the resulting polygons + * with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); -/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the intersection of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const General_polygon_2& pgn1, const General_polygon_2& pgn2, OutputIterator oi); -/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the intersection of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const General_polygon_with_holes_2 >& pgn1, const General_polygon_2& pgn2, OutputIterator oi); -/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the intersection of two general polygons and inserts the resulting + * general polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const General_polygon_2& pgn1, const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); -/*! computes the intersection of the general polygons `pgn1` and `pgn2` into the output iterator `oi`. - * The value type of `oi` is `General_polygon_with_holes_2`. +/*! computes the intersection of two general polygons with holes and inserts the + * resulting general polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(const General_polygon_with_holes_2& pgn1, @@ -655,29 +760,50 @@ OutputIterator intersection(const General_polygon_with_holes_2& pgn1, OutputIterator oi); -/*! computes the intersection of the general polygons (or general polygons with - * holes) in the given range. (The value type of the input iterator is used to - * distinguish between the two.) The result, represented by a set of general - * polygon with holes, is written into the output iterator `oi`. The output - * iterator is returned. The value type of the `OutputIterator` is - * `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) or a range of general + * polygons with holes (resp. general polygons with holes) computes the + * intersection of all polygons in the range and inserts the resulting polygons + * with holes (resp. general polygons with holes) into a container via an output + * iterator. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ template OutputIterator intersection(InputIterator begin, InputIterator end, OutputIterator oi); -/*! computes the intersection of the general polygons and general polygons with - * holes in the given two ranges. The result, represented by a set of general - * polygon with holes, is written into the output iterator `oi`. The output - * iterator is returned. The value type of the `OutputIterator` is - * `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) and a range of general + * polygons with holes (resp. general polygons with holes) computes the + * intersection of all polygons in the two ranges and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ template -OutputIterator intersection(InputIterator1 pgn_begin1, - InputIterator1 pgn_end1, - InputIterator2 pgn_begin2, - InputIterator2 pgn_end2, +OutputIterator intersection(InputIterator1 begin1, + InputIterator1 end1, + InputIterator2 begin2, + InputIterator2 end2, OutputIterator oi); /// @} @@ -703,22 +829,18 @@ namespace CGAL { * *
* - * - * - * - * - * - * - * + * + * + * + * + * + * + * * * *
Type1 Type2
Polygon_2Polygon_2
Polygon_2polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
*
* - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -849,15 +971,15 @@ namespace CGAL { * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
Type1 Type2
`Polygon_2` `Polygon_2`
`Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2`
`Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2`
`General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* @@ -1004,7 +1126,6 @@ Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. * */ template @@ -1018,7 +1139,6 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. * */ template @@ -1032,7 +1152,6 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. * */ template @@ -1116,8 +1235,6 @@ Oriented_side oriented_side(const Point_2& p, * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * */ template Oriented_side oriented_side(const Point_2& p, @@ -1172,35 +1289,52 @@ namespace CGAL { * * * - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. - * \pre A model of `GpsTraits` must derive from a type that is convertible to a model of `%ArrTraits`. - * * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink - * */ /// @{ -OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, - OutputIterator oi); - - +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const Polygon_2& pgn1, const Polygon_2& pgn2, OutputIterator oi); - +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const Polygon_with_holes_2& pgn1, @@ -1208,19 +1342,48 @@ symmetric_difference(const Polygon_with_holes_2& pgn1, OutputIterator oi); +/*! computes the symmetric difference between two polygons with holes and + * inserts the resulting polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi); - +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const General_polygon_2& pgn1, const General_polygon_2& pgn2, OutputIterator oi); +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const General_polygon_with_holes_2 >& pgn1, @@ -1228,6 +1391,16 @@ symmetric_difference(const General_polygon_with_holes_2 >`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const General_polygon_2& pgn1, @@ -1235,6 +1408,16 @@ symmetric_difference(const General_polygon_2& pgn1, OutputIterator oi); +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2`. + * \return the past-the-end iterator of the output container. + */ template OutputIterator symmetric_difference(const General_polygon_with_holes_2& pgn1, From 2b7f65e8a08ea051accda4f003dbf207cd97bd7a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Fri, 2 Oct 2020 15:10:05 +0300 Subject: [PATCH 061/317] Finished --- .../CGAL/Boolean_set_operations_2.h | 1067 ++++++++++++++--- 1 file changed, 884 insertions(+), 183 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index e17668a7816..d4e89bc8905 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -11,6 +11,8 @@ namespace CGAL { * `complement()` function template inserts the resulting poylgons with holes * into a container via an output iterator. * + * \cgalHeading{Parameters} + * * \param pgn The input polygon. Its type must be convertible to one of the * types `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or * `General_polygon_with_holes_2`. @@ -24,7 +26,7 @@ namespace CGAL { /// @{ -// Traits-less +//////// Traits-less /*! Computes the complement of a polygon. * \param pgn the input polygon. @@ -41,8 +43,9 @@ void complement(const Polygon_2& pgn, * `ArrangementDirectionalXMonotoneTraits_2`. */ template -void complement(const General_polygon_2& pgn, - General_polygon_with_holes_2 >& res); +void +complement(const General_polygon_2& pgn, + General_polygon_with_holes_2 >& res); /*! Computes the complement of a polygon with holes. * \param pgn the input polygon. @@ -65,10 +68,11 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, * `ArrangementDirectionalXMonotoneTraits_2`. */ template -OutputIterator complement(const General_polygon_with_holes_2 >& pgn, - OutputIterator oi); +OutputIterator +complement(const General_polygon_with_holes_2 >& pgn, + OutputIterator oi); -// With Traits +//////// With Traits /*! Computes the complement of a polygon. * \param pgn the input polygon. @@ -90,9 +94,10 @@ void complement(const Polygon_2& pgn, * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template -void complement(const General_polygon_2& pgn, - General_polygon_with_holes_2 >& res, - const GpsTraits& traits); +void +complement(const General_polygon_2& pgn, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); /*! Computes the complement of a polygon with holes. * \param pgn the input polygon. @@ -136,18 +141,19 @@ namespace CGAL { * \anchor ref_bso_difference * * There are several overloaded function templates called `difference()` that - * computes the \e difference between two polygons `pgn1` and `pgn2` and inserts - * the resulting polygons with holes into a container via the output iterator - * `oi`. + * compute the \e difference between two polygons and insert the resulting + * polygons with holes into a container via an output iterator. * - * \param oi the output iterator for the result. - * - * A function template in this subgroup has one of the two following signatures: + * A function template in this group has one of the two following signatures: * - `OutputIterator difference(const Type1& pgn1, const Type2& pgn2, * OutputIterator oi);` * - `OutputIterator difference(const Type1& pgn1, const Type2& pgn2, * OutputIterator oi, const GpsTraits& traits);` * + * \cgalHeading{Parameters} + * + * \param oi the output iterator for the result. + * * The types `Type1` and `Type2` of the parameters must be convertible to the * types specified in a row in the table below, respectively. The 3rd column * specifies the corresponding dereference type of the output iterator. @@ -166,6 +172,7 @@ namespace CGAL { * * * + * \sa \link boolean_complement `CGAL::complement()` \endlink * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink @@ -259,9 +266,10 @@ OutputIterator difference(const General_polygon_2& pgn1, * `ArrangementDirectionalXMonotoneTraits_2`. */ template -OutputIterator difference(const General_polygon_with_holes_2 >& pgn1, - const General_polygon_2& pgn2, - OutputIterator oi); +OutputIterator +difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi); /*! computes the difference of two polygons and inserts the resulting * general polygons with holes into a container via an output iterator. @@ -275,9 +283,10 @@ OutputIterator difference(const General_polygon_with_holes_2 -OutputIterator difference(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2, - OutputIterator oi); +OutputIterator +difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + OutputIterator oi); /*! computes the difference of two general polygons with holes and inserts the * resulting general polygons with holes into a container via an output @@ -307,7 +316,8 @@ OutputIterator difference(const General_polygon_with_holes_2& pgn1, * \return the past-the-end iterator of the output container. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ - template +template OutputIterator difference(const Polygon_2& pgn1, const Polygon_2& pgn2, OutputIterator oi, @@ -324,7 +334,8 @@ OutputIterator difference(const Polygon_2& pgn1, * \return the past-the-end iterator of the output container. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ -template +template OutputIterator difference(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi, @@ -341,7 +352,8 @@ OutputIterator difference(const Polygon_2& pgn1, * \return the past-the-end iterator of the output container. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ -template +template OutputIterator difference(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2, OutputIterator oi, @@ -358,7 +370,8 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, * \return the past-the-end iterator of the output container. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ -template +template OutputIterator difference(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, OutputIterator oi, @@ -397,10 +410,11 @@ OutputIterator difference(const General_polygon_2& pgn1, * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template -OutputIterator difference(const General_polygon_with_holes_2 >& pgn1, - const General_polygon_2& pgn2, - OutputIterator oi, - const GpsTraits& traits); +OutputIterator +difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); /*! computes the difference of two general polygons and inserts the resulting * general polygons with holes into a container via an output iterator. @@ -416,10 +430,11 @@ OutputIterator difference(const General_polygon_with_holes_2 -OutputIterator difference(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2, - OutputIterator oi, - const GpsTraits& traits); +OutputIterator +difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + OutputIterator oi, + const GpsTraits& traits); /*! computes the difference of two general polygons and inserts the resulting * general polygons with holes into a container via an output iterator. @@ -447,16 +462,19 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_do_intersect * - * Each one of these functions computes if the interior of two given - * polygons `pgn1` and `pgn2` intersect. + * There are several overloaded function templates called `do_intersect()` + * that determine whether the interior of two or more polygons intersect. * - * The signature of the function is: + * A function template in this group that accepts two input polygons has one of + * the two following signatures: * - `bool do_intersect(const Type1& pgn1, const Type2& pgn2);` + * - `bool do_intersect(const Type1& pgn1, const Type2& pgn2, + const GpsTraits& traits);` * * \cgalHeading{Parameters} * - * The types of the parameters of the \link ref_bso_do_intersect - * `do_intersect()` \endlink function are any of the following combinations. + * The types `Type1` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. * *
* @@ -472,6 +490,7 @@ namespace CGAL { *
*
* + * \sa \link boolean_complement `CGAL::complement()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -480,6 +499,8 @@ namespace CGAL { /// @{ +//////// Traits-less + /*! determines whether two polygons intersect in their interior. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. @@ -525,6 +546,8 @@ bool do_intersect(const Polygon_with_holes_2& pgn1, * \param pgn2 the 2nd input polygon. * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` * otherwise. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template bool do_intersect(const General_polygon_2& pgn1, @@ -535,16 +558,21 @@ bool do_intersect(const General_polygon_2& pgn1, * \param pgn2 the 2nd input polygon. * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` * otherwise. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -bool do_intersect(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2); +bool +do_intersect(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2); /*! determines whether two general polygons intersect in their interior. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` * otherwise. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template bool do_intersect(const General_polygon_with_holes_2 >& pgn1, @@ -599,6 +627,166 @@ bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2); + +//////// With Traits + +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(const Polygon_2& pgn1, + const Polygon_2& pgn2, + const GpsTraits& traits); + +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, + const GpsTraits& traits, + const GpsTraits& traits); + +/*! determines whether two polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, + const GpsTraits& traits); + +/*! determines whether two polygons with holes intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, + const GpsTraits& traits); + +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + */ +template +bool do_intersect(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, + const GpsTraits& traits); + +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + */ +template +bool +do_intersect(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + const GpsTraits& traits); + +/*! determines whether two general polygons intersect in their interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + */ +template +bool +do_intersect(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + const GpsTraits& traits); + +/*! determines whether two general polygons with holes intersect in their + * interior. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param traits a traits object. + * \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false` + * otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, + const GpsTraits& traits); + +/*! Given a range of polygons or a range of polygons with holes (resp. a range + * of general polygons or a range of general polygons with holes) determines + * whether the open polygons (resp. general polygons) in the range have a common + * point. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param traits a traits object. + * \return `true` if the pairwise intersections of all open polygons or polygons + * with holes (resp. general polygons or general polygons with holes) in + * the range [*begin,*end) overlap, and `false` otherwise. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool do_intersect(InputIterator begin, InputIterator end, + const GpsTraits& traits); + +/*! Given a range of polygons (resp. general polygons) and a range of polygons + * with holes (resp. general polygons with holes) determines whether the open + * polygons (resp. general polygons) in the two ranges have a common point. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param traits a traits object. + * \return `true` if the pairwise intersections of all open polygons (resp. + * general polygons) and polygons with holes (resp. general polygons with + * holes) in the ranges [*begin1,*end1) and [*begin2,*end2), + * respectively, overlap, and `false` otherwise. + */ +template +bool do_intersect(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, + const GpsTraits& traits); + /// @} } /* namespace CGAL */ @@ -608,41 +796,44 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_intersection * - * Each one of these functions computes the intersection of two given - * polygons `pgn1` and `pgn2`, inserts the resulting polygons with - * holes into an output container through a given output iterator - * `oi`, and returns the output iterator. The value type of the - * `OutputIterator` is either `Polygon_with_holes_2` or - * `General_polygon_with_holes_2`. + * There are several overloaded function templates called `intersection()` that + * compute the \e intersection of two or more polygons and insert the resulting + * polygons with holes into a container via an output iterator. * - * The signature of the function is: - * - `%OutputIterator %intersection(const Type1& pgn1, const Type2& pgn2, - * %OutputIterator oi);` + * A function template in this group that accepts two input polygons has one of + * the two following signatures: + * - `OutputIterator %intersection(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi);` + * - `OutputIterator %intersection(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi, const GpsTraits& traits);` * * \cgalHeading{Parameters} * - * The types of the parameters of the `intersection()` function are any of the - * following combinations. + * \param oi the output iterator for the result. + * + * The types `Type1` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. The 3rd column + * specifies the corresponding dereference type of the output iterator. * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2` %Dereference Type of `oi`
`Polygon_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_2` `General_polygon_with_holes_2``General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* + * \sa \link boolean_complement `CGAL::complement()` \endlink * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink * \sa \link boolean_symmetric_difference `CGAL::symmetric_difference()` \endlink - * */ /// @{ @@ -711,6 +902,8 @@ OutputIterator intersection(const Polygon_with_holes_2& pgn1, * Its dereference type must be convertible to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator intersection(const General_polygon_2& pgn1, @@ -725,11 +918,14 @@ OutputIterator intersection(const General_polygon_2& pgn1, * Its dereference type must be convertible to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -OutputIterator intersection(const General_polygon_with_holes_2 >& pgn1, - const General_polygon_2& pgn2, - OutputIterator oi); +OutputIterator +intersection(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi); /*! computes the intersection of two general polygons and inserts the resulting * general polygons with holes into a container via an output iterator. @@ -739,11 +935,14 @@ OutputIterator intersection(const General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -OutputIterator intersection(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2, - OutputIterator oi); +OutputIterator +intersection(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + OutputIterator oi); /*! computes the intersection of two general polygons with holes and inserts the * resulting general polygons with holes into a container via an output iterator. @@ -816,31 +1015,34 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_union * - * Each one of these functions computes the union of two given polygons `pgn1` and - * `pgn2`. If the two given polygons overlap, it returns `true`, and places the - * resulting polygon in `p`. Otherwise, it returns `false`. + * There are several overloaded function templates called `join()` that + * compute the \e union of two polygons. * - * The signature of the function is: - * - `bool join(const Type1& pgn1, const Type2& pgn2, General_polygon_with_holes_2& res);` + * A function template in this group has one of the two following signatures: + * - `bool join(const Type1& pgn1, const Type2& pgn2, Type3& res);` + * - `bool join(const Type1& pgn1, const Type2& pgn2, Type3& res, + * const GpsTraits& traits);` * * \cgalHeading{Parameters} * - * The types of the parameters of the `join()` function are any of the following combinations. + * The types `Type1`, `Type2`, and `Type3, of the parameters must be convertible + * to the types specified in a row in the table below, respectively. * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2` `Type3`
`Polygon_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_2` `General_polygon_with_holes_2``General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* + * \sa \link boolean_complement `CGAL::complement()` \endlink * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_difference `CGAL::difference()` \endlink @@ -849,8 +1051,13 @@ namespace CGAL { /// @{ -/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +//////// Traits-less + +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. */ template bool join(const Polygon_2& pgn1, @@ -858,8 +1065,11 @@ bool join(const Polygon_2& pgn1, General_polygon_with_holes_2 >& res); -/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. */ template bool join(const Polygon_2& pgn1, @@ -867,8 +1077,11 @@ bool join(const Polygon_2& pgn1, General_polygon_with_holes_2 >& res); -/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. */ template bool join(const Polygon_with_holes_2& pgn2, @@ -876,8 +1089,11 @@ bool join(const Polygon_with_holes_2& pgn2, General_polygon_with_holes_2 >& res); -/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two polygons with holes. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. */ template bool join(const Polygon_with_holes_2& pgn2, @@ -885,8 +1101,13 @@ bool join(const Polygon_with_holes_2& pgn2, General_polygon_with_holes_2 >& res); -/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template bool join(const General_polygon_2& pgn1, @@ -894,54 +1115,268 @@ bool join(const General_polygon_2& pgn1, General_polygon_with_holes_2 >& res); -/*! computes the union of the polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -bool join(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2, - General_polygon_with_holes_2 >& res); +bool +join(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + General_polygon_with_holes_2 >& res); -/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -bool join(const General_polygon_with_holes_2 >& pgn2, - const General_polygon_2& pgn1, - General_polygon_with_holes_2 >& res); +bool +join(const General_polygon_with_holes_2 >& pgn2, + const General_polygon_2& pgn1, + General_polygon_with_holes_2 >& res); -/*! computes the union of the general polygons `pgn1` and `pgn2` into the polygon with holes `res`. - * Returns `true` if the two given polygons overlap. +/*! computes the union of two general polygons with holes. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \return `true` if the two input polygons overlap. */ template bool join(const General_polygon_with_holes_2& pgn1, const General_polygon_with_holes_2& pgn2, - Traits::Polygon_with_holes_2& res); + General_polygon_with_holes_2& res); -/*! computes the union of the general polygons (or general polygons with holes) - * in the given range. (The value type of the input iterator is used to - * distinguish between the two.) The result, represented by a set of general - * polygon with holes, is written into the output iterator `oi`. The output - * iterator is returned. The value type of the `OutputIterator` is - * `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) or a range of general + * polygons with holes (resp. general polygons with holes) computes the + * union of all polygons in the range and inserts the resulting polygons + * with holes (resp. general polygons with holes) into a container via an output + * iterator. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ template OutputIterator join(InputIterator begin, InputIterator end, OutputIterator oi); -/*! computes the union of the general polygons and general polygons with holes - * in the given two ranges. The result, represented by a set of general polygon - * with holes, is written into the output iterator `oi`. The output iterator is - * returned. The value type of the `OutputIterator` is - * `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) and a range of general + * polygons with holes (resp. general polygons with holes) computes the + * union of all polygons in the two ranges and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ -template -OutputIterator join(InputIterator1 pgn_begin1, InputIterator1 pgn_end1, - InputIterator2 pgn_begin2, InputIterator2 pgn_end2, +template +OutputIterator join(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, OutputIterator oi); +//////// With Traits + +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const Polygon_2& pgn1, + const Polygon_2& pgn2, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const Polygon_with_holes_2& pgn2, + const Polygon_2& pgn1, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two polygons with holes. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const Polygon_with_holes_2& pgn2, + const Polygon_with_holes_2& pgn1, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool +join(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two general polygons. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const General_polygon_with_holes_2 >& pgn2, + const General_polygon_2& pgn1, + General_polygon_with_holes_2 >& res, + const GpsTraits& traits); + + +/*! computes the union of two general polygons with holes. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param res the resulting union of \p pgn1 and \p pgn2. + * \param traits a traits object. + * \return `true` if the two input polygons overlap. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +bool join(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, + General_polygon_with_holes_2& res, + const GpsTraits& traits); + +/*! Given a range of polygons (resp. general polygons) or a range of general + * polygons with holes (resp. general polygons with holes) computes the + * union of all polygons in the range and inserts the resulting polygons + * with holes (resp. general polygons with holes) into a container via an output + * iterator. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator join(InputIterator begin, InputIterator end, + OutputIterator oi, + const GpsTraits& traits); + +/*! Given a range of polygons (resp. general polygons) and a range of general + * polygons with holes (resp. general polygons with holes) computes the + * union of all polygons in the two ranges and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator join(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, + OutputIterator oi, + const GpsTraits& traits); + /// @} } /* namespace CGAL */ @@ -951,7 +1386,7 @@ namespace CGAL { * \anchor ref_bso_oriented_side * * There are several overloaded function templatess called `Oriented_side()` - * that computes the relative position of either (i) two polygons or (ii) a + * that compute the relative position of either (i) two polygons or (ii) a * point and a polygon. This group of function templates is divided into two * subgroups. * @@ -1020,8 +1455,9 @@ Oriented_side oriented_side(const Polygon_2& pgn1, * \param pgn2 the 2nd input polygon. */ template -Oriented_side oriented_side(const Polygon_2& pgn1, - const Polygon_with_holes_2& pgn2); +Oriented_side +oriented_side(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2); /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. @@ -1036,13 +1472,15 @@ Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, * \param pgn2 the 2nd input polygon. */ template -Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, - const Polygon_with_holes_2& pgn2); +Oriented_side +oriented_side(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2); /*! computes the relative position of two polygons. * \param pgn1 1st the input polygon. * \param pgn2 the 2nd input polygon. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template Oriented_side oriented_side(const General_polygon_2& pgn1, @@ -1051,20 +1489,24 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -Oriented_side oriented_side(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2); +Oriented_side +oriented_side(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2); /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template -Oriented_side oriented_side(const General_polygon_with_holes_2 >& pgn1, - const General_polygon_2& pgn2); +Oriented_side +oriented_side(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2); /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. @@ -1074,7 +1516,7 @@ template Oriented_side oriented_side(const General_polygon_with_holes_2& pgn1, const General_polygon_with_holes_2& pgn2); -// Polygon--Polygon With Traits +//////// Polygon--Polygon With Traits /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. @@ -1124,7 +1566,8 @@ Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param traits a traits object. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ @@ -1137,27 +1580,31 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param traits a traits object. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ template -Oriented_side oriented_side(const General_polygon_2& pgn1, - const General_polygon_with_holes_2 >& pgn2, - const GpsTraits& traits); +Oriented_side +oriented_side(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + const GpsTraits& traits); /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \param traits a traits object. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ template -Oriented_side oriented_side(const General_polygon_with_holes_2 >& pgn1, - const General_polygon_2& pgn2, - const GpsTraits& traits); +Oriented_side +oriented_side(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + const GpsTraits& traits); /*! computes the relative position of two polygons. * \param pgn1 the 1st input polygon. @@ -1191,7 +1638,8 @@ Oriented_side oriented_side(const Point_2& p, /*! computes the relative position of a point and a polygon. * \param p the input point. * \param pgn the input polygon. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template Oriented_side oriented_side(const Point_2& p, @@ -1205,7 +1653,7 @@ template Oriented_side oriented_side(const Point_2& p, const General_polygon_with_holes_2& pgn); -// Point--Polygon With Traits +//////// Point--Polygon With Traits /*! computes the relative position of a point and a polygon. * \param p the input point. @@ -1233,7 +1681,8 @@ Oriented_side oriented_side(const Point_2& p, * \param p the input point. * \param pgn the input polygon. * \param traits a traits object. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -1261,34 +1710,46 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_symmetric_difference * - * Each one of these functions computes the symmetric difference between - * two given polygons `pgn1` and `pgn2`, and inserts the resulting - * polygons with holes into an output container through the output - * iterator `oi`. The value type of the `OutputIterator` is either - * `Polygon_with_holes_2` or - * `General_polygon_with_holes_2`. + * There are several overloaded function templates called + * `symmetric_difference()` that compute the \e symmetric difference + * between two or more input polygons and insert the resulting + * polygons with holes into a container via an output iterator. + * - * The signature of the function is: - * - `%OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, %OutputIterator oi);` + * A function template in this group that accepts two input polygons has one of + * the two following signatures: + * - `OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi);` + * - `OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, + * OutputIterator oi, const GpsTraits& traits);` * * \cgalHeading{Parameters} * - * The types of the parameters of the `symmetric_difference()` function are any of the following combinations. + * The types `Type1` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. The 3rd column + * specifies the corresponding dereference type of the output iterator. + * + * \param oi the output iterator for the result. + * + * The types `Type1` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. The 3rd column + * specifies the corresponding dereference type of the output iterator. * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Arg 1 typeArg 2 type
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2` %Dereference Type of `oi`
`Polygon_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_2` `General_polygon_with_holes_2``General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* + * \sa \link boolean_complement `CGAL::complement()` \endlink * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink * \sa \link boolean_join `CGAL::join()` \endlink @@ -1297,6 +1758,8 @@ namespace CGAL { /// @{ +//////// Traits-less + /*! computes the symmetric difference between two polygons and inserts the * resulting polygons with holes into a container via an output iterator. * \param pgn1 the 1st input polygon. @@ -1367,6 +1830,8 @@ symmetric_difference(const Polygon_with_holes_2& pgn1, * Its dereference type must be convertible to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator symmetric_difference(const General_polygon_2& pgn1, @@ -1383,6 +1848,8 @@ OutputIterator symmetric_difference(const General_polygon_2& pgn1, * Its dereference type must be convertible to * `General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -1400,6 +1867,8 @@ symmetric_difference(const General_polygon_with_holes_2 >`. * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -1407,7 +1876,6 @@ symmetric_difference(const General_polygon_2& pgn1, const General_polygon_with_holes_2 >& pgn2, OutputIterator oi); - /*! computes the symmetric difference between two general polygons and inserts * the resulting general polygons with holes into a container via an output * iterator. @@ -1424,33 +1892,266 @@ symmetric_difference(const General_polygon_with_holes_2& pgn1, const General_polygon_with_holes_2& pgn2, OutputIterator oi); -/*! computes the symmetric difference of the general polygons (or general - * polygons with holes) in the given range. A point is contained in the - * symmetric difference, if and only if it is contained in an odd number of - * input polygons. (The value type of the input iterator is used to distinguish - * between the two.) The result, represented by a set of general polygon with - * holes, is inserted into an output container through a given output iterator - * `oi`. The output iterator is returned. The value type of the `OutputIterator` - * is `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) or a range of general + * polygons with holes (resp. general polygons with holes) computes the + * symmetric difference of all polygons in the range and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. A point is contained in the symmetric difference, if and + * only if it is contained in an odd number of input polygons. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ template OutputIterator symmetric_difference(InputIterator begin, InputIterator end, OutputIterator oi); -/*! computes the symmetric difference of the general polygons and general - * polygons with holes in the given two ranges. A point is contained in the - * symmetric difference, if and only if it is contained in an odd number of - * input polygons. The result, represented by a set of general polygon with - * holes, is inserted into an output container through a given output iterator - * `oi`. The output iterator is returned. The value type of the `OutputIterator` - * is `Traits::Polygon_with_holes_2`. +/*! Given a range of polygons (resp. general polygons) and a range of general + * polygons with holes (resp. general polygons with holes) computes the + * intersection of all polygons in the two ranges and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. A point is contained in the symmetric difference, if and + * only if it is contained in an odd number of input polygons. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \return the past-the-end iterator of the output container. */ -template -OutputIterator symmetric_difference(InputIterator1 pgn_begin1, - InputIterator1 pgn_end1, - InputIterator2 pgn_begin2, - InputIterator2 pgn_end2, +template +OutputIterator symmetric_difference(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, OutputIterator oi); + +//////// With Traits + +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator symmetric_difference(const Polygon_2& pgn1, + const Polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the symmetric difference between two polygons and inserts the + * resulting polygons with holes into a container via an output iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + + +/*! computes the symmetric difference between two polygons with holes and + * inserts the resulting polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator symmetric_difference(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + + +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const General_polygon_with_holes_2 >& pgn1, + const General_polygon_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + + +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2 >`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre `%ArrTraits` must be a model of the concept + * `ArrangementDirectionalXMonotoneTraits_2`. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 >& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! computes the symmetric difference between two general polygons and inserts + * the resulting general polygons with holes into a container via an output + * iterator. + * \param pgn1 the 1st input polygon. + * \param pgn2 the 2nd input polygon. + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `General_polygon_with_holes_2`. + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator +symmetric_difference(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, + OutputIterator oi, + const GpsTraits& traits); + +/*! Given a range of polygons (resp. general polygons) or a range of general + * polygons with holes (resp. general polygons with holes) computes the + * symmetric difference of all polygons in the range and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. A point is contained in the symmetric difference, if and + * only if it is contained in an odd number of input polygons. + * \param begin the first iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param end the past-the-end iterator of the input range. It's value type is + * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator symmetric_difference(InputIterator begin, InputIterator end, + OutputIterator oi, + const GpsTraits& traits); + +/*! Given a range of polygons (resp. general polygons) and a range of general + * polygons with holes (resp. general polygons with holes) computes the + * intersection of all polygons in the two ranges and inserts the resulting + * polygons with holes (resp. general polygons with holes) into a container via + * an output iterator. A point is contained in the symmetric difference, if and + * only if it is contained in an odd number of input polygons. + * \param begin1 the first iterator of the 1st input range. It's value type is + * Polygon_2 (resp. General_polygon_2). + * \param end1 the past-the-end iterator of the 1st input range. It's value + * type is Polygon_2 (resp. General_polygon_2). + * \param begin2 the first iterator of the 2nd input range. It's value type + * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param end2 the past-the-end iterator of the 2nd input range. It's value + * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param oi the output iterator for the result. + * Its dereference type must be convertible to + * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). + * \param traits a traits object. + * \return the past-the-end iterator of the output container. + * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. + */ +template +OutputIterator symmetric_difference(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, + OutputIterator oi, + const GpsTraits& traits); + /// @} } /* namespace CGAL */ From ee62fa60ed0b60ee2ea2c47a0546d7db8f631ef5 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 3 Oct 2020 10:21:13 +0300 Subject: [PATCH 062/317] Improved documentation of the Boolean_set_operations_2 free functions --- Installation/CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 310be97819a..83437243efc 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -28,6 +28,8 @@ Release date: December 2020 and [`Construct_power_sphere_d`](https://doc.cgal.org/5.2/Kernel_d/classCGAL_1_1Epeck__d_1_1Construct__power__sphere__d.html), to deal with weighted points. +### 2D Regularized Boolean Set Operations +- Added documentation for the free functions `oriented_side(const Point_2& p, ....)` that accept a point and a polygon, and improved the documentation of all other functions [Release 5.1](https://github.com/CGAL/cgal/releases/tag/v5.1) ----------- From 8c33fbbec319882e4c019eb1912dd8cad05d9e9f Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 3 Oct 2020 10:55:47 +0300 Subject: [PATCH 063/317] Last fixes --- .../CGAL/Boolean_set_operations_2.h | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index d4e89bc8905..53c940af212 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -11,11 +11,24 @@ namespace CGAL { * `complement()` function template inserts the resulting poylgons with holes * into a container via an output iterator. * + * A function template in this group has one of the two following signatures: + * - `void complement(const Type1& pgn, Type2& res);` + * - `void complement(const Type1& pgn, Type2& res, const GpsTraits& traits);` + * * \cgalHeading{Parameters} * - * \param pgn The input polygon. Its type must be convertible to one of the - * types `Polygon_2`, `General_polygon_2`, `Polygon_with_holes_2`, or - * `General_polygon_with_holes_2`. + * The types `Type` and `Type2` of the parameters must be convertible to the + * types specified in a row in the table below, respectively. + * + *
+ * + * + * + * + * + * + *
Type1 Type2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_with_holes_2
+ *
* * \sa \link boolean_do_intersect `CGAL::do_intersect()` \endlink * \sa \link boolean_intersection `CGAL::intersection()` \endlink @@ -150,8 +163,6 @@ namespace CGAL { * - `OutputIterator difference(const Type1& pgn1, const Type2& pgn2, * OutputIterator oi, const GpsTraits& traits);` * - * \cgalHeading{Parameters} - * * \param oi the output iterator for the result. * * The types `Type1` and `Type2` of the parameters must be convertible to the @@ -807,8 +818,6 @@ namespace CGAL { * - `OutputIterator %intersection(const Type1& pgn1, const Type2& pgn2, * OutputIterator oi, const GpsTraits& traits);` * - * \cgalHeading{Parameters} - * * \param oi the output iterator for the result. * * The types `Type1` and `Type2` of the parameters must be convertible to the @@ -1400,7 +1409,10 @@ namespace CGAL { * * A function template in this subgroup has one of the two following signatures: * - `Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2);` - * - `Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);` + * - `Oriented_side oriented_side(const Type1& pgn1, const Type2& pgn2, + * const GpsTraits& traits);` + * + * \cgalHeading{Parameters} * * The types `Type1` and `Type2` of the parameters must be convertible to the types specified in a row in the following table, respectively. * @@ -1427,7 +1439,10 @@ namespace CGAL { * * A function in this subgroup has one of the two following signatures: * - `Oriented_side oriented_side(const Point_2& p, const Type& pgn);` - * - `Oriented_side oriented_side(const Point_2& p, const Type& pgn, const GpsTraits& traits);` + * - `Oriented_side oriented_side(const Point_2& p, const Type& pgn, + * const GpsTraits& traits);` + * + * \cgalHeading{Parameters} * * `Type` must be convertible to one of * `Polygon_2`, @@ -1723,12 +1738,6 @@ namespace CGAL { * - `OutputIterator symmetric_difference(const Type1& pgn1, const Type2& pgn2, * OutputIterator oi, const GpsTraits& traits);` * - * \cgalHeading{Parameters} - * - * The types `Type1` and `Type2` of the parameters must be convertible to the - * types specified in a row in the table below, respectively. The 3rd column - * specifies the corresponding dereference type of the output iterator. - * * \param oi the output iterator for the result. * * The types `Type1` and `Type2` of the parameters must be convertible to the From 9b0b296cbe6ab11576e9081d05657df2fc9360b4 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:14:44 +0300 Subject: [PATCH 064/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 53c940af212..8a1fd4b6946 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -41,7 +41,7 @@ namespace CGAL { //////// Traits-less -/*! Computes the complement of a polygon. +/*! computes the complement of a polygon. * \param pgn the input polygon. * \param res the resulting complement of \p pgn. */ From 06ebe35eb2368fd542ec03172069d084c4f7a879 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:14:56 +0300 Subject: [PATCH 065/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 8a1fd4b6946..2d7290c3044 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -60,7 +60,7 @@ void complement(const General_polygon_2& pgn, General_polygon_with_holes_2 >& res); -/*! Computes the complement of a polygon with holes. +/*! computes the complement of a polygon with holes. * \param pgn the input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertible to From 4b621e1de592ef92d3cacc1ac12c70115d1b5a59 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:15:07 +0300 Subject: [PATCH 066/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 2d7290c3044..ca4ccd240f6 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -49,7 +49,7 @@ template void complement(const Polygon_2& pgn, Polygon_with_holes_2& res); -/*! Computes the complement of a general polygon. +/*! computes the complement of a general polygon. * \param pgn the input polygon. * \param res the complement of \p pgn. * \pre `%ArrTraits` must be a model of the concept From 03220ee24a6a88abb2cfbad13ffac8dfb28a11ed Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:15:17 +0300 Subject: [PATCH 067/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index ca4ccd240f6..871ae06600d 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -71,7 +71,7 @@ template OutputIterator complement(const Polygon_with_holes_2& pgn, OutputIterator oi); -/*! Computes the complement of a general polygon with holes. +/*! computes the complement of a general polygon with holes. * \param pgn the input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertible to From 0de8a77326c1d6cc6a1d15c85952123b8201a790 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:16:21 +0300 Subject: [PATCH 068/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 871ae06600d..4815a7024ff 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -87,7 +87,7 @@ complement(const General_polygon_with_holes_2 >& pg //////// With Traits -/*! Computes the complement of a polygon. +/*! computes the complement of a polygon. * \param pgn the input polygon. * \param res the resulting complement of \p pgn * \param traits a traits object. From 9215fb64c08333f4924eadf3803d3cdaaf62674a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:16:35 +0300 Subject: [PATCH 069/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 4815a7024ff..48f7365b81f 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -98,7 +98,7 @@ void complement(const Polygon_2& pgn, Polygon_with_holes_2& res, const GpsTraits& traits); -/*! Computes the complement of a general polygon. +/*! computes the complement of a general polygon. * \param pgn the input polygon. * \param res the resulting complement of \p pgn * \param traits a traits object. From 7cad2dd83b162905b1d0ef9f5d9990d076bfe9ce Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:17:04 +0300 Subject: [PATCH 070/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 48f7365b81f..42015be12c8 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -605,7 +605,7 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * whether the open polygons (resp. general polygons) in the range have a common * point. * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` * (resp. General_polygon_with_holes_2). * \param end the past-the-end iterator of the input range. It's value type is * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes From 15999c1d87a9720949a7dfddd230ff69b4b75701 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:17:33 +0300 Subject: [PATCH 071/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 42015be12c8..67ff6db56ed 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -606,7 +606,7 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * point. * \param begin the first iterator of the input range. It's value type is * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` - * (resp. General_polygon_with_holes_2). + * (resp. `General_polygon_with_holes_2`). * \param end the past-the-end iterator of the input range. It's value type is * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes * (resp. General_polygon_with_holes_2). From 5cbf5ff39bf7bf96ca14d1c0d410f080fb171989 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:17:54 +0300 Subject: [PATCH 072/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 67ff6db56ed..757ab17ac9d 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -127,7 +127,7 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, OutputIterator oi, const GpsTraits& traits); -/*! Computes the complement of the general polygon with holes. +/*! computes the complement of the general polygon with holes. * \param pgn the input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertible to From 37cc60b4217aaf8276aaf7743e1406ac40161d3b Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:18:08 +0300 Subject: [PATCH 073/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 757ab17ac9d..b7fa36f317f 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -112,7 +112,7 @@ complement(const General_polygon_2& pgn, General_polygon_with_holes_2 >& res, const GpsTraits& traits); -/*! Computes the complement of a polygon with holes. +/*! computes the complement of a polygon with holes. * \param pgn the input polygon. * \param oi the output iterator for the result. * Its dereference type must be convertible to From 3a48f47a9810d2b897468900dc26a528bf7a0575 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:18:34 +0300 Subject: [PATCH 074/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index b7fa36f317f..b6e28b9d9dc 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -608,7 +608,7 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` * (resp. `General_polygon_with_holes_2`). * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` * (resp. General_polygon_with_holes_2). * \return `true` if the pairwise intersections of all open polygons or polygons * with holes (resp. general polygons or general polygons with holes) in From f81c9c2d0058f14dc9673224ae3d24ff5b0c3098 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:18:55 +0300 Subject: [PATCH 075/317] Update Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h Co-authored-by: Sebastien Loriot --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index b6e28b9d9dc..157e7e89b32 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -609,7 +609,7 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * (resp. `General_polygon_with_holes_2`). * \param end the past-the-end iterator of the input range. It's value type is * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` - * (resp. General_polygon_with_holes_2). + * (resp. `General_polygon_with_holes_2`). * \return `true` if the pairwise intersections of all open polygons or polygons * with holes (resp. general polygons or general polygons with holes) in * the range [*begin,*end) overlap, and `false` otherwise. From 29063b4d3497e097b84f0aec5d305665918fe672 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:39:24 +0300 Subject: [PATCH 076/317] Added missing links and fixed syntax --- .../CGAL/Boolean_set_operations_2.h | 220 +++++++++--------- 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 157e7e89b32..c7a110accb9 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -22,11 +22,11 @@ namespace CGAL { * *
* - * - * - * - * - * + * + * + * + * + * *
Type1 Type2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2`
`Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* @@ -489,15 +489,15 @@ namespace CGAL { * *
* - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
`Type1` `Type2`
`Polygon_2` `Polygon_2`
`Polygon_2` `Polygon_with_holes_2`
`Polygon_with_holes_2` `Polygon_2`
`Polygon_with_holes_2` `Polygon_with_holes_2`
`General_polygon_2` `General_polygon_2`
`General_polygon_2` `General_polygon_with_holes_2`
`General_polygon_with_holes_2``General_polygon_2`
`General_polygon_with_holes_2``General_polygon_with_holes_2`
*
* @@ -604,11 +604,11 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * of general polygons or a range of general polygons with holes) determines * whether the open polygons (resp. general polygons) in the range have a common * point. - * \param begin the first iterator of the input range. It's value type is - * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` * (resp. `General_polygon_with_holes_2`). - * \param end the past-the-end iterator of the input range. It's value type is - * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes` + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` * (resp. `General_polygon_with_holes_2`). * \return `true` if the pairwise intersections of all open polygons or polygons * with holes (resp. general polygons or general polygons with holes) in @@ -620,14 +620,14 @@ bool do_intersect(InputIterator begin, InputIterator end); /*! Given a range of polygons (resp. general polygons) and a range of polygons * with holes (resp. general polygons with holes) determines whether the open * polygons (resp. general polygons) in the two ranges have a common point. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \return `true` if the pairwise intersections of all open polygons (resp. * general polygons) and polygons with holes (resp. general polygons with * holes) in the ranges [*begin1,*end1) and [*begin2,*end2), @@ -760,12 +760,12 @@ bool do_intersect(const General_polygon_with_holes_2& pgn1, * of general polygons or a range of general polygons with holes) determines * whether the open polygons (resp. general polygons) in the range have a common * point. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param traits a traits object. * \return `true` if the pairwise intersections of all open polygons or polygons * with holes (resp. general polygons or general polygons with holes) in @@ -779,14 +779,14 @@ bool do_intersect(InputIterator begin, InputIterator end, /*! Given a range of polygons (resp. general polygons) and a range of polygons * with holes (resp. general polygons with holes) determines whether the open * polygons (resp. general polygons) in the two ranges have a common point. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param traits a traits object. * \return `true` if the pairwise intersections of all open polygons (resp. * general polygons) and polygons with holes (resp. general polygons with @@ -973,12 +973,12 @@ OutputIterator intersection(const General_polygon_with_holes_2& pgn1, * intersection of all polygons in the range and inserts the resulting polygons * with holes (resp. general polygons with holes) into a container via an output * iterator. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -993,14 +993,14 @@ OutputIterator intersection(InputIterator begin, InputIterator end, * intersection of all polygons in the two ranges and inserts the resulting * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1170,12 +1170,12 @@ bool join(const General_polygon_with_holes_2& pgn1, * union of all polygons in the range and inserts the resulting polygons * with holes (resp. general polygons with holes) into a container via an output * iterator. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1190,14 +1190,14 @@ OutputIterator join(InputIterator begin, InputIterator end, * union of all polygons in the two ranges and inserts the resulting * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1342,12 +1342,12 @@ bool join(const General_polygon_with_holes_2& pgn1, * union of all polygons in the range and inserts the resulting polygons * with holes (resp. general polygons with holes) into a container via an output * iterator. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1365,14 +1365,14 @@ OutputIterator join(InputIterator begin, InputIterator end, * union of all polygons in the two ranges and inserts the resulting * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1907,12 +1907,12 @@ symmetric_difference(const General_polygon_with_holes_2& pgn1, * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. A point is contained in the symmetric difference, if and * only if it is contained in an odd number of input polygons. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -1928,14 +1928,14 @@ OutputIterator symmetric_difference(InputIterator begin, InputIterator end, * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. A point is contained in the symmetric difference, if and * only if it is contained in an odd number of input polygons. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -2115,12 +2115,12 @@ symmetric_difference(const General_polygon_with_holes_2& pgn1, * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. A point is contained in the symmetric difference, if and * only if it is contained in an odd number of input polygons. - * \param begin the first iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). - * \param end the past-the-end iterator of the input range. It's value type is - * either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes - * (resp. General_polygon_with_holes_2). + * \param begin the first iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). + * \param end the past-the-end iterator of the input range. Its value type is + * either `Polygon_2` (resp. `General_polygon_2`) or `Polygon_with_holes_2` + * (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). @@ -2139,14 +2139,14 @@ OutputIterator symmetric_difference(InputIterator begin, InputIterator end, * polygons with holes (resp. general polygons with holes) into a container via * an output iterator. A point is contained in the symmetric difference, if and * only if it is contained in an odd number of input polygons. - * \param begin1 the first iterator of the 1st input range. It's value type is - * Polygon_2 (resp. General_polygon_2). - * \param end1 the past-the-end iterator of the 1st input range. It's value - * type is Polygon_2 (resp. General_polygon_2). - * \param begin2 the first iterator of the 2nd input range. It's value type - * is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). - * \param end2 the past-the-end iterator of the 2nd input range. It's value - * type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2). + * \param begin1 the first iterator of the 1st input range. Its value type is + * `Polygon_2` (resp. `General_polygon_2`). + * \param end1 the past-the-end iterator of the 1st input range. Its value + * type is `Polygon_2` (resp. `General_polygon_2`). + * \param begin2 the first iterator of the 2nd input range. Its value type + * is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). + * \param end2 the past-the-end iterator of the 2nd input range. Its value + * type is `Polygon_with_holes_2` (resp. `General_polygon_with_holes_2`). * \param oi the output iterator for the result. * Its dereference type must be convertible to * `Polygon_with_holes_2` (resp. `General_polygons_with_holes_2`). From 7db7a24a90599ba8d8b92218678f6de34b54225f Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 5 Oct 2020 15:48:04 +0300 Subject: [PATCH 077/317] Fixed typo --- .../Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index c7a110accb9..31eb450f116 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -1394,7 +1394,7 @@ namespace CGAL { * \ingroup PkgBooleanSetOperations2Ref * \anchor ref_bso_oriented_side * - * There are several overloaded function templatess called `Oriented_side()` + * There are several overloaded function templates called `Oriented_side()` * that compute the relative position of either (i) two polygons or (ii) a * point and a polygon. This group of function templates is divided into two * subgroups. From 8f090ae8126cdd4b774512e541765da8737bd0fa Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 10:47:51 +0200 Subject: [PATCH 078/317] fixed conversion warnings and added missing named parameters --- .../PackageDescription.txt | 1 - .../Hole_filling/Triangulate_hole_polyline.h | 8 ++-- .../triangulate_hole.h | 43 +++++++++++++++++-- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index c54a5f6bfb7..2717405f1bc 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -114,7 +114,6 @@ and provides a list of the parameters that are used in this package. - `CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()` - `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()` - `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()` -- `CGAL::Polygon_mesh_processing::triangulate_hole_with_cdt_2()` \cgalCRPSection{Predicate Functions} - `CGAL::Polygon_mesh_processing::does_self_intersect()` diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index d73b5d44b5e..9fc38043985 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1410,7 +1410,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, } fh->info() = true; - for (std::size_t i = 0; i < 3; ++i) { + for (int i = 0; i < 3; ++i) { if (!cdt.is_constrained(typename CDT::Edge(fh, i))) { face_queue.push(fh->neighbor(i)); } @@ -1426,8 +1426,8 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, end = cdt.finite_faces_end(); fit != end; ++fit) { if (!fit->info()) { // if it is not external - std::vector is(3); - for (std::size_t i = 0; i < 3; ++i) { + std::vector is(3); + for (int i = 0; i < 3; ++i) { is[i] = fit->vertex(i)->info(); } @@ -1441,7 +1441,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // Call the tracer. It correctly orients the patch faces. // std::cout << "CDT is being used!" << std::endl; - tracer(lambda, 0, size - 1); + tracer(lambda, 0, static_cast(size) - 1); return true; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 7f9dab5fb5a..75d817c4e63 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -42,9 +42,10 @@ namespace Polygon_mesh_processing { /*! \ingroup hole_filling_grp triangulates a hole in a polygon mesh. - The hole must not contain any non-manifold vertex, nor self-intersections. - When using the 2D constrained Delaunay triangulation, the non-manifold vertex is - not an issue. The patch generated does not introduce non-manifold edges nor degenerate triangles. + When using the 2D constrained Delaunay triangulation, the hole must not contain any + self-intersections. However, this option can be applied only for near planar holes. + In other cases, the hole must not contain any non-manifold vertex as well. + The patch generated does not introduce non-manifold edges nor degenerate triangles. If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`. @tparam PolygonMesh a model of `MutableFaceGraph` @@ -81,6 +82,15 @@ namespace Polygon_mesh_processing { \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution.} \cgalParamNEnd + + \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution. + This parameter is a good choice for near planar holes.} + \cgalParamNEnd \cgalNamedParamsEnd @return `out` @@ -198,6 +208,15 @@ namespace Polygon_mesh_processing { falls back to the non-Delaunay triangulations search space to find a solution.} \cgalParamNEnd + \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution. + This parameter is a good choice for near planar holes.} + \cgalParamNEnd + \cgalParamNBegin{density_control_factor} \cgalParamDescription{factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()`} @@ -289,6 +308,15 @@ namespace Polygon_mesh_processing { falls back to the non-Delaunay triangulations search space to find a solution.} \cgalParamNEnd + \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution. + This parameter is a good choice for near planar holes.} + \cgalParamNEnd + \cgalParamNBegin{density_control_factor} \cgalParamDescription{factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()`} @@ -415,6 +443,15 @@ namespace Polygon_mesh_processing { \cgalParamExtra{If no valid triangulation can be found in this search space, the algorithm falls back to the non-Delaunay triangulations search space to find a solution.} \cgalParamNEnd + + \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm + falls back to the non-Delaunay triangulations search space to find a solution. + This parameter is a good choice for near planar holes.} + \cgalParamNEnd \cgalNamedParamsEnd \todo handle islands From 003291f696217ae1e031f7da780fa06a6ee7980d Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 15:02:57 +0200 Subject: [PATCH 079/317] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h Co-authored-by: Sebastien Loriot --- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index f0bc49091ca..d88637b7093 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -88,7 +88,7 @@ namespace Polygon_mesh_processing { \cgalParamType{Boolean} \cgalParamDefault{`true`} \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm - falls back to the non-Delaunay triangulations search space to find a solution. + falls back to the 3D Delaunay triangulation search space and/or the general search space to find a solution. This parameter is a good choice for near planar holes.} \cgalParamNEnd \cgalNamedParamsEnd From 62cb8d3ed12dc4c9169d9b3de2eb359c7d7a9003 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 15:03:19 +0200 Subject: [PATCH 080/317] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h Co-authored-by: Sebastien Loriot --- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index d88637b7093..9ff1fb0327f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -87,7 +87,7 @@ namespace Polygon_mesh_processing { \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm + \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm falls back to the 3D Delaunay triangulation search space and/or the general search space to find a solution. This parameter is a good choice for near planar holes.} \cgalParamNEnd From 1988e8e4b6aa45961f52d7eb454b27de15a27315 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 15:03:37 +0200 Subject: [PATCH 081/317] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h Co-authored-by: Sebastien Loriot --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 9fc38043985..ceea8311ba6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1301,7 +1301,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, const Collinear_3 collinear_3 = traits.collinear_3_object(); - std::vector P(boost::begin(points), boost::end(points)); + std::vector P(std::begin(points), std::end(points)); CGAL_assertion(P.size() >= 3); if (P.front() != P.back()) { P.push_back(P.front()); From c5ac6f15c753b94a8cc10f50ac4d6dfafb784c0d Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 15:54:41 +0200 Subject: [PATCH 082/317] max squared distance added to np --- .../CGAL/boost/graph/parameters_interface.h | 1 + .../Triangulate_hole_polygon_mesh.h | 6 ++- .../Hole_filling/Triangulate_hole_polyline.h | 23 ++++++---- .../triangulate_hole.h | 44 ++++++++++++++++++- 4 files changed, 61 insertions(+), 13 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 9bfc3d77841..420bc549e59 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -48,6 +48,7 @@ CGAL_add_named_parameter(vertex_incident_patches_t, vertex_incident_patches, ver CGAL_add_named_parameter(density_control_factor_t, density_control_factor, density_control_factor) CGAL_add_named_parameter(use_delaunay_triangulation_t, use_delaunay_triangulation, use_delaunay_triangulation) CGAL_add_named_parameter(use_2d_constrained_delaunay_triangulation_t, use_2d_constrained_delaunay_triangulation, use_2d_constrained_delaunay_triangulation) +CGAL_add_named_parameter(max_squared_distance_t, max_squared_distance, max_squared_distance) CGAL_add_named_parameter(fairing_continuity_t, fairing_continuity, fairing_continuity) CGAL_add_named_parameter(sparse_linear_solver_t, sparse_linear_solver, sparse_linear_solver) CGAL_add_named_parameter(number_of_relaxation_steps_t, number_of_relaxation_steps, number_of_relaxation_steps) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index cba88c6c27f..0636f5d470e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -95,7 +95,9 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, VertexPointMap vpmap, bool use_delaunay_triangulation, const Kernel& k, - const bool use_cdt) + const bool use_cdt, + const typename Kernel::FT max_squared_distance = + typename Kernel::FT(4) / typename Kernel::FT(10000)) { typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -176,7 +178,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k, max_squared_distance)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index ceea8311ba6..c61907b169c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1215,7 +1215,7 @@ template bool is_planar_2( const std::vector& points, const typename Traits::Vector_3& avg_normal, - const typename Traits::FT max_sq_distance, + const typename Traits::FT max_squared_distance, const Traits& traits) { typedef typename Traits::FT FT; @@ -1263,16 +1263,16 @@ bool is_planar_2( } const Plane_3 plane = Plane_3(centroid, avg_normal); - FT avg_sq_distance = FT(0); + FT avg_squared_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { const Point_3& p = points[i]; const Point_3 q = projection_3(plane, p); - avg_sq_distance += squared_distance_3(p, q); + avg_squared_distance += squared_distance_3(p, q); } - avg_sq_distance /= static_cast(n); - // std::cout << "avg squared distance: " << avg_sq_distance << std::endl; + avg_squared_distance /= static_cast(n); + // std::cout << "avg squared distance: " << avg_squared_distance << std::endl; - if (avg_sq_distance > max_sq_distance) { + if (avg_squared_distance > max_squared_distance) { return false; // the user distance criteria are not satisfied! } @@ -1290,7 +1290,8 @@ bool triangulate_hole_polyline_with_cdt(const PointRange& points, Tracer& tracer, const Validity_checker& is_valid, - const Traits& traits) + const Traits& traits, + const typename Traits::FT max_squared_distance) { typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; @@ -1338,6 +1339,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, } if (num_normals < 1) { + // std::cerr << "WARNING: num normals, cdt 2 falls back to the original solution!" << std::endl; return false; } @@ -1349,8 +1351,8 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // std::cout << "avg normal: " << avg_normal << std::endl; // Checking the hole planarity. - const FT max_sq_distance = FT(4) / FT(10000); - if (!is_planar_2(P, avg_normal, max_sq_distance, traits)) { + if (!is_planar_2(P, avg_normal, max_squared_distance, traits)) { + // std::cerr << "WARNING: planarity, cdt 2 falls back to the original solution!" << std::endl; return false; } @@ -1358,6 +1360,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, typedef Triangulation_2_projection_traits_3 P_traits; const P_traits p_traits(avg_normal); if (!is_simple_2(P.begin(), P.end() - 1, p_traits)) { + // std::cerr << "WARNING: simplicity, cdt 2 falls back to the original solution!" << std::endl; return false; } @@ -1418,6 +1421,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, } if (cdt.dimension() != 2 || cdt.number_of_vertices() != size) { + // std::cerr << "WARNING: dim + num vertices, cdt 2 falls back to the original solution!" << std::endl; return false; } @@ -1434,6 +1438,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, std::sort(is.begin(), is.end()); lambda.put(is[0], is[2], is[1]); if (!is_valid(P, is[0], is[1], is[2])) { + // std::cerr << "WARNING: validity, cdt 2 falls back to the original solution!" << std::endl; return false; } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 9ff1fb0327f..4da34c344c7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -91,6 +91,15 @@ namespace Polygon_mesh_processing { falls back to the 3D Delaunay triangulation search space and/or the general search space to find a solution. This parameter is a good choice for near planar holes.} \cgalParamNEnd + + \cgalParamNBegin{max_squared_distance} + \cgalParamDescription{The maximum squared distance between the vertices of + the hole boundary and the least squares plane fitted to this boundary.} + \cgalParamType{double} + \cgalParamDefault{0.0004} + \cgalParamExtra{This parameter is used only in conjunction with + the parameter `use_2d_constrained_delaunay_triangulation`.} + \cgalParamNEnd \cgalNamedParamsEnd @return `out` @@ -137,7 +146,9 @@ namespace Polygon_mesh_processing { out, choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits)),use_cdt).first; + choose_parameter(get_parameter(np, internal_np::geom_traits)),use_cdt, + choose_parameter(get_parameter(np, internal_np::max_squared_distance), + typename GeomTraits::FT(4) / typename GeomTraits::FT(10000))).first; } template @@ -217,6 +228,15 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd + \cgalParamNBegin{max_squared_distance} + \cgalParamDescription{The maximum squared distance between the vertices of + the hole boundary and the least squares plane fitted to this boundary.} + \cgalParamType{double} + \cgalParamDefault{0.0004} + \cgalParamExtra{This parameter is used only in conjunction with + the parameter `use_2d_constrained_delaunay_triangulation`.} + \cgalParamNEnd + \cgalParamNBegin{density_control_factor} \cgalParamDescription{factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()`} @@ -317,6 +337,15 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd + \cgalParamNBegin{max_squared_distance} + \cgalParamDescription{The maximum squared distance between the vertices of + the hole boundary and the least squares plane fitted to this boundary.} + \cgalParamType{double} + \cgalParamDefault{0.0004} + \cgalParamExtra{This parameter is used only in conjunction with + the parameter `use_2d_constrained_delaunay_triangulation`.} + \cgalParamNEnd + \cgalParamNBegin{density_control_factor} \cgalParamDescription{factor to control density of the ouput mesh, where larger values cause denser refinements, as in `refine()`} @@ -452,6 +481,15 @@ namespace Polygon_mesh_processing { falls back to the non-Delaunay triangulations search space to find a solution. This parameter is a good choice for near planar holes.} \cgalParamNEnd + + \cgalParamNBegin{max_squared_distance} + \cgalParamDescription{The maximum squared distance between the vertices of + the hole boundary and the least squares plane fitted to this boundary.} + \cgalParamType{double} + \cgalParamDefault{0.0004} + \cgalParamExtra{This parameter is used only in conjunction with + the parameter `use_2d_constrained_delaunay_triangulation`.} + \cgalParamNEnd \cgalNamedParamsEnd \todo handle islands @@ -509,7 +547,9 @@ bool use_dt3 = points, tracer, is_valid, - choose_parameter(get_parameter(np, internal_np::geom_traits)))) + choose_parameter(get_parameter(np, internal_np::geom_traits)), + choose_parameter(get_parameter(np, internal_np::max_squared_distance), + typename Kernel::FT(4) / typename Kernel::FT(10000)))) #endif triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, From b2494b1cc6e6a5a34e97b73d795a6277b9f12424 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 7 Oct 2020 16:47:39 +0200 Subject: [PATCH 083/317] use bbox to define the default value for the param max sq dist --- .../Triangulate_hole_polygon_mesh.h | 3 +- .../triangulate_hole.h | 35 ++++++++++++++----- .../triangulate_hole_Polyhedron_3_test.cpp | 2 +- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index 0636f5d470e..53fcf62e09d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -96,8 +96,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, bool use_delaunay_triangulation, const Kernel& k, const bool use_cdt, - const typename Kernel::FT max_squared_distance = - typename Kernel::FT(4) / typename Kernel::FT(10000)) + const typename Kernel::FT max_squared_distance) { typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 4da34c344c7..0eccb3ced57 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -96,7 +97,7 @@ namespace Polygon_mesh_processing { \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{0.0004} + \cgalParamDefault{squared one quater of the hole bounding box height} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -141,14 +142,29 @@ namespace Polygon_mesh_processing { choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); #endif + typename GeomTraits::FT default_sq_dist = typename GeomTraits::FT(0); + if (use_cdt) { + + std::vector points; + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; + const auto vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)); + Hedge_around_face_circulator circ(border_halfedge, pmesh), done(circ); + do { + points.push_back(get(vpmap, target(*circ, pmesh))); + } while (++circ != done); + + const typename GeomTraits::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); + default_sq_dist = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); + default_sq_dist /= typename GeomTraits::FT(16); + } + return internal::triangulate_hole_polygon_mesh(pmesh, border_halfedge, out, choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), use_dt3, choose_parameter(get_parameter(np, internal_np::geom_traits)),use_cdt, - choose_parameter(get_parameter(np, internal_np::max_squared_distance), - typename GeomTraits::FT(4) / typename GeomTraits::FT(10000))).first; + choose_parameter(get_parameter(np, internal_np::max_squared_distance), default_sq_dist)).first; } template @@ -232,7 +248,7 @@ namespace Polygon_mesh_processing { \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{0.0004} + \cgalParamDefault{squared one quater of the hole bounding box height} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -341,7 +357,7 @@ namespace Polygon_mesh_processing { \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{0.0004} + \cgalParamDefault{squared one quater of the hole bounding box height} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -486,7 +502,7 @@ namespace Polygon_mesh_processing { \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{0.0004} + \cgalParamDefault{squared one quater of the hole bounding box height} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -542,14 +558,17 @@ bool use_dt3 = }; Always_valid is_valid; + const typename Kernel::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); + typename Kernel::FT default_sq_dist = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); + default_sq_dist /= typename Kernel::FT(16); + if(!use_cdt || !triangulate_hole_polyline_with_cdt( points, tracer, is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)), - choose_parameter(get_parameter(np, internal_np::max_squared_distance), - typename Kernel::FT(4) / typename Kernel::FT(10000)))) + choose_parameter(get_parameter(np, internal_np::max_squared_distance), default_sq_dist))) #endif triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 5796282cf22..c2c5c575162 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -109,7 +109,7 @@ void test_triangulate_hole_weight(const char* file_name, bool use_DT, std::size_ for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; Weight w_algo = CGAL::Polygon_mesh_processing::internal::triangulate_hole_polygon_mesh( - poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel(), false).second; + poly, *it, back_inserter(patch), get(CGAL::vertex_point, poly), use_DT, Kernel(), false, 0).second; if(patch.empty()) { continue; } Weight w_test = calculate_weight_for_patch(poly, patch.begin(), patch.end()); From ab9f76f2dbdf203b09030169286caeb506c5dee9 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 13 Oct 2020 17:48:06 +0200 Subject: [PATCH 084/317] fixed size_t warning --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index c61907b169c..baa4878820f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1432,7 +1432,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, std::vector is(3); for (int i = 0; i < 3; ++i) { - is[i] = fit->vertex(i)->info(); + is[i] = static_cast(fit->vertex(i)->info()); } std::sort(is.begin(), is.end()); From 82d561774b70a59cb5f985007c1e5c07a24b03cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 14 Oct 2020 15:42:18 +0200 Subject: [PATCH 085/317] update header --- .../Non_manifold_feature_map.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h index edbb9809a54..419e330011e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h @@ -2,20 +2,10 @@ // All rights reserved. // // This file is part of CGAL (www.cgal.org). -// You can redistribute it and/or modify it under the terms of the GNU -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // // $URL$ // $Id$ -// SPDX-License-Identifier: GPL-3.0+ -// +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot From 1333517747b482edcd61d781f5e617b2538f0781 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 19 Oct 2020 11:45:21 +0200 Subject: [PATCH 086/317] fixed docs + max_sq_dist param changed to the dist param --- .../CGAL/boost/graph/parameters_interface.h | 1 - .../Triangulate_hole_polygon_mesh.h | 4 +- .../Hole_filling/Triangulate_hole_polyline.h | 17 ++++---- .../triangulate_hole.h | 40 ++++++++++--------- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 420bc549e59..9bfc3d77841 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -48,7 +48,6 @@ CGAL_add_named_parameter(vertex_incident_patches_t, vertex_incident_patches, ver CGAL_add_named_parameter(density_control_factor_t, density_control_factor, density_control_factor) CGAL_add_named_parameter(use_delaunay_triangulation_t, use_delaunay_triangulation, use_delaunay_triangulation) CGAL_add_named_parameter(use_2d_constrained_delaunay_triangulation_t, use_2d_constrained_delaunay_triangulation, use_2d_constrained_delaunay_triangulation) -CGAL_add_named_parameter(max_squared_distance_t, max_squared_distance, max_squared_distance) CGAL_add_named_parameter(fairing_continuity_t, fairing_continuity, fairing_continuity) CGAL_add_named_parameter(sparse_linear_solver_t, sparse_linear_solver, sparse_linear_solver) CGAL_add_named_parameter(number_of_relaxation_steps_t, number_of_relaxation_steps, number_of_relaxation_steps) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index 53fcf62e09d..57bbe989eb4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -96,7 +96,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, bool use_delaunay_triangulation, const Kernel& k, const bool use_cdt, - const typename Kernel::FT max_squared_distance) + const typename Kernel::FT threshold_distance) { typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -177,7 +177,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k, max_squared_distance)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k, threshold_distance)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index baa4878820f..502886d5d1c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1215,7 +1215,7 @@ template bool is_planar_2( const std::vector& points, const typename Traits::Vector_3& avg_normal, - const typename Traits::FT max_squared_distance, + const typename Traits::FT threshold_distance, const Traits& traits) { typedef typename Traits::FT FT; @@ -1263,16 +1263,17 @@ bool is_planar_2( } const Plane_3 plane = Plane_3(centroid, avg_normal); - FT avg_squared_distance = FT(0); + FT avg_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { const Point_3& p = points[i]; const Point_3 q = projection_3(plane, p); - avg_squared_distance += squared_distance_3(p, q); + avg_distance += static_cast( + CGAL::sqrt(CGAL::to_double(CGAL::abs(squared_distance_3(p, q))))); } - avg_squared_distance /= static_cast(n); - // std::cout << "avg squared distance: " << avg_squared_distance << std::endl; + avg_distance /= static_cast(n); + // std::cout << "avg distance: " << avg_distance << std::endl; - if (avg_squared_distance > max_squared_distance) { + if (avg_distance > threshold_distance) { return false; // the user distance criteria are not satisfied! } @@ -1291,7 +1292,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, Tracer& tracer, const Validity_checker& is_valid, const Traits& traits, - const typename Traits::FT max_squared_distance) + const typename Traits::FT threshold_distance) { typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; @@ -1351,7 +1352,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // std::cout << "avg normal: " << avg_normal << std::endl; // Checking the hole planarity. - if (!is_planar_2(P, avg_normal, max_squared_distance, traits)) { + if (!is_planar_2(P, avg_normal, threshold_distance, traits)) { // std::cerr << "WARNING: planarity, cdt 2 falls back to the original solution!" << std::endl; return false; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 0eccb3ced57..ecb34866969 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -93,11 +93,11 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd - \cgalParamNBegin{max_squared_distance} - \cgalParamDescription{The maximum squared distance between the vertices of + \cgalParamNBegin{threshold_distance} + \cgalParamDescription{The maximum distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{squared one quater of the hole bounding box height} + \cgalParamDefault{one quarter of the height of the bounding box of the hole} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -142,7 +142,7 @@ namespace Polygon_mesh_processing { choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); #endif - typename GeomTraits::FT default_sq_dist = typename GeomTraits::FT(0); + typename GeomTraits::FT default_distance = typename GeomTraits::FT(0); if (use_cdt) { std::vector points; @@ -154,17 +154,20 @@ namespace Polygon_mesh_processing { } while (++circ != done); const typename GeomTraits::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); - default_sq_dist = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); - default_sq_dist /= typename GeomTraits::FT(16); + default_distance = static_cast( + CGAL::sqrt(CGAL::to_double(CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5)))))); + default_distance /= typename GeomTraits::FT(4); // one quarter of the bbox height } - return internal::triangulate_hole_polygon_mesh(pmesh, + return internal::triangulate_hole_polygon_mesh( + pmesh, border_halfedge, out, choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits)),use_cdt, - choose_parameter(get_parameter(np, internal_np::max_squared_distance), default_sq_dist)).first; + choose_parameter(get_parameter(np, internal_np::geom_traits)), + use_cdt, + choose_parameter(get_parameter(np, internal_np::threshold_distance), default_distance)).first; } template @@ -244,11 +247,11 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd - \cgalParamNBegin{max_squared_distance} + \cgalParamNBegin{threshold_distance} \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{squared one quater of the hole bounding box height} + \cgalParamDefault{one quarter of the height of the bounding box of the hole} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -353,11 +356,11 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd - \cgalParamNBegin{max_squared_distance} + \cgalParamNBegin{threshold_distance} \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{squared one quater of the hole bounding box height} + \cgalParamDefault{one quarter of the height of the bounding box of the hole} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -498,11 +501,11 @@ namespace Polygon_mesh_processing { This parameter is a good choice for near planar holes.} \cgalParamNEnd - \cgalParamNBegin{max_squared_distance} + \cgalParamNBegin{threshold_distance} \cgalParamDescription{The maximum squared distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} - \cgalParamDefault{squared one quater of the hole bounding box height} + \cgalParamDefault{one quarter of the height of the bounding box of the hole} \cgalParamExtra{This parameter is used only in conjunction with the parameter `use_2d_constrained_delaunay_triangulation`.} \cgalParamNEnd @@ -559,8 +562,9 @@ bool use_dt3 = Always_valid is_valid; const typename Kernel::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); - typename Kernel::FT default_sq_dist = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); - default_sq_dist /= typename Kernel::FT(16); + typename Kernel::FT default_distance = static_cast( + CGAL::sqrt(CGAL::to_double(CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5)))))); + default_distance /= typename Kernel::FT(4); // one quarter of the bbox height if(!use_cdt || !triangulate_hole_polyline_with_cdt( @@ -568,7 +572,7 @@ bool use_dt3 = tracer, is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)), - choose_parameter(get_parameter(np, internal_np::max_squared_distance), default_sq_dist))) + choose_parameter(get_parameter(np, internal_np::threshold_distance), default_distance))) #endif triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, From 1f5bc1e3ee4f01762619b03a73596c009284308c Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 19 Oct 2020 16:14:59 +0200 Subject: [PATCH 087/317] fixed description of the 2d CDT named parameter --- .../triangulate_hole.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index ecb34866969..96662c3fe43 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -85,11 +85,11 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} \cgalParamType{Boolean} \cgalParamDefault{`true`} \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm - falls back to the 3D Delaunay triangulation search space and/or the general search space to find a solution. + falls back to the method using the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd @@ -239,11 +239,11 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm - falls back to the non-Delaunay triangulations search space to find a solution. + \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm + falls back to the method using the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd @@ -348,11 +348,11 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm - falls back to the non-Delaunay triangulations search space to find a solution. + \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm + falls back to the method using the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd @@ -493,11 +493,11 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation facet search space.} + \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found in this search space, the algorithm - falls back to the non-Delaunay triangulations search space to find a solution. + \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm + falls back to the method using the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd From 4b69a7f3512a04cd67eed1588ab0070e625138a7 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 19 Oct 2020 16:19:38 +0200 Subject: [PATCH 088/317] better function description --- .../CGAL/Polygon_mesh_processing/triangulate_hole.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 96662c3fe43..73c02f7cb2f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -43,11 +43,13 @@ namespace Polygon_mesh_processing { /*! \ingroup hole_filling_grp triangulates a hole in a polygon mesh. - When using the 2D constrained Delaunay triangulation, the hole must not contain any - self-intersections. However, this option can be applied only for near planar holes. - In other cases, the hole must not contain any non-manifold vertex as well. - The patch generated does not introduce non-manifold edges nor degenerate triangles. - If a hole cannot be triangulated, `pmesh` is not modified and nothing is recorded in `out`. + + Depending on the choice of the underlying algorithm different preconditions apply. + When using the 2D constrained Delaunay triangulation, the border edges of the hole + must not intersect the surface. Otherwise, additionally, the boundary + of the hole must not contain any non-manifold vertex. The patch generated does not + introduce non-manifold edges nor degenerate triangles. If a hole cannot be triangulated, + `pmesh` is not modified and nothing is recorded in `out`. @tparam PolygonMesh a model of `MutableFaceGraph` @tparam OutputIterator a model of `OutputIterator` From b64c9638b6d1f96568aac00f69af52ec56d432d6 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Wed, 21 Oct 2020 11:55:58 +0200 Subject: [PATCH 089/317] fixed docs + improved test (warning free now) + more precise computations inside tri with cdt --- .../Triangulate_hole_polygon_mesh.h | 4 +- .../Hole_filling/Triangulate_hole_polyline.h | 18 ++--- .../triangulate_hole.h | 80 ++++++++++++------- .../triangulate_hole_with_cdt_2_test.cpp | 6 +- 4 files changed, 65 insertions(+), 43 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index 57bbe989eb4..53fcf62e09d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -96,7 +96,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, bool use_delaunay_triangulation, const Kernel& k, const bool use_cdt, - const typename Kernel::FT threshold_distance) + const typename Kernel::FT max_squared_distance) { typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -177,7 +177,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, tracer(out, pmesh, P_edges); #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k, threshold_distance)) + if(use_cdt && triangulate_hole_polyline_with_cdt(P, tracer, is_valid, k, max_squared_distance)) { return std::make_pair(tracer.out, CGAL::internal::Weight_min_max_dihedral_and_area(0,0)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 502886d5d1c..b7db5e2e80d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1215,7 +1215,7 @@ template bool is_planar_2( const std::vector& points, const typename Traits::Vector_3& avg_normal, - const typename Traits::FT threshold_distance, + const typename Traits::FT max_squared_distance, const Traits& traits) { typedef typename Traits::FT FT; @@ -1262,18 +1262,18 @@ bool is_planar_2( return false; // a good plane does not exist for sure! } + // Here, avg_squared_distance is a little bit more tolerant than avg_distance^2. const Plane_3 plane = Plane_3(centroid, avg_normal); - FT avg_distance = FT(0); + FT avg_squared_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { const Point_3& p = points[i]; const Point_3 q = projection_3(plane, p); - avg_distance += static_cast( - CGAL::sqrt(CGAL::to_double(CGAL::abs(squared_distance_3(p, q))))); + avg_squared_distance += CGAL::abs(squared_distance_3(p, q)); } - avg_distance /= static_cast(n); - // std::cout << "avg distance: " << avg_distance << std::endl; + avg_squared_distance /= static_cast(n); + // std::cout << "avg squared distance: " << avg_squared_distance << std::endl; - if (avg_distance > threshold_distance) { + if (avg_squared_distance > max_squared_distance) { return false; // the user distance criteria are not satisfied! } @@ -1292,7 +1292,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, Tracer& tracer, const Validity_checker& is_valid, const Traits& traits, - const typename Traits::FT threshold_distance) + const typename Traits::FT max_squared_distance) { typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; @@ -1352,7 +1352,7 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, // std::cout << "avg normal: " << avg_normal << std::endl; // Checking the hole planarity. - if (!is_planar_2(P, avg_normal, threshold_distance, traits)) { + if (!is_planar_2(P, avg_normal, max_squared_distance, traits)) { // std::cerr << "WARNING: planarity, cdt 2 falls back to the original solution!" << std::endl; return false; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 73c02f7cb2f..be8ec391de8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -87,12 +87,15 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} + \cgalParamDescription{If `true`, the points of the boundary of the hole are used + to estimate a fitting plane and a 2D constrained Delaunay triangulation + is then used to fill the hole projected in the fitting plane.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm - falls back to the method using the 3D Delaunay triangulation. - This parameter is a good choice for near planar holes.} + \cgalParamExtra{If the boundary of the hole is not planar (according to the + parameter `threshold_distance`) or if no valid 2D triangulation + can be found, the algorithm falls back to the method using + the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd \cgalParamNBegin{threshold_distance} @@ -144,7 +147,7 @@ namespace Polygon_mesh_processing { choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); #endif - typename GeomTraits::FT default_distance = typename GeomTraits::FT(0); + typename GeomTraits::FT max_squared_distance = typename GeomTraits::FT(-1); if (use_cdt) { std::vector points; @@ -156,10 +159,16 @@ namespace Polygon_mesh_processing { } while (++circ != done); const typename GeomTraits::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); - default_distance = static_cast( - CGAL::sqrt(CGAL::to_double(CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5)))))); - default_distance /= typename GeomTraits::FT(4); // one quarter of the bbox height + typename GeomTraits::FT default_squared_distance = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); + default_squared_distance /= typename GeomTraits::FT(16); // one quarter of the bbox height + + const typename GeomTraits::FT threshold_distance = choose_parameter( + get_parameter(np, internal_np::threshold_distance), typename GeomTraits::FT(-1)); + max_squared_distance = default_squared_distance; + if (threshold_distance >= typename GeomTraits::FT(0)) + max_squared_distance = threshold_distance * threshold_distance; } + CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0)); return internal::triangulate_hole_polygon_mesh( pmesh, @@ -169,7 +178,7 @@ namespace Polygon_mesh_processing { use_dt3, choose_parameter(get_parameter(np, internal_np::geom_traits)), use_cdt, - choose_parameter(get_parameter(np, internal_np::threshold_distance), default_distance)).first; + max_squared_distance).first; } template @@ -241,16 +250,19 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} + \cgalParamDescription{If `true`, the points of the boundary of the hole are used + to estimate a fitting plane and a 2D constrained Delaunay triangulation + is then used to fill the hole projected in the fitting plane.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm - falls back to the method using the 3D Delaunay triangulation. - This parameter is a good choice for near planar holes.} + \cgalParamExtra{If the boundary of the hole is not planar (according to the + parameter `threshold_distance`) or if no valid 2D triangulation + can be found, the algorithm falls back to the method using + the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd \cgalParamNBegin{threshold_distance} - \cgalParamDescription{The maximum squared distance between the vertices of + \cgalParamDescription{The maximum distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} \cgalParamDefault{one quarter of the height of the bounding box of the hole} @@ -350,16 +362,19 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} + \cgalParamDescription{If `true`, the points of the boundary of the hole are used + to estimate a fitting plane and a 2D constrained Delaunay triangulation + is then used to fill the hole projected in the fitting plane.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm - falls back to the method using the 3D Delaunay triangulation. - This parameter is a good choice for near planar holes.} + \cgalParamExtra{If the boundary of the hole is not planar (according to the + parameter `threshold_distance`) or if no valid 2D triangulation + can be found, the algorithm falls back to the method using + the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd \cgalParamNBegin{threshold_distance} - \cgalParamDescription{The maximum squared distance between the vertices of + \cgalParamDescription{The maximum distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} \cgalParamDefault{one quarter of the height of the bounding box of the hole} @@ -495,16 +510,19 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{use_2d_constrained_delaunay_triangulation} - \cgalParamDescription{If `true`, use the 2D constrained Delaunay triangulation to fill the hole.} + \cgalParamDescription{If `true`, the points of the boundary of the hole are used + to estimate a fitting plane and a 2D constrained Delaunay triangulation + is then used to fill the hole projected in the fitting plane.} \cgalParamType{Boolean} \cgalParamDefault{`true`} - \cgalParamExtra{If no valid 2D triangulation can be found, the algorithm - falls back to the method using the 3D Delaunay triangulation. - This parameter is a good choice for near planar holes.} + \cgalParamExtra{If the boundary of the hole is not planar (according to the + parameter `threshold_distance`) or if no valid 2D triangulation + can be found, the algorithm falls back to the method using + the 3D Delaunay triangulation. This parameter is a good choice for near planar holes.} \cgalParamNEnd \cgalParamNBegin{threshold_distance} - \cgalParamDescription{The maximum squared distance between the vertices of + \cgalParamDescription{The maximum distance between the vertices of the hole boundary and the least squares plane fitted to this boundary.} \cgalParamType{double} \cgalParamDefault{one quarter of the height of the bounding box of the hole} @@ -564,9 +582,15 @@ bool use_dt3 = Always_valid is_valid; const typename Kernel::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); - typename Kernel::FT default_distance = static_cast( - CGAL::sqrt(CGAL::to_double(CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5)))))); - default_distance /= typename Kernel::FT(4); // one quarter of the bbox height + typename Kernel::FT default_squared_distance = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); + default_squared_distance /= typename Kernel::FT(16); // one quarter of the bbox height + + const typename Kernel::FT threshold_distance = choose_parameter( + get_parameter(np, internal_np::threshold_distance), typename Kernel::FT(-1)); + typename Kernel::FT max_squared_distance = default_squared_distance; + if (threshold_distance >= typename Kernel::FT(0)) + max_squared_distance = threshold_distance * threshold_distance; + CGAL_assertion(max_squared_distance >= typename Kernel::FT(0)); if(!use_cdt || !triangulate_hole_polyline_with_cdt( @@ -574,7 +598,7 @@ bool use_dt3 = tracer, is_valid, choose_parameter(get_parameter(np, internal_np::geom_traits)), - choose_parameter(get_parameter(np, internal_np::threshold_distance), default_distance))) + max_squared_distance)) #endif triangulate_hole_polyline(points, third_points, tracer, WC(), use_dt3, diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 0d57e360b59..2e656139b3e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -35,9 +35,7 @@ void detect_borders( Halfedge_around_facet_circulator done(hf_around_facet); do { - const bool is_insertion_ok = - border_map.insert(*hf_around_facet).second; - assert(is_insertion_ok); + assert(border_map.insert(*hf_around_facet).second); // is insertion ok? } while (++hf_around_facet != done); } } @@ -83,7 +81,7 @@ void test_triangulate_hole_with_cdt_2( // Triangulating the holes. std::vector patch_faces; - for (const Halfedge_handle h : borders) { + for (const Halfedge_handle& h : borders) { patch_faces.clear(); CGAL::Polygon_mesh_processing::triangulate_hole( pmesh, From 80af4b3e747e362f9c0e1c30f1a51b6e0fe69eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 26 Oct 2020 09:17:01 +0100 Subject: [PATCH 090/317] be more permissive for bisector with a FT with sqrt --- .../include/CGAL/constructions/kernel_ftC2.h | 4 ++-- .../include/CGAL/constructions/kernel_ftC3.h | 8 ++++---- .../doc/Kernel_23/CGAL/Kernel/global_functions.h | 12 ++++++++---- .../doc/Kernel_23/Concepts/FunctionObjectConcepts.h | 12 ++++++++---- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h index c5066bec4d0..f5d27322792 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h @@ -246,8 +246,8 @@ bisector_of_linesC2(const FT &pa, const FT &pb, const FT &pc, FT &a, FT &b, FT &c) { // We normalize the equations of the 2 lines, and we then add them. - FT n1 = CGAL_NTS sqrt(CGAL_NTS square(pa) + CGAL_NTS square(pb)); - FT n2 = CGAL_NTS sqrt(CGAL_NTS square(qa) + CGAL_NTS square(qb)); + FT n1 = CGAL_NTS approximate_sqrt( FT(CGAL_NTS square(pa) + CGAL_NTS square(pb)) ); + FT n2 = CGAL_NTS approximate_sqrt( FT(CGAL_NTS square(qa) + CGAL_NTS square(qb)) ); a = n2 * pa + n1 * qa; b = n2 * pb + n1 * qb; c = n2 * pc + n1 * qc; diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h index 63a1442f511..ac1dced802c 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h @@ -366,10 +366,10 @@ bisector_of_planesC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, FT &a, FT &b, FT &c, FT &d) { // We normalize the equations of the 2 planes, and we then add them. - FT n1 = CGAL_NTS sqrt(CGAL_NTS square(pa) + CGAL_NTS square(pb) + - CGAL_NTS square(pc)); - FT n2 = CGAL_NTS sqrt(CGAL_NTS square(qa) + CGAL_NTS square(qb) + - CGAL_NTS square(qc)); + FT n1 = CGAL_NTS approximate_sqrt( FT(CGAL_NTS square(pa) + CGAL_NTS square(pb) + + CGAL_NTS square(pc)) ); + FT n2 = CGAL_NTS approximate_sqrt( FT(CGAL_NTS square(qa) + CGAL_NTS square(qb) + + CGAL_NTS square(qc)) ); a = n2 * pa + n1 * qa; b = n2 * pb + n1 * qb; c = n2 * pc + n1 * qc; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h index 98ea9f7ed60..24b5d073631 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h @@ -355,8 +355,10 @@ through the intersection of `l1` and `l2`. If `l1` and `l2` are parallel, then the bisector is defined as the line which has the same direction as `l1`, and which is at the same distance from `l1` and `l2`. -This function requires that `Kernel::RT` supports the `sqrt()` -operation. +If `Kernel::FT` is not a model of `FieldWithSqrt` +an approximation of the square root will be used in this function, +impacting the exactness of the result even with a (exact) multiprecision +number type. */ template CGAL::Line_2 bisector(const CGAL::Line_2 &l1, @@ -379,8 +381,10 @@ passes through the intersection of `h1` and `h2`. If `h1` and `h2` are parallel, then the bisector is defined as the plane which has the same oriented normal vector as `l1`, and which is at the same distance from `h1` and `h2`. -This function requires that `Kernel::RT` supports the `sqrt()` -operation. +If `Kernel::FT` is not a model of `FieldWithSqrt` +an approximation of the square root will be used in this function, +impacting the exactness of the result even with a (exact) multiprecision +number type. */ template CGAL::Plane_3 bisector(const CGAL::Plane_3 &h1, diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index b63475c7188..a8ea38cd865 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -3848,8 +3848,10 @@ public: If `l1` and `l2` are parallel, then the bisector is defined as the line which has the same direction as `l1`, and which is at the same distance from `l1` and `l2`. - This function requires that `Kernel::RT` supports the `sqrt()` - operation. + If `Kernel::FT` is not a model of `FieldWithSqrt` + an approximation of the square root will be used in this function, + impacting the exactness of the result even with a (exact) multiprecision + number type. */ Kernel::Line_2 operator()(const Kernel::Line_2&l1, const Kernel::Line_2&l2); @@ -3891,8 +3893,10 @@ public: If `h1` and `h2` are parallel, then the bisector is defined as the plane which has the same oriented normal vector as `h1`, and which is at the same distance from `h1` and `h2`. - This function requires that `Kernel::RT` supports the `sqrt()` - operation. + If `Kernel::FT` is not a model of `FieldWithSqrt` + an approximation of the square root will be used in this function, + impacting the exactness of the result even with a (exact) multiprecision + number type. */ Kernel::Plane_3 operator()(const Kernel::Plane_3&h1, const Kernel::Plane_3&h2); From e685203cc60602d8cb5361aa4a9ec31fa22c304b Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 26 Oct 2020 11:08:56 +0100 Subject: [PATCH 091/317] a -> an --- Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h | 4 ++-- Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h index 24b5d073631..bb63612593e 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h @@ -357,7 +357,7 @@ which has the same direction as `l1`, and which is at the same distance from `l1` and `l2`. If `Kernel::FT` is not a model of `FieldWithSqrt` an approximation of the square root will be used in this function, -impacting the exactness of the result even with a (exact) multiprecision +impacting the exactness of the result even with an (exact) multiprecision number type. */ template @@ -383,7 +383,7 @@ plane which has the same oriented normal vector as `l1`, and which is at the same distance from `h1` and `h2`. If `Kernel::FT` is not a model of `FieldWithSqrt` an approximation of the square root will be used in this function, -impacting the exactness of the result even with a (exact) multiprecision +impacting the exactness of the result even with an (exact) multiprecision number type. */ template diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index a8ea38cd865..34c54c85e42 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -3850,7 +3850,7 @@ public: from `l1` and `l2`. If `Kernel::FT` is not a model of `FieldWithSqrt` an approximation of the square root will be used in this function, - impacting the exactness of the result even with a (exact) multiprecision + impacting the exactness of the result even with an (exact) multiprecision number type. */ Kernel::Line_2 operator()(const Kernel::Line_2&l1, @@ -3895,7 +3895,7 @@ public: the same distance from `h1` and `h2`. If `Kernel::FT` is not a model of `FieldWithSqrt` an approximation of the square root will be used in this function, - impacting the exactness of the result even with a (exact) multiprecision + impacting the exactness of the result even with an (exact) multiprecision number type. */ Kernel::Plane_3 operator()(const Kernel::Plane_3&h1, From 061c6684fb443e132a660faa4ab619a37424099e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 29 Oct 2020 16:08:23 +0100 Subject: [PATCH 092/317] use Sqrt function if available --- Algebraic_foundations/include/CGAL/number_utils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Algebraic_foundations/include/CGAL/number_utils.h b/Algebraic_foundations/include/CGAL/number_utils.h index abb7894ccf4..7c1ac814af6 100644 --- a/Algebraic_foundations/include/CGAL/number_utils.h +++ b/Algebraic_foundations/include/CGAL/number_utils.h @@ -302,13 +302,13 @@ to_interval( const Real_embeddable& x) { } template -NT approximate_sqrt(const NT& nt, CGAL::Field_tag) +NT approximate_sqrt(const NT& nt, CGAL::Null_functor) { return NT(sqrt(CGAL::to_double(nt))); } -template -NT approximate_sqrt(const NT& nt, CGAL::Field_with_sqrt_tag) +template +NT approximate_sqrt(const NT& nt, Sqrt sqrt) { return sqrt(nt); } @@ -317,8 +317,8 @@ template NT approximate_sqrt(const NT& nt) { typedef CGAL::Algebraic_structure_traits AST; - typedef typename AST::Algebraic_category Algebraic_category; - return approximate_sqrt(nt, Algebraic_category()); + typedef typename AST::Sqrt Sqrt; + return approximate_sqrt(nt, Sqrt()); } CGAL_NTS_END_NAMESPACE From a4b0f88d41f58dcfb9b9fc6756fadd5a6e13dba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 29 Oct 2020 16:08:47 +0100 Subject: [PATCH 093/317] test all now --- .../Kernel_23/include/CGAL/_test_fct_line_2.h | 25 +++---------------- .../include/CGAL/_test_fct_plane_3.h | 22 +++------------- 2 files changed, 7 insertions(+), 40 deletions(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h index e88c95fb0fe..28ec8a3d1ea 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h @@ -18,22 +18,9 @@ #ifndef CGAL__TEST_FCT_LINE_2_H #define CGAL__TEST_FCT_LINE_2_H -// Accessory function testing functions that require sqrt(). -// Doesn't instantiate anything if RT doesn't support sqrt(). template bool -_test_fct_line_sqrt_2(const R&, CGAL::Tag_false) -{ -// bool UNTESTED_STUFF_BECAUSE_SQRT_IS_NOT_SUPPORTED; - std::cout << std::endl - << "NOTE : FT doesn't support sqrt()," - " hence some functions are not tested." << std::endl; - return true; -} - -template -bool -_test_fct_line_sqrt_2(const R&, CGAL::Tag_true) +_test_fct_line_sqrt_2(const R&) { typedef typename R::Point_2 Point_2; typedef typename R::Line_2 Line_2; @@ -178,13 +165,9 @@ _test_fct_line_2(const R& ) assert(bl1.oriented_side(p2) == CGAL::ON_POSITIVE_SIDE); assert( CGAL::parallel(bl1, bl2) ); - // More tests, that require sqrt(). - { - typedef ::CGAL::Algebraic_structure_traits AST; - static const bool has_sqrt = - ! ::boost::is_same< ::CGAL::Null_functor, typename AST::Sqrt >::value; - _test_fct_line_sqrt_2(R(), ::CGAL::Boolean_tag()); - } + // More tests, that require sqrt() or use approx. + _test_fct_line_sqrt_2(R()); + std::cout << "done" << std::endl; return true; } diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h index f39bc4d1ae7..a5502ad4c3b 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h @@ -17,22 +17,9 @@ #ifndef CGAL__TEST_FCT_PLANE_3_H #define CGAL__TEST_FCT_PLANE_3_H -// Accessory function testing functions that require sqrt(). -// Doesn't instantiate anything if RT doesn't support sqrt(). template bool -_test_fct_plane_sqrt_3(const R&, CGAL::Tag_false) -{ -// bool UNTESTED_STUFF_BECAUSE_SQRT_IS_NOT_SUPPORTED; - std::cout << std::endl - << "NOTE : FT doesn't support sqrt()," - " hence some functions are not tested." << std::endl; - return true; -} - -template -bool -_test_fct_plane_sqrt_3(const R&, CGAL::Tag_true) +_test_fct_plane_sqrt_3(const R&) { typedef typename R::Point_3 Point_3; typedef typename R::Plane_3 Plane_3; @@ -97,11 +84,8 @@ _test_fct_plane_3(const R& ) assert( CGAL::parallel(h1, h2) ); assert( ! CGAL::parallel(h1, h5) ); - // More tests, that require sqrt(). - typedef ::CGAL::Algebraic_structure_traits AST; - static const bool has_sqrt = - ! ::boost::is_same< ::CGAL::Null_functor, typename AST::Sqrt >::value; - _test_fct_plane_sqrt_3(R(), ::CGAL::Boolean_tag()); + // More tests, that require sqrt() or use approx. + _test_fct_plane_sqrt_3(R()); std::cout << "done" << std::endl; return true; From 0accdc3c7953319d90b5063a66e5c960a3c326ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 29 Oct 2020 16:32:23 +0100 Subject: [PATCH 094/317] add comment --- Algebraic_foundations/include/CGAL/number_utils.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Algebraic_foundations/include/CGAL/number_utils.h b/Algebraic_foundations/include/CGAL/number_utils.h index 7c1ac814af6..d29434ad603 100644 --- a/Algebraic_foundations/include/CGAL/number_utils.h +++ b/Algebraic_foundations/include/CGAL/number_utils.h @@ -316,6 +316,9 @@ NT approximate_sqrt(const NT& nt, Sqrt sqrt) template NT approximate_sqrt(const NT& nt) { + // the initial version of this function was using Algebraic_category + // for the dispatch but some ring type (like Gmpz) provides a Sqrt + // functor even if not being Field_with_sqrt. typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Sqrt Sqrt; return approximate_sqrt(nt, Sqrt()); From 15094cd6794ff0937f458458226156d6379ee306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 30 Oct 2020 16:23:17 +0100 Subject: [PATCH 095/317] the visitor can now track edge splits --- .../Concepts/PMPCorefinementVisitor.h | 23 +++++++++++++++---- .../internal/Corefinement/Visitor.h | 3 +++ .../internal/Corefinement/face_graph_utils.h | 3 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h index 7d95997ff80..cd2e6ebf2eb 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h @@ -3,20 +3,21 @@ /// /// The concept `PMPCorefinementVisitor` defines the requirements for the visitor /// used in \link PMP_corefinement_grp corefinement-related functions \endlink to track -/// the creation of new faces. +/// the creation of new faces and new edges. /// /// \cgalRefines `CopyConstructible` /// \cgalHasModel `CGAL::Polygon_mesh_processing::Corefinement::Default_visitor`. - class PMPCorefinementVisitor{ public: /// Mesh type typedef unspecified_type Triangle_mesh; -/// Face decriptor type +/// Face descriptor type typedef unspecified_type face_descriptor; +/// Halfedge descriptor type +typedef unspecified_type halfedge_descriptor; -/// @name Functions used by corefine() +/// @name Functions used by corefine() when faces are split /// @{ /// called before the triangulation of `f_split` in `tm`. Note that `f_split` /// will be one of the faces of the triangulation. Each subsequent call to @@ -32,6 +33,20 @@ typedef unspecified_type face_descriptor; void after_subface_created(face_descriptor f_new, Triangle_mesh& tm); /// @} +/// @name Functions used by corefine() when edges are split +/// @{ + /// called before the edge of `h` in `tm` is split. Each subsequent call to + /// `edge_split()` until the call to `after_edge_split()` will correspond to + /// the split of that edge. If `edge_split(h_i, tm)` is called for `i=1` to `n`, + /// `h_1`, `h_2`, ... ,`h_n`, `h` is the sequence of halfedges representing the + /// edge split (with the same initial orientation) + void before_edge_split(halfedge_descriptor h, TriangleMesh& tm); + /// called when a new split is done. The target of `hnew` is a new split vertex. + void edge_split(halfedge_descriptor hnew, TriangleMesh& tm); + /// called when the split of the halfedge `h` passed at the later call to `before_edge_split()` is finished. + void after_edge_split(); +/// @} + /// @name Functions used by Boolean operations functions using corefinement. /// These functions are not needed if you only call `corefine()`. /// @{ 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 a367f1eee99..43bc4889aee 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 @@ -759,6 +759,7 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, bool hedge_is_marked = call_get(marks_on_edges,tm,edge(hedge,tm)); //do split the edges CGAL_assertion_code(vertex_descriptor expected_src=source(hedge,tm)); + user_visitor.before_edge_split(hedge, tm); for(std::size_t node_id : node_ids) { halfedge_descriptor hnew = Euler::split_edge(hedge, tm); @@ -777,9 +778,11 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, //update marker tags. If the edge was marked, then the resulting edges in the split must be marked if ( hedge_is_marked ) call_put(marks_on_edges,tm,edge(hnew,tm),true); + user_visitor.edge_split(hnew, tm); CGAL_assertion_code(expected_src=vnew); } + user_visitor.after_edge_split(); CGAL_assertion(target(hedge_incident_to_src,tm)==original_vertex); CGAL_assertion(face(hedge_incident_to_src,tm)==face(hedge_opp,tm)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 26881b21f61..0cbd943d517 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -223,6 +223,9 @@ struct Default_visitor{ void before_face_copy(face_descriptor /*f_old*/, TriangleMesh&, TriangleMesh&){} void after_face_copy(face_descriptor /*f_old*/, TriangleMesh&, face_descriptor /* f_new */, TriangleMesh&){} + void before_edge_split(halfedge_descriptor /* h */, const TriangleMesh& /* tm */){} + void edge_split(halfedge_descriptor /* hnew */, const TriangleMesh& /* tm */){} + void after_edge_split(){} // calls commented in the code and probably incomplete due to the migration // see NODE_VISITOR_TAG From 0abbeb303f9f4ac20ca8ee8e4d3294d82978b6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 2 Nov 2020 09:38:39 +0100 Subject: [PATCH 096/317] add missing typedef --- .../internal/Corefinement/face_graph_utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 0cbd943d517..c9eafb3930b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -215,6 +215,7 @@ template struct Default_visitor{ typedef boost::graph_traits GT; typedef typename GT::face_descriptor face_descriptor; + typedef typename GT::halfedge_descriptor halfedge_descriptor; void before_subface_creations(face_descriptor /*f_old*/,TriangleMesh&){} void after_subface_creations(TriangleMesh&){} From 21f64efbdcdac5a0896f2163e21d921992cc7b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 9 Nov 2020 18:25:13 +0100 Subject: [PATCH 097/317] add non-documented visitor function calls --- .../Corefinement/Face_graph_output_builder.h | 118 +++++++++++++++++- 1 file changed, 117 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index 01cdaa446b3..9aacc6939d3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -26,6 +26,7 @@ #include #include +#include // required to handle the multiple types of edge constrained maps // for the different output types. CGAL_COREF_FUNCTION_CALL_DEF @@ -57,13 +58,72 @@ enum Boolean_operation_type {UNION = 0, INTERSECTION, namespace PMP=Polygon_mesh_processing; namespace params=PMP::parameters; +// extra functions for handling non-documented functions for user visitors +// with no extra functions +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_extra_functions, + Has_extra_functions, + false) + +template +void export_flags(UserVisitor&, boost::mpl::bool_, + FaceIndexMap, const std::vector&, + const boost::dynamic_bitset<>&, + const boost::dynamic_bitset<>&, + const boost::dynamic_bitset<>&, + const boost::dynamic_bitset<>&, + TriangleMesh&) +{} + +template +void register_halfedge_pair(UserVisitor&, boost::mpl::bool_, + halfedge_descriptor, halfedge_descriptor, + bool, bool, + bool, bool, + bool=false, bool=false, + bool=false, bool=false) +{} + +// with extra functions (forward the call to the visitor) +template +void export_flags(UserVisitor& visitor, boost::mpl::bool_, + FaceIndexMap fim, const std::vector& tm_patch_ids, + const boost::dynamic_bitset<>& is_patch_inside_other_tm, + const boost::dynamic_bitset<>& coplanar_patches_of_tm, + const boost::dynamic_bitset<>& coplanar_patches_of_tm_for_union_and_intersection, + const boost::dynamic_bitset<>& patch_status_not_set, + TriangleMesh& tm) +{ + visitor.export_flags(fim, tm_patch_ids, + is_patch_inside_other_tm, + coplanar_patches_of_tm, + coplanar_patches_of_tm_for_union_and_intersection, + patch_status_not_set, + tm); +} + +template +void register_halfedge_pair(UserVisitor& visitor, boost::mpl::bool_, + halfedge_descriptor h1, halfedge_descriptor h2, + bool q1_is_between_p1p2, bool q2_is_between_p1p2, + bool p1_is_between_q1q2, bool p2_is_between_q1q2, + bool p1_is_coplanar=false, bool p2_is_coplanar=false, + bool q1_is_coplanar=false, bool q2_is_coplanar=false) +{ + visitor.register_halfedge_pair(h1, h2, + q1_is_between_p1p2, q2_is_between_p1p2, + p1_is_between_q1q2, p2_is_between_q1q2, + p1_is_coplanar, p2_is_coplanar, + q1_is_coplanar, q2_is_coplanar); +} + + template @@ -86,6 +146,7 @@ class Face_graph_output_builder No_mark > >::type EdgeMarkMapTuple; typedef typename Default::Get< UserVisitor_, Default_visitor >::type UserVisitor; + typedef typename Has_extra_functions::type VUNDF; //shortcut // graph_traits typedefs typedef TriangleMesh TM; @@ -483,6 +544,11 @@ public: boost::dynamic_bitset<> tm1_coplanar_faces(num_faces(tm1), 0); boost::dynamic_bitset<> tm2_coplanar_faces(num_faces(tm2), 0); + const bool used_to_classify_patches = requested_output[UNION]==boost::none && + requested_output[TM1_MINUS_TM2]==boost::none && + requested_output[TM2_MINUS_TM1]==boost::none && + requested_output[INTERSECTION]==boost::none; + // In the following loop we filter intersection edges that are strictly inside a patch // of coplanar facets so that we keep only the edges on the border of the patch. // This is not optimal and in an ideal world being able to find the outside edges @@ -498,8 +564,10 @@ public: for (;epp_it!=epp_it_end;) { halfedge_descriptor h1 = epp_it->second.first[&tm1]; + CGAL_assertion( h1 != GT::null_halfedge()); halfedge_descriptor h1_opp = opposite(h1, tm1); halfedge_descriptor h2 = epp_it->second.first[&tm2]; + CGAL_assertion( h2 != GT::null_halfedge()); halfedge_descriptor h2_opp = opposite(h2, tm2); //vertices from tm1 @@ -861,6 +929,12 @@ public: p1, p2, q2, vpm1, vpm2, nodes); + + register_halfedge_pair(user_visitor, VUNDF(), + h1, h2, + false, q2_is_between_p1p2, false, !q2_is_between_p1p2, + true, false, true, false); + if ( q2_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q2); //case 1 else is_patch_inside_tm2.set(patch_id_p2); //case 2 continue; @@ -882,6 +956,12 @@ public: p1, p2, q1, vpm1, vpm2, nodes); + + register_halfedge_pair(user_visitor, VUNDF(), + h1, h2, + q1_is_between_p1p2, false, false, !q1_is_between_p1p2, + true, false, false, true); + if ( q1_is_between_p1p2 ) { // case 3 is_patch_inside_tm1.set(patch_id_q1); @@ -906,6 +986,12 @@ public: p1, p2, q2, vpm1, vpm2, nodes); + + register_halfedge_pair(user_visitor, VUNDF(), + h1, h2, + false, q2_is_between_p1p2, !q2_is_between_p1p2, false, + false, true, true, false); + if ( q2_is_between_p1p2 ) { //case 5 is_patch_inside_tm1.set(patch_id_q2); @@ -931,6 +1017,12 @@ public: p1, p2, q1, vpm1, vpm2, nodes); + + register_halfedge_pair(user_visitor, VUNDF(), + h1, h2, + q1_is_between_p1p2, false, !q1_is_between_p1p2, false, + false, true, false, true); + if ( q1_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q1); //case 7 else is_patch_inside_tm2.set(patch_id_p1); //case 8 continue; @@ -981,6 +1073,7 @@ public: vpm2, vpm1, nodes); if (!p1_is_between_q1q2){ + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, true, true, false, false); // case (a4) // poly_first - poly_second = p1q1 U q2p2 // poly_second - poly_first = {0} @@ -992,6 +1085,7 @@ public: impossible_operation.set(TM1_MINUS_TM2); // tm1-tm2 is non-manifold } else{ + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, true, true, true, true); // case (b4) // poly_first - poly_second = q2q1 // poly_second - poly_first = p2p1 @@ -1010,6 +1104,7 @@ public: } else { + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, true, false, false, true); //case (c4) // poly_first - poly_second = p1q1 // poly_second - poly_first = p2q2 @@ -1034,6 +1129,7 @@ public: { if( q2_is_between_p1p2 ) { + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, false, true, true, false); //case (d4) // poly_first - poly_second = q2p2 // poly_second - poly_first = q1p1 @@ -1063,6 +1159,7 @@ public: vpm2, vpm1, nodes); if (!p1_is_between_q1q2){ + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, false, false, false, false); //case (e4) // poly_first - poly_second = p1p2 // poly_second - poly_first = q1q2 @@ -1074,6 +1171,7 @@ public: impossible_operation.set(UNION); // tm1 U tm2 is non-manifold } else{ + register_halfedge_pair(user_visitor, VUNDF(), h1, h2, false, false, true, true); //case (f4) is_patch_inside_tm2.set(patch_id_p1); is_patch_inside_tm2.set(patch_id_p2); @@ -1091,6 +1189,24 @@ public: } } + if (used_to_classify_patches) + { + export_flags( user_visitor, VUNDF(),fids1, tm1_patch_ids, + is_patch_inside_tm2, + coplanar_patches_of_tm1, + coplanar_patches_of_tm1_for_union_and_intersection, + patch_status_not_set_tm1, + tm1); + export_flags( user_visitor, VUNDF(), + fids2, tm2_patch_ids, + is_patch_inside_tm1, + coplanar_patches_of_tm2, + coplanar_patches_of_tm2_for_union_and_intersection, + patch_status_not_set_tm2, + tm2); + return; + } + // (2-b) Classify isolated surface patches wrt the other mesh // in case a mesh is not closed, any cc of the second mesh that is // free from intersection is considered as outside/inside From 06fbadbd103ed2d476df55e00d6534fec4c0304d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Nov 2020 11:28:41 +0100 Subject: [PATCH 098/317] add extra code to handle boundary conditions --- .../Corefinement/Face_graph_output_builder.h | 182 +++++++++++++++--- .../internal/Corefinement/predicates.h | 31 +++ 2 files changed, 184 insertions(+), 29 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index 9aacc6939d3..98ffe1a347f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -519,8 +519,15 @@ public: const boost::dynamic_bitset<>& is_node_of_degree_one, const Mesh_to_map_node&) { - CGAL_assertion( vertex_to_node_id1.size() == vertex_to_node_id2.size()); - CGAL_assertion( vertex_to_node_id1.size() == nodes.size()); + const bool used_to_classify_patches = requested_output[UNION]==boost::none && + requested_output[TM1_MINUS_TM2]==boost::none && + requested_output[TM2_MINUS_TM1]==boost::none && + requested_output[INTERSECTION]==boost::none; + + CGAL_assertion( vertex_to_node_id1.size() <= nodes.size() ); + CGAL_assertion( vertex_to_node_id2.size() <= nodes.size() ); + CGAL_assertion(used_to_classify_patches || vertex_to_node_id1.size() == vertex_to_node_id2.size()); + CGAL_assertion(used_to_classify_patches || vertex_to_node_id1.size() == nodes.size()); Intersection_edge_map& intersection_edges1 = mesh_to_intersection_edges[&tm1]; Intersection_edge_map& intersection_edges2 = mesh_to_intersection_edges[&tm2]; @@ -544,11 +551,6 @@ public: boost::dynamic_bitset<> tm1_coplanar_faces(num_faces(tm1), 0); boost::dynamic_bitset<> tm2_coplanar_faces(num_faces(tm2), 0); - const bool used_to_classify_patches = requested_output[UNION]==boost::none && - requested_output[TM1_MINUS_TM2]==boost::none && - requested_output[TM2_MINUS_TM1]==boost::none && - requested_output[INTERSECTION]==boost::none; - // In the following loop we filter intersection edges that are strictly inside a patch // of coplanar facets so that we keep only the edges on the border of the patch. // This is not optimal and in an ideal world being able to find the outside edges @@ -784,25 +786,66 @@ public: } else { - //Nothing allowed if (!used_to_clip_a_surface) { + if (used_to_classify_patches) + { + Node_id index_o_prime = ids.first, index_o = ids.second; + if( is_border(h1, tm1) ) + { + h1 = opposite(h1, tm1); + h2 = opposite(h2, tm2); + std::swap(index_o_prime, index_o); + } + + vertex_descriptor p = target(next(h1,tm1),tm1); + vertex_descriptor q= target(next(h2,tm2),tm2); + Node_id index_p = get_node_id(p, vertex_to_node_id1); + Node_id index_q = get_node_id(q, vertex_to_node_id2); + + std::size_t patch_id_p=tm1_patch_ids[ get(fids1, face(h1,tm1)) ]; + std::size_t patch_id_q=tm2_patch_ids[ get(fids2, face(h2,tm2)) ]; + + //indicates that patch status will be updated + patch_status_not_set_tm1.reset(patch_id_p); + patch_status_not_set_tm2.reset(patch_id_q); + + if (coplanar_patches_of_tm1.test(patch_id_p) && coplanar_patches_of_tm2.test(patch_id_q)) + { + coplanar_patches_of_tm1_for_union_and_intersection.set(patch_id_p); + coplanar_patches_of_tm2_for_union_and_intersection.set(patch_id_q); + } + else + { + if ( p_is_below_q(index_o_prime, index_o, + index_p, index_q, p, q, + vpm1, vpm2, + nodes) ) + is_patch_inside_tm2.set(patch_id_p); + else + is_patch_inside_tm1.set(patch_id_q); + } + } + else + { + //Nothing allowed #ifdef CGAL_COREFINEMENT_DEBUG - std::cout << " Non-manifold edge case 1\n"; + std::cout << " Non-manifold edge case 1\n"; #endif - impossible_operation.set(); - return; + impossible_operation.set(); + return; + } } } } else { - //Ambiguous, we can do nothing - if (!used_to_clip_a_surface) + if (!used_to_clip_a_surface && !used_to_classify_patches) { #ifdef CGAL_COREFINEMENT_DEBUG std::cout << " Non-manifold edge case 2\n"; #endif + //Ambiguous, we can do nothing impossible_operation.set(); return; } @@ -834,20 +877,38 @@ public: std::size_t patch_id_q1=tm2_patch_ids[ get(fids2, face(opposite(h2,tm2),tm2)) ]; std::size_t patch_id_q2=tm2_patch_ids[ get(fids2, face(h2,tm2)) ]; - //indicates that patch status will be updated - patch_status_not_set_tm1.reset(patch_id_p); - patch_status_not_set_tm2.reset(patch_id_q1); - patch_status_not_set_tm2.reset(patch_id_q2); + if (index_p!=index_q1 && index_p!=index_q2) + { + //indicates that patch status will be updated + patch_status_not_set_tm1.reset(patch_id_p); + patch_status_not_set_tm2.reset(patch_id_q1); + patch_status_not_set_tm2.reset(patch_id_q2); - bool p_is_between_q1q2 = sorted_around_edge( - ids.first, ids.second, - index_q1, index_q2, index_p, - q1, q2, p, - vpm2, vpm1, - nodes); + bool p_is_between_q1q2 = sorted_around_edge( + ids.first, ids.second, + index_q1, index_q2, index_p, + q1, q2, p, + vpm2, vpm1, + nodes); - if (p_is_between_q1q2) - is_patch_inside_tm2.set(patch_id_p); + if (p_is_between_q1q2) + { + is_patch_inside_tm2.set(patch_id_p); + // locally does not really make sense globally + if (h == h1) // i.e. p2 + is_patch_inside_tm1.set(patch_id_q2); + else + is_patch_inside_tm1.set(patch_id_q1); + } + else + { + // locally does not really make sense globally + if (h == h1) // i.e. p2 + is_patch_inside_tm1.set(patch_id_q1); + else + is_patch_inside_tm1.set(patch_id_q2); + } + } } } } @@ -855,12 +916,75 @@ public: if ( is_border_edge(h2,tm2) ) { CGAL_assertion(!used_to_clip_a_surface); - //Ambiguous, we do nothing + if (!used_to_classify_patches) + { #ifdef CGAL_COREFINEMENT_DEBUG - std::cout << " Non-manifold edge case 3\n"; + std::cout << " Non-manifold edge case 3\n"; #endif - impossible_operation.set(); - return; + impossible_operation.set(); + return; + } + else + { + //Sort the three triangle faces around their common edge + // we assume that the exterior of the volume is indicated by + // counterclockwise oriented faces + // (corrected by is_tmi_inside_tmi). + halfedge_descriptor h = is_border(h2, tm2) ? opposite(h2, tm2) : h2; + vertex_descriptor q = target(next(h,tm2),tm2); + // when looking from the side of indices.second, + // the interior of the first triangle mesh is described + // by turning counterclockwise from p1 to p2 + vertex_descriptor p1=target(next(opposite(h1,tm1),tm1),tm1); + vertex_descriptor p2=target(next(h1,tm1),tm1); + // when looking from the side of indices.second, + // the interior of the second volume is described + // by turning from p1 to p2 + + //check if the third point of each triangular face is an original point (stay NID) + //or a intersection point (in that case we need the index of the corresponding node to + //have the exact value of the point) + Node_id index_q = get_node_id(q, vertex_to_node_id2); + Node_id index_p1 = get_node_id(p1, vertex_to_node_id1); + Node_id index_p2 = get_node_id(p2, vertex_to_node_id1); + + std::size_t patch_id_q=tm2_patch_ids[ get(fids2, face(h,tm2)) ]; + std::size_t patch_id_p1=tm1_patch_ids[ get(fids1, face(opposite(h1,tm1),tm1)) ]; + std::size_t patch_id_p2=tm1_patch_ids[ get(fids1, face(h1,tm1)) ]; + + if (index_q!=index_p1 && index_q!=index_p2) + { + //indicates that patch status will be updated + patch_status_not_set_tm2.reset(patch_id_q); + patch_status_not_set_tm1.reset(patch_id_p1); + patch_status_not_set_tm1.reset(patch_id_p2); + + bool q_is_between_p1p2 = sorted_around_edge( + ids.first, ids.second, + index_p1, index_p2, index_q, + p1, p2, q, + vpm1, vpm2, + nodes); + + if (q_is_between_p1p2) + { + is_patch_inside_tm1.set(patch_id_q); + // locally does not really make sense globally + if (h == h2) // i.e. q2 + is_patch_inside_tm2.set(patch_id_p2); + else + is_patch_inside_tm2.set(patch_id_p1); + } + else + { + // locally does not really make sense globally + if (h == h2) // i.e. q2 + is_patch_inside_tm2.set(patch_id_p1); + else + is_patch_inside_tm2.set(patch_id_p2); + } + } + } } else { diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h index 4b25b21e472..f0f65b62ee7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h @@ -109,6 +109,16 @@ bool sorted_around_edge( || ( s2 != NEGATIVE ); //true if the angle p1,o,q or the angle q,o,p2 is smaller than or equal to Pi } +template +bool p_is_below_q(const typename Kernel::Point_3& o_prime, const typename Kernel::Point_3& o, + const typename Kernel::Point_3& p, const typename Kernel::Point_3& q) +{ + CGAL::Orientation res = CGAL::orientation(o_prime, o, p, q); + CGAL_assertion(res != CGAL::COPLANAR); + + return res == CGAL::POSITIVE; +} + template bool are_triangles_coplanar_same_side( const typename Kernel::Point_3& o_prime, const typename Kernel::Point_3& o, @@ -167,6 +177,27 @@ bool sorted_around_edge( Node_id o_prime_index, : nodes.exact_node(q_index ) ); } +template +bool p_is_below_q( Node_id o_prime_index, + Node_id o_index, + Node_id p_index, + Node_id q_index, + vertex_descriptor p, + vertex_descriptor q, + const VPMP& vpm_p, + const VPMQ& vpm_q, + const Node_vector& nodes) +{ + const Node_id NID((std::numeric_limits::max)()); + return p_is_below_q( + nodes.exact_node(o_prime_index), + nodes.exact_node(o_index), + p_index == NID ? nodes.to_exact(get(vpm_p,p)) + : nodes.exact_node(p_index), + q_index == NID ? nodes.to_exact(get(vpm_q,q)) + : nodes.exact_node(q_index) ); +} + } } } // CGAL::Polygon_mesh_processing::Corefinement From d3e54b9b9925c49fffe9d97b2ad3d6dc536d9868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Nov 2020 13:21:31 +0100 Subject: [PATCH 099/317] add new named parameter --- BGL/include/CGAL/boost/graph/parameters_interface.h | 1 + BGL/test/BGL/test_cgal_bgl_named_params.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 14bdb1bdbca..c9c9ba6f52b 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -103,6 +103,7 @@ 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) CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, non_manifold_feature_map) +CGAL_add_named_parameter(filter_t, filter, filter) // 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 887a9098c13..dde2ad90041 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -100,6 +100,7 @@ void test(const NamedParameters& np) 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); assert(get_parameter(np, CGAL::internal_np::non_manifold_feature_map).v == 60); + assert(get_parameter(np, CGAL::internal_np::filter).v == 61); // Named parameters that we use in the package 'Surface Mesh Simplification' assert(get_parameter(np, CGAL::internal_np::get_cost_policy).v == 34); @@ -209,6 +210,7 @@ void test(const NamedParameters& np) check_same_type<64>(get_parameter(np, CGAL::internal_np::do_simplify_border)); check_same_type<78910>(get_parameter(np, CGAL::internal_np::maximum_number_of_faces)); check_same_type<60>(get_parameter(np, CGAL::internal_np::non_manifold_feature_map)); + check_same_type<61>(get_parameter(np, CGAL::internal_np::filter)); // Named parameters that we use in the package 'Surface Mesh Simplification' check_same_type<34>(get_parameter(np, CGAL::internal_np::get_cost_policy)); @@ -327,7 +329,8 @@ int main() .throw_on_self_intersection(A<43>(43)) .clip_volume(A<44>(44)) .use_compact_clipper(A<45>(45)) - .non_manifold_feature_map(A<60>(60)) + .non_manifold_feature_map(A<60>(60) + .filter(A<61>(61)) .apply_per_connected_component(A<46>(46)) .output_iterator(A<47>(47)) .erase_all_duplicates(A<48>(48)) From e86b24e2c4c4bcc6802934630fba3b3e368ba599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Nov 2020 13:46:22 +0100 Subject: [PATCH 100/317] add an np to filter some self-intersections --- .../repair_self_intersections.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index ce3e4dfeeab..c6df03d1aa3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -1881,6 +1881,18 @@ bool remove_self_intersections(const FaceRange& face_range, // detect_feature_pp NP (unused for now) const double weak_dihedral_angle = 0.; // choose_parameter(get_parameter(np, internal_np::weak_dihedral_angle), 20.); + struct Return_false { + bool operator()(std::pair) const { return false; } + }; + + typedef typename internal_np::Lookup_named_param_def < + internal_np::filter_t, + NamedParameters, + Return_false // default: keep all + > ::type Output_iterator_predicate; + Output_iterator_predicate out_it_predicates + = choose_parameter(get_parameter(np, internal_np::filter)); + #ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG std::cout << "DEBUG: Starting remove_self_intersections, is_valid(tmesh)? " << is_valid_polygon_mesh(tmesh) << "\n"; std::cout << "\tpreserve_genus: " << preserve_genus << std::endl; @@ -1909,7 +1921,8 @@ bool remove_self_intersections(const FaceRange& face_range, // TODO : possible optimization to reduce the range to check with the bbox // of the previous patches or something. - self_intersections(working_face_range, tmesh, std::back_inserter(self_inter)); + self_intersections(working_face_range, tmesh, + CGAL::filter_output_iterator(std::back_inserter(self_inter), out_it_predicates)); #ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG std::cout << self_inter.size() << " intersecting pairs" << std::endl; #endif From aecc7c7ee735cdefb692fe8aa1a552b71cfad62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Nov 2020 14:44:32 +0100 Subject: [PATCH 101/317] improve debug --- .../repair_self_intersections.h | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index c6df03d1aa3..43569b3ca96 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -736,7 +736,7 @@ bool construct_tentative_hole_patch(std::vector > to_dump; for(const Face_indices& face : hole_faces) { @@ -1393,8 +1393,13 @@ remove_self_intersections_one_step(std::set faces_to_remove_copy = faces_to_remove; +#if defined(CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG) || defined(CGAL_PMP_REMOVE_SELF_INTERSECTION_OUTPUT) + static int call_id = -1; + ++call_id; +#endif + #ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG - std::cout << "##### running remove_self_intersections_one_step, step " << step + std::cout << "##### running remove_self_intersections_one_step (#" << call_id << "), step " << step << " with " << faces_to_remove.size() << " intersecting faces\n"; #endif @@ -1405,18 +1410,24 @@ remove_self_intersections_one_step(std::set ::type Output_iterator_predicate; Output_iterator_predicate out_it_predicates = choose_parameter(get_parameter(np, internal_np::filter)); @@ -1924,7 +1930,7 @@ bool remove_self_intersections(const FaceRange& face_range, self_intersections(working_face_range, tmesh, CGAL::filter_output_iterator(std::back_inserter(self_inter), out_it_predicates)); #ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG - std::cout << self_inter.size() << " intersecting pairs" << std::endl; + std::cout << " DEBUG: " << self_inter.size() << " intersecting pairs" << std::endl; #endif for(const Face_pair& fp : self_inter) { From 27965c56e8362da9ee1d2317cc4ec86059c73909 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 11 Nov 2020 18:47:09 +0000 Subject: [PATCH 102/317] Move code closer to useage and convert to if --- .../include/CGAL/Nef_S2/sphere_predicates.h | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h index b5655144033..996b47bce23 100644 --- a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h +++ b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h @@ -84,30 +84,15 @@ int spherical_compare(const Sphere_point& p1, const Sphere_point& p2, int axis, int pos) { - Sphere_point pS, pN; - CGAL_assertion(axis>=0 && axis<=2); - switch(axis) { - case 0: - pS=Sphere_point(0,-1,0); - // pN=Sphere_point(0,1,0); - break; - case 1: - pS=Sphere_point(0,0,1); - // pN=Sphere_point(0,0,-1); - break; - case 2: - pS=Sphere_point(0,-1,0); - // pN=Sphere_point(0,1,0); - break; - } typename R::Direction_3 d1(p1-CGAL::ORIGIN), d2(p2-CGAL::ORIGIN); if (d1 == d2) return 0; + + CGAL_assertion(axis>=0 && axis<=2); if(is_south(p1,axis) || is_north(p2,axis)) return -1; if(is_south(p2,axis) || is_north(p1,axis)) return 1; - // if (d1 == dS || d2 == dN) return -1; - // if (d1 == dN || d2 == dS) return 1; + // now no more special cases if (axis==0 && (p1.hx()==static_cast(0) && p2.hx()==static_cast(0))) { @@ -133,7 +118,11 @@ int spherical_compare(const Sphere_point& p1, // now s1 == s2 return s1 * CGAL::spherical_orientation(p1,Sphere_point(0,0,1),p2); } - int sor = CGAL::spherical_orientation(pS,p1,p2); + int sor; + if(axis==1) + sor = CGAL::spherical_orientation(Sphere_point(0, 0, 1),p1,p2); + else + sor = CGAL::spherical_orientation(Sphere_point(0,-1, 0),p1,p2); if ( sor ) return sor; if(axis==0) return CGAL::spherical_orientation(Sphere_point(0,0,pos),p2,p1); From 31e46384ca60408edc32fc0cf9283d61e26738e0 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 11 Nov 2020 18:47:25 +0000 Subject: [PATCH 103/317] Remove commented-out code --- .../include/CGAL/Nef_S2/sphere_predicates.h | 92 ------------------- 1 file changed, 92 deletions(-) diff --git a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h index 996b47bce23..01316e8951f 100644 --- a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h +++ b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h @@ -197,98 +197,6 @@ $h^{0+}$ then we return a trivial segment. */ -/* -template -int Sphere_segment:: -intersection(const CGAL::Sphere_circle& c, std::vector >& s) const { - - CGAL_NEF_TRACEN(" intersection "<<*this<<" "< i1 = CGAL::intersection(ptr()->c_,c); - if ( !has_on(i1) ) - i1 = i1.antipode(); - s.push_back(Sphere_segment(source(),i1,sphere_circle())); - s.push_back(Sphere_segment(i1,target(),sphere_circle())); - return 2; - } - else if ( or1 == CGAL::ON_ORIENTED_BOUNDARY && - or2 == CGAL::ON_ORIENTED_BOUNDARY ) { - // if both ends of $s$ are part of $h$ then $s$ is a halfcircle or - // $s$ is fully part of $h$. In this case we have to check if the - // halfcircle is not part of $h^-$. This can be formulated by an - // orientation test of the point $p$ at the tip of the normal of - // |s.sphere_circle()| with respect to the plane through the - // endpoints of $s$ and the tip of the normal of $h$. - CGAL_NEF_TRACEN(" both in plane"); - s.push_back(*this); - return 1; - } - else if ( or1 != CGAL::ON_NEGATIVE_SIDE && - or2 != CGAL::ON_NEGATIVE_SIDE ) { - // this case covers the endpoints of $s$ as part of the closed - // oriented halfspace $h^{0+}$. At least one is part of - // $h^{+}$. If $s$ is not long then the segment must be fully part - // of $h^{0+}$. Otherwise if $s$ is long, then we at both ends - // there are subsegments as part of $h^{0+}$ (one might be - // degenerate). - if ( is_long() ) { - Sphere_point i1 = CGAL::intersection(ptr()->c_,c); - Sphere_point i2 = i1.antipode(); - Sphere_segment so(i1,i2,sphere_circle()); - if ( so.has_on(source()) && so.has_on(target()) ) - std::swap(i1,i2); - // now source(),i1,i2,target() are circularly ordered - s.push_back(Sphere_segment(source(),i1,sphere_circle())); - s.push_back(Sphere_segment(i1,i2,sphere_circle())); - s.push_back(Sphere_segment(i2,target(),sphere_circle())); - // CGAL_NEF_TRACEN(" both >= plane, long "<= plane, short "); - s.push_back(*this); - return 1; - } - else if ( or1 != CGAL::ON_POSITIVE_SIDE && - or2 != CGAL::ON_POSITIVE_SIDE ) { - // either both endpoints of $s$ are in $h^-$ or one is in $h^-$ - // and one on $h^0$. - if ( is_long() ) { - Sphere_point i1 = CGAL::intersection(ptr()->c_,c); - Sphere_point i2 = i1.antipode(); - Sphere_segment so(i1,i2,sphere_circle()); - // CGAL_NEF_TRACEN(" both <= plane, long"< int Sphere_segment:: intersection(const CGAL::Sphere_circle& c, From 63ad707c02d8630daa61d78fef92fcaf3917b1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 13 Nov 2020 15:20:54 +0100 Subject: [PATCH 104/317] correctly handle orientation of coplanar patches --- .../internal/Corefinement/Face_graph_output_builder.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index 98ffe1a347f..84e71d5c471 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -1375,7 +1375,8 @@ public: if (tm1_coplanar_faces.test(f_id)) { coplanar_patches_of_tm1.set(patch_id); - coplanar_patches_of_tm1_for_union_and_intersection.set(patch_id); + if (is_tm1_inside_out == is_tm2_inside_out) + coplanar_patches_of_tm1_for_union_and_intersection.set(patch_id); } else { @@ -1436,7 +1437,8 @@ public: if (tm2_coplanar_faces.test(f_id)) { coplanar_patches_of_tm2.set(patch_id); - coplanar_patches_of_tm2_for_union_and_intersection.set(patch_id); + if (is_tm1_inside_out == is_tm2_inside_out) + coplanar_patches_of_tm2_for_union_and_intersection.set(patch_id); } else { From cbc4360b4375ea3ecdd46bde556d433810a82d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 17 Nov 2020 15:01:24 +0100 Subject: [PATCH 105/317] better handling of setting of coplanar flag for patches especially for connected components being entirely a coplanar patch --- .../Corefinement/Face_graph_output_builder.h | 96 +++++++++++-------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index 84e71d5c471..c00c8771b86 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -87,15 +87,15 @@ void register_halfedge_pair(UserVisitor&, boost::mpl::bool_, template void export_flags(UserVisitor& visitor, boost::mpl::bool_, FaceIndexMap fim, const std::vector& tm_patch_ids, - const boost::dynamic_bitset<>& is_patch_inside_other_tm, - const boost::dynamic_bitset<>& coplanar_patches_of_tm, + const boost::dynamic_bitset<>& is_patch_inside_other_tm, + const boost::dynamic_bitset<>& coplanar_patches, const boost::dynamic_bitset<>& coplanar_patches_of_tm_for_union_and_intersection, const boost::dynamic_bitset<>& patch_status_not_set, TriangleMesh& tm) { visitor.export_flags(fim, tm_patch_ids, is_patch_inside_other_tm, - coplanar_patches_of_tm, + coplanar_patches, coplanar_patches_of_tm_for_union_and_intersection, patch_status_not_set, tm); @@ -547,10 +547,6 @@ public: } CGAL_assertion(BGL::internal::is_index_map_valid(fids2, num_faces(tm2), faces(tm2))); - // bitset to identify coplanar faces - boost::dynamic_bitset<> tm1_coplanar_faces(num_faces(tm1), 0); - boost::dynamic_bitset<> tm2_coplanar_faces(num_faces(tm2), 0); - // In the following loop we filter intersection edges that are strictly inside a patch // of coplanar facets so that we keep only the edges on the border of the patch. // This is not optimal and in an ideal world being able to find the outside edges @@ -563,6 +559,14 @@ public: : epp_it_end; boost::unordered_set inter_edges_to_remove1, inter_edges_to_remove2; + + // Each vector contains a subset of coplanar faces. More particularly only + // the coplanar faces incident to an intersection edge. Note + // that for coplanar faces, intersection edges are on the input + // edges and some coplanar faces might not be seen as they are + // the result of the retriangulation. + std::vector tm1_coplanar_faces, tm2_coplanar_faces; + for (;epp_it!=epp_it_end;) { halfedge_descriptor h1 = epp_it->second.first[&tm1]; @@ -584,7 +588,7 @@ public: Node_id index_q2 = get_node_id(q2, vertex_to_node_id2); // set boolean for the position of p1 wrt to q1 and q2 - bool p1_eq_q1=is_border(h1_opp, tm1), p1_eq_q2=p1_eq_q1; + bool p1_eq_q1 = false, p1_eq_q2 = false; if (!is_border(h1_opp, tm1) && index_p1!=NID) { if (!is_border(h2_opp, tm2)) @@ -593,8 +597,8 @@ public: if (p1_eq_q1) { //mark coplanar facets if any - tm1_coplanar_faces.set(get(fids1, face(h1_opp, tm1))); - tm2_coplanar_faces.set(get(fids2, face(h2_opp, tm2))); + tm1_coplanar_faces.push_back(face(h1_opp, tm1)); + tm2_coplanar_faces.push_back(face(h2_opp, tm2)); } } if (!is_border(h2, tm2)) @@ -603,14 +607,14 @@ public: if (p1_eq_q2) { //mark coplanar facets if any - tm1_coplanar_faces.set(get(fids1, face(h1_opp, tm1))); - tm2_coplanar_faces.set(get(fids2, face(h2, tm2))); + tm1_coplanar_faces.push_back(face(h1_opp, tm1)); + tm2_coplanar_faces.push_back(face(h2, tm2)); } } } // set boolean for the position of p2 wrt to q1 and q2 - bool p2_eq_q1=is_border(h1, tm1), p2_eq_q2=p2_eq_q1; + bool p2_eq_q1 = false, p2_eq_q2 = false; if (!is_border(h1, tm1) && index_p2!=NID) { if (!is_border(h2_opp, tm2)) @@ -618,8 +622,8 @@ public: p2_eq_q1 = index_p2 == index_q1; if (p2_eq_q1){ //mark coplanar facets if any - tm1_coplanar_faces.set(get(fids1, face(h1, tm1))); - tm2_coplanar_faces.set(get(fids2, face(h2_opp, tm2))); + tm1_coplanar_faces.push_back(face(h1, tm1)); + tm2_coplanar_faces.push_back(face(h2_opp, tm2)); } } if (!is_border(h2, tm2)) @@ -627,8 +631,8 @@ public: p2_eq_q2 = index_p2 == index_q2; if (p2_eq_q2){ //mark coplanar facets if any - tm1_coplanar_faces.set(get(fids1, face(h1, tm1))); - tm2_coplanar_faces.set(get(fids2, face(h2, tm2))); + tm1_coplanar_faces.push_back(face(h1, tm1)); + tm2_coplanar_faces.push_back(face(h2, tm2)); } } } @@ -741,6 +745,21 @@ public: patch_status_not_set_tm1.set(); patch_status_not_set_tm2.set(); + // first set coplanar status of patches using the coplanar faces collected during the + // extra intersection edges collected. This is important in the case of full connected components + // being coplanar. They have no intersection edges (closed cc) or only intersection edges on the + // boundary (non-closed cc) + for (face_descriptor f1 : tm1_coplanar_faces) + { + std::size_t fid1 = get(fids1, f1); + coplanar_patches_of_tm1.set(tm1_patch_ids[ fid1 ]); + } + for (face_descriptor f2 : tm2_coplanar_faces) + { + std::size_t fid2 = get(fids2, f2); + coplanar_patches_of_tm2.set(tm2_patch_ids[ fid2 ]); + } + for (typename An_edge_per_polyline_map::iterator it=an_edge_per_polyline.begin(), it_end=an_edge_per_polyline.end(); it!=it_end;++it) @@ -773,16 +792,17 @@ public: if ( is_border(h1,tm1) != is_border(h2,tm2) ) { //No restriction at this level - std::size_t patch_id1 = - tm1_patch_ids[ get( fids1, is_border(h1,tm1) - ? face(opposite(h1,tm1),tm1) - : face(h1,tm1)) ]; - std::size_t patch_id2 = - tm2_patch_ids[ get( fids2, is_border(h2,tm2) - ? face(opposite(h2,tm2),tm2) - : face(h2,tm2)) ]; - patch_status_not_set_tm1.reset(patch_id1); - patch_status_not_set_tm2.reset(patch_id2); + std::size_t fid1 = + get(fids1, is_border(h1,tm1) ? face(opposite(h1,tm1),tm1) + : face(h1,tm1)); + std::size_t fid2 = + get(fids2, is_border(h2,tm2) ? face(opposite(h2,tm2),tm2) + : face(h2,tm2)); + std::size_t patch_id_p=tm1_patch_ids[ fid1 ]; + std::size_t patch_id_q=tm2_patch_ids[ fid2 ]; + + patch_status_not_set_tm1.reset(patch_id_p); + patch_status_not_set_tm2.reset(patch_id_q); } else { @@ -798,13 +818,10 @@ public: std::swap(index_o_prime, index_o); } - vertex_descriptor p = target(next(h1,tm1),tm1); - vertex_descriptor q= target(next(h2,tm2),tm2); - Node_id index_p = get_node_id(p, vertex_to_node_id1); - Node_id index_q = get_node_id(q, vertex_to_node_id2); - - std::size_t patch_id_p=tm1_patch_ids[ get(fids1, face(h1,tm1)) ]; - std::size_t patch_id_q=tm2_patch_ids[ get(fids2, face(h2,tm2)) ]; + std::size_t fid1 = get(fids1, face(h1,tm1)); + std::size_t fid2 = get(fids2, face(h2,tm2)); + std::size_t patch_id_p=tm1_patch_ids[ fid1 ]; + std::size_t patch_id_q=tm2_patch_ids[ fid2 ]; //indicates that patch status will be updated patch_status_not_set_tm1.reset(patch_id_p); @@ -817,6 +834,11 @@ public: } else { + vertex_descriptor p = target(next(h1,tm1),tm1); + vertex_descriptor q = target(next(h2,tm2),tm2); + Node_id index_p = get_node_id(p, vertex_to_node_id1); + Node_id index_q = get_node_id(q, vertex_to_node_id2); + if ( p_is_below_q(index_o_prime, index_o, index_p, index_q, p, q, vpm1, vpm2, @@ -1372,9 +1394,8 @@ public: } if (index_p1 != NID) { - if (tm1_coplanar_faces.test(f_id)) + if (coplanar_patches_of_tm1.test(patch_id)) { - coplanar_patches_of_tm1.set(patch_id); if (is_tm1_inside_out == is_tm2_inside_out) coplanar_patches_of_tm1_for_union_and_intersection.set(patch_id); } @@ -1434,9 +1455,8 @@ public: } if (index_p2 != NID) { - if (tm2_coplanar_faces.test(f_id)) + if (coplanar_patches_of_tm2.test(patch_id)) { - coplanar_patches_of_tm2.set(patch_id); if (is_tm1_inside_out == is_tm2_inside_out) coplanar_patches_of_tm2_for_union_and_intersection.set(patch_id); } From f56cbecce98177f2c2e5a1ba5ecce3daf950f50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 23 Nov 2020 16:36:05 +0100 Subject: [PATCH 106/317] add missing resize for autoref case --- .../CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h | 1 + 1 file changed, 1 insertion(+) 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 43bc4889aee..00650c75161 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 @@ -390,6 +390,7 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, const TriangleMesh& tm) // TODO check if we need a special case if the endpoint of the intersect edge is on the third face { CGAL_assertion(f1!=f2 && f1!=f3 && f2!=f3); + is_node_on_boundary.resize(node_id+1, false); TriangleMesh* tm_ptr = const_cast(&tm); // user_visitor.new_node_added_triple_face(node_id, f1, f2, f3, tm); // NODE_VISITOR_TAG #ifdef CGAL_DEBUG_AUTOREFINEMENT From 4b26935ff5d438f50853a753768b08d64cc73161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 24 Nov 2020 18:11:27 +0100 Subject: [PATCH 107/317] fix boundary cases (regular and coplanar) tests are updated as results were somehow invalid --- .../Output_builder_for_autorefinement.h | 296 ++++++++++++++---- .../test_autorefinement.cmd | 4 +- 2 files changed, 236 insertions(+), 64 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h index db57fbee53a..6e5b3a73705 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h @@ -245,7 +245,7 @@ public: CGAL_assertion(BGL::internal::is_index_map_valid(fids, num_faces(tm), faces(tm))); // bitset to identify coplanar faces - boost::dynamic_bitset<> tm_coplanar_faces(num_faces(tm), 0); + std::vector tm_coplanar_faces; // In the following loop we filter intersection edges that are strictly inside a patch // of coplanar facets so that we keep only the edges on the border of the patch. @@ -277,11 +277,6 @@ public: else{ halfedge_descriptor h2_opp = opposite(h2, tm); - if (is_border_edge(h1,tm) || is_border_edge(h2,tm)){ - ++epp_it; - continue; - } - //vertices from tm1 vertex_descriptor p1 = target(next(h1_opp, tm), tm); vertex_descriptor p2 = target(next(h1, tm), tm); @@ -315,20 +310,20 @@ public: //mark coplanar facets if any if (p1_eq_q1){ - tm_coplanar_faces.set(get(fids, face(h1_opp, tm))); - tm_coplanar_faces.set(get(fids, face(h2_opp, tm))); + tm_coplanar_faces.push_back(face(h1_opp, tm)); + tm_coplanar_faces.push_back(face(h2_opp, tm)); } if (p1_eq_q2){ - tm_coplanar_faces.set(get(fids, face(h1_opp, tm))); - tm_coplanar_faces.set(get(fids, face(h2, tm))); + tm_coplanar_faces.push_back(face(h1_opp, tm)); + tm_coplanar_faces.push_back(face(h2, tm)); } if (p2_eq_q1){ - tm_coplanar_faces.set(get(fids, face(h1, tm))); - tm_coplanar_faces.set(get(fids, face(h2_opp, tm))); + tm_coplanar_faces.push_back(face(h1, tm)); + tm_coplanar_faces.push_back(face(h2_opp, tm)); } if (p2_eq_q2){ - tm_coplanar_faces.set(get(fids, face(h1, tm))); - tm_coplanar_faces.set(get(fids, face(h2, tm))); + tm_coplanar_faces.push_back(face(h1, tm)); + tm_coplanar_faces.push_back(face(h2, tm)); } if ( (p1_eq_q1 || p1_eq_q2) && (p2_eq_q1 || p2_eq_q2) ) to_remove = true; @@ -368,6 +363,12 @@ public: boost::dynamic_bitset<> coplanar_patches(nb_patches,false); patches_to_keep.set(); patch_status_not_set.set(); + + // set coplanar patches flags + for (face_descriptor f : tm_coplanar_faces) + coplanar_patches.set( patch_ids[get(fids,f)] ); + + // use a union-find on patches to track the incidence between patches kept typedef Union_find UF; UF uf; @@ -404,10 +405,25 @@ public: if ( is_border_edge(h1, tm) ){ if ( is_border_edge(h2,tm) ) { + // CASE h1 and h2 are boundary edge if ( is_border(h1,tm) == is_border(h2,tm) ) { - //Orientation issue, nothing done - all_fixed = false; + std::size_t pid1 = + patch_ids[ get(fids, face( is_border(h1,tm)?opposite(h1,tm):h1 ,tm)) ]; + if (coplanar_patches[pid1]) + { + std::size_t pid2 = + patch_ids[ get(fids, face( is_border(h2,tm)?opposite(h2,tm):h2 ,tm)) ]; + CGAL_assertion(coplanar_patches[pid2]); + // the face of p and the face of q1 have the same orientation: remove both patches + patches_to_keep.reset(pid1); + patches_to_keep.reset(pid2); + } + else + { + //Orientation issue, nothing done + all_fixed = false; + } } else { @@ -415,22 +431,42 @@ public: { std::size_t pid1=patch_ids[ get(fids, face(opposite(h1,tm),tm)) ], pid2=patch_ids[ get(fids, face(h2,tm)) ]; - uf.unify_sets(patch_handles[pid1], patch_handles[pid2]); - patch_status_not_set.reset(pid1); - patch_status_not_set.reset(pid2); + + if (coplanar_patches[pid1]) + { + CGAL_assertion(coplanar_patches[pid2]); + // arbitrarily remove the patch with the smallest id + patches_to_keep.reset(pid1 Date: Wed, 25 Nov 2020 09:00:26 +0100 Subject: [PATCH 108/317] typo --- BGL/test/BGL/test_cgal_bgl_named_params.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/test/BGL/test_cgal_bgl_named_params.cpp b/BGL/test/BGL/test_cgal_bgl_named_params.cpp index dde2ad90041..f9c65cd2f97 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -329,7 +329,7 @@ int main() .throw_on_self_intersection(A<43>(43)) .clip_volume(A<44>(44)) .use_compact_clipper(A<45>(45)) - .non_manifold_feature_map(A<60>(60) + .non_manifold_feature_map(A<60>(60)) .filter(A<61>(61)) .apply_per_connected_component(A<46>(46)) .output_iterator(A<47>(47)) From d8499765a8e293fa3e8e3e7abc09fbb2cd7c525d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 25 Nov 2020 16:32:20 +0100 Subject: [PATCH 109/317] move undocumented feature to test --- .../examples/Polygon_mesh_processing/CMakeLists.txt | 1 - .../test/Polygon_mesh_processing/CMakeLists.txt | 1 + .../Polygon_mesh_processing/corefine_non_manifold.cpp | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename Polygon_mesh_processing/{examples => test}/Polygon_mesh_processing/corefine_non_manifold.cpp (100%) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index f3896b61eb1..ec8bb41756b 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -84,7 +84,6 @@ create_single_source_cgal_program( "corefinement_mesh_union.cpp" ) create_single_source_cgal_program( "corefinement_mesh_union_and_intersection.cpp" ) create_single_source_cgal_program( "corefinement_mesh_union_with_attributes.cpp" ) create_single_source_cgal_program( "corefinement_polyhedron_union.cpp" ) -create_single_source_cgal_program( "corefine_non_manifold.cpp" ) create_single_source_cgal_program( "random_perturbation_SM_example.cpp" ) create_single_source_cgal_program( "corefinement_LCC.cpp") create_single_source_cgal_program( "detect_features_example.cpp" ) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index c1612e65f9d..84e4946e4d6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -86,6 +86,7 @@ endif() create_single_source_cgal_program("test_pmp_clip.cpp") create_single_source_cgal_program("test_autorefinement.cpp") create_single_source_cgal_program("autorefinement_sm.cpp") + create_single_source_cgal_program( "corefine_non_manifold.cpp" ) create_single_source_cgal_program("triangulate_hole_polyline_test.cpp") create_single_source_cgal_program("surface_intersection_sm_poly.cpp" ) create_single_source_cgal_program("test_orient_cc.cpp") diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/corefine_non_manifold.cpp similarity index 100% rename from Polygon_mesh_processing/examples/Polygon_mesh_processing/corefine_non_manifold.cpp rename to Polygon_mesh_processing/test/Polygon_mesh_processing/corefine_non_manifold.cpp From 172b16bf09b1c9f53d6f072f725adc414f422665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 26 Nov 2020 14:10:53 +0100 Subject: [PATCH 110/317] really split the intersection graph at node where the intersection polylines ... ... goes from the interior of a mesh onto its boundary The patch is not yet valid for autorefinement --- .../internal/Corefinement/Visitor.h | 164 ++++++++++++++---- 1 file changed, 134 insertions(+), 30 deletions(-) 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 00650c75161..00670ec4c0d 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 @@ -26,6 +26,8 @@ #include #include +#include + namespace CGAL{ namespace Polygon_mesh_processing { namespace Corefinement{ @@ -156,6 +158,10 @@ private: // data members private: boost::dynamic_bitset<> is_node_on_boundary; // indicate if a vertex is a border vertex in tm1 or tm2 + boost::container::flat_map > node_on_vertex_map; + boost::container::flat_map > node_on_edge_map; + + std::vector< std::vector > graph_of_constraints; boost::dynamic_bitset<> is_node_of_degree_one; //nb of intersection points between coplanar faces, see fixes XSL_TAG_CPL_VERT @@ -281,12 +287,96 @@ public: } } + bool is_on_border(std::size_t node_id1, std::size_t node_id2, + const std::vector* node_on_vertex_ptr, + const std::vector* node_on_edge_ptr, + TriangleMesh* tm_ptr) + { + if (tm_ptr == nullptr) return false; + + if (node_on_vertex_ptr!=nullptr) + { + if ( (*node_on_vertex_ptr)[node_id1] != Graph_traits::null_vertex() ) + { + if ( (*node_on_vertex_ptr)[node_id2] != Graph_traits::null_vertex() ) + { + std::pair< halfedge_descriptor, bool > res = + halfedge((*node_on_vertex_ptr)[node_id1], + (*node_on_vertex_ptr)[node_id2], + *tm_ptr); + CGAL_assertion(res.second); + return res.second && is_border_edge(res.first, *tm_ptr); + } + if (node_on_edge_ptr!=nullptr) + { + halfedge_descriptor h = (*node_on_edge_ptr)[node_id2]; + if (h != Graph_traits::null_halfedge()) + { + return ( source(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id1] || + target(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id1] ) + && is_border_edge(h, *tm_ptr); + } + return false; + } + } + } + + if (node_on_edge_ptr!=nullptr) + { + halfedge_descriptor h = (*node_on_edge_ptr)[node_id1]; + if (h != Graph_traits::null_halfedge()) + { + if ( node_on_vertex_ptr!=nullptr && + (*node_on_vertex_ptr)[node_id2] != Graph_traits::null_vertex() ) + { + return ( source(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id2] || + target(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id2] ) + && is_border_edge(h, *tm_ptr); + } + halfedge_descriptor h_bis = (*node_on_edge_ptr)[node_id2]; + if (h_bis != Graph_traits::null_halfedge()) + return h==h_bis || h==opposite(h_bis, *tm_ptr); + } + } + return false; + } + template void annotate_graph(std::vector& graph) { std::size_t nb_nodes=graph.size(); graph_of_constraints.resize(nb_nodes); is_node_of_degree_one.resize(nb_nodes); +//TODO: pas bon avec autoref et la collecte des infos aussi... + TriangleMesh* tm1_ptr = nullptr; + const std::vector* node_on_vertex_1_ptr = nullptr; + const std::vector* node_on_edge_1_ptr = nullptr; + TriangleMesh* tm2_ptr = nullptr; + const std::vector* node_on_vertex_2_ptr = nullptr; + const std::vector* node_on_edge_2_ptr = nullptr; + + boost::container::flat_set mesh_ptrs; + mesh_ptrs.reserve(2); + for (const auto& k_v : node_on_vertex_map) mesh_ptrs.insert(k_v.first); + for (const auto& k_v : node_on_edge_map) mesh_ptrs.insert(k_v.first); + + if (!mesh_ptrs.empty()) + { + tm1_ptr=*mesh_ptrs.begin(); + auto itv = node_on_vertex_map.find(tm1_ptr); + if (itv != node_on_vertex_map.end()) node_on_vertex_1_ptr= &(itv->second); + auto ite = node_on_edge_map.find(tm1_ptr); + if (ite != node_on_edge_map.end()) node_on_edge_1_ptr= &(ite->second); + if (mesh_ptrs.size()==2) + { + tm2_ptr=*std::next(mesh_ptrs.begin()); + itv = node_on_vertex_map.find(tm2_ptr); + if (itv != node_on_vertex_map.end()) node_on_vertex_2_ptr= &(itv->second); + ite = node_on_edge_map.find(tm2_ptr); + if (ite != node_on_edge_map.end()) node_on_edge_2_ptr= &(ite->second); + } + } + for(std::size_t node_id=0;node_id(&tm)][node_id] = h; + } + + void check_node_on_boundary_vertex_case(std::size_t node_id, + halfedge_descriptor h, + const TriangleMesh& tm) + { + node_on_vertex_map[const_cast(&tm)][node_id] = target(h,tm); + + //we turn around the hedge and check no halfedge is a border halfedge + for(halfedge_descriptor hc :halfedges_around_target(h,tm)) + if ( is_border_edge(hc,tm) ) + { + is_node_on_boundary.set(node_id); + return; + } + } //keep track of the fact that a polyhedron original vertex is a node void all_incident_faces_got_a_node_as_vertex( @@ -392,6 +488,9 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, CGAL_assertion(f1!=f2 && f1!=f3 && f2!=f3); is_node_on_boundary.resize(node_id+1, false); TriangleMesh* tm_ptr = const_cast(&tm); + node_on_edge_map[tm_ptr].resize(node_id+1, Graph_traits::null_halfedge()); + node_on_vertex_map[tm_ptr].resize(node_id+1, Graph_traits::null_vertex()); + // user_visitor.new_node_added_triple_face(node_id, f1, f2, f3, tm); // NODE_VISITOR_TAG #ifdef CGAL_DEBUG_AUTOREFINEMENT std::cout << "adding node " << node_id << " " << f1 << " " << f2 << " " << f3 << "\n"; @@ -415,6 +514,11 @@ void check_node_on_boundary_vertex_case(std::size_t node_id, TriangleMesh* tm1_ptr = const_cast(&tm1); TriangleMesh* tm2_ptr = const_cast(&tm2); + node_on_edge_map[tm1_ptr].resize(node_id+1, Graph_traits::null_halfedge()); + node_on_vertex_map[tm1_ptr].resize(node_id+1, Graph_traits::null_vertex()); + node_on_edge_map[tm2_ptr].resize(node_id+1, Graph_traits::null_halfedge()); + node_on_vertex_map[tm2_ptr].resize(node_id+1, Graph_traits::null_vertex()); + //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) From feb5ed87fdd0d4a5d10b508e4955f102b33a67d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 26 Nov 2020 18:31:24 +0100 Subject: [PATCH 111/317] export the handling of extra terminal node in a class template (with specialization for autoref) --- .../internal/Corefinement/Visitor.h | 373 ++++++++++++------ 1 file changed, 250 insertions(+), 123 deletions(-) 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 00670ec4c0d..02692973e93 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 @@ -27,6 +27,7 @@ #include #include +#include namespace CGAL{ namespace Polygon_mesh_processing { @@ -101,6 +102,245 @@ struct No_extra_output_from_corefinement {} }; +template +class Graph_node_classifier +{ + typedef std::size_t Node_id; + typedef boost::graph_traits Graph_traits; + typedef typename Graph_traits::vertex_descriptor vertex_descriptor; + typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor; + boost::dynamic_bitset<> is_node_on_boundary; // indicate if a vertex is a border vertex in tm1 or tm2 + boost::container::flat_map > m_node_on_vertex_map; + boost::container::flat_map > m_node_on_edge_map; +// variables filled by preprocessing + TriangleMesh* m_tm1_ptr = nullptr; + const std::vector* m_node_on_vertex_1_ptr = nullptr; + const std::vector* m_node_on_edge_1_ptr = nullptr; + TriangleMesh* m_tm2_ptr = nullptr; + const std::vector* m_node_on_vertex_2_ptr = nullptr; + const std::vector* m_node_on_edge_2_ptr = nullptr; + + bool is_on_border(std::size_t node_id1, std::size_t node_id2, + const std::vector* node_on_vertex_ptr, + const std::vector* node_on_edge_ptr, + TriangleMesh* tm_ptr) + { + if (tm_ptr == nullptr) return false; + + if (node_on_vertex_ptr!=nullptr) + { + vertex_descriptor v1 = (*node_on_vertex_ptr)[node_id1]; + if ( v1 != Graph_traits::null_vertex() ) + { + vertex_descriptor v2 = (*node_on_vertex_ptr)[node_id2]; + if ( v2 != Graph_traits::null_vertex() ) + { + std::pair< halfedge_descriptor, bool > res = + halfedge(v1, v2, *tm_ptr); + CGAL_assertion(res.second); + return res.second && is_border_edge(res.first, *tm_ptr); + } + if (node_on_edge_ptr!=nullptr) + { + halfedge_descriptor h = (*node_on_edge_ptr)[node_id2]; + if (h != Graph_traits::null_halfedge() && is_border_edge(h, *tm_ptr)) + return source(h, *tm_ptr)==v1 || target(h, *tm_ptr)==v1; + return false; + } + } + } + + if (node_on_edge_ptr!=nullptr) + { + halfedge_descriptor h = (*node_on_edge_ptr)[node_id1]; + if (h != Graph_traits::null_halfedge() && is_border_edge(h, *tm_ptr)) + { + if ( node_on_vertex_ptr!=nullptr ) + { + vertex_descriptor v2 = (*node_on_vertex_ptr)[node_id2]; + if (v2 != Graph_traits::null_vertex() ) + return source(h, *tm_ptr)==v2 || target(h, *tm_ptr)==v2; + } + halfedge_descriptor h_bis = (*node_on_edge_ptr)[node_id2]; + if (h_bis != Graph_traits::null_halfedge()) + return h==h_bis || h==opposite(h_bis, *tm_ptr); + } + } + return false; + } +public: + + void preprocessing() + { + boost::container::flat_set mesh_ptrs; + mesh_ptrs.reserve(2); + for (const auto& k_v : m_node_on_vertex_map) mesh_ptrs.insert(k_v.first); + for (const auto& k_v : m_node_on_edge_map) mesh_ptrs.insert(k_v.first); + + if (!mesh_ptrs.empty()) + { + m_tm1_ptr=*mesh_ptrs.begin(); + auto itv = m_node_on_vertex_map.find(m_tm1_ptr); + if (itv != m_node_on_vertex_map.end()) m_node_on_vertex_1_ptr= &(itv->second); + auto ite = m_node_on_edge_map.find(m_tm1_ptr); + if (ite != m_node_on_edge_map.end()) m_node_on_edge_1_ptr= &(ite->second); + if (mesh_ptrs.size()==2) + { + m_tm2_ptr=*std::next(mesh_ptrs.begin()); + itv = m_node_on_vertex_map.find(m_tm2_ptr); + if (itv != m_node_on_vertex_map.end()) m_node_on_vertex_2_ptr= &(itv->second); + ite = m_node_on_edge_map.find(m_tm2_ptr); + if (ite != m_node_on_edge_map.end()) m_node_on_edge_2_ptr= &(ite->second); + } + } + } + + void node_on_vertex(Node_id node_id, vertex_descriptor v, const TriangleMesh& tm) + { + m_node_on_vertex_map[const_cast(&tm)][node_id] = v; + + //we turn around the hedge and check no halfedge is a border halfedge + for(halfedge_descriptor hc :halfedges_around_target(halfedge(v,tm),tm)) + if ( is_border_edge(hc,tm) ) + { + is_node_on_boundary.set(node_id); + return; + } + } + + void node_on_edge(Node_id node_id, halfedge_descriptor h, const TriangleMesh& tm) + { + if ( is_border_edge(h,tm) ) + is_node_on_boundary.set(node_id); + m_node_on_edge_map[const_cast(&tm)][node_id] = h; + + } + + void new_node(Node_id node_id, const TriangleMesh& tm) + { + is_node_on_boundary.resize(node_id+1, false); + TriangleMesh* tm_ptr = const_cast(&tm); + m_node_on_edge_map[tm_ptr].resize(node_id+1, Graph_traits::null_halfedge()); + m_node_on_vertex_map[tm_ptr].resize(node_id+1, Graph_traits::null_vertex()); + } + + bool is_terminal(Node_id node_id, const std::vector& neighbor_nodes) + { + if ( is_node_on_boundary.test(node_id) && neighbor_nodes.size()==2) + { + std::size_t nn1 = neighbor_nodes[0], nn2 = neighbor_nodes[1]; + + return is_on_border(node_id, nn1, m_node_on_vertex_1_ptr, m_node_on_edge_1_ptr, m_tm1_ptr) != + is_on_border(node_id, nn2, m_node_on_vertex_1_ptr, m_node_on_edge_1_ptr, m_tm1_ptr) + || + is_on_border(node_id, nn1, m_node_on_vertex_2_ptr, m_node_on_edge_2_ptr, m_tm2_ptr) != + is_on_border(node_id, nn2, m_node_on_vertex_2_ptr, m_node_on_edge_2_ptr, m_tm2_ptr); + } + return false; + } +}; + +template +class Graph_node_classifier +{ + typedef std::size_t Node_id; + typedef boost::graph_traits Graph_traits; + typedef typename Graph_traits::vertex_descriptor vertex_descriptor; + typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor; + boost::dynamic_bitset<> m_is_node_on_boundary; // indicate if a vertex is a border vertex in tm1 or tm2 + std::vector> m_node_on_vertex; + std::vector> m_node_on_edge; + TriangleMesh* m_tm_ptr = nullptr; + + bool is_on_border(std::size_t node_id1, std::size_t node_id2) + { + if (m_tm_ptr == nullptr) return false; + + for (vertex_descriptor v1 : m_node_on_vertex[node_id1]) + { + for (vertex_descriptor v2 : m_node_on_vertex[node_id2]) + { + //vertex-vertex case + std::pair< halfedge_descriptor, bool > res = + halfedge(v1, v2, *m_tm_ptr); + if (res.second && is_border_edge(res.first, *m_tm_ptr)) + return true; + } + for (halfedge_descriptor h2 : m_node_on_edge[node_id2]) + { + // vertex-edge case + if ( (source(h2, *m_tm_ptr)==v1 || target(h2, *m_tm_ptr)==v1) + && is_border_edge(h2, *m_tm_ptr) ) + { + return true; + } + } + } + + for (halfedge_descriptor h1 : m_node_on_edge[node_id1]) + { + if (!is_border_edge(h1, *m_tm_ptr)) continue; + for (vertex_descriptor v2 : m_node_on_vertex[node_id2]) + { + // edge-vertex case + if (source(h1, *m_tm_ptr)==v2 || target(h1, *m_tm_ptr)==v2) + return true; + } + for (halfedge_descriptor h2 : m_node_on_edge[node_id2]) + { + if (h1==h2 || h1==opposite(h2, *m_tm_ptr)) + return true; + } + } + + return false; + } + +public: + + void preprocessing(){} + + void node_on_vertex(Node_id node_id, vertex_descriptor v, const TriangleMesh& tm) + { + m_node_on_vertex[node_id].push_back(v); + + //we turn around the hedge and check no halfedge is a border halfedge + for(halfedge_descriptor hc :halfedges_around_target(halfedge(v,tm),tm)) + if ( is_border_edge(hc,tm) ) + { + m_is_node_on_boundary.set(node_id); + return; + } + } + + void node_on_edge(Node_id node_id, halfedge_descriptor h, const TriangleMesh& tm) + { + if ( is_border_edge(h,tm) ) + m_is_node_on_boundary.set(node_id); + m_node_on_edge[node_id].push_back(h); + + } + + void new_node(Node_id node_id, const TriangleMesh& tm) + { + m_is_node_on_boundary.resize(node_id+1, false); + m_tm_ptr = const_cast(&tm); + m_node_on_edge.resize(node_id+1); + m_node_on_vertex.resize(node_id+1); + } + + bool is_terminal(Node_id node_id, const std::vector& neighbor_nodes) + { + if ( m_is_node_on_boundary.test(node_id) && neighbor_nodes.size()==2) + { + std::size_t nn1 = neighbor_nodes[0], nn2 = neighbor_nodes[1]; + + return is_on_border(node_id, nn1) != is_on_border(node_id, nn2); + } + return false; + } +}; + // A visitor for Intersection_of_triangle_meshes that can be used to corefine // two meshes template< class TriangleMesh, @@ -157,11 +397,8 @@ private: typedef typename CDT::Vertex_handle CDT_Vertex_handle; // data members private: - boost::dynamic_bitset<> is_node_on_boundary; // indicate if a vertex is a border vertex in tm1 or tm2 - boost::container::flat_map > node_on_vertex_map; - boost::container::flat_map > node_on_edge_map; - + Graph_node_classifier graph_node_classifier; std::vector< std::vector > graph_of_constraints; boost::dynamic_bitset<> is_node_of_degree_one; //nb of intersection points between coplanar faces, see fixes XSL_TAG_CPL_VERT @@ -287,60 +524,6 @@ public: } } - bool is_on_border(std::size_t node_id1, std::size_t node_id2, - const std::vector* node_on_vertex_ptr, - const std::vector* node_on_edge_ptr, - TriangleMesh* tm_ptr) - { - if (tm_ptr == nullptr) return false; - - if (node_on_vertex_ptr!=nullptr) - { - if ( (*node_on_vertex_ptr)[node_id1] != Graph_traits::null_vertex() ) - { - if ( (*node_on_vertex_ptr)[node_id2] != Graph_traits::null_vertex() ) - { - std::pair< halfedge_descriptor, bool > res = - halfedge((*node_on_vertex_ptr)[node_id1], - (*node_on_vertex_ptr)[node_id2], - *tm_ptr); - CGAL_assertion(res.second); - return res.second && is_border_edge(res.first, *tm_ptr); - } - if (node_on_edge_ptr!=nullptr) - { - halfedge_descriptor h = (*node_on_edge_ptr)[node_id2]; - if (h != Graph_traits::null_halfedge()) - { - return ( source(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id1] || - target(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id1] ) - && is_border_edge(h, *tm_ptr); - } - return false; - } - } - } - - if (node_on_edge_ptr!=nullptr) - { - halfedge_descriptor h = (*node_on_edge_ptr)[node_id1]; - if (h != Graph_traits::null_halfedge()) - { - if ( node_on_vertex_ptr!=nullptr && - (*node_on_vertex_ptr)[node_id2] != Graph_traits::null_vertex() ) - { - return ( source(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id2] || - target(h, *tm_ptr)==(*node_on_vertex_ptr)[node_id2] ) - && is_border_edge(h, *tm_ptr); - } - halfedge_descriptor h_bis = (*node_on_edge_ptr)[node_id2]; - if (h_bis != Graph_traits::null_halfedge()) - return h==h_bis || h==opposite(h_bis, *tm_ptr); - } - } - return false; - } - template void annotate_graph(std::vector& graph) { @@ -348,35 +531,8 @@ public: graph_of_constraints.resize(nb_nodes); is_node_of_degree_one.resize(nb_nodes); //TODO: pas bon avec autoref et la collecte des infos aussi... - TriangleMesh* tm1_ptr = nullptr; - const std::vector* node_on_vertex_1_ptr = nullptr; - const std::vector* node_on_edge_1_ptr = nullptr; - TriangleMesh* tm2_ptr = nullptr; - const std::vector* node_on_vertex_2_ptr = nullptr; - const std::vector* node_on_edge_2_ptr = nullptr; - - boost::container::flat_set mesh_ptrs; - mesh_ptrs.reserve(2); - for (const auto& k_v : node_on_vertex_map) mesh_ptrs.insert(k_v.first); - for (const auto& k_v : node_on_edge_map) mesh_ptrs.insert(k_v.first); - - if (!mesh_ptrs.empty()) - { - tm1_ptr=*mesh_ptrs.begin(); - auto itv = node_on_vertex_map.find(tm1_ptr); - if (itv != node_on_vertex_map.end()) node_on_vertex_1_ptr= &(itv->second); - auto ite = node_on_edge_map.find(tm1_ptr); - if (ite != node_on_edge_map.end()) node_on_edge_1_ptr= &(ite->second); - if (mesh_ptrs.size()==2) - { - tm2_ptr=*std::next(mesh_ptrs.begin()); - itv = node_on_vertex_map.find(tm2_ptr); - if (itv != node_on_vertex_map.end()) node_on_vertex_2_ptr= &(itv->second); - ite = node_on_edge_map.find(tm2_ptr); - if (ite != node_on_edge_map.end()) node_on_edge_2_ptr= &(ite->second); - } - } + graph_node_classifier.preprocessing(); for(std::size_t node_id=0;node_id(&tm)][node_id] = h; + graph_node_classifier.node_on_edge(node_id, h, tm); } void check_node_on_boundary_vertex_case(std::size_t node_id, halfedge_descriptor h, const TriangleMesh& tm) { - node_on_vertex_map[const_cast(&tm)][node_id] = target(h,tm); - - //we turn around the hedge and check no halfedge is a border halfedge - for(halfedge_descriptor hc :halfedges_around_target(h,tm)) - if ( is_border_edge(hc,tm) ) - { - is_node_on_boundary.set(node_id); - return; - } + graph_node_classifier.node_on_vertex(node_id, target(h,tm), tm); } //keep track of the fact that a polyhedron original vertex is a node @@ -486,15 +620,13 @@ public: const TriangleMesh& tm) // TODO check if we need a special case if the endpoint of the intersect edge is on the third face { CGAL_assertion(f1!=f2 && f1!=f3 && f2!=f3); - is_node_on_boundary.resize(node_id+1, false); - TriangleMesh* tm_ptr = const_cast(&tm); - node_on_edge_map[tm_ptr].resize(node_id+1, Graph_traits::null_halfedge()); - node_on_vertex_map[tm_ptr].resize(node_id+1, Graph_traits::null_vertex()); + graph_node_classifier.new_node(node_id, tm); // user_visitor.new_node_added_triple_face(node_id, f1, f2, f3, tm); // NODE_VISITOR_TAG #ifdef CGAL_DEBUG_AUTOREFINEMENT std::cout << "adding node " << node_id << " " << f1 << " " << f2 << " " << f3 << "\n"; #endif + TriangleMesh* tm_ptr = const_cast(&tm); on_face[tm_ptr][f1].push_back(node_id); on_face[tm_ptr][f2].push_back(node_id); on_face[tm_ptr][f3].push_back(node_id); @@ -509,15 +641,10 @@ public: bool is_target_coplanar, bool is_source_coplanar) { - is_node_on_boundary.resize(node_id+1, false); - TriangleMesh* tm1_ptr = const_cast(&tm1); TriangleMesh* tm2_ptr = const_cast(&tm2); - - node_on_edge_map[tm1_ptr].resize(node_id+1, Graph_traits::null_halfedge()); - node_on_vertex_map[tm1_ptr].resize(node_id+1, Graph_traits::null_vertex()); - node_on_edge_map[tm2_ptr].resize(node_id+1, Graph_traits::null_halfedge()); - node_on_vertex_map[tm2_ptr].resize(node_id+1, Graph_traits::null_vertex()); + graph_node_classifier.new_node(node_id, *tm1_ptr); + graph_node_classifier.new_node(node_id, *tm2_ptr); //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 From 2e24249f13e0b474ff0b7e61a4a3285edb60f899 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 4 Dec 2020 16:44:22 +0000 Subject: [PATCH 112/317] Triangulation_2: Change the result type of the Intersect_2 functor --- .../CGAL/internal/Projection_traits_3.h | 27 +++++++++---- .../ConstrainedTriangulationTraits_2.h | 3 +- .../CGAL/Constrained_triangulation_2.h | 38 ++++++++++++------- 3 files changed, 44 insertions(+), 24 deletions(-) diff --git a/Kernel_23/include/CGAL/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h index ec721a715ee..a579c4beedd 100644 --- a/Kernel_23/include/CGAL/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -308,8 +308,13 @@ public: return (CGAL::abs(dx)>CGAL::abs(dy)) ? ( p.x()-source.x() ) / dx : (p.y()-source.y() ) / dy; } - Object operator()(const Segment_3& s1, const Segment_3& s2) const + + + boost::optional< boost::variant > + operator()(const Segment_3& s1, const Segment_3& s2) const { + typedef boost::variant variant_type; + Point_2 s1_source = project(s1.source()); Point_2 s1_target = project(s1.target()); Point_2 s2_source = project(s2.source()); @@ -321,11 +326,14 @@ public: //compute intersection points in projected plane //We know that none of the segment is degenerate - Object o = intersection(s1_2,s2_2); - const Point_2* pi=CGAL::object_cast(&o); - if (pi==nullptr) { //case of segment or empty - const Segment_2* si=CGAL::object_cast(&o); - if (si==nullptr) return Object(); + + CGAL::cpp11::result_of::type + o = intersection(s1_2,s2_2); + if(! 0){ + return boost::none; + } + + if(const Segment_2* si = boost::get(&*o)){ FT src[3],tgt[3]; //the third coordinate is the midpoint between the points on s1 and s2 FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -343,8 +351,11 @@ public: src[Projector::y_index] = si->source().y(); tgt[Projector::x_index] = si->target().x(); tgt[Projector::y_index] = si->target().y(); - return make_object( Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ); + return boost::make_optional(variant_type(Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ) ); } + + + const Point_2* pi = boost::get(&*o); FT coords[3]; //compute the third coordinate of the projected intersection point onto 3D segments FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -356,7 +367,7 @@ public: Point_3 res(coords[0],coords[1],coords[2]); CGAL_assertion(x(res)==pi->x() && y(res)==pi->y()); - return make_object(res); + return boost::make_optional(variant_type(res)); } }; diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h index 0a26f8ee02d..eae059ac51e 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationTraits_2.h @@ -39,7 +39,7 @@ public: /*! A function object whose `operator()` computes the intersection of two segments. -`Object_2 operator()(Segment_2 s1, Segment_2 s2);` +`boost:optional > operator()(Segment_2 s1, Segment_2 s2);` Returns the intersection of `s1` and `s2`. */ typedef unspecified_type Intersect_2; @@ -113,4 +113,3 @@ compute_squared_distance_2_object(); /// @} }; /* end ConstrainedTriangulationTraits_2 */ - diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 1ec49ab1581..1d337cd3aaf 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -1710,23 +1710,33 @@ compute_intersection(const Gt& gt, const typename Gt::Point_2& pd, typename Gt::Point_2& pi) { - typename Gt::Intersect_2 compute_intersec=gt.intersect_2_object(); - typename Gt::Construct_segment_2 - construct_segment=gt.construct_segment_2_object(); - Object result = compute_intersec(construct_segment(pa,pb), - construct_segment(pc,pd)); + typedef typename Gt::Point_2 Point_2; + typedef typename Gt::Segment_2 Segment_2; + typename Gt::Intersect_2 compute_intersec = gt.intersect_2_object(); + typename Gt::Construct_segment_2 construct_segment = gt.construct_segment_2_object(); + + auto // CGAL::cpp11::result_of::type + result = compute_intersec(construct_segment(pa,pb), + construct_segment(pc,pd)); + + #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS - typename Gt::Segment_2 s; - if(assign(s, result)) { - std::cerr << CGAL::internal::cdt_2_indent_level - << "compute_intersection: " << s << '\n'; - } - if(assign(pi, result)) { - std::cerr << CGAL::internal::cdt_2_indent_level - << "compute_intersection: " << pi << '\n'; + if(result){ + if (const Segment_2* s = boost::get(&*result)){ + std::cerr << CGAL::internal::cdt_2_indent_level + << "compute_intersection: " << *s << '\n'; + }else if(const Point_2* p = boost::get(&*result)) + std::cerr << CGAL::internal::cdt_2_indent_level + << "compute_intersection: " << *p << '\n'; } #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS - return assign(pi, result); + if(result){ + if(const Point_2* p = boost::get(&*result)){ + pi = *p; + return true; + } + } + return false; } From 7314f83ac8f6289c28e77eb0e47ceeae04d54acc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Dec 2020 12:41:15 +0000 Subject: [PATCH 113/317] Fixes after comments by Laurent and Marc --- Kernel_23/include/CGAL/internal/Projection_traits_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel_23/include/CGAL/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h index a579c4beedd..eb94a85caf6 100644 --- a/Kernel_23/include/CGAL/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -327,9 +327,9 @@ public: //compute intersection points in projected plane //We know that none of the segment is degenerate - CGAL::cpp11::result_of::type + typename CGAL::cpp11::result_of::type o = intersection(s1_2,s2_2); - if(! 0){ + if(! o){ return boost::none; } From 4079954ee0d2eadba4d20d0fc5c0f62b4e5b8e71 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Dec 2020 16:27:21 +0000 Subject: [PATCH 114/317] Fix Triangulation_2_projection_traits_3 --- ...Triangulation_2_projection_traits_base_3.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h index 984d2381035..f5b8135a83d 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h @@ -185,7 +185,8 @@ public: CGAL_TIME_PROFILER("Construct Projected_intersect_3") } - Object operator()(const Segment& s1, const Segment& s2) + boost::optional > + operator()(const Segment& s1, const Segment& s2) { CGAL_PROFILER("Projected_intersect_3::operator()") CGAL_TIME_PROFILER("Projected_intersect_3::operator()") @@ -200,12 +201,12 @@ public: const Plane_3 plane_1(s1.source(), u1); const Plane_3 plane_2(s2.source(), u2); - Object planes_intersection = intersection(plane_1, plane_2); - if(planes_intersection.empty()) { + auto planes_intersection = intersection(plane_1, plane_2); + if(! planes_intersection) { std::cerr << "planes_intersection is empty\n"; - return planes_intersection; + return boost::none; } - if(const Line* line = object_cast(&planes_intersection)) + if(const Line* line = boost::get(&*planes_intersection)) { const Point& pi = line->point(0); if(cross_product(normal, pi - s1.source()) @@ -216,7 +217,7 @@ public: { // the intersection of the lines is not inside the segments std::cerr << "intersection not inside\n"; - return Object(); + return boost::none; } else { @@ -228,13 +229,13 @@ public: s2.to_vector()))); } } - if(object_cast(&planes_intersection)) + if(boost::get(&*planes_intersection)) { std::cerr << "coplanar lines\n"; CGAL_error(); - return Object(); + return boost::none; } - return Object(); + return boost::none; } }; // end class Projected_intersect_3 From 31037aa014052938766512102ef0cb1aadb9465d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Dec 2020 16:48:19 +0000 Subject: [PATCH 115/317] Fix Triangulation_2_projection_traits_3 --- .../Triangulation_2_projection_traits_base_3.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h index f5b8135a83d..04ae968671e 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h @@ -224,9 +224,16 @@ public: // Let the plane passing through s1.source() and with normal // the cross product of s1.to_vector() and s2.to_vector(). That // plane should intersect *l, now. - return intersection(*line, Plane_3(s1.source(), - cross_product(s1.to_vector(), - s2.to_vector()))); + auto inter = intersection(*line, Plane_3(s1.source(), + cross_product(s1.to_vector(), + s2.to_vector()))); + if(! inter){ + return boost::none; + } + if(const Point* point = boost::get(&*inter)){ + typedef boost::variant variant_type; + return boost::make_optional(variant_type(*point)); + } } } if(boost::get(&*planes_intersection)) From f3330b91d6e23dc7504b61df7c81b7828eab7972 Mon Sep 17 00:00:00 2001 From: Raphael Grimm Date: Fri, 18 Dec 2020 08:59:24 +0100 Subject: [PATCH 116/317] Add move ctor and move assign to Side_of_triangle_mesh --- .../include/CGAL/Side_of_triangle_mesh.h | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) 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 151f8d4e805..4a9415de26d 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -181,6 +181,27 @@ public: box = tree.bbox(); } +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + /** + * Constructor moving an instance of Side_of_triangle_mesh to a new memory + * location with minimal memory copy. + * @param other The instance to be moved + */ + Side_of_triangle_mesh(Side_of_triangle_mesh&& other) : + tm_ptr{other.tm_ptr}, + opt_vpm{std::move(other.opt_vpm)}, + own_tree{other.own_tree}, + box{other.box}, + #ifdef CGAL_HAS_THREADS + atomic_tree_ptr{other.atomic_tree_ptr.load()} + #else + tree_ptr{other.tree_ptr} + #endif + { + other.own_tree = false; + } +#endif + ~Side_of_triangle_mesh() { if (own_tree) @@ -192,6 +213,29 @@ public: } public: +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + /** + * Assign operator moving an instance of Side_of_triangle_mesh to this + * location with minimal memory copy. + * @param other The instance to be moved + * @return A reference to this + */ + Side_of_triangle_mesh& operator=(Side_of_triangle_mesh&& other) + { + tm_ptr = other.tm_ptr; + opt_vpm = std::move(other.opt_vpm); + own_tree = other.own_tree; + box = other.box; + other.own_tree = false; + #ifdef CGAL_HAS_THREADS + atomic_tree_ptr = atomic_tree_ptr.load(); + #else + tree_ptr = other.tree_ptr; + #endif + return *this; + } +#endif + /** * returns the location of a query point * @param point the query point to be located with respect to the input From 7bd2923bc3f371736429e929f80a7a456d75a70f Mon Sep 17 00:00:00 2001 From: Raphael Grimm Date: Fri, 18 Dec 2020 10:31:18 +0100 Subject: [PATCH 117/317] Remove BOOST_NO_CXX11_RVALUE_REFERENCES --- Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h | 4 ---- 1 file changed, 4 deletions(-) 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 4a9415de26d..c2353ca813b 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -181,7 +181,6 @@ public: box = tree.bbox(); } -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES /** * Constructor moving an instance of Side_of_triangle_mesh to a new memory * location with minimal memory copy. @@ -200,7 +199,6 @@ public: { other.own_tree = false; } -#endif ~Side_of_triangle_mesh() { @@ -213,7 +211,6 @@ public: } public: -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES /** * Assign operator moving an instance of Side_of_triangle_mesh to this * location with minimal memory copy. @@ -234,7 +231,6 @@ public: #endif return *this; } -#endif /** * returns the location of a query point From c395a5d3f765ebedd29c4de930a0522bfb4d3aa3 Mon Sep 17 00:00:00 2001 From: Raphael Grimm Date: Fri, 18 Dec 2020 10:54:42 +0100 Subject: [PATCH 118/317] Add std::move to all members --- .../include/CGAL/Side_of_triangle_mesh.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 c2353ca813b..08dd5262afe 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -187,14 +187,14 @@ public: * @param other The instance to be moved */ Side_of_triangle_mesh(Side_of_triangle_mesh&& other) : - tm_ptr{other.tm_ptr}, + tm_ptr{std::move(other.tm_ptr)}, opt_vpm{std::move(other.opt_vpm)}, - own_tree{other.own_tree}, - box{other.box}, + own_tree{std::move(other.own_tree)}, + box{std::move(other.box)}, #ifdef CGAL_HAS_THREADS atomic_tree_ptr{other.atomic_tree_ptr.load()} #else - tree_ptr{other.tree_ptr} + tree_ptr{std::move(other.tree_ptr)} #endif { other.own_tree = false; @@ -219,15 +219,15 @@ public: */ Side_of_triangle_mesh& operator=(Side_of_triangle_mesh&& other) { - tm_ptr = other.tm_ptr; + tm_ptr = std::move(other.tm_ptr); opt_vpm = std::move(other.opt_vpm); - own_tree = other.own_tree; - box = other.box; + own_tree = std::move(other.own_tree); + box = std::move(other.box); other.own_tree = false; #ifdef CGAL_HAS_THREADS atomic_tree_ptr = atomic_tree_ptr.load(); #else - tree_ptr = other.tree_ptr; + tree_ptr = std::move(other.tree_ptr); #endif return *this; } From 4b5e25893aa31d0299ab89b8cc16aff18c7e9450 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 18 Dec 2020 16:04:36 +0100 Subject: [PATCH 119/317] If there is only one patch, let the user chose its color for the tests --- Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp | 17 ++++++++++++++--- Polyhedron/demo/Polyhedron/Scene_c3t3_item.h | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index ed1fd56a3ec..3aaf96e21c3 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -102,8 +102,12 @@ public : } void setColor(QColor c) Q_DECL_OVERRIDE { - qobject_cast(this->parent())->setColor(c); + Scene_c3t3_item* p_item = qobject_cast(this->parent()); + if(p_item->number_of_patches() > 1) + p_item->setColor(c); Scene_item::setColor(c); + if(p_item->number_of_patches() <= 1) + p_item->changed(); } // Indicates if rendering mode is supported bool supportsRenderingMode(RenderingMode m) const Q_DECL_OVERRIDE{ @@ -1308,7 +1312,11 @@ void Scene_c3t3_item_priv::computeIntersection(const Primitive& cell) typedef unsigned char UC; Tr::Cell_handle ch = cell.id(); - QColor c = this->colors_subdomains[ch->subdomain_index()].lighter(50); + QColor c; + if(surface_patch_indices_.size()>1) + c = this->colors_subdomains[ch->subdomain_index()].lighter(50); + else + c = intersection->color(); const Tr::Bare_point& pa = wp2p(ch->vertex(0)->point()); const Tr::Bare_point& pb = wp2p(ch->vertex(1)->point()); @@ -2117,6 +2125,9 @@ 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; } - +std::size_t Scene_c3t3_item::number_of_patches() const +{ + return d->surface_patch_indices_.size(); +} #include "Scene_c3t3_item.moc" diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h index d71d906fce3..7d5e343ded0 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h @@ -128,6 +128,7 @@ public: float getShrinkFactor() const; bool keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE; + std::size_t number_of_patches() const; public Q_SLOTS: void on_spheres_color_changed(); From 695ff0f3b316ded9725b9b6ebc145bc4d88c6887 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 5 Jan 2021 15:39:06 +0000 Subject: [PATCH 120/317] Fix doc of Projection_traits_xy_3 --- Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h index 56b476d9735..63759e8c3ba 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h @@ -77,7 +77,7 @@ typedef Line_3 Line_2; A construction object. Provides the operator : -`Object_2 operator()(Segment_2 s1, Segment_2 s2);` +`boost::optional< boost::variant > operator()(Segment_2 s1, Segment_2 s2);` which returns a 3D object whose projection on the xy-plane is the intersection of the projections of `s1` and `s2`. If non empty, the returned object is either a segment or a point. From 1e249afdb39cfc718b7983f262bc7a3a11862a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Nov 2020 19:21:21 +0100 Subject: [PATCH 121/317] remove some boost::bind --- AABB_tree/include/CGAL/AABB_traits.h | 7 +- Generator/include/CGAL/random_convex_set_2.h | 8 +- .../include/CGAL/sorted_matrix_search.h | 73 ++++++++----------- .../sorted_matrix_search_test.cpp | 2 + .../Straight_skeleton_builder_2_impl.h | 5 +- .../include/CGAL/Triangulation_3.h | 17 +---- 6 files changed, 43 insertions(+), 69 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index 470420162a7..613d08c174b 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -26,7 +26,6 @@ #include #include -#include /// \file AABB_traits.h @@ -274,13 +273,13 @@ public: switch(Traits::longest_axis(bbox)) { case AT::CGAL_AXIS_X: // sort along x - std::nth_element(first, middle, beyond, boost::bind(Traits::less_x,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_x(p1, p2, this->m_traits); }); break; case AT::CGAL_AXIS_Y: // sort along y - std::nth_element(first, middle, beyond, boost::bind(Traits::less_y,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_y(p1, p2, this->m_traits); }); break; case AT::CGAL_AXIS_Z: // sort along z - std::nth_element(first, middle, beyond, boost::bind(Traits::less_z,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_z(p1, p2, this->m_traits); }); break; default: CGAL_error(); diff --git a/Generator/include/CGAL/random_convex_set_2.h b/Generator/include/CGAL/random_convex_set_2.h index a118503b4c3..56313839e55 100644 --- a/Generator/include/CGAL/random_convex_set_2.h +++ b/Generator/include/CGAL/random_convex_set_2.h @@ -23,7 +23,6 @@ #include #include #include -#include namespace CGAL { @@ -80,7 +79,7 @@ random_convex_set_2( std::size_t n, points.begin(), points.end(), points.begin(), - boost::bind2nd( Sum(), scale( centroid, FT( -1)))); + [¢roid, &sum, &scale](const Point_2& p) { return sum(p, scale(centroid, FT( -1))); }); // sort them according to their direction's angle // w.r.t. the positive x-axis: @@ -102,8 +101,7 @@ random_convex_set_2( std::size_t n, points.begin(), points.end(), points.begin(), - boost::bind2nd( Sum(), sum( centroid, - scale( new_centroid, FT( -1))))); + [¢roid, &sum, &scale](const Point_2& p) { return sum(p, scale(centroid, FT( -1))); }); // compute maximal coordinate: FT maxcoord( max_coordinate( @@ -118,7 +116,7 @@ random_convex_set_2( std::size_t n, points.begin(), points.end(), o, - boost::bind2nd( Scale(), FT( pg.range()) / maxcoord)); + [&pg, &maxcoord, &scale](const Point_2& p){ return scale(p, FT( pg.range()) / maxcoord); }); } // random_convex_set_2( n, o, pg, t) diff --git a/Matrix_search/include/CGAL/sorted_matrix_search.h b/Matrix_search/include/CGAL/sorted_matrix_search.h index 8d2cf105ffb..dd21234b4f5 100644 --- a/Matrix_search/include/CGAL/sorted_matrix_search.h +++ b/Matrix_search/include/CGAL/sorted_matrix_search.h @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -254,10 +253,10 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) std::nth_element(active_cells.begin(), active_cells.begin() + upper_median_rank, active_cells.end(), - boost::bind( - t.compare_strictly(), - boost::bind(Cell_min(), _1), - boost::bind(Cell_min(), _2))); + [&t](const Cell& c1, const Cell& c2) + { + return t.compare_strictly()(Cell_min()(c1), Cell_min()(c2)); + }); Cell_iterator lower_median_cell = active_cells.begin() + upper_median_rank; @@ -267,10 +266,10 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) std::nth_element(active_cells.begin(), active_cells.begin() + lower_median_rank, active_cells.end(), - boost::bind( - t.compare_strictly(), - boost::bind(Cell_max< Cell >(ccd), _1), - boost::bind(Cell_max< Cell >(ccd), _2))); + [&t, &ccd](const Cell& c1, const Cell& c2) + { + return t.compare_strictly()(Cell_max< Cell >(ccd)(c1), Cell_max< Cell >(ccd)(c2)); + }); Cell_iterator upper_median_cell = active_cells.begin() + lower_median_rank; @@ -282,10 +281,10 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) lower_median_cell = find_if(active_cells.begin(), active_cells.end(), - boost::bind( - equal_to< Value >(), - lower_median, - boost::bind(Cell_min< Cell >(), _1))); + [&lower_median](const Cell& c) + { + return equal_to< Value >()(lower_median, Cell_min< Cell >()(c)); + }); CGAL_optimisation_assertion(lower_median_cell != active_cells.end()); // ------------------------------------------------------ // test feasibility of medians and remove cells accordingly: @@ -318,10 +317,10 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) remove_if( active_cells.begin() + 1, active_cells.end(), - boost::bind( - t.compare_non_strictly(), - min_median, - boost::bind(Cell_min< Cell >(), _1))); + [&t, &min_median](const Cell& c) + { + return t.compare_non_strictly()(min_median, Cell_min< Cell >()(c)); + }); } // lower_median and upper_median are feasible else { // lower_median is feasible, but upper_median is not @@ -337,16 +336,11 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) remove_if( active_cells.begin() + 1, active_cells.end(), - boost::bind( - logical_or< bool >(), - boost::bind( - t.compare_non_strictly(), - lower_median, - boost::bind(Cell_min< Cell >(), _1)), - boost::bind( - t.compare_non_strictly(), - boost::bind(Cell_max< Cell >( ccd), _1), - upper_median))); + [&t, &lower_median, &upper_median, &ccd](const Cell& c) + { + return t.compare_non_strictly()(lower_median, Cell_min< Cell >()(c)) || + t.compare_non_strictly()(Cell_max< Cell >(ccd)(c), upper_median); + }); } // lower_median is feasible, but upper_median is not else @@ -364,16 +358,11 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) remove_if( active_cells.begin() + 1, active_cells.end(), - boost::bind( - logical_or< bool >(), - boost::bind( - t.compare_non_strictly(), - upper_median, - boost::bind(Cell_min< Cell >(), _1)), - boost::bind( - t.compare_non_strictly(), - boost::bind(Cell_max< Cell >( ccd), _1), - lower_median))); + [&t, &lower_median, &upper_median, &ccd](const Cell& c) + { + return t.compare_non_strictly()(upper_median, Cell_min()(c)) || + t.compare_non_strictly()(Cell_max(ccd)(c),lower_median); + }); } // upper_median is feasible, but lower_median is not else { // both upper_median and lower_median are infeasible @@ -385,11 +374,11 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) remove_if( active_cells.begin(), active_cells.end(), - boost::bind( - t.compare_non_strictly(), - boost::bind(Cell_max< Cell >( ccd), _1), - max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median))); - + [&t, &ccd, &lower_median, &upper_median](const Cell& c) + { + return t.compare_non_strictly()(Cell_max( ccd)(c), + max BOOST_PREVENT_MACRO_SUBSTITUTION ( lower_median, upper_median)); + }); } // both upper_median and lower_median are infeasible active_cells.erase( new_end, active_cells.end()); diff --git a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp index af9d062c74f..999babe16fd 100644 --- a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp +++ b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp @@ -16,6 +16,8 @@ #include #include +#include + template < class Matrix_iterator, class Value > Value compute_upper_bound( Matrix_iterator f, diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index e2936def38a..5adacb71a4f 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -17,7 +17,6 @@ #include #include -#include #include #include #if BOOST_VERSION == 106000 @@ -2018,12 +2017,12 @@ bool Straight_skeleton_builder_2::FinishUp() std::for_each( mSplitNodes.begin() ,mSplitNodes.end () - ,boost::bind(&Straight_skeleton_builder_2::MergeSplitNodes,this,_1) + ,[this](Vertex_handle_pair p){ this->MergeSplitNodes(p); } ) ; std::for_each( mDanglingBisectors.begin() ,mDanglingBisectors.end () - ,boost::bind(&Straight_skeleton_builder_2::EraseBisector,this,_1) + ,[this](Halfedge_handle db){ this->EraseBisector(db); } ) ; // MergeCoincidentNodes() locks all extremities of halfedges that have a vertex involved in a multinode. diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 4e4c5606545..df69bf1f1b6 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -53,7 +53,6 @@ #include #include -#include #include #include #include @@ -7294,22 +7293,10 @@ operator==(const Triangulation_3& t1, std::vector V2 (t2.points_begin(), t2.points_end()); std::sort(V1.begin(), V1.end(), - boost::bind( - cmp1, - boost::bind< - typename boost::result_of::type>(cp, _1), - boost::bind< - typename boost::result_of::type>(cp, _2)) - == SMALLER); + [&cmp1, &cp](const Point& p1, const Point& p2){ return cmp1(cp(p1), cp(p2))==SMALLER; }); std::sort(V2.begin(), V2.end(), - boost::bind( - cmp2, - boost::bind< - typename boost::result_of::type>(cp, _1), - boost::bind< - typename boost::result_of::type>(cp, _2)) - == SMALLER); + [&cmp2, &cp](const Point& p1, const Point& p2){ return cmp2(cp(p1), cp(p2))==SMALLER; }); return V1 == V2; } From c4ad713b9ef080d8c376489a1bba6e12c98c3446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 11:40:22 +0100 Subject: [PATCH 122/317] replace bind in Convex_hull_2 --- .../Convex_hull_2/ch_graham_anderson.cpp | 3 +- .../Convex_hull_2/ch_akl_toussaint_impl.h | 7 ++-- .../CGAL/Convex_hull_2/ch_bykat_impl.h | 33 +++++++++++-------- .../include/CGAL/Convex_hull_2/ch_eddy_impl.h | 19 +++++++---- .../CGAL/Convex_hull_2/ch_jarvis_impl.h | 7 ++-- 5 files changed, 41 insertions(+), 28 deletions(-) diff --git a/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp b/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp index bc98d8c91ed..cc50d5f5c1b 100644 --- a/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp +++ b/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp @@ -2,7 +2,6 @@ #include #include #include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; @@ -23,7 +22,7 @@ ch_graham_anderson( InputIterator first, InputIterator beyond, std::vector< Point_2 > V (first, beyond); typename std::vector< Point_2 >::iterator it = std::min_element(V.begin(), V.end(), Less_xy_2()); - std::sort( V.begin(), V.end(), boost::bind(Less_rotate_ccw_2(), *it, _1, _2) ); + std::sort( V.begin(), V.end(), [it](const Point_2& p1, const Point_2& p2){return Less_rotate_ccw_2()(*it, p1, p2);} ); if ( *(V.begin()) != *(V.rbegin()) ) { result = CGAL::ch_graham_andrew_scan( V.begin(), V.end(), result, ch_traits); diff --git a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h index c06435efcef..0fdc1a0367b 100644 --- a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h +++ b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -296,9 +295,11 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last, std::sort( std::next(region2.begin() ), region2.end(), ch_traits.less_xy_2_object() ); std::sort( std::next(region3.begin() ), region3.end(), - boost::bind(ch_traits.less_xy_2_object(), _2, _1) ); + [&ch_traits](const Point_2& p1, const Point_2& p2) + { return ch_traits.less_xy_2_object()(p2, p1); }); std::sort( std::next(region4.begin() ), region4.end(), - boost::bind(ch_traits.less_xy_2_object(), _2, _1) ); + [&ch_traits](const Point_2& p1, const Point_2& p2) + { return ch_traits.less_xy_2_object()(p2, p1); }); if (! equal_points(*w,*s) ) { diff --git a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h index 32334e4e7f9..0b4ae797fb3 100644 --- a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h +++ b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h @@ -26,7 +26,6 @@ #include #include #include -#include namespace CGAL { template @@ -77,18 +76,21 @@ ch_bykat(InputIterator first, InputIterator last, H.push_back( a ); L.push_back( P.begin() ); R.push_back( l = std::partition(P.begin(), P.end(), - boost::bind(left_turn, boost::cref(a), boost::cref(b), _1))); - r = std::partition( l, P.end(), boost::bind(left_turn, boost::cref(b), boost::cref(a), _1)); + [&left_turn, &a, &b](const Point_2& p){ return left_turn(a,b,p); }) ); + r = std::partition( l, P.end(), [&left_turn, &a, &b](const Point_2& p){ return left_turn(b,a,p); }); for (;;) { if ( l != r) { - Point_2 c = *std::min_element( l, r, boost::bind(less_dist, boost::cref(a), boost::cref(b), _1, _2)); + Point_2 c = *std::min_element( l, r, [&less_dist,&a,&b](const Point_2&p1, const Point_2& p2) + { return less_dist(a, b, p1, p2); }); H.push_back( b ); L.push_back( l ); - R.push_back( l = std::partition(l, r, boost::bind(left_turn, boost::cref(b), boost::cref(c), _1))); - r = std::partition(l, r, boost::bind(left_turn, boost::cref(c), boost::cref(a), _1)); + R.push_back( l = std::partition(l, r, [&left_turn,&c,&b](const Point_2&p) + { return left_turn(b, c, p); })); + r = std::partition(l, r, [&left_turn,&c,&a](const Point_2&p) + { return left_turn(c, a, p); }); b = c; } else @@ -173,8 +175,10 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, H.push_back( a ); L.push_back( Pbegin ); Left_turn_2 left_turn = ch_traits.left_turn_2_object(); - R.push_back( l = std::partition( Pbegin, Pend, boost::bind(left_turn, boost::cref(a), boost::cref(b), _1))); - r = std::partition( l, Pend, boost::bind(left_turn, boost::cref(b), boost::cref(a), _1)); + R.push_back( l = std::partition( Pbegin, Pend, [&left_turn,&a,&b](const Point_2&p) + { return left_turn(a, b, p); })); + r = std::partition( l, Pend, [&left_turn,&a,&b](const Point_2&p) + { return left_turn(b, a, p); }); Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); for (;;) @@ -183,11 +187,14 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, { if ( r-l > CGAL_ch_THRESHOLD ) { - Point_2 c = *std::min_element( l, r, boost::bind(less_dist, boost::cref(a), boost::cref(b), _1, _2)); + Point_2 c = *std::min_element( l, r, [&less_dist,&a,&b](const Point_2&p1, const Point_2& p2) + { return less_dist(a, b, p1, p2); }); H.push_back( b ); L.push_back( l ); - R.push_back( l = std::partition(l, r, boost::bind(left_turn, boost::cref(b), boost::cref(c), _1))); - r = std::partition(l, r, boost::bind(left_turn, boost::cref(c), boost::cref(a), _1)); + R.push_back( l = std::partition(l, r, [&left_turn,&c,&b](const Point_2&p) + { return left_turn(b, c, p); })); + r = std::partition(l, r, [&left_turn,&a,&c](const Point_2&p) + { return left_turn(c, a, p); }); b = c; } else @@ -201,8 +208,8 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, } else { - std::sort(std::next(l), r, - boost::bind(ch_traits.less_xy_2_object(), _2, _1) ); + std::sort(std::next(l), r, [&ch_traits](const Point_2&p1, const Point_2& p2) + { return ch_traits.less_xy_2_object()(p2, p1); }); } ch__ref_graham_andrew_scan(l, std::next(r), res, ch_traits); std::swap( a, *l); diff --git a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h index 2a7b29c2ddd..19df2467657 100644 --- a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h +++ b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h @@ -25,7 +25,6 @@ #include #include #include -#include namespace CGAL { @@ -45,7 +44,8 @@ ch__recursive_eddy(List& L, CGAL_ch_precondition( \ std::find_if(a_it, b_it, \ - boost::bind(left_turn, *b_it, *a_it, _1)) \ + [&left_turn, a_it, b_it](const Point_2& p) + { return left_turn(*b_it, *a_it, p); }) \ != b_it ); @@ -53,11 +53,14 @@ ch__recursive_eddy(List& L, Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); ListIterator c_it = std::min_element( f_it, b_it, // max before - boost::bind(less_dist, *a_it, *b_it, _1, _2)); + [&less_dist, a_it, b_it](const Point_2& p1, const Point_2& p2) + { return less_dist(*a_it, *b_it, p1, p2); }); Point_2 c = *c_it; - c_it = std::partition(f_it, b_it, boost::bind(left_turn, c, *a_it, _1)); - f_it = std::partition(c_it, b_it, boost::bind(left_turn, *b_it, c, _1)); + c_it = std::partition(f_it, b_it, [&left_turn, &c, a_it](const Point_2& p) + {return left_turn(c, *a_it, p);}); + f_it = std::partition(c_it, b_it, [&left_turn, &c, b_it](const Point_2& p) + {return left_turn(*b_it, c, p);}); c_it = L.insert(c_it, c); L.erase( f_it, b_it ); @@ -104,7 +107,8 @@ ch_eddy(InputIterator first, InputIterator last, L.erase(e); e = std::partition(L.begin(), L.end(), - boost::bind(left_turn, ep, wp, _1) ); + [&left_turn, &wp, &ep](const Point_2& p) + {return left_turn(ep, wp, p);} ); L.push_front(wp); e = L.insert(e, ep); @@ -112,7 +116,8 @@ ch_eddy(InputIterator first, InputIterator last, { ch__recursive_eddy( L, L.begin(), e, ch_traits); } - w = std::find_if( e, L.end(), boost::bind(left_turn, wp, ep, _1) ); + w = std::find_if( e, L.end(), [&left_turn, &wp, &ep](const Point_2& p) + { return left_turn(wp, ep, p); }); if ( w == L.end() ) { L.erase( ++e, L.end() ); diff --git a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h index c5d3309cbd0..65b2d1fc29c 100644 --- a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h +++ b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h @@ -24,7 +24,6 @@ #include #include #include -#include namespace CGAL { @@ -65,7 +64,8 @@ ch_jarvis_march(ForwardIterator first, ForwardIterator last, Point previous_point = start_p; ) ForwardIterator it = std::min_element( first, last, - boost::bind(rotation_predicate, boost::cref(start_p), _1, _2) ); + [&start_p, &rotation_predicate](const Point& p1, const Point& p2) + {return rotation_predicate(start_p, p1, p2);} ); while (! equal_points(*it, stop_p) ) { CGAL_ch_exactness_assertion( \ @@ -80,7 +80,8 @@ ch_jarvis_march(ForwardIterator first, ForwardIterator last, constructed_points <= count_points + 1 ); it = std::min_element( first, last, - boost::bind(rotation_predicate, *it, _1, _2) ); + [it, &rotation_predicate](const Point& p1, const Point& p2) + {return rotation_predicate(*it, p1, p2);} ); } CGAL_ch_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ From 4a27ff5bf6dbaca73e3b0249e84413fc7b2a26ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 11:53:50 +0100 Subject: [PATCH 123/317] remove bind in Surface_mesh --- .../examples/Surface_mesh/sm_do_intersect.cpp | 15 ++++----------- .../test/Surface_mesh/surface_mesh_test.cpp | 11 +++-------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Surface_mesh/examples/Surface_mesh/sm_do_intersect.cpp b/Surface_mesh/examples/Surface_mesh/sm_do_intersect.cpp index 69e3b2550ab..02a18d5bf45 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_do_intersect.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_do_intersect.cpp @@ -2,9 +2,6 @@ #include #include -#include -#include -#include #include #include #include @@ -87,16 +84,12 @@ unsigned int intersect(const Mesh& P, const Mesh& Q) { Q_box_ptr.reserve(Q.number_of_faces()); // build boxes and pointers to boxes - boost::transform(P.faces(), - std::back_inserter(P_boxes), - boost::bind(boost::value_factory(), _1, boost::cref(P))); - - + for(auto f : P.faces()) + P_boxes.push_back( Box(f, P) ); std::transform(P_boxes.begin(), P_boxes.end(), std::back_inserter(P_box_ptr), &address_of_box); - boost::transform(Q.faces(), - std::back_inserter(Q_boxes), - boost::bind(boost::value_factory(), _1, boost::cref(Q))); + for(auto f : Q.faces()) + Q_boxes.push_back( Box(f, Q) ); std::transform(Q_boxes.begin(), Q_boxes.end(), std::back_inserter(Q_box_ptr), &address_of_box); diff --git a/Surface_mesh/test/Surface_mesh/surface_mesh_test.cpp b/Surface_mesh/test/Surface_mesh/surface_mesh_test.cpp index ee0e71417de..949d2538bff 100644 --- a/Surface_mesh/test/Surface_mesh/surface_mesh_test.cpp +++ b/Surface_mesh/test/Surface_mesh/surface_mesh_test.cpp @@ -4,9 +4,6 @@ #include #include -#include -#include - #include void constructors_test() @@ -118,15 +115,13 @@ void memory_reuse_test() // remove all faces std::size_t old_face_size = f.m.number_of_faces(); std::size_t old_removed_face_size = f.m.number_of_removed_faces(); - boost::range::for_each(f.m.faces(), boost::bind(&Sm::remove_face, boost::ref(f.m), _1)); + for(auto face : f.m.faces()) f.m.remove_face(face); assert(f.m.number_of_faces()== 0); assert(f.m.number_of_removed_faces()== old_face_size + old_removed_face_size); // remove all edges std::size_t old_edge_size = f.m.number_of_edges(); std::size_t old_removed_edge_size = f.m.number_of_removed_edges(); - boost::range::for_each(f.m.edges(), - boost::bind(static_cast(&Sm::remove_edge), - boost::ref(f.m), _1)); + for(auto e : f.m.edges()) f.m.remove_edge(e); assert(f.m.number_of_faces() == 0); assert(f.m.number_of_removed_edges()== old_edge_size + old_removed_edge_size); @@ -151,7 +146,7 @@ void memory_reuse_test() std::size_t old_size = f.m.number_of_vertices(); std::size_t old_removed_size = f.m.number_of_removed_vertices(); - boost::range::for_each(f.m.vertices(), boost::bind(&Sm::remove_vertex, boost::ref(f.m), _1)); + for(auto v : f.m.vertices()) f.m.remove_vertex(v); assert(f.m.number_of_vertices() == 0); assert(f.m.number_of_removed_vertices()== old_size + old_removed_size); From 61d0fb53b4786360c1147a33b76e003170fae849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 12:06:20 +0100 Subject: [PATCH 124/317] replace bind in Convex_hull_3 --- Convex_hull_3/include/CGAL/convex_hull_3.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index 995c978abd8..cf35a6d78af 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -576,7 +575,8 @@ farthest_outside_point(Face_handle f, std::list& outside_set, Outside_set_iterator farthest_it = std::max_element(outside_set.begin(), outside_set.end(), - boost::bind(less_dist_to_plane, plane, _1, _2)); + [&less_dist_to_plane,&plane](const Point& p1, const Point& p2) + { return less_dist_to_plane(plane, p1, p2); }); return farthest_it; } @@ -795,8 +795,10 @@ ch_quickhull_face_graph(std::list& points, // plane. std::pair min_max; min_max = CGAL::min_max_element(points.begin(), points.end(), - boost::bind(compare_dist, plane, _1, _2), - boost::bind(compare_dist, plane, _1, _2)); + [&compare_dist, &plane](const Point_3& p1, const Point_3& p2) + { return compare_dist(plane, p1, p2); }, + [&compare_dist, &plane](const Point_3& p1, const Point_3& p2) + { return compare_dist(plane, p1, p2); }); P3_iterator max_it; if (coplanar(*point1_it, *point2_it, *point3_it, *min_max.second)) { @@ -929,8 +931,10 @@ convex_hull_3(InputIterator first, InputIterator beyond, Less_dist less_dist = traits.less_distance_to_point_3_object(); P3_iterator_pair endpoints = min_max_element(points.begin(), points.end(), - boost::bind(less_dist, *points.begin(), _1, _2), - boost::bind(less_dist, *points.begin(), _1, _2)); + [&points, &less_dist](const Point_3& p1, const Point_3& p2) + { return less_dist(*points.begin(), p1, p2); }, + [&points, &less_dist](const Point_3& p1, const Point_3& p2) + { return less_dist(*points.begin(), p1, p2); }); typename Traits::Construct_segment_3 construct_segment = traits.construct_segment_3_object(); @@ -1032,8 +1036,10 @@ void convex_hull_3(InputIterator first, InputIterator beyond, Less_dist less_dist = traits.less_distance_to_point_3_object(); P3_iterator_pair endpoints = min_max_element(points.begin(), points.end(), - boost::bind(less_dist, *points.begin(), _1, _2), - boost::bind(less_dist, *points.begin(), _1, _2)); + [&points, &less_dist](const Point_3& p1, const Point_3& p2) + { return less_dist(*points.begin(), p1, p2); }, + [&points, &less_dist](const Point_3& p1, const Point_3& p2) + { return less_dist(*points.begin(), p1, p2); }); Convex_hull_3::internal::add_isolated_points(*endpoints.first, polyhedron); Convex_hull_3::internal::add_isolated_points(*endpoints.second, polyhedron); return; From 0d16ef14c557a4d5ce949e6babe3c1ee6addc618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:35:11 +0100 Subject: [PATCH 125/317] replace bind in Arrangement_on_surface_2 --- .../gfx/Curve_renderer_internals.h | 11 ++--------- .../gfx/Curve_renderer_traits.h | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h index 984ea6170a6..37c15966a21 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h @@ -295,13 +295,6 @@ public: return y; } - //! \brief the same as \c evaluate but arguments are passed by value - //! (needed to substitute variables in bivariate polynomial) - inline static NT binded_eval(Poly_1 poly, NT x) - { - return evaluate(poly, x); - } - //! \brief evalutates a polynomial at certain x-coordinate static NT evaluate(const Poly_1& poly, const NT& x, bool *error_bounds_ = nullptr) @@ -914,9 +907,9 @@ void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly) if(not_cached||not_found) { poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), - boost::bind2nd(std::ptr_fun(binded_eval), key1)), + [&key1](Poly_1 poly){ return evaluate(poly, key1); }), ::boost::make_transform_iterator(coeffs->end(), - boost::bind2nd(std::ptr_fun(binded_eval), key1))); + [&key1](Poly_1 poly){ return evaluate(poly, key1); })); if(not_cached) return; // all available space consumed: drop the least recently used entry diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index 752389a0f35..01ecfd0bd6e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -110,8 +110,8 @@ struct Transform { Transform tr; return OutputPoly_2( - ::boost::make_transform_iterator(p.begin(), boost::bind2nd(tr, op)), - ::boost::make_transform_iterator(p.end(), boost::bind2nd(tr, op))); + ::boost::make_transform_iterator(p.begin(), [&op, &tr](const auto& v){ return tr(v, op); }), + ::boost::make_transform_iterator(p.end(), [&op, &tr](const auto& v){ return tr(v, op); })); } OutputPoly_2 operator()( From cef46c9ee6fbd090d1e81206f48694767c4bb4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:35:57 +0100 Subject: [PATCH 126/317] replace bind in STL_extension --- .../examples/STL_Extension/min_element_if_example.cpp | 3 +-- STL_Extension/test/STL_Extension/test_composition.cpp | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/STL_Extension/examples/STL_Extension/min_element_if_example.cpp b/STL_Extension/examples/STL_Extension/min_element_if_example.cpp index a2a98015533..32e43c1abfb 100644 --- a/STL_Extension/examples/STL_Extension/min_element_if_example.cpp +++ b/STL_Extension/examples/STL_Extension/min_element_if_example.cpp @@ -14,8 +14,7 @@ int main() std::cout << "min_odd = " << *CGAL::min_element_if(v.begin(), v.end(), - CGAL::compose1_1(boost::bind2nd(std::greater< int >(), 0), - boost::bind2nd(std::modulus< int >(), 2))) + [](int i){ return (i%2) > 0; }) << std::endl; return 0; } diff --git a/STL_Extension/test/STL_Extension/test_composition.cpp b/STL_Extension/test/STL_Extension/test_composition.cpp index c7deeaa56f0..a4d4c4d5d66 100644 --- a/STL_Extension/test/STL_Extension/test_composition.cpp +++ b/STL_Extension/test/STL_Extension/test_composition.cpp @@ -12,8 +12,6 @@ using CGAL::compose1_2; using CGAL::compose2_1; using CGAL::compose2_2; using CGAL::compare_to_less; -using boost::binder1st; -using boost::bind1st; using std::accumulate; using std::plus; using std::multiplies; @@ -31,8 +29,8 @@ int main() { plus< int > pl; multiplies< int > mu; - binder1st< plus< int > > op1 = bind1st(pl, 1); - binder1st< multiplies< int > > op2 = bind1st(mu, 2); + auto op1 = [](int i){ return i+1; }; + auto op2 = [](int i){ return i * 2; }; // compose1_2: int a[] = {3,5,7,2,4}; From 2eb990869998412575c294b96647a44684042554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:36:47 +0100 Subject: [PATCH 127/317] replace bind in Mesh_3 packages --- Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h | 3 +-- .../CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 954909113b6..d9ddc61e0bf 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -50,7 +50,6 @@ #include -#include #include #ifndef CGAL_NO_ASSERTIONS # include // for float_prior @@ -1879,7 +1878,7 @@ next_vertex_along_curve(const Vertex_handle& start, adjacent_vertices.erase (std::remove_if(adjacent_vertices.begin(), adjacent_vertices.end(), - boost::bind(&Adjacent_vertices::value_type::second, _1) != curve_index), + [curve_index](const auto& p){ return p.second != curve_index; }), adjacent_vertices.end()); CGAL_assertion(adjacent_vertices.size() == 2); diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index e27c762ed34..7a6078a3d1a 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -49,7 +49,6 @@ #include -#include #include #ifndef CGAL_NO_ASSERTIONS # include // for float_prior @@ -2892,7 +2891,7 @@ next_vertex_along_curve(const Vertex_handle& start, adjacent_vertices.erase (std::remove_if(adjacent_vertices.begin(), adjacent_vertices.end(), - boost::bind(&Adjacent_vertices::value_type::second, _1) != curve_index), + [curve_index](const auto& p){ return p.second != curve_index;}), adjacent_vertices.end()); // typename Adjacent_vertices::const_iterator iv = adjacent_vertices.begin(); From 24a5fdbaed1689ed0ab69881a4a17a6c7be3443d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:37:28 +0100 Subject: [PATCH 128/317] remove useless bind --- .../include/CGAL/Surface_mesher/Intersection_data_structure_3.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h index 52f158a2918..453d4db1212 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -144,7 +143,6 @@ public: void create_data_structure() { - using boost::bind; using boost::make_transform_iterator; max_width = CGAL_NTS max BOOST_PREVENT_MACRO_SUBSTITUTION From 2b61a993132c4f9615d2378021842139cb46b345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:38:16 +0100 Subject: [PATCH 129/317] replace bind in Polytope_distance_d --- Polytope_distance_d/include/CGAL/Polytope_distance_d.h | 5 ++--- Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h index 3f6a4b74f93..b52d1ca7219 100644 --- a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h +++ b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h @@ -665,9 +665,8 @@ private: check_dimension( InputIterator first, InputIterator last) { return ( std::find_if ( first, last, - CGAL::compose1_1 - ( boost::bind2nd(std::not_equal_to(), d), - tco.access_dimension_d_object())) + [this](const auto& o) + { return this->tco.access_dimension_d_object()(o) != this->d; }) == last); } // compute (squared) distance diff --git a/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h b/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h index ad05b31358a..d2927f43d6b 100644 --- a/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h +++ b/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h @@ -22,7 +22,6 @@ #include #include #include -#include namespace CGAL { template < class Operation, class RandomAccessIC > @@ -116,7 +115,7 @@ all_furthest_neighbors_2( RandomAccessIC points_begin, return transform(v.begin(), v.end(), o, - boost::bind(modulus(), _1, number_of_points)); + [number_of_points](int i){ return i % number_of_points;} ); } // all_furthest_neighbors_2( ... ) From 7d6f0491eed003cd2b6fa91900f4689c163ca53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:39:57 +0100 Subject: [PATCH 130/317] replace bind in matrix search --- Matrix_search/examples/Matrix_search/sorted_matrix_search.cpp | 2 +- .../test/Matrix_search/sorted_matrix_search_test.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Matrix_search/examples/Matrix_search/sorted_matrix_search.cpp b/Matrix_search/examples/Matrix_search/sorted_matrix_search.cpp index 6fce8f6dd10..a9c261a494c 100644 --- a/Matrix_search/examples/Matrix_search/sorted_matrix_search.cpp +++ b/Matrix_search/examples/Matrix_search/sorted_matrix_search.cpp @@ -38,7 +38,7 @@ int main() CGAL::sorted_matrix_search( &M, &M + 1, CGAL::sorted_matrix_search_traits_adaptor( - boost::bind2nd(std::greater_equal(), bound), M)); + [&bound](const auto& m){ return std::greater_equal()(m, bound); }, M)); std::cout << "Upper bound for " << bound << " is " << upper_bound << "." << std::endl; diff --git a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp index 999babe16fd..22b2e16b82d 100644 --- a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp +++ b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp @@ -16,8 +16,6 @@ #include #include -#include - template < class Matrix_iterator, class Value > Value compute_upper_bound( Matrix_iterator f, @@ -183,7 +181,7 @@ main( int argc, char* argv[]) matrices.begin(), matrices.end(), sorted_matrix_search_traits_adaptor( - boost::bind( greater_equal< Value >(), _1, bound), + [&bound](const auto& m){ return greater_equal< Value >()(m, bound); }, *(matrices.begin())))); #ifdef OUTPUT From d8d5f1de5bdb850d83b28a428c01a9a375ff80ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:41:11 +0100 Subject: [PATCH 131/317] replace bind in Inscribed_areas --- .../include/CGAL/Extremal_polygon_traits_2.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h b/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h index 64f3ac2dd1d..a85e9a76f47 100644 --- a/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h +++ b/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h @@ -19,7 +19,6 @@ #include #include #include -#include #include namespace CGAL { @@ -47,7 +46,7 @@ struct Extremal_polygon_area_traits_2 { }; typedef Kgon_triangle_area Baseop; - typedef boost::function2 Operation; + typedef std::function Operation; Extremal_polygon_area_traits_2() {} Extremal_polygon_area_traits_2(const K& k_) : k(k_) {} @@ -60,7 +59,7 @@ struct Extremal_polygon_area_traits_2 { Operation operation( const Point_2& p) const - { return boost::bind(Baseop(k), _1, _2, p); } + { return [&p, this](const Point_2& p1, const Point_2& p2){ return Baseop(this->k)(p1, p2, p);}; } template < class RandomAccessIC, class OutputIterator > OutputIterator @@ -184,7 +183,7 @@ struct Extremal_polygon_perimeter_traits_2 { }; typedef Kgon_triangle_perimeter Baseop; - typedef boost::function2 Operation; + typedef std::function Operation; Extremal_polygon_perimeter_traits_2() {} Extremal_polygon_perimeter_traits_2(const K& k_) : k(k_) {} @@ -197,7 +196,7 @@ struct Extremal_polygon_perimeter_traits_2 { Operation operation( const Point_2& p) const - { return boost::bind(Baseop(k), _1, _2, p); } + { return [this,&p](const Point_2& p1, const Point_2& p2){ return Baseop(this->k)(p1,p2,p); }; } template < class RandomAccessIC, class OutputIterator > OutputIterator @@ -234,10 +233,9 @@ struct Extremal_polygon_perimeter_traits_2 { max_element( points_begin + 1, points_end, - boost::bind( - less< FT >(), - boost::bind(operation(points_begin[0]), _1, points_begin[0]), - boost::bind(operation(points_begin[0]), _2, points_begin[0])))); + [points_begin, this](const Point_2& p1, const Point_2& p2) + { return less< FT >()( this->operation(points_begin[0])(p1, points_begin[0]), + this->operation(points_begin[0])(p2, points_begin[0])); } )); // give result: max_perimeter = operation(*points_begin)(*maxi, *points_begin); From a925a64fcf6006c1805ca20ebf2f2c779c876944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:42:53 +0100 Subject: [PATCH 132/317] start removing bind in QP_solver --- QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h | 2 +- QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h | 6 ++---- QP_solver/test/QP_solver/test_bind.cpp | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h index 91aaa9972f8..b9f3906da7e 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h @@ -410,7 +410,7 @@ class QP_basis_inverse { m_it1 = M.begin()+l; for ( row = 0; row < s; ++row, ++m_it1) { std::transform( m_it1->begin(), m_it1->begin()+s, m_it1->begin(), - boost::bind2nd( std::multiplies(), d)); + [this](const ET& v){return v * this->d;}); } // new denominator: |det(A_B)|^2 diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h index 10873b0db55..58887c6f9c1 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h @@ -178,13 +178,11 @@ z_replace_original_by_original(ForwardIterator y_l_it, // tmp_l -part std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(), - compose2_2(std::plus(), Identity(), - boost::bind1st(std::multiplies(), s_delta))); + [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); // tmp_x -part std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(), - compose2_2(std::plus(), Identity(), - boost::bind1st(std::multiplies(), s_delta))); + [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); tmp_x[k_i] -= d; // prepare \hat{k}_{2} -scalar diff --git a/QP_solver/test/QP_solver/test_bind.cpp b/QP_solver/test/QP_solver/test_bind.cpp index 3733f359200..b1c592c9be2 100644 --- a/QP_solver/test/QP_solver/test_bind.cpp +++ b/QP_solver/test/QP_solver/test_bind.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include // functor int x int -> Quotient, (a,b) -> a/b // ------------------------------------------------ @@ -26,8 +26,8 @@ int main() // --------------------------------------- int three = 3; int two = 2; - std::cout << boost::bind - (Quotient_inverter(), boost::bind + std::cout << std::bind + (Quotient_inverter(), std::bind (Quotient_creator(), _1, _2)) // ...and apply it to (3, 2) // ------------------------- From c9a5cf7072d23f58d46c6e8bbc6ab3e0d9473ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Jan 2021 18:52:29 +0100 Subject: [PATCH 133/317] start removing bind in Bounding_volumes --- .../include/CGAL/min_quadrilateral_2.h | 34 ++-- .../include/CGAL/rectangular_3_center_2.h | 147 ++++++++---------- .../include/CGAL/rectangular_p_center_2.h | 5 +- 3 files changed, 87 insertions(+), 99 deletions(-) diff --git a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h index 867593b2d1d..5072dce39ed 100644 --- a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h +++ b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #ifdef CGAL_OPTIMISATION_EXPENSIVE_PRECONDITION_TAG @@ -70,13 +69,16 @@ convex_bounding_box_2( typedef typename Traits::Point_2 Point_2; typedef typename Traits::Less_xy_2 Less_xy_2; typedef typename Traits::Less_yx_2 Less_yx_2; - typedef boost::function2 Greater_xy_2; - typedef boost::function2 Greater_yx_2; + typedef std::function Greater_xy_2; + typedef Greater_xy_2 Greater_yx_2; Less_xy_2 less_xy_2 = t.less_xy_2_object(); Less_yx_2 less_yx_2 = t.less_yx_2_object(); - Greater_xy_2 greater_xy_2 = boost::bind(less_xy_2, _2, _1); - Greater_yx_2 greater_yx_2 = boost::bind(less_yx_2, _2, _1); + Greater_xy_2 greater_xy_2 = [&less_xy_2](const Point_2& p1, const Point_2& p2) + { return less_xy_2(p2, p1); }; + Greater_yx_2 greater_yx_2 = [&less_yx_2](const Point_2& p1, const Point_2& p2) + { return less_yx_2(p2, p1); }; if (less_xy_2(*minx, *f) || (less_yx_2(*minx, *f) && !less_xy_2(*f, *minx))) @@ -268,21 +270,21 @@ namespace Optimisation { // --------------------------------------------------------------- // Right_of_implicit_line_2 // --------------------------------------------------------------- - typedef boost::function3 + typedef std::function Right_of_implicit_line_2; Right_of_implicit_line_2 right_of_implicit_line_2_object() const { - return boost::bind(has_on_negative_side_2_object(), - boost::bind(construct_line_2_object(), _2, _3), - _1); + return [this](const Point_2& p1, const Point_2& p2, const Direction_2& d) + { return this->has_on_negative_side_2_object()(this->construct_line_2_object()(p2, d), p1); }; } - typedef boost::function2 + typedef std::function Construct_direction_2; Construct_direction_2 construct_direction_2_object() const { - return boost::bind(Base::construct_direction_2_object(), - boost::bind(construct_vector_2_object(), _1, _2)); + return [this](const Point_2& p1, const Point_2& p2) + { return this->Base::construct_direction_2_object()( + this->construct_vector_2_object()(p1, p2)); }; } template < class Kernel > @@ -324,13 +326,11 @@ namespace Optimisation { rotate_direction_by_multiple_of_pi_2_object() const { return Rotate_direction_by_multiple_of_pi_2(*this); } - typedef boost::function2 + typedef std::function Less_angle_with_x_axis_2; Less_angle_with_x_axis_2 less_angle_with_x_axis_2_object() const { - return boost::bind(std::equal_to(), - boost::bind(compare_angle_with_x_axis_2_object(), - _1, _2), - SMALLER); + return [this](const Direction_2& d1, const Direction_2& d2) + { return this->compare_angle_with_x_axis_2_object()(d1, d2) == SMALLER; }; } }; diff --git a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h index 531fe486fd4..c119e8118de 100644 --- a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h +++ b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h @@ -22,8 +22,6 @@ #include #include #include -#include -#include namespace CGAL { @@ -38,8 +36,6 @@ rectangular_2_center_2( Traits& t) { using std::pair; - using std::greater; - using std::less; typedef typename Traits::Iso_rectangle_2 Rectangle; typedef typename Traits::Point_2 Point; @@ -53,7 +49,7 @@ rectangular_2_center_2( P_below_right; typedef typename Traits::Construct_point_2_below_left_implicit_point_2 P_below_left; - typedef boost::function1 Gamma; + typedef std::function Gamma; // fetch function objects from traits class CVertex v = t.construct_vertex_2_object(); @@ -73,14 +69,14 @@ rectangular_2_center_2( // two cases: top-left & bottom-right or top-right & bottom-left Min< FT > minft; Gamma gamma1 = - boost::bind(minft, boost::bind(dist, v(bb, 0), _1), boost::bind(dist, v(bb, 2), _1)); + [&minft, &bb, &dist, &v](const Point& p){ return minft(dist( v(bb, 0), p), dist(v(bb, 2),p));}; Gamma gamma2 = - boost::bind(minft, boost::bind(dist, v(bb, 1), _1), boost::bind(dist, v(bb, 3), _1)); + [&minft, &bb, &dist, &v](const Point& p){ return minft(dist( v(bb, 1), p), dist(v(bb, 3),p));}; pair< ForwardIterator, ForwardIterator > cand = min_max_element(f, l, - boost::bind(greater(), boost::bind(gamma1, _1), boost::bind(gamma1, _2)), - boost::bind(less(), boost::bind(gamma2, _1), boost::bind(gamma2, _2))); + [&gamma1](const Point& p1, const Point& p2){ return std::greater()(gamma1(p1), gamma1(p2)); }, + [&gamma2](const Point& p1, const Point& p2){ return std::less()(gamma2(p1), gamma2(p2)); }); // return the result if (gamma1(*cand.first) < gamma2(*cand.second)) { @@ -106,9 +102,6 @@ rectangular_3_center_2_type1( typename Traits::FT& rad, Traits& t) { - using std::max; - using std::less; - typedef typename Traits::FT FT; typedef typename Traits::Iso_rectangle_2 Rectangle; typedef typename Traits::Point_2 Point; @@ -124,7 +117,7 @@ rectangular_3_center_2_type1( P_below_right; typedef typename Traits::Construct_point_2_below_left_implicit_point_2 P_below_left; - typedef boost::function1 Gamma; + typedef std::function Gamma; // fetch function objects from traits class Rect rect = t.construct_iso_rectangle_2_object(); @@ -158,14 +151,14 @@ rectangular_3_center_2_type1( RandomAccessIterator e = l; bool b_empty = true; Min< FT > minft; - Gamma gamma = boost::bind(minft, - boost::bind(dist, v(r, i), _1), - boost::bind(dist, v(r, 2 + i), _1)); + Gamma gamma = [&minft, &dist, &v, &r, i](const Point& p) + { return minft(dist(v(r, i), p), dist(v(r, 2 + i), p)); }; while (e - s > 1) { // step (a) RandomAccessIterator m = s + (e - s - 1) / 2; - std::nth_element(s, m, e, boost::bind(less(), boost::bind(gamma, _1), boost::bind(gamma, _2))); + std::nth_element(s, m, e, [&gamma](const Point& p1, const Point& p2) + {return gamma(p1) < gamma(p2);}); // step (b) Rectangle b_prime = bounding_box_2(m + 1, e, t); @@ -220,8 +213,9 @@ struct Rectangular_3_center_2_type2_operations_base { typedef typename R::Infinity_distance_2 Infinity_distance_2; typedef typename R::Less_x_2 Less_x_2; typedef typename R::Less_y_2 Less_y_2; - typedef boost::function2 Greater_x_2; - typedef boost::function2 Greater_y_2; + typedef std::function Greater_x_2; + typedef Greater_x_2 Greater_y_2; typedef Min< Point_2, Less_x_2 > Min_x_2; typedef Max< Point_2, Less_x_2 > Max_x_2; typedef Min< Point_2, Less_y_2 > Min_y_2; @@ -236,15 +230,15 @@ struct Rectangular_3_center_2_type2_operations_base { Construct_point_2_below_right_implicit_point_2; typedef typename R::Construct_point_2_below_left_implicit_point_2 Construct_point_2_below_left_implicit_point_2; - typedef boost::function1 Delta; + typedef std::function Delta; Delta delta() const { return delta_; } Less_x_2 less_x_2_object() const { return r_.less_x_2_object(); } Less_y_2 less_y_2_object() const { return r_.less_y_2_object(); } Greater_x_2 greater_x_2_object() const - { return boost::bind(less_x_2_object(),_2,_1); } + { return [this](const Point_2& p1, const Point_2& p2){ return this->less_x_2_object()(p2, p1); }; } Greater_y_2 greater_y_2_object() const - { return boost::bind(less_y_2_object(),_2,_1); } + { return [this](const Point_2& p1, const Point_2& p2){ return this->less_y_2_object()(p2, p1); }; } Infinity_distance_2 distance() const { return r_.infinity_distance_2_object(); } Construct_vertex_2 construct_vertex_2_object() const @@ -277,7 +271,7 @@ struct Rectangular_3_center_2_type2_operations_base { public: Rectangular_3_center_2_type2_operations_base(R& r, const Point_2& p) - : r_(r), delta_(boost::bind(r.infinity_distance_2_object(), p, _1)) + : r_(r), delta_([&r, &p](const Point_2& q){ return r.infinity_distance_2_object()(p, q); }) {} }; @@ -846,10 +840,6 @@ rectangular_3_center_2_type2( Operations op) { BOOST_USING_STD_MAX(); - using std::less; - using std::greater; - using std::greater_equal; - using std::not_equal_to; using std::logical_and; using std::max_element; using std::find_if; @@ -894,7 +884,7 @@ rectangular_3_center_2_type2( { // First try whether the best radius so far can be reached at all RandomAccessIterator m = - partition(f, l, boost::bind(greater< FT >(), rad, boost::bind(op.delta(), _1))); + partition(f, l, [&rad, &op](const Point& p){ return rad > op.delta()(p); }); IP pos = min_max_element(m, l, op.compare_x(), op.compare_y()); // extreme points of the two other squares Point q_t = @@ -905,11 +895,11 @@ rectangular_3_center_2_type2( op.place_y_square(op.place_y_square(Q_r_empty, Q_r, *pos.second, r), r, rad); - boost::function1 le_rad = boost::bind(greater_equal(), rad, _1); + std::function le_rad = [&rad](const FT& v){return rad >= v;}; RandomAccessIterator b1 = - partition(m, l, boost::bind(le_rad, boost::bind(op.distance(), q_t, _1))); + partition(m, l, [&le_rad, &op, q_t](const Point& p){ return le_rad(op.distance()(q_t, p)); }); RandomAccessIterator b2 = - partition(b1, l, boost::bind(le_rad, boost::bind(op.distance(), q_r, _1))); + partition(b1, l, [&le_rad, &op, q_r](const Point& p){ return le_rad(op.distance()(q_r, p)); }); if (b2 != l) return o; @@ -921,8 +911,7 @@ rectangular_3_center_2_type2( while (e - s > 6) { std::ptrdiff_t cutoff = (e - s) / 2; RandomAccessIterator m = s + cutoff - 1; - std::nth_element(s, m, e, - boost::bind(less(), boost::bind(op.delta(), _1), boost::bind(op.delta(), _2))); + std::nth_element(s, m, e, [&op](const Point& p1, const Point& p2){ return op.delta()(p1) < op.delta()(p2); }); // step (b) IP pos = min_max_element(m + 1, e, op.compare_x(), op.compare_y()); @@ -935,13 +924,12 @@ rectangular_3_center_2_type2( Point q_r = op.place_y_square(q_r_afap, r, op.delta()(*m)); // check for covering - boost::function1 - le_delta_m = boost::bind(greater_equal(), op.delta()(*m), _1); + std::function + le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; RandomAccessIterator b1 = - partition(m + 1, e, - boost::bind(le_delta_m, boost::bind(op.distance(), q_t, _1))); + partition(m + 1, e, [&le_delta_m, &op, & q_t](const Point& p){ return le_delta_m(op.distance()(q_t, p)); }); RandomAccessIterator b2 = - partition(b1, e, boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1))); + partition(b1, e, [&le_delta_m, &op, & q_r](const Point& p){ return le_delta_m(op.distance()(q_r, p)); }); if (b2 != e) s = m; @@ -960,7 +948,7 @@ rectangular_3_center_2_type2( std::ptrdiff_t cutoff = (e - s) / fraction; RandomAccessIterator m = s + cutoff - 1; std::nth_element(s, m, e, - boost::bind(less(), boost::bind(op.delta(), _1), boost::bind(op.delta(), _2))); + [&op](const Point& p1, const Point& p2){ return op.delta()(p1) < op.delta()(p2); }); // step (b) IP pos = min_max_element(m + 1, e, op.compare_x(), op.compare_y()); @@ -1007,16 +995,17 @@ rectangular_3_center_2_type2( // partition the range [m+1, e) into ranges // [m+1, b1), [b1, b2), [b2, b3) and [b3, e) // R G cap q_t G cap q_r none - boost::function1 - le_delta_m = boost::bind(greater_equal(), op.delta()(*m), _1); + std::function + le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; RandomAccessIterator b2 = - partition(m + 1, e, boost::bind(le_delta_m, boost::bind(op.distance(), q_t, _1))); + partition(m + 1, e, + [&le_delta_m, &op, &q_t](const Point& p) { return le_delta_m(op.distance()(q_t, p)); }); RandomAccessIterator b1 = partition(m + 1, b2, - boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1))); + [&le_delta_m, &op, &q_r](const Point& p) { return le_delta_m(op.distance()(q_r, p)); }); RandomAccessIterator b3 = - partition(b2, e, boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1))); - + partition(b2, e, + [&le_delta_m, &op, &q_r](const Point& p) { return le_delta_m(op.distance()(q_r, p)); }); // step (c) if (b3 != e || @@ -1100,9 +1089,8 @@ rectangular_3_center_2_type2( // step 1 RandomAccessIterator s_m = s_b + (s_e - s_b - 1) / 2; std::nth_element(s_b, s_m, s_e, - boost::bind(less(), - boost::bind(op.delta(), _1), - boost::bind(op.delta(), _2))); + [&op](const Point& p1, const Point& p2) + { return op.delta()(p1) < op.delta()(p2); }); // step 2 (as above) Point q_t_m = q_t_afap; @@ -1138,14 +1126,18 @@ CGAL_3CENTER_REPEAT_CHECK: // partition the range [s_b+1, e) into ranges // [s_b+1, b1), [b1, b2), [b2, b3) and [b3, e) // R G cap q_t G cap q_r none - boost::function1 - le_delta_sb = boost::bind(greater_equal(), op.delta()(*s_b), _1); - b2 = partition(s_b + 1, e, boost::bind(le_delta_sb, - boost::bind(op.distance(), q_t, _1))); - b1 = partition(s_b + 1, b2, boost::bind(le_delta_sb, - boost::bind(op.distance(), q_r, _1))); + std::function + le_delta_sb = [&op, s_b](const FT& v){ return op.delta()(*s_b) >= v;} ; + + b2 = partition(s_b + 1, e, + [&le_delta_sb, &op, &q_t](const Point& p) + { return le_delta_sb(op.distance()(q_t, p)); }); + b1 = partition(s_b + 1, b2, + [&le_delta_sb, &op, &q_r](const Point& p) + { return le_delta_sb(op.distance()(q_r, p)); }); b3 = partition(b2, e, - boost::bind(le_delta_sb, boost::bind(op.distance(), q_r, _1))); + [&le_delta_sb, &op, &q_r](const Point& p) + { return le_delta_sb(op.distance()(q_r, p)); }); if (b3 != e || (!Q_t_empty && op.compute_x_distance(q_t, Q_t) > op.delta()(*s_b)) || @@ -1183,7 +1175,7 @@ CGAL_3CENTER_REPEAT_CHECK: std::vector< Point > tmppts(f, l); RandomAccessIterator ii = partition(tmppts.begin(), tmppts.end(), - boost::bind(le_delta_sb, boost::bind(op.delta(), _1))); + [&le_delta_sb, &op](const FT& v){ return le_delta_sb(op.delta()(v)); }); IP tmppos = min_max_element(ii, tmppts.end(), op.compare_x(), op.compare_y()); ) @@ -1228,12 +1220,8 @@ CGAL_3CENTER_REPEAT_CHECK: // we have to take the next smaller radius RandomAccessIterator next = max_element_if(s, s_b, - boost::bind(less(), - boost::bind(op.delta(), _1), - boost::bind(op.delta(), _2)), - boost::bind(not_equal_to(), - op.delta()(*s_b), - boost::bind(op.delta(), _1))); + [&op](const Point& p1, const Point& p2){ return op.delta()(p1) < op.delta()(p2); }, + [&op, s_b](const Point& p){ return op.delta()(*s_b) != op.delta()(p); }); rho_max = op.delta()(*s_b); q_t_at_rho_max = q_t, q_r_at_rho_max = q_r; CGAL_optimisation_assertion(op.delta()(*next) < op.delta()(*s_b)); @@ -1243,14 +1231,14 @@ CGAL_3CENTER_REPEAT_CHECK: q_r = op.place_y_square(q_r_afap, r, op.delta()(*next)); // again check for covering - boost::function1 - le_delta_next = boost::bind(greater_equal(), op.delta()(*next), _1); + std::function + le_delta_next = [&op, next](const FT& v){ return op.delta()(*next) >= v; }; b2 = partition(s_b, e, - boost::bind(le_delta_next, boost::bind(op.distance(), q_t, _1))); + [&op, &le_delta_next, &q_t](const Point& p){ return le_delta_next( op.distance()(q_t,p) ); }); b1 = partition(s_b, b2, - boost::bind(le_delta_next, boost::bind(op.distance(), q_r, _1))); + [&op, &le_delta_next, &q_r](const Point& p){ return le_delta_next( op.distance()(q_r,p) ); }); b3 = partition(b2, e, - boost::bind(le_delta_next, boost::bind(op.distance(), q_r, _1))); + [&op, &le_delta_next, &q_r](const Point& p){ return le_delta_next( op.distance()(q_r,p) ); }); if (b3 != e || (!Q_t_empty && op.compute_x_distance(q_t, Q_t) > op.delta()(*next)) || @@ -1304,7 +1292,7 @@ CGAL_3CENTER_REPEAT_CHECK: Point q_t_afap = op.place_x_square(Q_t_empty, Q_t, r); Point q_r_afap = op.place_y_square(Q_r_empty, Q_r, r); if (s != e) { - sort(s, e, boost::bind(less(), boost::bind(op.delta(), _1), boost::bind(op.delta(), _2))); + sort(s, e, [&op](const Point& p1, const Point& p2){ return op.delta()(p1) < op.delta()(p2);}); rho_max = op.delta()(*--t); } else rho_max = rho_min; @@ -1347,16 +1335,16 @@ CGAL_3CENTER_REPEAT_CHECK: q_r = op.place_y_square(q_r_afap, r, try_rho); // check for covering - boost::function1 - greater_rho_max = boost::bind(less(), try_rho, _1); + std::function + greater_rho_max = [&try_rho](const FT& v){ return try_rho < v; }; if ((!Q_t_empty && op.compute_x_distance(q_t, Q_t) > try_rho) || (!Q_r_empty && op.compute_y_distance(q_r, Q_r) > try_rho) || e != find_if( t + 1, e, - boost::bind(logical_and(), - boost::bind(greater_rho_max, boost::bind(op.distance(), q_t, _1)), - boost::bind(greater_rho_max, boost::bind(op.distance(), q_r, _1))))) + [&greater_rho_max, &q_t, &q_r, &op](const Point& p) + { return greater_rho_max(op.distance()(q_t,p)) && + greater_rho_max(op.distance()(q_r,p)); })) { rho_min = try_rho; q_t_q_r_cover_at_rho_min = 0; @@ -1393,17 +1381,16 @@ CGAL_3CENTER_REPEAT_CHECK: CGAL_optimisation_assertion(rho_min >= 0); FT rad_2 = q_t_q_r_cover_at_rho_min; if (s_at_rho_min != e_at_rho_min) { - boost::function1 - mydist = boost::bind(Min(), - boost::bind(op.distance(), q_t_at_rho_min, _1), - boost::bind(op.distance(), q_r_at_rho_min, _1)); + std::function + mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p) + { return Min()( op.distance()(q_t_at_rho_min, p), + op.distance()(q_r_at_rho_min, p)); }; rad_2 = max BOOST_PREVENT_MACRO_SUBSTITUTION ( rad_2, mydist(*max_element(s_at_rho_min, e_at_rho_min, - boost::bind(less< FT >(), - boost::bind(mydist, _1), - boost::bind(mydist, _2))))); + [&mydist](const Point& p1, const Point& p2) + { return mydist(p1) < mydist(p2); }))); } CGAL_optimisation_assertion(rad_2 == 0 || rad_2 > rho_min); diff --git a/Bounding_volumes/include/CGAL/rectangular_p_center_2.h b/Bounding_volumes/include/CGAL/rectangular_p_center_2.h index 6034a94f173..1d680e9572f 100644 --- a/Bounding_volumes/include/CGAL/rectangular_p_center_2.h +++ b/Bounding_volumes/include/CGAL/rectangular_p_center_2.h @@ -316,7 +316,6 @@ rectangular_p_center_2_matrix_search( const Traits& t) { typedef typename Traits::FT FT; - using std::minus; return rectangular_p_center_2_matrix_search( f, @@ -325,7 +324,9 @@ rectangular_p_center_2_matrix_search( r, pf, t, - boost::bind(Max(), 0, boost::bind(minus(), _1, _2))); + std::function( + [](const FT& a, const FT& b) { return Max()(0, std::minus()(a,b)); } + )); } // Pcenter_matrix_search( ... ) From 3f10219bf4fd953b2847093913a5bbcfe28ce217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 09:34:57 +0100 Subject: [PATCH 134/317] replace remaining bind in QP_solver --- QP_solver/include/CGAL/QP_solution.h | 45 +++++++++---------- .../CGAL/QP_solver/QP_basis_inverse_impl.h | 4 +- QP_solver/include/CGAL/QP_solver/QP_solver.h | 38 +++++++--------- .../include/CGAL/QP_solver/QP_solver_impl.h | 19 ++++---- 4 files changed, 49 insertions(+), 57 deletions(-) diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index f1908434cc5..722acf3e7dc 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include @@ -75,7 +73,7 @@ public: typedef QP_solution_detail::Quotient_normalizer Quotient_normalizer; // normalizer (ET, ET) -> (ET, ET) - typedef boost::function1< Quotient, ET > + typedef std::function< Quotient(const ET&) > Quotient_maker; typedef std::vector @@ -130,10 +128,7 @@ public: ET n = solution_numerator(); ET d = solution_denominator(); return - boost::bind - (Quotient_normalizer(), boost::bind - (U_Quotient_creator(), _1, _2)) - (n, d); + Quotient_normalizer()( U_Quotient_creator()(n,d) ); // (solution_numerator(), solution_denominator()); } virtual Quadratic_program_status status() const = 0; @@ -164,20 +159,22 @@ public: original_variable_values_begin( ) const { return Variable_value_iterator (original_variables_numerator_begin(), - boost::bind - (boost::bind - (Quotient_normalizer(), boost::bind - (U_Quotient_creator(), _1, _2)), _1, variables_common_denominator())); + [this](const ET& n) + { + return Quotient_normalizer()( + U_Quotient_creator()(n, this->variables_common_denominator())); + }); } Variable_value_iterator original_variable_values_end ( ) const { return Variable_value_iterator (original_variables_numerator_end(), - boost::bind - (boost::bind - (Quotient_normalizer(), boost::bind - (U_Quotient_creator(), _1, _2)), _1, variables_common_denominator())); + [this](const ET& n) + { + return Quotient_normalizer()( + U_Quotient_creator()(n, this->variables_common_denominator())); + }); } // Basic variables and constraints @@ -234,10 +231,11 @@ public: { return Lambda_iterator (lambda_numerator_begin(), - boost::bind - (boost::bind - (Quotient_normalizer(), boost::bind - (U_Quotient_creator(), _1, _2)), _1, variables_common_denominator())); + [this](const ET& n) + { + return Quotient_normalizer()( + U_Quotient_creator()(n, this->variables_common_denominator())); + }); } Lambda_iterator @@ -245,10 +243,11 @@ public: { return Lambda_iterator (lambda_numerator_end(), - boost::bind - (boost::bind - (Quotient_normalizer(), boost::bind - (U_Quotient_creator(), _1, _2)), _1, variables_common_denominator())); + [this](const ET& n) + { + return Quotient_normalizer()( + U_Quotient_creator()(n, this->variables_common_denominator())); + }); } // destruction diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h index 58887c6f9c1..f3f879d8bb7 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h @@ -178,11 +178,11 @@ z_replace_original_by_original(ForwardIterator y_l_it, // tmp_l -part std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(), - [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); + [&s_delta](const ET& v1, const ET& v2){ return v1 + v2 * s_delta; }); // tmp_x -part std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(), - [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); + [&s_delta](const ET& v1, const ET& v2){ return v1 + v2 * s_delta; }); tmp_x[k_i] -= d; // prepare \hat{k}_{2} -scalar diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver.h b/QP_solver/include/CGAL/QP_solver/QP_solver.h index 74c7bb367e1..ff3676702d6 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver.h @@ -38,9 +38,6 @@ #include -#include -#include - #include #include @@ -262,7 +259,7 @@ private: typedef QP_matrix_accessor< A_iterator, false, true, false, false> A_accessor; - typedef boost::function1 + typedef std::function A_row_by_index_accessor; typedef boost::transform_iterator < A_row_by_index_accessor, Index_iterator > @@ -1500,9 +1497,12 @@ transition( Tag_false) inv_M_B.transition (boost::make_transform_iterator (B_O.begin(), - boost::bind - (D_transition_creator_iterator(), B_O.begin(), - boost::bind (D_transition_creator_accessor(), qp_D, _1)))); + [this](int i) + { + return D_transition_creator_iterator()( + this->B_O.begin(),D_transition_creator_accessor()(this->qp_D, i)); + }) + ); } template < typename Q, typename ET, typename Tags > inline // LP case @@ -1597,12 +1597,10 @@ ratio_test_1__q_x_S( Tag_false) A_by_index_iterator( S_B.begin(), A_by_index_accessor( *(qp_A + j))), q_x_S.begin(), - boost::bind(std::minus(), - _1, - boost::bind(std::multiplies(), d, - boost::bind( - NT_converter(), - _2)))); + [this](const ET& n1, const RT& n2) + { + return n1 - this->d * NT_converter() (n2); + }); } // q_x_S = -+ ( A_S_BxB_O * q_x_O - A_S_Bxj) @@ -1883,7 +1881,8 @@ basis_matrix_stays_regular() if ( has_ineq && (i >= qp_n)) { // slack variable new_row = slack_A[ i-qp_n].first; A_row_by_index_accessor a_accessor = - boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; + typedef typename std::iterator_traits::value_type RT; std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), @@ -1940,17 +1939,14 @@ compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/, B_by_index_iterator( S_B.end (), b_accessor), x_B_S.begin(), x_B_S.begin(), - compose2_2( std::minus(), - boost::bind1st( std::multiplies(), d), - Identity())); + [this](const ET& n1, const ET& n2) + { return this->d * n1 - n2; }); // b_S_B - ( A_S_BxB_O * x_B_O) - r_S_B std::transform(x_B_S.begin(), x_B_S.begin()+S_B.size(), r_S_B.begin(), x_B_S.begin(), - compose2_2(std::minus(), - Identity(), - boost::bind1st( std::multiplies(), d))); - + [this](const ET& n1, const ET& n2) + { return n1 - this->d * n2; }); // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O) Value_iterator x_it = x_B_S.begin(); diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h b/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h index bc3788745b2..2d3a66015ef 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h @@ -14,7 +14,6 @@ // Kaspar Fischer #include -#include #include namespace CGAL { @@ -64,9 +63,7 @@ transition( ) std::transform( C_by_index_iterator( B_O.begin(), c_accessor), C_by_index_iterator( B_O.end (), c_accessor), minus_c_B.begin(), - boost::bind( - NT_converter(), - boost::bind(std::negate(), _1))); + [](const RT& n){return NT_converter()(-n);} ); // compute initial solution of phase II compute_solution(Is_nonnegative()); @@ -1438,7 +1435,7 @@ replace_variable_slack_slack( ) // update basis inverse A_row_by_index_accessor a_accessor = - boost::bind( A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; typedef typename std::iterator_traits::value_type RT; std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), @@ -1591,7 +1588,7 @@ replace_variable_original_slack( ) // update basis inverse A_row_by_index_accessor a_accessor = - boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; typedef typename std::iterator_traits::value_type RT; std::transform(A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), @@ -1946,7 +1943,7 @@ leave_variable( ) // update basis inverse A_row_by_index_accessor a_accessor = - boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), tmp_x.begin()); @@ -2283,7 +2280,7 @@ z_replace_variable_slack_by_original( ) // prepare u A_row_by_index_accessor a_accessor = - boost::bind (A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), tmp_x.begin()); @@ -2370,7 +2367,7 @@ z_replace_variable_slack_by_slack( ) // update basis inverse // -------------------- A_row_by_index_accessor a_accessor = - boost::bind ( A_accessor( qp_A, 0, qp_n), _1, new_row); + [new_row, this](int i){ return A_accessor( this->qp_A, 0, this->qp_n)(i, new_row); }; std::copy( A_row_by_index_iterator( B_O.begin(), a_accessor), A_row_by_index_iterator( B_O.end (), a_accessor), tmp_x.begin()); @@ -2937,7 +2934,7 @@ check_basis_inverse( Tag_false) } } v_it = std::find_if( q_x_O.begin(), q_x_O.begin()+cols, - boost::bind2nd( std::not_equal_to(), et0)); + [this](const ET& v){ return v != this->et0; }); if ( v_it != q_x_O.begin()+cols) { if ( ! vout4.verbose()) { std::cerr << std::endl << "basis-inverse check: "; @@ -2978,7 +2975,7 @@ check_basis_inverse( Tag_false) } v_it = std::find_if( q_lambda.begin(), q_lambda.begin()+rows, - boost::bind2nd( std::not_equal_to(), et0)); + [this](const ET& v){ return v != this->et0; }); if ( v_it != q_lambda.begin()+rows) { if ( ! vout4.verbose()) { std::cerr << std::endl << "basis-inverse check: "; From bf325bfc60ff53768eb10c1ee48f79a86ed9e0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 10:54:49 +0100 Subject: [PATCH 135/317] replace last bind in Bounding_volume --- Bounding_volumes/include/CGAL/Min_annulus_d.h | 17 +-- .../include/CGAL/pierce_rectangles_2.h | 115 ++++++++++-------- 2 files changed, 69 insertions(+), 63 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Min_annulus_d.h b/Bounding_volumes/include/CGAL/Min_annulus_d.h index 70f45488c0b..0bf6532dbd0 100644 --- a/Bounding_volumes/include/CGAL/Min_annulus_d.h +++ b/Bounding_volumes/include/CGAL/Min_annulus_d.h @@ -258,9 +258,6 @@ private: typedef QP_access_by_index ::const_iterator, int> Point_by_index; - typedef boost::binder2nd< std::divides > - Divide; - typedef std::vector Index_vector; typedef std::vector NT_vector; @@ -272,7 +269,7 @@ public: typedef CGAL::Join_input_iterator_1< Basic_variable_index_iterator, - CGAL::Unary_compose_1 > + std::function > Support_point_iterator; @@ -331,9 +328,7 @@ public: "support_points_begin: not enough points"); return Support_point_iterator( solver->basic_original_variable_indices_begin(), - CGAL::compose1_1( - Point_by_index( points.begin()), - boost::bind2nd( std::divides(), 2))); + [this](int i){ return Point_by_index(this->points.begin())(i/2); }); } Support_point_iterator @@ -342,9 +337,7 @@ public: "support_points_begin: not enough points"); return Support_point_iterator( solver->basic_original_variable_indices_end(), - CGAL::compose1_1( - Point_by_index( points.begin()), - boost::bind2nd( std::divides(), 2))); + [this](int i){ return Point_by_index(this->points.begin())(i/2); }); } int number_of_inner_support_points() const { return static_cast(inner_indices.size());} @@ -592,9 +585,7 @@ private: bool check_dimension( std::size_t offset = 0) { return ( std::find_if( points.begin()+offset, points.end(), - CGAL::compose1_1( boost::bind2nd( - std::not_equal_to(), d), - tco.access_dimension_d_object())) + [this](const Point& p){ return this->d != this->tco.access_dimension_d_object()(p); }) == points.end()); } // compute smallest enclosing annulus diff --git a/Bounding_volumes/include/CGAL/pierce_rectangles_2.h b/Bounding_volumes/include/CGAL/pierce_rectangles_2.h index 9a3bfb91883..ebaf8081e1c 100644 --- a/Bounding_volumes/include/CGAL/pierce_rectangles_2.h +++ b/Bounding_volumes/include/CGAL/pierce_rectangles_2.h @@ -22,7 +22,6 @@ #include #include #include -#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -235,14 +234,16 @@ struct Staircases : public Loc_domain< Traits_ > { do { brstc.push_back(*i++); i = find_if(i, ysort.end(), - boost::bind(this->traits.less_x_2_object(), brstc.back(), _1)); + [this](const Point_2& p) + { return this->traits.less_x_2_object()(this->brstc.back(), p);}); } while (i != ysort.end()); // top-left Riterator j = ysort.rbegin(); do { tlstc.push_back(*j++); j = find_if(j, ysort.rend(), - boost::bind(this->traits.less_x_2_object(), _1, tlstc.back())); + [this](const Point_2& p) + { return this->traits.less_x_2_object()(p, this->tlstc.back());}); } while (j != ysort.rend()); // build left-bottom and right-top staircases @@ -252,14 +253,16 @@ struct Staircases : public Loc_domain< Traits_ > { do { lbstc.push_back(*i++); i = find_if(i, xsort.end(), - boost::bind(this->traits.less_y_2_object(), _1, lbstc.back())); + [this](const Point_2& p) + { return this->traits.less_y_2_object()(p, this->lbstc.back());}); } while (i != xsort.end()); // right-top j = xsort.rbegin(); do { rtstc.push_back(*j++); j = find_if(j, xsort.rend(), - boost::bind(this->traits.less_y_2_object(), rtstc.back(), _1)); + [this](const Point_2& p) + { return this->traits.less_y_2_object()(this->rtstc.back(), p);}); } while (j != xsort.rend()); } // Staircases(b, e, t) @@ -300,16 +303,20 @@ struct Staircases : public Loc_domain< Traits_ > { min_element_if( this->pts.begin(), this->pts.end(), this->traits.less_x_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), p, _1), - boost::bind(this->traits.less_y_2_object(), p, _1))); + [&p, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(p, pt) && + this->traits.less_y_2_object()(p, pt); + }); Citerator j = max_element_if( this->pts.begin(), this->pts.end(), this->traits.less_x_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), _1, q), - boost::bind(this->traits.less_y_2_object(), q, _1))); + [&q, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(pt, q) && + this->traits.less_y_2_object()(q, pt); + }); return Intervall(i == this->pts.end() ? this->maxx : *i, j == this->pts.end() ? this->minx : *j); } // top_intervall() @@ -326,16 +333,20 @@ struct Staircases : public Loc_domain< Traits_ > { min_element_if( this->pts.begin(), this->pts.end(), this->traits.less_x_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), p, _1), - boost::bind(this->traits.less_y_2_object(), _1, p))); + [&p, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(p, pt) && + this->traits.less_y_2_object()(pt, p); + }); Citerator j = max_element_if( this->pts.begin(), this->pts.end(), this->traits.less_x_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), _1, q), - boost::bind(this->traits.less_y_2_object(), _1, q))); + [&q, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(pt, q) && + this->traits.less_y_2_object()(pt, q); + }); return Intervall(i == this->pts.end() ? this->maxx : *i, j == this->pts.end() ? this->minx : *j); } // bottom_intervall() @@ -352,16 +363,20 @@ struct Staircases : public Loc_domain< Traits_ > { min_element_if( this->pts.begin(), this->pts.end(), this->traits.less_y_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), _1, p), - boost::bind(this->traits.less_y_2_object(), p, _1))); + [&p, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(pt, p) && + this->traits.less_y_2_object()(p, pt); + }); Citerator j = max_element_if( this->pts.begin(), this->pts.end(), this->traits.less_y_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), _1, q), - boost::bind(this->traits.less_y_2_object(), _1, q))); + [&q, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(pt, q) && + this->traits.less_y_2_object()(pt, q); + }); return Intervall(i == this->pts.end() ? this->maxy : *i, j == this->pts.end() ? this->miny : *j); } // left_intervall() @@ -378,16 +393,20 @@ struct Staircases : public Loc_domain< Traits_ > { min_element_if( this->pts.begin(), this->pts.end(), this->traits.less_y_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), p, _1), - boost::bind(this->traits.less_y_2_object(), p, _1))); + [&p, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(p, pt) && + this->traits.less_y_2_object()(p, pt); + }); Citerator j = max_element_if( this->pts.begin(), this->pts.end(), this->traits.less_y_2_object(), - boost::bind(std::logical_and< bool >(), - boost::bind(this->traits.less_x_2_object(), q, _1), - boost::bind(this->traits.less_y_2_object(), _1, q))); + [&q, this](const Point_2& pt) + { + return this->traits.less_x_2_object()(q, pt) && + this->traits.less_y_2_object()(pt, q); + }); return Intervall(i == this->pts.end() ? this->maxy : *i, j == this->pts.end() ? this->miny : *j); } // right_intervall() @@ -487,6 +506,7 @@ two_cover_points( using std::less; typedef typename Traits::FT FT; + typedef typename Traits::Point_2 Point_2; typename Traits::Infinity_distance_2 dist = d.traits.infinity_distance_2_object(); typename Traits::Signed_infinity_distance_2 sdist = @@ -504,11 +524,8 @@ two_cover_points( if (d.end() == find_if(d.begin(), d.end(), - boost::bind(less(), - d.r, - boost::bind(Min(), - boost::bind(dist, d[0], _1), - boost::bind(dist, d[2], _1))))) + [&dist,&d](const Point_2& p) + { return d.r < Min()(dist(d[0], p), dist(d[2],p)); })) { *o++ = d[0]; *o++ = d[2]; @@ -520,11 +537,8 @@ two_cover_points( if (d.end() == find_if(d.begin(), d.end(), - boost::bind(less(), - d.r, - boost::bind(Min(), - boost::bind(dist, d[1], _1), - boost::bind(dist, d[3], _1))))) + [&dist,&d](const Point_2& p) + { return d.r < Min()(dist(d[1], p), dist(d[3],p)); })) { *o++ = d[1]; *o++ = d[3]; @@ -551,7 +565,6 @@ three_cover_points( CGAL_optimisation_precondition(!d.empty()); // typedefs: - typedef typename Traits::FT FT; typedef typename Traits::Point_2 Point_2; typedef typename Loc_domain< Traits >::Iterator Iterator; typename Traits::Infinity_distance_2 dist = @@ -565,7 +578,8 @@ three_cover_points( // find first point not covered by the rectangle at d[k] Iterator i = find_if(d.begin(), d.end(), - boost::bind(less(), d.r, boost::bind(dist, corner, _1))); + [&d,&dist, &corner](const Point_2& p) + { return d.r < dist(corner, p); }); // are all points already covered? if (i == d.end()) { @@ -608,12 +622,12 @@ three_cover_points( CGAL_optimisation_expensive_assertion( save_end == find_if(d.end(), save_end, - boost::bind(less(), d.r, boost::bind(dist, corner, _1)))); + [&d, &dist, &corner](const Point_2& p) + { return d.r < dist(corner, p); })); CGAL_optimisation_expensive_assertion( d.end() == find_if(d.begin(), d.end(), - boost::bind(std::greater_equal(), - d.r, - boost::bind(dist, corner, _1)))); + [&d,&dist, &corner](const Point_2& p) + { return d.r >= dist(corner, p); })); two_cover_points(d, o, ok); @@ -702,7 +716,8 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok) // find first point not covered by the rectangle at d[k] Iterator i = find_if(d.begin(), d.end(), - boost::bind(less(), d.r, boost::bind(dist, corner, _1))); + [&d,&dist,&corner](const Point_2& p) + { return d.r < dist(corner, p); }); // are all points already covered? if (i == d.end()) { @@ -745,12 +760,12 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok) CGAL_optimisation_expensive_assertion( save_end == find_if(d.end(), save_end, - boost::bind(less(), d.r, boost::bind(dist, corner, _1)))); + [&d,&dist,&corner](const Point_2& p) + { return d.r < dist(corner, p); })); CGAL_optimisation_expensive_assertion( d.end() == find_if(d.begin(), d.end(), - boost::bind(std::greater_equal(), - d.r, - boost::bind(dist, corner, _1)))); + [&d,&dist,&corner](const Point_2& p) + { return d.r >= dist(corner, p); })); three_cover_points(d, o, ok); From 41ceed534723ca24191a485307be8a83b9aeb044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 10:55:17 +0100 Subject: [PATCH 136/317] match requirements of CGAL adaptors --- STL_Extension/test/STL_Extension/test_composition.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STL_Extension/test/STL_Extension/test_composition.cpp b/STL_Extension/test/STL_Extension/test_composition.cpp index a4d4c4d5d66..c9a3caaea61 100644 --- a/STL_Extension/test/STL_Extension/test_composition.cpp +++ b/STL_Extension/test/STL_Extension/test_composition.cpp @@ -29,8 +29,8 @@ int main() { plus< int > pl; multiplies< int > mu; - auto op1 = [](int i){ return i+1; }; - auto op2 = [](int i){ return i * 2; }; + std::function op1 = [](int i){ return i+1; }; + std::function op2 = [](int i){ return i * 2; }; // compose1_2: int a[] = {3,5,7,2,4}; From 87e20cd5741a102d78cf30a3992c436a354689ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 10:55:43 +0100 Subject: [PATCH 137/317] add missing using namespace --- QP_solver/test/QP_solver/test_bind.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QP_solver/test/QP_solver/test_bind.cpp b/QP_solver/test/QP_solver/test_bind.cpp index b1c592c9be2..ce828b73068 100644 --- a/QP_solver/test/QP_solver/test_bind.cpp +++ b/QP_solver/test/QP_solver/test_bind.cpp @@ -20,6 +20,8 @@ struct Quotient_inverter } }; +using namespace std::placeholders; + int main() { // create composed functor (a,b) -> b/a... From 3882d270764711b2eb8fd4802987b8d970e5df15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 10:55:53 +0100 Subject: [PATCH 138/317] remove bind in Incribed_areas --- Inscribed_areas/include/CGAL/extremal_polygon_2.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Inscribed_areas/include/CGAL/extremal_polygon_2.h b/Inscribed_areas/include/CGAL/extremal_polygon_2.h index 33c6a126f9a..2cd09fdd7c0 100644 --- a/Inscribed_areas/include/CGAL/extremal_polygon_2.h +++ b/Inscribed_areas/include/CGAL/extremal_polygon_2.h @@ -25,8 +25,6 @@ #include #include #include -#include -#include namespace CGAL { //!!! This will eventually be integrated into function_objects.h @@ -443,8 +441,8 @@ extremal_polygon_2( k, CGAL::transform_iterator( o, - boost::make_adaptable(boost::bind(Index_operator< RandomAccessIC, int, Point_2 >(), - points_begin, _1))), + std::function([points_begin](int i) + { return Index_operator< RandomAccessIC, int, Point_2 >()(points_begin, i); })), t); } From ea0386c3334fd48599f2fff2d39b00be993266f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 6 Jan 2021 11:36:32 +0100 Subject: [PATCH 139/317] replace last bind --- STL_Extension/include/CGAL/Spatial_lock_grid_3.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h index 1189a120a33..f5d2b6df798 100644 --- a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h +++ b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h @@ -16,8 +16,6 @@ #include -#include - #include #if TBB_IMPLEMENT_CPP0X # include @@ -334,7 +332,7 @@ protected: Spatial_lock_grid_base_3(const Bbox_3 &bbox, int num_grid_cells_per_axis) : m_num_grid_cells_per_axis(num_grid_cells_per_axis), - m_tls_grids(boost::bind(init_TLS_grid, num_grid_cells_per_axis)) + m_tls_grids([num_grid_cells_per_axis](){ return init_TLS_grid(num_grid_cells_per_axis); }) { set_bbox(bbox); } From 7418c4217baf18324683b272429c354dda21c5a7 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Jan 2021 11:15:39 +0100 Subject: [PATCH 140/317] Try to select context according to OS --- .../include/CGAL/draw_triangulation_2.h | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 60d15734b2f..372065b428e 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -22,6 +22,35 @@ namespace CGAL { +namespace internal_test{ + + +int& code_to_call_before_creation_of_QCoreApplication(int& i) { + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setDepthBufferSize(24); + fmt.setStencilBufferSize(8); + fmt.setVersion(2,0); + fmt.setRenderableType(QSurfaceFormat::OpenGLES); + fmt.setSamples(0); +#else + fmt.setVersion(4, 3); + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); +#endif + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + + //for windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); +#endif + + //We set the locale to avoid any trouble with VTK + setlocale(LC_ALL, "C"); + return i; +} +} // Default color functor; user can change it to have its own face color struct DefaultColorFunctorT2 @@ -146,7 +175,7 @@ void draw(const CGAL_T2_TYPE& at2, { int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::internal_test::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorT2 fcolor; SimpleTriangulation2ViewerQt mainwindow(app.activeWindow(), at2, title, nofill, fcolor); From f25363131dd14414093f433e77f6cfd6020e744d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 7 Jan 2021 10:27:22 +0000 Subject: [PATCH 141/317] Switch to variant in Nef_3 --- ...xact_triangulation_euclidean_traits_xy_3.h | 62 +++++++++++-------- ...xact_triangulation_euclidean_traits_xz_3.h | 59 +++++++++++------- ...xact_triangulation_euclidean_traits_yz_3.h | 58 ++++++++++------- 3 files changed, 108 insertions(+), 71 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index ccd9e3fdb37..4e84e3eebc7 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -28,13 +28,16 @@ template struct Exact_intersect_xy_2; template struct Exact_intersect_xy_2 { - typedef typename R::Point_2 Point_2; - typedef typename R::Segment_2 Segment_2; + typedef typename R::Point_2 Point_2; + typedef typename R::Segment_2 Segment_2; - typedef typename R::Point_3 Point_3; - typedef typename R::Segment_3 Segment_3; + typedef typename R::Point_3 Point_3; + typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional + operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -50,17 +53,21 @@ struct Exact_intersect_xy_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, // so all third components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (p2.x(),p2.y(),0)); + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3(p2.x(),p2.y(),0), Point_3(q2.x(),q2.y(),0) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(p2.x(),p2.y(),0))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), + Point_3(q2.x(),q2.y(),0) ) )); } }; @@ -73,7 +80,9 @@ struct Exact_intersect_xy_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -91,18 +100,21 @@ struct Exact_intersect_xy_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, // so all third components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (p2.hx(),p2.hy(),0,p2.hw())); + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3 (p2.hx(),p2.hy(),0,p2.hw()), - Point_3 (q2.hx(),q2.hy(),0,q2.hw()) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(p2.hx(),p2.hy(),0,p2.hw()))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), + Point_3 (q2.hx(),q2.hy(),0,q2.hw())) )); } }; diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 0e1ccf6864a..178b8b6ad2c 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -33,7 +33,10 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional + operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -48,18 +51,22 @@ struct Exact_intersect_xz_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, - // so all second components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (p2.x(),0,p2.y())); + // so all third components are faked! + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3(p2.x(),0,p2.y()), Point_3(q2.x(),0,q2.y()) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(p2.x(),0,p2.y()))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), + Point_3(q2.x(),0,q2.y()) ) )); } }; @@ -72,7 +79,9 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -89,20 +98,24 @@ struct Exact_intersect_xz_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, - // so all second components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (p2.hx(),0,p2.hy(),p2.hw())); + // so all third components are faked! + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3 (p2.hx(),0,p2.hy(),p2.hw()), - Point_3 (q2.hx(),0,q2.hy(),q2.hw()) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(p2.hx(),0,p2.hy(),p2.hw()))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), + Point_3 (q2.hx(),0,q2.hy(),q2.hw())) )); } + }; template diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index 9779a836401..2ff1f85a2c7 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -34,7 +34,10 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional + operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -49,18 +52,22 @@ struct Exact_intersect_yz_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, - // so all first components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (0,p2.x(),p2.y())); + // so all third components are faked! + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3(0,p2.x(),p2.y()), Point_3(0,q2.x(),q2.y()) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(0,p2.x(),p2.y()))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), + Point_3(0,q2.x(),q2.y()) ) )); } }; @@ -73,7 +80,9 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - CGAL::Object operator() (Segment_3 s3, Segment_3 t3) + typedef boost::variant variant_type; + + boost::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -90,19 +99,22 @@ struct Exact_intersect_yz_2 // convert intersection from Object_2 to Object_3 // Note: there is not necessarily a spartial intersection, - // so all first components are faked! - CGAL::Object obj = intersection (s2,t2); - if ( CGAL::assign(p2, obj) ) - { obj = make_object (Point_3 (0,p2.hx(),p2.hy(),p2.hw())); + // so all third components are faked! + auto obj = intersection (s2,t2); + if(! obj){ + return boost::none; } - else if ( CGAL::assign(s2, obj) ) - { p2 = s2.source(); - q2 = s2.target(); - obj = make_object( Segment_3( - Point_3 (0,p2.hx(),p2.hy(),p2.hw()), - Point_3 (0,q2.hx(),q2.hy(),q2.hw()) ) ); + if (const Point_2* pi = boost::get(&*obj)) + { + return boost::make_optional(variant_type(Point_3(0,p2.hx(),p2.hy(),p2.hw()))); } - return obj; + + const Segment_2* si = boost::get(&*obj); + p2 = s2.source(); + q2 = s2.target(); + + return boost::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), + Point_3 (0,q2.hx(),q2.hy(),q2.hw())) )); } }; From 7c6bbaaea0126bcf18de2cf08134f581b4c251c7 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Jan 2021 11:27:49 +0100 Subject: [PATCH 142/317] debug --- Triangulation_2/include/CGAL/draw_triangulation_2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 372065b428e..1d034adbe5e 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -28,6 +28,7 @@ namespace internal_test{ int& code_to_call_before_creation_of_QCoreApplication(int& i) { QSurfaceFormat fmt; #ifdef Q_OS_MAC + std::cout<<"Running on mac"< Date: Thu, 7 Jan 2021 10:31:14 +0000 Subject: [PATCH 143/317] Move a typedef to where it is used --- Triangulation_2/include/CGAL/Constrained_triangulation_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 1d337cd3aaf..32317818174 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -1711,7 +1711,7 @@ compute_intersection(const Gt& gt, typename Gt::Point_2& pi) { typedef typename Gt::Point_2 Point_2; - typedef typename Gt::Segment_2 Segment_2; + typename Gt::Intersect_2 compute_intersec = gt.intersect_2_object(); typename Gt::Construct_segment_2 construct_segment = gt.construct_segment_2_object(); @@ -1721,6 +1721,7 @@ compute_intersection(const Gt& gt, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + typedef typename Gt::Segment_2 Segment_2; if(result){ if (const Segment_2* s = boost::get(&*result)){ std::cerr << CGAL::internal::cdt_2_indent_level From 02eb3648ad39a8086b7255f8355bcf300989e5af Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Jan 2021 11:43:13 +0100 Subject: [PATCH 144/317] Try something else --- Triangulation_2/include/CGAL/draw_triangulation_2.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 1d034adbe5e..58e069282ba 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -28,17 +28,12 @@ namespace internal_test{ int& code_to_call_before_creation_of_QCoreApplication(int& i) { QSurfaceFormat fmt; #ifdef Q_OS_MAC - std::cout<<"Running on mac"< Date: Thu, 7 Jan 2021 12:03:46 +0100 Subject: [PATCH 145/317] Use version150 --- .../include/CGAL/Qt/Basic_viewer_qt.h | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 547cff022b8..7d93cb2aa34 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -58,17 +58,17 @@ namespace CGAL //------------------------------------------------------------------------------ const char vertex_source_color[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" - "attribute highp vec3 color;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 normal;\n" + "in highp vec3 color;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" + "out highp vec4 fP; \n" + "out highp vec3 fN; \n" + "out highp vec4 fColor; \n" "uniform highp float point_size; \n" "void main(void)\n" @@ -83,15 +83,16 @@ const char vertex_source_color[] = const char fragment_source_color[] = { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" + "#version 150 \n" + "in highp vec4 fP; \n" + "in highp vec3 fN; \n" + "in highp vec4 fColor; \n" "uniform highp vec4 light_pos; \n" "uniform highp vec4 light_diff; \n" "uniform highp vec4 light_spec; \n" "uniform highp vec4 light_amb; \n" "uniform float spec_power ; \n" + "out vec4 out_color; \n" "void main(void) { \n" " highp vec3 L = light_pos.xyz - fP.xyz; \n" @@ -104,18 +105,18 @@ const char fragment_source_color[] = " highp vec3 R = reflect(-L, N); \n" " highp vec4 diffuse = max(dot(N,L), 0.0) * light_diff * fColor; \n" " highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - " gl_FragColor = light_amb*fColor + diffuse ; \n" + " out_color = light_amb*fColor + diffuse ; \n" "} \n" "\n" }; const char vertex_source_p_l[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 color;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 color;\n" "uniform highp mat4 mvp_matrix;\n" - "varying highp vec4 fColor; \n" + "out highp vec4 fColor; \n" "uniform highp float point_size; \n" "void main(void)\n" "{\n" @@ -127,10 +128,11 @@ const char vertex_source_p_l[] = const char fragment_source_p_l[] = { - "#version 120 \n" - "varying highp vec4 fColor; \n" + "#version 150 \n" + "in highp vec4 fColor; \n" + "out vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = fColor; \n" + "out_color = fColor; \n" "} \n" "\n" }; From 2a212bb2a83c635802ddf98a4183e497e3ff28e0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Jan 2021 13:06:40 +0100 Subject: [PATCH 146/317] Upgrade non-compatibility sahders in Basic_viewer to glsl 150 and add a context creation before the creation of the QApp in draw_xxx examples --- .../include/CGAL/Qt/Basic_viewer_qt.h | 20 ++++++++++++++ .../include/CGAL/draw_linear_cell_complex.h | 2 +- Nef_3/include/CGAL/draw_nef_3.h | 2 +- .../CGAL/draw_periodic_2_triangulation_2.h | 2 +- Point_set_3/include/CGAL/draw_point_set_3.h | 2 +- Polygon/include/CGAL/draw_polygon_2.h | 2 +- .../include/CGAL/draw_polygon_with_holes_2.h | 2 +- Polyhedron/include/CGAL/draw_polyhedron.h | 2 +- Surface_mesh/include/CGAL/draw_surface_mesh.h | 2 +- .../include/CGAL/draw_face_graph_with_paths.h | 2 +- .../include/CGAL/draw_triangulation_2.h | 27 +------------------ .../include/CGAL/draw_triangulation_3.h | 2 +- .../include/CGAL/draw_voronoi_diagram_2.h | 2 +- 13 files changed, 32 insertions(+), 37 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 7d93cb2aa34..932c4ab255d 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -54,7 +54,27 @@ namespace CGAL { +int& code_to_call_before_creation_of_QCoreApplication(int& i) { + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setVersion(4, 1); +#else + fmt.setVersion(4, 3); +#endif + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + //for windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); +#endif + + //We set the locale to avoid any trouble with VTK + setlocale(LC_ALL, "C"); + return i; +} //------------------------------------------------------------------------------ const char vertex_source_color[] = { diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 6f630b2c0b1..650d78b0893 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -406,7 +406,7 @@ void draw(const CGAL_LCC_TYPE& alcc, { int argc=1; const char* argv[2]={"lccviewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); SimpleLCCViewerQt mainwindow(app.activeWindow(), &alcc, title, nofill, drawing_functor); mainwindow.show(); diff --git a/Nef_3/include/CGAL/draw_nef_3.h b/Nef_3/include/CGAL/draw_nef_3.h index da8e01bacc8..f4babd5f6a6 100644 --- a/Nef_3/include/CGAL/draw_nef_3.h +++ b/Nef_3/include/CGAL/draw_nef_3.h @@ -255,7 +255,7 @@ void draw(const CGAL_NEF3_TYPE &anef, { int argc = 1; const char *argv[2] = {"nef_polyhedron_viewer", "\0"}; - QApplication app(argc, const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc), const_cast(argv)); DefaultColorFunctorNefPolyhedron fcolor; SimpleNefPolyhedronViewerQt diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index 909b38c0675..e81c6fca7c3 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -262,7 +262,7 @@ void draw(const CGAL_P2T2_TYPE& ap2t2, { int argc=1; const char* argv[2]={"p2t2_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorP2T2 fcolor; SimplePeriodic2Triangulation2ViewerQt diff --git a/Point_set_3/include/CGAL/draw_point_set_3.h b/Point_set_3/include/CGAL/draw_point_set_3.h index de9548c6b1b..295229bf568 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -102,7 +102,7 @@ void draw(const Point_set_3& apointset, { int argc=1; const char* argv[2]={"point_set_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); SimplePointSetViewerQt > mainwindow(app.activeWindow(), apointset, title); diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index 0f75db09b7c..bad34bdc6f3 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -124,7 +124,7 @@ void draw(const CGAL::Polygon_2& ap2, { int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); SimplePolygon2ViewerQt > mainwindow(app.activeWindow(), ap2, title); mainwindow.show(); diff --git a/Polygon/include/CGAL/draw_polygon_with_holes_2.h b/Polygon/include/CGAL/draw_polygon_with_holes_2.h index 35f98928c7e..6aab87b3094 100644 --- a/Polygon/include/CGAL/draw_polygon_with_holes_2.h +++ b/Polygon/include/CGAL/draw_polygon_with_holes_2.h @@ -140,7 +140,7 @@ void draw(const CGAL::Polygon_with_holes_2& ap2, { int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); SimplePolygonWithHoles2ViewerQt > mainwindow(app.activeWindow(), ap2, title); mainwindow.show(); diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index 7e5983c81ac..6bce7a1fa82 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -210,7 +210,7 @@ void draw(const CGAL_POLY_TYPE& apoly, { int argc=1; const char* argv[2]={"polyhedron_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorPolyhedron fcolor; SimplePolyhedronViewerQt mainwindow(app.activeWindow(), apoly, title, nofill, fcolor); diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index efa6c2f480c..ec502ab9809 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -210,7 +210,7 @@ void draw(const Surface_mesh& amesh, { int argc=1; const char* argv[2]={"surface_mesh_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorSM fcolor; SimpleSurfaceMeshViewerQt, DefaultColorFunctorSM> mainwindow(app.activeWindow(), amesh, title, nofill, fcolor); diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index 96cad072369..a310e1ae616 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -411,7 +411,7 @@ void draw(const Mesh& alcc, { int argc=1; const char* argv[2]={"lccviewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); Face_graph_with_path_viewer mainwindow(app.activeWindow(), alcc, &paths, amark, title, nofill, diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 58e069282ba..94cd7e0529c 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -22,31 +22,6 @@ namespace CGAL { -namespace internal_test{ - - -int& code_to_call_before_creation_of_QCoreApplication(int& i) { - QSurfaceFormat fmt; -#ifdef Q_OS_MAC - fmt.setVersion(4, 1); -#else - fmt.setVersion(4, 3); -#endif - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); -#endif - - //We set the locale to avoid any trouble with VTK - setlocale(LC_ALL, "C"); - return i; -} -} // Default color functor; user can change it to have its own face color struct DefaultColorFunctorT2 @@ -171,7 +146,7 @@ void draw(const CGAL_T2_TYPE& at2, { int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(CGAL::internal_test::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorT2 fcolor; SimpleTriangulation2ViewerQt mainwindow(app.activeWindow(), at2, title, nofill, fcolor); diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index 11d25a28f29..cdb666564df 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -152,7 +152,7 @@ void draw(const CGAL_T3_TYPE& at3, { int argc=1; const char* argv[2]={"t3_viewer","\0"}; - QApplication app(argc,const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); DefaultColorFunctorT3 fcolor; SimpleTriangulation3ViewerQt mainwindow(app.activeWindow(), at3, title, nofill, fcolor); diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 5e32e12d3d4..11ab8f3acf4 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -318,7 +318,7 @@ void draw(const CGAL_VORONOI_TYPE &av2, if (!cgal_test_suite) { int argc = 1; const char *argv[2] = {"voronoi_2_viewer", "\0"}; - QApplication app(argc, const_cast(argv)); + QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc), const_cast(argv)); DefaultColorFunctorV2 fcolor; SimpleVoronoiDiagram2ViewerQt mainwindow(app.activeWindow(), av2, title, nofill, From af94033a64c21dfe874c424209bd9b6ada00f79e Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 16:39:03 +0100 Subject: [PATCH 147/317] arrangement on surface 2 unused variables warning fixed --- .../include/CGAL/Arr_circular_line_arc_traits_2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index db91adb57cf..e913bc9f7db 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -159,11 +159,11 @@ namespace CGAL { { return CK_Equal_2()(a0, a1); } result_type - operator() ( const Line_arc_2 &a0, const Circular_arc_2 &a1) const + operator() ( const Line_arc_2 &/*a0*/, const Circular_arc_2 &/*a1*/) const { return false; } result_type - operator() ( const Circular_arc_2 &a0, const Line_arc_2 &a1) const + operator() ( const Circular_arc_2 &/*a0*/, const Line_arc_2 &/*a1*/) const { return false; } result_type From 76d1fe8c7e5b785f3dde517e14865b7a2f268931 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 16:45:08 +0100 Subject: [PATCH 148/317] classification range loop analysis ref to copy warning fixed --- Classification/include/CGAL/Classification/Evaluation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classification/include/CGAL/Classification/Evaluation.h b/Classification/include/CGAL/Classification/Evaluation.h index eeff26f73d6..afdde15e216 100644 --- a/Classification/include/CGAL/Classification/Evaluation.h +++ b/Classification/include/CGAL/Classification/Evaluation.h @@ -123,7 +123,7 @@ public: CGAL_precondition (m_labels.is_valid_ground_truth (ground_truth)); CGAL_precondition (m_labels.is_valid_ground_truth (result)); - for (const auto& p : CGAL::make_range + for (const auto p : CGAL::make_range (boost::make_zip_iterator(boost::make_tuple(ground_truth.begin(), result.begin())), boost::make_zip_iterator(boost::make_tuple(ground_truth.end(), result.end())))) { From a1f5fd4ab6862398981f078eff91ecbc09eb4aae Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 16:49:58 +0100 Subject: [PATCH 149/317] halfedge ds range loop analysis copy to ref warning fixed --- .../test/HalfedgeDS/test_hds_range_based_loops.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HalfedgeDS/test/HalfedgeDS/test_hds_range_based_loops.cpp b/HalfedgeDS/test/HalfedgeDS/test_hds_range_based_loops.cpp index 455367d6836..893d5e40b0e 100644 --- a/HalfedgeDS/test/HalfedgeDS/test_hds_range_based_loops.cpp +++ b/HalfedgeDS/test/HalfedgeDS/test_hds_range_based_loops.cpp @@ -47,7 +47,7 @@ void test_const_vertex_handles( auto lit = hds_list.vertices_begin(); assert(hds_list.vertex_handles().size() == 1); - for (const auto vh : hds_list.vertex_handles()) { + for (const auto& vh : hds_list.vertex_handles()) { assert(vh == lit); assert(vh->point() == lit->point()); assert(vh->halfedge() == lit->halfedge()); @@ -57,7 +57,7 @@ void test_const_vertex_handles( auto vit = hds_vector.vertices_begin(); assert(hds_vector.vertex_handles().size() == 1); - for (const auto vh : hds_vector.vertex_handles()) { + for (const auto& vh : hds_vector.vertex_handles()) { assert(vh == vit); assert(vh->point() == vit->point()); assert(vh->halfedge() == vit->halfedge()); @@ -97,7 +97,7 @@ void test_const_face_handles( auto lit = hds_list.faces_begin(); assert(hds_list.face_handles().size() == 2); - for (const auto fh : hds_list.face_handles()) { + for (const auto& fh : hds_list.face_handles()) { assert(fh == lit); assert(fh->plane() == lit->plane()); assert(fh->halfedge() == lit->halfedge()); @@ -107,7 +107,7 @@ void test_const_face_handles( auto vit = hds_vector.faces_begin(); assert(hds_vector.face_handles().size() == 2); - for (const auto fh : hds_vector.face_handles()) { + for (const auto& fh : hds_vector.face_handles()) { assert(fh == vit); assert(fh->plane() == vit->plane()); assert(fh->halfedge() == vit->halfedge()); @@ -147,7 +147,7 @@ void test_const_halfedge_handles( auto lit = hds_list.halfedges_begin(); assert(hds_list.halfedge_handles().size() == 2); - for (const auto hh : hds_list.halfedge_handles()) { + for (const auto& hh : hds_list.halfedge_handles()) { assert(hh == lit); assert(hh->face() == lit->face()); assert(hh->vertex() == lit->vertex()); @@ -157,7 +157,7 @@ void test_const_halfedge_handles( auto vit = hds_vector.halfedges_begin(); assert(hds_vector.halfedge_handles().size() == 2); - for (const auto hh : hds_vector.halfedge_handles()) { + for (const auto& hh : hds_vector.halfedge_handles()) { assert(hh == vit); assert(hh->face() == vit->face()); assert(hh->vertex() == vit->vertex()); From 331c98d65599f493193558afb79648b66f9aa44b Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 16:56:39 +0100 Subject: [PATCH 150/317] optimal bounding box range loop analysis copy to ref warning fixed --- .../Optimal_bounding_box/obb_with_point_maps_example.cpp | 4 ++-- .../Optimal_bounding_box/test_optimization_algorithms.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/obb_with_point_maps_example.cpp b/Optimal_bounding_box/examples/Optimal_bounding_box/obb_with_point_maps_example.cpp index 9129aef472d..d9588b8f644 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/obb_with_point_maps_example.cpp +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/obb_with_point_maps_example.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) // one can associate positions to the vertices of the mesh without changing the mesh std::unordered_map translated_positions; - for(const vertex_descriptor v : vertices(sm)) + for(const vertex_descriptor& v : vertices(sm)) translated_positions[v] = sm.point(v) + Vector(1, 2, 3); CGAL::oriented_bounding_box(sm, obb_points, @@ -42,7 +42,7 @@ int main(int argc, char** argv) // using a range of points std::vector points; - for(const vertex_descriptor v : vertices(sm)) + for(const vertex_descriptor& v : vertices(sm)) points.push_back(sm.point(v)); CGAL::oriented_bounding_box(points, obb_points); diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp b/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp index eee97967b5b..a7b330b09e6 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp +++ b/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp @@ -91,7 +91,7 @@ void test_OBB_of_mesh(const std::string fname, } std::vector points; - for(const auto v : vertices(mesh)) + for(const auto& v : vertices(mesh)) points.push_back(v->point()); test_OBB_data(points, expected_vol); From a96ff6092de3c2c2c5e4e6a7293ba113bb3c03ae Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 16:59:44 +0100 Subject: [PATCH 151/317] range loop analysis copy to ref warning fixed --- .../test/Point_set_processing_3/remove_outliers_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp index a77494a9252..7497c89674f 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp @@ -140,7 +140,7 @@ int main(int argc, char * argv[]) struct A{}; std::vector< std::pair > points_bis; points_bis.reserve(points.size()); - for (const Point p : points) + for (const Point& p : points) points_bis.push_back( std::make_pair(p, A()) ); test_avg_knn_sq_distance(points_bis, nb_neighbors_remove_outliers, removed_percentage, CGAL::First_of_pair_property_map>()); From 357186df4025eb52a9ef84adbe256d21910e17f4 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 17:02:30 +0100 Subject: [PATCH 152/317] polyhedron range loop analysis copy to ref warning fixed --- .../test/Polyhedron/test_polyhedron_range_based_loops.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polyhedron/test/Polyhedron/test_polyhedron_range_based_loops.cpp b/Polyhedron/test/Polyhedron/test_polyhedron_range_based_loops.cpp index da08b8d781f..ee04f5385e1 100644 --- a/Polyhedron/test/Polyhedron/test_polyhedron_range_based_loops.cpp +++ b/Polyhedron/test/Polyhedron/test_polyhedron_range_based_loops.cpp @@ -38,7 +38,7 @@ void test_const_vertex_handles_and_points( auto pit = polyhedron.points_begin(); auto vit = polyhedron.vertices_begin(); - for (const auto vh : polyhedron.vertex_handles()) { + for (const auto& vh : polyhedron.vertex_handles()) { assert(vh == vit); assert(vh->point() == vit->point()); assert(vh->point() == *pit); @@ -88,7 +88,7 @@ void test_const_facet_handles_and_planes( auto pit = polyhedron.planes_begin(); auto fit = polyhedron.facets_begin(); - for (const auto fh : polyhedron.facet_handles()) { + for (const auto& fh : polyhedron.facet_handles()) { assert(fh == fit); assert(fh->plane() == fit->plane()); assert(fh->plane() == *pit); @@ -133,7 +133,7 @@ void test_const_halfedge_handles_and_edges( const Polyhedron& polyhedron) { auto hit = polyhedron.halfedges_begin(); - for (const auto hh : polyhedron.halfedge_handles()) { + for (const auto& hh : polyhedron.halfedge_handles()) { assert(hh == hit); assert(hh->facet() == hit->facet()); assert(hh->vertex() == hit->vertex()); From 3fbb2693922010896ff50e310af0ef44185df626 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 7 Jan 2021 17:05:04 +0100 Subject: [PATCH 153/317] spatial searching range loop analysis ref to copy warning fixed --- .../examples/Spatial_searching/parallel_kdtree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_searching/examples/Spatial_searching/parallel_kdtree.cpp b/Spatial_searching/examples/Spatial_searching/parallel_kdtree.cpp index a14612a5f22..12f474909f6 100644 --- a/Spatial_searching/examples/Spatial_searching/parallel_kdtree.cpp +++ b/Spatial_searching/examples/Spatial_searching/parallel_kdtree.cpp @@ -47,7 +47,7 @@ int main() // neighbor search returns a set of pair of // point and distance , here we // keep the points only - for (const Point_with_distance& pwd : search) + for (const Point_with_distance pwd : search) neighbors[s].push_back (pwd.first); } }); From fbbff6794f6d3567231322ded5988d53b752274b Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 8 Jan 2021 10:15:12 +0100 Subject: [PATCH 154/317] surface mesh approximation range loop analysis copy to ref warning fixed --- .../vsa_isotropic_metric_example.cpp | 2 +- .../Surface_mesh_approximation/L21_metric_plane_proxy.h | 2 +- .../CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h | 2 +- .../include/CGAL/Variational_shape_approximation.h | 6 +++--- .../test/Surface_mesh_approximation/vsa_metric_test.cpp | 2 +- .../Surface_mesh_approximation/vsa_teleportation_test.cpp | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp index d3e1dd71e8c..e8a066b59a8 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp @@ -46,7 +46,7 @@ struct Compact_metric_point_proxy // fitting center Vector_3 center = CGAL::NULL_VECTOR; FT sum_areas = FT(0.0); - for(const face_descriptor f : faces) { + for(const face_descriptor& f : faces) { center = center + (center_pmap[f] - CGAL::ORIGIN) * area_pmap[f]; sum_areas += area_pmap[f]; } diff --git a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h index 75f324d7469..4a38a9783da 100644 --- a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h +++ b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h @@ -127,7 +127,7 @@ public: // fitting normal Vector_3 norm = CGAL::NULL_VECTOR; - for(const face_descriptor f : faces) { + for(const face_descriptor& f : faces) { norm = m_sum_functor(norm, m_scale_functor(get(m_fnmap, f), get(m_famap, f))); } diff --git a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h index 9ced8858388..eee12468f63 100644 --- a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h +++ b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h @@ -125,7 +125,7 @@ public: CGAL_assertion(!faces.empty()); std::list tris; - for(const face_descriptor f : faces) { + for(const face_descriptor& f : faces) { const halfedge_descriptor he = halfedge(f, *m_tm); const Point_3 &p0 = m_vpmap[source(he, *m_tm)]; const Point_3 &p1 = m_vpmap[target(he, *m_tm)]; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 59a85d361a5..53e6e4867f0 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1552,7 +1552,7 @@ private: std::cerr << "#chord_anchor " << m_bcycles.back().num_anchors << std::endl; #endif - for(const halfedge_descriptor he : chord) + for(const halfedge_descriptor& he : chord) he_candidates.erase(he); } while (he_start != he_mark); } @@ -1600,7 +1600,7 @@ private: FT dist_max(0.0); chord_vec = scale_functor(chord_vec, FT(1.0) / CGAL::approximate_sqrt(chord_vec.squared_length())); - for(const halfedge_descriptor he : chord) { + for(const halfedge_descriptor& he : chord) { Vector_3 vec = vector_functor(pt_begin, m_vpoint_map[target(he, *m_ptm)]); vec = cross_product_functor(chord_vec, vec); const FT dist = CGAL::approximate_sqrt(vec.squared_length()); @@ -1612,7 +1612,7 @@ private: } else { FT dist_max(0.0); - for(const halfedge_descriptor he : chord) { + for(const halfedge_descriptor& he : chord) { const FT dist = CGAL::approximate_sqrt(CGAL::squared_distance( pt_begin, m_vpoint_map[target(he, *m_ptm)])); if (dist > dist_max) { diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp index 4b8fe1e65d4..186048d8631 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp @@ -46,7 +46,7 @@ struct Compact_metric_point_proxy { // fitting center Vector_3 center = CGAL::NULL_VECTOR; FT sum_areas = FT(0.0); - for(const face_descriptor f : faces) { + for(const face_descriptor& f : faces) { center = center + (center_pmap[f] - CGAL::ORIGIN) * area_pmap[f]; sum_areas += area_pmap[f]; } diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp index 4e7411f1921..f1d10a9a57c 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp @@ -104,7 +104,7 @@ int main() CGAL::Bbox_3 bbox; - for(const vertex_descriptor v : vertices(mesh)) + for(const vertex_descriptor& v : vertices(mesh)) bbox += vpmap[v].bbox(); const FT ymin = bbox.ymin(), ymax = bbox.ymax(), yrange = ymax - ymin; std::cout << "Range along y axis: [" << ymin << ", " << ymax << "]" << std::endl; @@ -113,7 +113,7 @@ int main() std::size_t planar_pxidx = static_cast(-1); std::size_t num_planar_faces = 0; bool first = true; - for(const face_descriptor f : faces(mesh)) { + for(const face_descriptor& f : faces(mesh)) { const halfedge_descriptor he = halfedge(f, mesh); const Point_3 &p0 = vpmap[source(he, mesh)]; const Point_3 &p1 = vpmap[target(he, mesh)]; From bd600286ee2c324caac3461b6305e71fb0d6e729 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 8 Jan 2021 10:20:34 +0100 Subject: [PATCH 155/317] surface mesh simplification range loop analysis copy to ref warning fixed --- .../Policies/Edge_collapse/internal/Lindstrom_Turk_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h index 7b0ddb69c4f..fd02ec777fa 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h @@ -491,7 +491,7 @@ add_shape_optimization_constraints(const vertex_descriptor_vector& link) 0.0, 0.0, s); Vector c = NULL_VECTOR; - for(const vertex_descriptor v : link) + for(const vertex_descriptor& v : link) c = c + (ORIGIN - get_point(v)); CGAL_SMS_LT_TRACE(1," Adding shape optimization constraint. Shape vector: " << xyz_to_string(c)); @@ -540,7 +540,7 @@ compute_shape_cost(const Point& p, const vertex_descriptor_vector& link) { FT rCost(0); - for(const vertex_descriptor v : link) + for(const vertex_descriptor& v : link) rCost += squared_distance(p, get_point(v)); return rCost; From 086299c56e174407783a1f81b928716432a4e1a8 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 8 Jan 2021 10:39:24 +0100 Subject: [PATCH 156/317] tetrahedral remeshing range loop analysis copy to ref and auto warnings fixed --- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 2 +- .../internal/collapse_short_edges.h | 18 +++++++++--------- .../internal/smooth_vertices.h | 4 ++-- 3 files changed, 12 insertions(+), 12 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 677d37124fa..5c2f6d69a08 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 @@ -301,7 +301,7 @@ bool build_infinite_cells(Tr& tr, #endif // add the facets to the incident cells map - for (const Cell_handle c : infinite_cells) + for (const Cell_handle& c : infinite_cells) if(!add_infinite_facets_to_incident_cells_map(c, 0, incident_cells_map, verbose)) return false; diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h index 526d9dd7d82..4ce1fe25af0 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h @@ -219,7 +219,7 @@ public: Vertex_handle infinite_vertex = triangulation.infinite_vertex(); bool v0_updated = false; - for (const Cell_handle ch : find_incident) + for (const Cell_handle& ch : find_incident) { if (invalid_cells.find(ch) == invalid_cells.end()) //valid cell { @@ -445,7 +445,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, c3t3.triangulation().finite_incident_cells(v0, std::back_inserter(cells_to_check)); - for (const Cell_handle ch : cells_to_check) + for (const Cell_handle& ch : cells_to_check) { if (!ch->has_vertex(v1)) { @@ -478,7 +478,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, c3t3.triangulation().finite_incident_cells(v1, std::back_inserter(cells_to_check)); - for (const Cell_handle ch : cells_to_check) + for (const Cell_handle& ch : cells_to_check) { if (!ch->has_vertex(v0)) { @@ -792,7 +792,7 @@ collapse(const typename C3t3::Cell_handle ch, std::vector cells_to_remove; boost::unordered_set invalid_cells; - for(const Cell_handle c : inc_cells) + for(const Cell_handle& c : inc_cells) { const int v0_id = c->index(vh0); const int v1_id = c->index(vh1); @@ -838,7 +838,7 @@ collapse(const typename C3t3::Cell_handle ch, const Vertex_handle infinite_vertex = tr.infinite_vertex(); bool v0_updated = false; - for (const Cell_handle c : find_incident) + for (const Cell_handle& c : find_incident) { if (invalid_cells.find(c) == invalid_cells.end())//valid cell { @@ -856,7 +856,7 @@ collapse(const typename C3t3::Cell_handle ch, = { { {{0,1}}, {{0,2}}, {{0,3}}, {{1,2}}, {{1,3}}, {{2,3}} } }; //vertex indices in cells const Vertex_handle vkept = vh0; const Vertex_handle vdeleted = vh1; - for (const Cell_handle c : cells_to_update) + for (const Cell_handle& c : cells_to_update) { for (const std::array& ei : edges) { @@ -886,7 +886,7 @@ collapse(const typename C3t3::Cell_handle ch, // update complex facets //Update the vertex before removing it - for (const Cell_handle c : cells_to_update) + for (const Cell_handle& c : cells_to_update) { if (invalid_cells.find(c) == invalid_cells.end()) //valid cell { @@ -1005,7 +1005,7 @@ bool is_cells_set_manifold(const C3t3&, } boost::unordered_map edges; - for (const std::pair& fvv : facets) + for (const auto& fvv : facets) { if (fvv.second != 1) continue; @@ -1021,7 +1021,7 @@ bool is_cells_set_manifold(const C3t3&, } } - for (const std::pair& evv : edges) + for (const auto& evv : edges) if (evv.second != 2) return false; 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 d22d6fdf65c..7c784af9820 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -162,7 +162,7 @@ private: } } - for (const std::pair& fn : fnormals) + for (const auto& fn : fnormals) { if(fn.second != CGAL::NULL_VECTOR) continue; @@ -347,7 +347,7 @@ private: v->set_point(typename Tr::Point(pv + frac * move)); bool valid_try = true; - for (const typename Tr::Cell_handle ci : inc_cells) + for (const typename Tr::Cell_handle& ci : inc_cells) { if (CGAL::POSITIVE != CGAL::orientation(point(ci->vertex(0)->point()), point(ci->vertex(1)->point()), From 17e83d573d6a4e3f58267c14ab8c81b5bf7be6ea Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 8 Jan 2021 11:40:09 +0100 Subject: [PATCH 157/317] Fix demos --- AABB_tree/demo/AABB_tree/AABB_demo.cpp | 18 ++++-- AABB_tree/demo/AABB_tree/Scene.cpp | 34 ++++++----- AABB_tree/demo/AABB_tree/Scene.h | 2 +- .../demo/Alpha_shapes_3/Alpha_shape_3.cpp | 22 +++++-- Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp | 28 ++++----- .../Circular_kernel_3/Circular_kernel_3.cpp | 18 ++++-- .../demo/Circular_kernel_3/Viewer.cpp | 30 +++++----- .../Linear_cell_complex_3_demo.cpp | 8 +-- .../Linear_cell_complex/basic_viewer.h | 57 ++++++++++--------- .../periodic_3_triangulation_3_demo.cpp | 6 ++ .../Periodic_Lloyd_3/Periodic_Lloyd_3.cpp | 15 +++-- .../Principal_component_analysis/PCA_demo.cpp | 10 ++++ .../demo/Triangulation_3/T3_demo.cpp | 14 +++-- 13 files changed, 163 insertions(+), 99 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/AABB_demo.cpp b/AABB_tree/demo/AABB_tree/AABB_demo.cpp index c69f7aa1281..061036cd9cd 100644 --- a/AABB_tree/demo/AABB_tree/AABB_demo.cpp +++ b/AABB_tree/demo/AABB_tree/AABB_demo.cpp @@ -23,14 +23,24 @@ int main(int argc, char **argv) { + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setVersion(4, 1); +#else + fmt.setVersion(4, 3); +#endif + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + //for windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); app.setOrganizationName("INRIA"); app.setApplicationName("AABB tree demo"); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - app.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif // Import resources from libCGALQt (Qt5). CGAL_QT_INIT_RESOURCES; diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index 69ba683a21b..a48a517423a 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -91,8 +91,8 @@ void Scene::compile_shaders() //Vertex source code const char vertex_source[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 f_matrix;\n" "void main(void)\n" @@ -103,10 +103,11 @@ void Scene::compile_shaders() //Vertex source code const char fragment_source[] = { - "#version 120 \n" + "#version 150 \n" "uniform highp vec4 color; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = color; \n" + "out_color = color; \n" "} \n" "\n" }; @@ -139,26 +140,27 @@ void Scene::compile_shaders() //Vertex source code const char tex_vertex_source[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec2 tex_coord; \n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec2 tex_coord; \n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 f_matrix;\n" - "varying highp vec2 texc;\n" + "out highp vec2 texc;\n" "void main(void)\n" "{\n" " gl_Position = mvp_matrix * f_matrix * vertex;\n" - " texc = tex_coord;\n" + " texc = tex_coord;\n" "}" }; //Vertex source code const char tex_fragment_source[] = { - "#version 120 \n" + "#version 150 \n" "uniform sampler2D texture;\n" - "varying highp vec2 texc;\n" + "in highp vec2 texc;\n" + "out highp vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = texture2D(texture, texc.st);\n" + "out_color = texture2D(texture, texc.st);\n" "} \n" "\n" }; @@ -1319,12 +1321,8 @@ void Scene::deactivate_cutting_plane() } void Scene::initGL() { - gl = new QOpenGLFunctions_2_1(); - if(!gl->initializeOpenGLFunctions()) - { - qFatal("ERROR : OpenGL Functions not initialized. Check your OpenGL Verison (should be >=3.3)"); - exit(1); - } + gl = new QOpenGLFunctions(); + gl->initializeOpenGLFunctions(); gl->glGenTextures(1, &textureId); compile_shaders(); diff --git a/AABB_tree/demo/AABB_tree/Scene.h b/AABB_tree/demo/AABB_tree/Scene.h index 95ea74cdc33..44d7b8239ce 100644 --- a/AABB_tree/demo/AABB_tree/Scene.h +++ b/AABB_tree/demo/AABB_tree/Scene.h @@ -86,7 +86,7 @@ public: private: // member data - QOpenGLFunctions_2_1 *gl; + QOpenGLFunctions *gl; Bbox m_bbox; Polyhedron *m_pPolyhedron; std::list m_points; diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp index dbe053e9824..a83e4ae1683 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp @@ -8,15 +8,27 @@ int main(int argc, char** argv) { - QApplication application(argc,argv); + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setVersion(4, 1); +#else + fmt.setVersion(4, 3); +#endif + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + + //for Windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif + + QApplication application(argc,argv); application.setOrganizationDomain("geometryfactory.com"); application.setOrganizationName("GeometryFactory"); application.setApplicationName("Alpha Shape Reconstruction"); - //for Windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - application.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif // Import resources from libCGALQt (Qt5). // See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp index a30e7a9a133..ad0e388412c 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp @@ -29,14 +29,14 @@ void Viewer::compile_shaders() //Vertex source code const char vertex_source[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 normal;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "out highp vec4 fP; \n" + "out highp vec3 fN; \n" "void main(void)\n" "{\n" " fP = mv_matrix * vertex; \n" @@ -47,15 +47,16 @@ void Viewer::compile_shaders() //Fragment source code const char fragment_source[] = { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "#version 150 \n" + "in highp vec4 fP; \n" + "in highp vec3 fN; \n" "uniform highp vec4 color; \n" "uniform highp vec4 light_pos; \n" "uniform highp vec4 light_diff; \n" "uniform highp vec4 light_spec; \n" "uniform highp vec4 light_amb; \n" "uniform float spec_power ; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" @@ -70,7 +71,7 @@ void Viewer::compile_shaders() " highp vec4 diffuse = abs(dot(N,L)) * light_diff * color; \n" " highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - "gl_FragColor = light_amb*color + diffuse + specular ; \n" + "out_color = light_amb*color + diffuse + specular ; \n" "} \n" "\n" }; @@ -105,8 +106,8 @@ rendering_program.bind(); //Vertex source code const char vertex_source_points[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp float point_size;\n" @@ -119,11 +120,12 @@ const char vertex_source_points[] = //Vertex source code const char fragment_source_points[] = { - "#version 120 \n" + "#version 150 \n" "uniform highp vec4 color; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = color; \n" + "out_color = color; \n" "} \n" "\n" }; diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp index 513722fec61..72c7a0a4c09 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp @@ -3,15 +3,25 @@ int main(int argc, char** argv) { + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setVersion(4, 1); +#else + fmt.setVersion(4, 3); +#endif + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); // Read command lines arguments. + //for Windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif QApplication application(argc,argv); // Instantiate the viewer. Viewer viewer; - //for Windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - application.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif viewer.setWindowTitle("Intersection points of randomly generated circles."); // Make the viewer window visible on screen. diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index c026e1cce0b..69901dbbd1c 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -32,16 +32,16 @@ void Viewer::compile_shaders() //Vertex source code const char vertex_source[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" - "attribute highp vec4 center;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 normal;\n" + "in highp vec4 center;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "out highp vec4 fP; \n" + "out highp vec3 fN; \n" "void main(void)\n" "{\n" " fP = mv_matrix * vertex; \n" @@ -52,15 +52,16 @@ void Viewer::compile_shaders() //Vertex source code const char fragment_source[] = { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "#version 150 \n" + "in highp vec4 fP; \n" + "in highp vec3 fN; \n" "uniform highp vec4 color; \n" "uniform highp vec4 light_pos; \n" "uniform highp vec4 light_diff; \n" "uniform highp vec4 light_spec; \n" "uniform highp vec4 light_amb; \n" "uniform float spec_power ; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" @@ -75,7 +76,7 @@ void Viewer::compile_shaders() " highp vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n" " highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - "gl_FragColor = light_amb*color + diffuse ; \n" + "out_color = light_amb*color + diffuse ; \n" "} \n" "\n" }; @@ -111,8 +112,8 @@ void Viewer::compile_shaders() //Vertex source code const char vertex_source_no_ext[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" "void main(void)\n" "{\n" @@ -123,10 +124,11 @@ void Viewer::compile_shaders() //Vertex source code const char fragment_source_no_ext[] = { - "#version 120 \n" + "#version 150 \n" "uniform highp vec4 color; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = color; \n" + "out_color = color; \n" "} \n" "\n" }; diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp index 42713752435..1672adad3f8 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp @@ -23,15 +23,15 @@ int main(int argc, char** argv) // std::cout<<"Size of dart: "<= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif QApplication application(argc,argv); application.setOrganizationDomain("cgal.org"); application.setOrganizationName("CNRS and LIRIS' Establishments"); application.setApplicationName("3D Linear Cell Complex"); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - application.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif // Import resources from libCGALQt5 // See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE diff --git a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h index db5a49f847f..b6b89a1b416 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h +++ b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -43,15 +43,15 @@ typedef Local_kernel::Vector_3 Local_vector; //Vertex source code const char vertex_source_mono[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 normal;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "out highp vec4 fP; \n" + "out highp vec3 fN; \n" "void main(void)\n" "{\n" " fP = mv_matrix * vertex; \n" @@ -62,17 +62,17 @@ const char vertex_source_mono[] = const char vertex_source_color[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" - "attribute highp vec3 color;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" + "in highp vec3 normal;\n" + "in highp vec3 color;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" + "out highp vec4 fP; \n" + "out highp vec3 fN; \n" + "out highp vec4 fColor; \n" "void main(void)\n" "{\n" " fP = mv_matrix * vertex; \n" @@ -85,15 +85,16 @@ const char vertex_source_color[] = //Vertex source code const char fragment_source_mono[] = { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" + "#version 150 \n" + "in highp vec4 fP; \n" + "in highp vec3 fN; \n" "uniform highp vec4 color; \n" "uniform highp vec4 light_pos; \n" "uniform highp vec4 light_diff; \n" "uniform highp vec4 light_spec; \n" "uniform highp vec4 light_amb; \n" "uniform float spec_power ; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" @@ -108,22 +109,23 @@ const char fragment_source_mono[] = " highp vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n" " highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - "gl_FragColor = light_amb*color + diffuse ; \n" + "out_color = light_amb*color + diffuse ; \n" "} \n" "\n" }; const char fragment_source_color[] = { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" + "#version 150 \n" + "in highp vec4 fP; \n" + "in highp vec3 fN; \n" + "in highp vec4 fColor; \n" "uniform highp vec4 light_pos; \n" "uniform highp vec4 light_diff; \n" "uniform highp vec4 light_spec; \n" "uniform highp vec4 light_amb; \n" "uniform float spec_power ; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" @@ -138,7 +140,7 @@ const char fragment_source_color[] = " highp vec4 diffuse = max(dot(N,L), 0.0) * light_diff * fColor; \n" " highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - "gl_FragColor = light_amb*fColor + diffuse ; \n" + "out_color = light_amb*fColor + diffuse ; \n" "} \n" "\n" }; @@ -146,8 +148,8 @@ const char fragment_source_color[] = //Vertex source code const char vertex_source_p_l[] = { - "#version 120 \n" - "attribute highp vec4 vertex;\n" + "#version 150 \n" + "in highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" "void main(void)\n" "{\n" @@ -157,10 +159,11 @@ const char vertex_source_p_l[] = //Vertex source code const char fragment_source_p_l[] = { - "#version 120 \n" + "#version 150 \n" "uniform highp vec4 color; \n" + "out highp vec4 out_color; \n" "void main(void) { \n" - "gl_FragColor = color; \n" + "out_color = color; \n" "} \n" "\n" }; @@ -194,7 +197,7 @@ typename K::Vector_3 compute_normal_of_face(const std::vectorsetupUi(w); diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp index 75f1f8ee396..6e0435f4b4e 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp @@ -4,15 +4,20 @@ int main(int argc, char** argv) { + QSurfaceFormat fmt; + fmt.setVersion(2, 1); + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + //for windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif QApplication application(argc,argv); - application.setOrganizationDomain("inria.fr"); application.setOrganizationName("INRIA"); application.setApplicationName("3D Periodic Lloyd"); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - application.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif // Import resources from libCGAL (QT5). // See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE diff --git a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp index f1b7a78b624..63581649155 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp @@ -21,6 +21,16 @@ int main(int argc, char **argv) { + QSurfaceFormat fmt; + fmt.setVersion(2, 1); + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); +#endif + QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); app.setOrganizationName("INRIA"); diff --git a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp index 7b70c57dd07..4d3be25b5ac 100644 --- a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp @@ -16,15 +16,21 @@ int main(int argc, char** argv) { + QSurfaceFormat fmt; + fmt.setVersion(2, 1); + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + //for windows + #if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); + #endif QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); app.setOrganizationName("INRIA"); app.setApplicationName("3D Triangulation Demo"); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - app.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif MainWindow mw; mw.show(); From 78f1b28e41da7dd11cbb964fd767850e49c5d031 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 8 Jan 2021 12:46:39 +0100 Subject: [PATCH 158/317] Fix message about context not made current --- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 932c4ab255d..d004749aec5 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -358,6 +358,7 @@ public: ~Basic_viewer_qt() { + makeCurrent(); for (unsigned int i=0; i Date: Fri, 8 Jan 2021 14:52:28 +0100 Subject: [PATCH 159/317] fix invalid replacement spotted by @maxGimeno --- Generator/include/CGAL/random_convex_set_2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Generator/include/CGAL/random_convex_set_2.h b/Generator/include/CGAL/random_convex_set_2.h index 56313839e55..f8189fcea1c 100644 --- a/Generator/include/CGAL/random_convex_set_2.h +++ b/Generator/include/CGAL/random_convex_set_2.h @@ -101,7 +101,9 @@ random_convex_set_2( std::size_t n, points.begin(), points.end(), points.begin(), - [¢roid, &sum, &scale](const Point_2& p) { return sum(p, scale(centroid, FT( -1))); }); + [¢roid, &new_centroid, &sum, &scale](const Point_2& p) + {return sum(p, sum( centroid, scale(new_centroid, FT( -1)))); } + ); // compute maximal coordinate: FT maxcoord( max_coordinate( From 3ec3ffc518a0da24e9a0f58470dc63be1b0c1c43 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Jan 2021 11:05:10 +0100 Subject: [PATCH 160/317] WIP --- .../include/CGAL/Qt/Basic_viewer_qt.h | 21 ---------- .../include/CGAL/Qt/Context_initialization.h | 41 +++++++++++++++++++ 2 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 GraphicsView/include/CGAL/Qt/Context_initialization.h diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index d004749aec5..be3b583a0c0 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -54,27 +54,6 @@ namespace CGAL { -int& code_to_call_before_creation_of_QCoreApplication(int& i) { - QSurfaceFormat fmt; -#ifdef Q_OS_MAC - fmt.setVersion(4, 1); -#else - fmt.setVersion(4, 3); -#endif - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); -#endif - - //We set the locale to avoid any trouble with VTK - setlocale(LC_ALL, "C"); - return i; -} //------------------------------------------------------------------------------ const char vertex_source_color[] = { diff --git a/GraphicsView/include/CGAL/Qt/Context_initialization.h b/GraphicsView/include/CGAL/Qt/Context_initialization.h new file mode 100644 index 00000000000..2c29b4eb6a8 --- /dev/null +++ b/GraphicsView/include/CGAL/Qt/Context_initialization.h @@ -0,0 +1,41 @@ +// Copyright (c) 2021 GeometryFactory Sarl (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) : Maxime Gimeno + +#ifndef CGAL_QT_CONTEXT_INITIALIZATION_H +#define CGAL_QT_CONTEXT_INITIALIZATION_H +namespace CGAL +{ +void init_ogl_context(int major, int minor) { + QSurfaceFormat fmt; +#ifdef Q_OS_MAC + fmt.setVersion(4, 1); +#else + fmt.setVersion(4, 3); +#endif + fmt.setRenderableType(QSurfaceFormat::OpenGL); + fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setOption(QSurfaceFormat::DebugContext); + QSurfaceFormat::setDefaultFormat(fmt); + + //for windows +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); +#endif + + //We set the locale to avoid any trouble with VTK + setlocale(LC_ALL, "C"); + return i; +} + +} + +#endif // CGAL_QT_CONTEXT_INITIALIZATION_H From 95192d6d4b7637bdd9c0347b1b4a8acac424f834 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Jan 2021 12:43:53 +0100 Subject: [PATCH 161/317] factorize context initialization --- AABB_tree/demo/AABB_tree/AABB_demo.cpp | 18 +++--------------- .../demo/Alpha_shapes_3/Alpha_shape_3.cpp | 18 ++---------------- .../Circular_kernel_3/Circular_kernel_3.cpp | 19 ++----------------- .../include/CGAL/Qt/Context_initialization.h | 15 +++++++++++---- .../Linear_cell_complex_3_demo.cpp | 6 ++---- .../include/CGAL/draw_linear_cell_complex.h | 4 +++- Nef_3/include/CGAL/draw_nef_3.h | 4 +++- .../CGAL/draw_periodic_2_triangulation_2.h | 4 +++- .../periodic_3_triangulation_3_demo.cpp | 8 ++------ .../Periodic_Lloyd_3/Periodic_Lloyd_3.cpp | 14 ++++---------- Point_set_3/include/CGAL/draw_point_set_3.h | 4 +++- Polygon/include/CGAL/draw_polygon_2.h | 4 +++- .../include/CGAL/draw_polygon_with_holes_2.h | 4 +++- Polyhedron/include/CGAL/draw_polyhedron.h | 4 +++- .../Principal_component_analysis/PCA_demo.cpp | 11 ++--------- Surface_mesh/include/CGAL/draw_surface_mesh.h | 4 +++- .../include/CGAL/draw_face_graph_with_paths.h | 4 +++- .../include/CGAL/draw_triangulation_2.h | 4 +++- .../demo/Triangulation_3/T3_demo.cpp | 13 +++---------- .../include/CGAL/draw_triangulation_3.h | 4 +++- .../include/CGAL/draw_voronoi_diagram_2.h | 4 +++- 21 files changed, 67 insertions(+), 103 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/AABB_demo.cpp b/AABB_tree/demo/AABB_tree/AABB_demo.cpp index 061036cd9cd..4e643e352f3 100644 --- a/AABB_tree/demo/AABB_tree/AABB_demo.cpp +++ b/AABB_tree/demo/AABB_tree/AABB_demo.cpp @@ -19,24 +19,12 @@ #include #include #include - +#include int main(int argc, char **argv) { - QSurfaceFormat fmt; -#ifdef Q_OS_MAC - fmt.setVersion(4, 1); -#else - fmt.setVersion(4, 3); -#endif - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + + CGAL::init_ogl_context(4,3); QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); app.setOrganizationName("INRIA"); diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp index a83e4ae1683..8c9baa63e53 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp @@ -5,27 +5,13 @@ #include +#include int main(int argc, char** argv) { - QSurfaceFormat fmt; -#ifdef Q_OS_MAC - fmt.setVersion(4, 1); -#else - fmt.setVersion(4, 3); -#endif - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - - //for Windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + CGAL::init_ogl_context(4,3); QApplication application(argc,argv); - application.setOrganizationDomain("geometryfactory.com"); application.setOrganizationName("GeometryFactory"); application.setApplicationName("Alpha Shape Reconstruction"); diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp index 72c7a0a4c09..72fe7f88c8b 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp @@ -1,25 +1,10 @@ #include "Viewer.h" #include - +#include int main(int argc, char** argv) { - QSurfaceFormat fmt; -#ifdef Q_OS_MAC - fmt.setVersion(4, 1); -#else - fmt.setVersion(4, 3); -#endif - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - // Read command lines arguments. - //for Windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + CGAL::init_ogl_context(4,3); QApplication application(argc,argv); - // Instantiate the viewer. Viewer viewer; viewer.setWindowTitle("Intersection points of randomly generated circles."); diff --git a/GraphicsView/include/CGAL/Qt/Context_initialization.h b/GraphicsView/include/CGAL/Qt/Context_initialization.h index 2c29b4eb6a8..1ad56f04a79 100644 --- a/GraphicsView/include/CGAL/Qt/Context_initialization.h +++ b/GraphicsView/include/CGAL/Qt/Context_initialization.h @@ -12,14 +12,22 @@ #ifndef CGAL_QT_CONTEXT_INITIALIZATION_H #define CGAL_QT_CONTEXT_INITIALIZATION_H + namespace CGAL { -void init_ogl_context(int major, int minor) { +inline void init_ogl_context(int major, int minor) { QSurfaceFormat fmt; #ifdef Q_OS_MAC - fmt.setVersion(4, 1); + if(major == 4) + { + fmt.setVersion(4, 1); + } + else + { + fmt.setVersion(major, minor); + } #else - fmt.setVersion(4, 3); + fmt.setVersion(major, minor); #endif fmt.setRenderableType(QSurfaceFormat::OpenGL); fmt.setProfile(QSurfaceFormat::CoreProfile); @@ -33,7 +41,6 @@ void init_ogl_context(int major, int minor) { //We set the locale to avoid any trouble with VTK setlocale(LC_ALL, "C"); - return i; } } diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp index 1672adad3f8..e27fbb07aad 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp @@ -14,6 +14,7 @@ #include #include #include +#include // Global random CGAL::Random myrandom; @@ -23,10 +24,7 @@ int main(int argc, char** argv) // std::cout<<"Size of dart: "<= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + CGAL::init_ogl_context(4,3); QApplication application(argc,argv); application.setOrganizationDomain("cgal.org"); diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 650d78b0893..a34263b2a47 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -13,6 +13,7 @@ #define CGAL_DRAW_LCC_H #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -404,9 +405,10 @@ void draw(const CGAL_LCC_TYPE& alcc, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"lccviewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); SimpleLCCViewerQt mainwindow(app.activeWindow(), &alcc, title, nofill, drawing_functor); mainwindow.show(); diff --git a/Nef_3/include/CGAL/draw_nef_3.h b/Nef_3/include/CGAL/draw_nef_3.h index f4babd5f6a6..1ccdb02415f 100644 --- a/Nef_3/include/CGAL/draw_nef_3.h +++ b/Nef_3/include/CGAL/draw_nef_3.h @@ -15,6 +15,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -253,9 +254,10 @@ void draw(const CGAL_NEF3_TYPE &anef, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc = 1; const char *argv[2] = {"nef_polyhedron_viewer", "\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc), const_cast(argv)); + QApplication app(argc, const_cast(argv)); DefaultColorFunctorNefPolyhedron fcolor; SimpleNefPolyhedronViewerQt diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index e81c6fca7c3..f0df1f59c34 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -14,6 +14,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -260,9 +261,10 @@ void draw(const CGAL_P2T2_TYPE& ap2t2, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"p2t2_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); DefaultColorFunctorP2T2 fcolor; SimplePeriodic2Triangulation2ViewerQt diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp index 14e004ca71b..b66d053b8ad 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp @@ -1,15 +1,11 @@ #include "MainWindow.h" #include +#include int main(int argc, char *argv[]) { - QSurfaceFormat fmt; - fmt.setVersion(2, 1); - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); + init_ogl_context(2,1); QApplication a(argc, argv); MainWindow w; //w.ui->setupUi(w); diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp index 6e0435f4b4e..3778226b2f5 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp @@ -1,19 +1,13 @@ #include "MainWindow.h" #include #include +#include int main(int argc, char** argv) { - QSurfaceFormat fmt; - fmt.setVersion(2, 1); - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + + CGAL::init_ogl_context(2, 1); + QApplication application(argc,argv); application.setOrganizationDomain("inria.fr"); application.setOrganizationName("INRIA"); diff --git a/Point_set_3/include/CGAL/draw_point_set_3.h b/Point_set_3/include/CGAL/draw_point_set_3.h index 295229bf568..c79da404ede 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -15,6 +15,7 @@ #include #include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -100,9 +101,10 @@ void draw(const Point_set_3& apointset, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"point_set_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); SimplePointSetViewerQt > mainwindow(app.activeWindow(), apointset, title); diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index bad34bdc6f3..7c0b29cde20 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -18,6 +18,7 @@ #define CGAL_DRAW_POLYGON_2_H #include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -122,9 +123,10 @@ void draw(const CGAL::Polygon_2& ap2, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); SimplePolygon2ViewerQt > mainwindow(app.activeWindow(), ap2, title); mainwindow.show(); diff --git a/Polygon/include/CGAL/draw_polygon_with_holes_2.h b/Polygon/include/CGAL/draw_polygon_with_holes_2.h index 6aab87b3094..6cb017d3ef6 100644 --- a/Polygon/include/CGAL/draw_polygon_with_holes_2.h +++ b/Polygon/include/CGAL/draw_polygon_with_holes_2.h @@ -18,6 +18,7 @@ #define CGAL_DRAW_POLYGON_WITH_HOLES_2_H #include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -138,9 +139,10 @@ void draw(const CGAL::Polygon_with_holes_2& ap2, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); SimplePolygonWithHoles2ViewerQt > mainwindow(app.activeWindow(), ap2, title); mainwindow.show(); diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index 6bce7a1fa82..4c780145c9e 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -14,6 +14,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -208,9 +209,10 @@ void draw(const CGAL_POLY_TYPE& apoly, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"polyhedron_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); DefaultColorFunctorPolyhedron fcolor; SimplePolyhedronViewerQt mainwindow(app.activeWindow(), apoly, title, nofill, fcolor); diff --git a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp index 63581649155..25a3bde8b5f 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp @@ -18,18 +18,11 @@ #include "MainWindow.h" #include #include +#include int main(int argc, char **argv) { - QSurfaceFormat fmt; - fmt.setVersion(2, 1); - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif + CGAL::init_ogl_context(2, 1); QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index ec502ab9809..6ee0239cf98 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -29,6 +29,7 @@ void draw(const SM& asm); #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -208,9 +209,10 @@ void draw(const Surface_mesh& amesh, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"surface_mesh_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); DefaultColorFunctorSM fcolor; SimpleSurfaceMeshViewerQt, DefaultColorFunctorSM> mainwindow(app.activeWindow(), amesh, title, nofill, fcolor); diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index a310e1ae616..819297cc7d0 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -409,9 +410,10 @@ void draw(const Mesh& alcc, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"lccviewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); Face_graph_with_path_viewer mainwindow(app.activeWindow(), alcc, &paths, amark, title, nofill, diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 94cd7e0529c..7b854abb889 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -14,6 +14,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -144,9 +145,10 @@ void draw(const CGAL_T2_TYPE& at2, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); DefaultColorFunctorT2 fcolor; SimpleTriangulation2ViewerQt mainwindow(app.activeWindow(), at2, title, nofill, fcolor); diff --git a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp index 4d3be25b5ac..b590849fb2e 100644 --- a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp @@ -13,19 +13,12 @@ #include "MainWindow.h" #include +#include int main(int argc, char** argv) { - QSurfaceFormat fmt; - fmt.setVersion(2, 1); - fmt.setRenderableType(QSurfaceFormat::OpenGL); - fmt.setProfile(QSurfaceFormat::CoreProfile); - fmt.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(fmt); - //for windows - #if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); - #endif + CGAL::init_ogl_context(2, 1); + QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index cdb666564df..1a048c80d5b 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -14,6 +14,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -150,9 +151,10 @@ void draw(const CGAL_T3_TYPE& at3, if (!cgal_test_suite) { + init_ogl_context(4,3); int argc=1; const char* argv[2]={"t3_viewer","\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc),const_cast(argv)); + QApplication app(argc,const_cast(argv)); DefaultColorFunctorT3 fcolor; SimpleTriangulation3ViewerQt mainwindow(app.activeWindow(), at3, title, nofill, fcolor); diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 11ab8f3acf4..b172513a29e 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -14,6 +14,7 @@ #include #include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -316,9 +317,10 @@ void draw(const CGAL_VORONOI_TYPE &av2, #endif if (!cgal_test_suite) { + init_ogl_context(4,3); int argc = 1; const char *argv[2] = {"voronoi_2_viewer", "\0"}; - QApplication app(CGAL::code_to_call_before_creation_of_QCoreApplication(argc), const_cast(argv)); + QApplication app(argc, const_cast(argv)); DefaultColorFunctorV2 fcolor; SimpleVoronoiDiagram2ViewerQt mainwindow(app.activeWindow(), av2, title, nofill, From 04753381e5e91cd9dfefdba88f01bfd7928e0850 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Jan 2021 13:22:34 +0100 Subject: [PATCH 162/317] Rename file and add ::Qt --- AABB_tree/demo/AABB_tree/AABB_demo.cpp | 4 ++-- Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp | 4 ++-- .../demo/Circular_kernel_3/Circular_kernel_3.cpp | 4 ++-- .../Qt/{Context_initialization.h => init_ogl_context.h} | 6 ++++-- .../demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp | 4 ++-- Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h | 4 ++-- Nef_3/include/CGAL/draw_nef_3.h | 4 ++-- .../include/CGAL/draw_periodic_2_triangulation_2.h | 4 ++-- .../periodic_3_triangulation_3_demo.cpp | 4 ++-- .../demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp | 4 ++-- Point_set_3/include/CGAL/draw_point_set_3.h | 4 ++-- Polygon/include/CGAL/draw_polygon_2.h | 4 ++-- Polygon/include/CGAL/draw_polygon_with_holes_2.h | 4 ++-- Polyhedron/include/CGAL/draw_polyhedron.h | 4 ++-- .../demo/Principal_component_analysis/PCA_demo.cpp | 4 ++-- Surface_mesh/include/CGAL/draw_surface_mesh.h | 4 ++-- .../include/CGAL/draw_face_graph_with_paths.h | 4 ++-- Triangulation_2/include/CGAL/draw_triangulation_2.h | 4 ++-- Triangulation_3/demo/Triangulation_3/T3_demo.cpp | 4 ++-- Triangulation_3/include/CGAL/draw_triangulation_3.h | 4 ++-- Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h | 4 ++-- 21 files changed, 44 insertions(+), 42 deletions(-) rename GraphicsView/include/CGAL/Qt/{Context_initialization.h => init_ogl_context.h} (96%) diff --git a/AABB_tree/demo/AABB_tree/AABB_demo.cpp b/AABB_tree/demo/AABB_tree/AABB_demo.cpp index 4e643e352f3..018e0f69c14 100644 --- a/AABB_tree/demo/AABB_tree/AABB_demo.cpp +++ b/AABB_tree/demo/AABB_tree/AABB_demo.cpp @@ -19,12 +19,12 @@ #include #include #include -#include +#include int main(int argc, char **argv) { - CGAL::init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); app.setOrganizationName("INRIA"); diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp index 8c9baa63e53..784ee1af57f 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp @@ -5,11 +5,11 @@ #include -#include +#include int main(int argc, char** argv) { - CGAL::init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); QApplication application(argc,argv); application.setOrganizationDomain("geometryfactory.com"); diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp index 72fe7f88c8b..0b41052abad 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3.cpp @@ -1,9 +1,9 @@ #include "Viewer.h" #include -#include +#include int main(int argc, char** argv) { - CGAL::init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); QApplication application(argc,argv); // Instantiate the viewer. Viewer viewer; diff --git a/GraphicsView/include/CGAL/Qt/Context_initialization.h b/GraphicsView/include/CGAL/Qt/init_ogl_context.h similarity index 96% rename from GraphicsView/include/CGAL/Qt/Context_initialization.h rename to GraphicsView/include/CGAL/Qt/init_ogl_context.h index 1ad56f04a79..57198277fe6 100644 --- a/GraphicsView/include/CGAL/Qt/Context_initialization.h +++ b/GraphicsView/include/CGAL/Qt/init_ogl_context.h @@ -15,6 +15,8 @@ namespace CGAL { +namespace Qt +{ inline void init_ogl_context(int major, int minor) { QSurfaceFormat fmt; #ifdef Q_OS_MAC @@ -43,6 +45,6 @@ inline void init_ogl_context(int major, int minor) { setlocale(LC_ALL, "C"); } -} - +} //end Qt +} //end CGAL #endif // CGAL_QT_CONTEXT_INITIALIZATION_H diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp index e27fbb07aad..cd31d859217 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include // Global random CGAL::Random myrandom; @@ -24,7 +24,7 @@ int main(int argc, char** argv) // std::cout<<"Size of dart: "< -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -405,7 +405,7 @@ void draw(const CGAL_LCC_TYPE& alcc, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"lccviewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Nef_3/include/CGAL/draw_nef_3.h b/Nef_3/include/CGAL/draw_nef_3.h index 1ccdb02415f..1f397471e6c 100644 --- a/Nef_3/include/CGAL/draw_nef_3.h +++ b/Nef_3/include/CGAL/draw_nef_3.h @@ -15,7 +15,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -254,7 +254,7 @@ void draw(const CGAL_NEF3_TYPE &anef, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc = 1; const char *argv[2] = {"nef_polyhedron_viewer", "\0"}; QApplication app(argc, const_cast(argv)); diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index f0df1f59c34..6e192e321fd 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -261,7 +261,7 @@ void draw(const CGAL_P2T2_TYPE& ap2t2, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"p2t2_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp index b66d053b8ad..2cf672fdb48 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp @@ -1,11 +1,11 @@ #include "MainWindow.h" #include -#include +#include int main(int argc, char *argv[]) { - init_ogl_context(2,1); + CGAL::Qt::init_ogl_context(2,1); QApplication a(argc, argv); MainWindow w; //w.ui->setupUi(w); diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp index 3778226b2f5..ae0074e0bcc 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp @@ -1,12 +1,12 @@ #include "MainWindow.h" #include #include -#include +#include int main(int argc, char** argv) { - CGAL::init_ogl_context(2, 1); + CGAL::Qt::init_ogl_context(2, 1); QApplication application(argc,argv); application.setOrganizationDomain("inria.fr"); diff --git a/Point_set_3/include/CGAL/draw_point_set_3.h b/Point_set_3/include/CGAL/draw_point_set_3.h index c79da404ede..ef02b438a68 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -15,7 +15,7 @@ #include #include -#include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -101,7 +101,7 @@ void draw(const Point_set_3& apointset, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"point_set_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index 7c0b29cde20..fe31f51deca 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -18,7 +18,7 @@ #define CGAL_DRAW_POLYGON_2_H #include -#include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -123,7 +123,7 @@ void draw(const CGAL::Polygon_2& ap2, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Polygon/include/CGAL/draw_polygon_with_holes_2.h b/Polygon/include/CGAL/draw_polygon_with_holes_2.h index 6cb017d3ef6..0b9d5260c1f 100644 --- a/Polygon/include/CGAL/draw_polygon_with_holes_2.h +++ b/Polygon/include/CGAL/draw_polygon_with_holes_2.h @@ -18,7 +18,7 @@ #define CGAL_DRAW_POLYGON_WITH_HOLES_2_H #include -#include +#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -139,7 +139,7 @@ void draw(const CGAL::Polygon_with_holes_2& ap2, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index 4c780145c9e..58610cd5891 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -209,7 +209,7 @@ void draw(const CGAL_POLY_TYPE& apoly, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"polyhedron_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp index 25a3bde8b5f..04b8cf11f13 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/PCA_demo.cpp @@ -18,11 +18,11 @@ #include "MainWindow.h" #include #include -#include +#include int main(int argc, char **argv) { - CGAL::init_ogl_context(2, 1); + CGAL::Qt::init_ogl_context(2, 1); QApplication app(argc, argv); app.setOrganizationDomain("inria.fr"); diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index 6ee0239cf98..5ebbc221af3 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -29,7 +29,7 @@ void draw(const SM& asm); #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -209,7 +209,7 @@ void draw(const Surface_mesh& amesh, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"surface_mesh_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index 819297cc7d0..dfa4af1cc26 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -410,7 +410,7 @@ void draw(const Mesh& alcc, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"lccviewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 7b854abb889..a5a0f5331d2 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -145,7 +145,7 @@ void draw(const CGAL_T2_TYPE& at2, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"t2_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp index b590849fb2e..aef465639ff 100644 --- a/Triangulation_3/demo/Triangulation_3/T3_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3/T3_demo.cpp @@ -13,11 +13,11 @@ #include "MainWindow.h" #include -#include +#include int main(int argc, char** argv) { - CGAL::init_ogl_context(2, 1); + CGAL::Qt::init_ogl_context(2, 1); QApplication app(argc, argv); diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index 1a048c80d5b..4cac6b42526 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -151,7 +151,7 @@ void draw(const CGAL_T3_TYPE& at3, if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc=1; const char* argv[2]={"t3_viewer","\0"}; QApplication app(argc,const_cast(argv)); diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index b172513a29e..53c38de359e 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef CGAL_USE_BASIC_VIEWER @@ -317,7 +317,7 @@ void draw(const CGAL_VORONOI_TYPE &av2, #endif if (!cgal_test_suite) { - init_ogl_context(4,3); + CGAL::Qt::init_ogl_context(4,3); int argc = 1; const char *argv[2] = {"voronoi_2_viewer", "\0"}; QApplication app(argc, const_cast(argv)); From 9a202e2bbc8d5e3acd3fcd1acb7b15f660c14b98 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Jan 2021 13:27:31 +0100 Subject: [PATCH 163/317] Add missing headers --- GraphicsView/include/CGAL/Qt/init_ogl_context.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/init_ogl_context.h b/GraphicsView/include/CGAL/Qt/init_ogl_context.h index 57198277fe6..4ec18c6659a 100644 --- a/GraphicsView/include/CGAL/Qt/init_ogl_context.h +++ b/GraphicsView/include/CGAL/Qt/init_ogl_context.h @@ -13,6 +13,11 @@ #ifndef CGAL_QT_CONTEXT_INITIALIZATION_H #define CGAL_QT_CONTEXT_INITIALIZATION_H +#include + + +#include +#include namespace CGAL { namespace Qt @@ -37,9 +42,7 @@ inline void init_ogl_context(int major, int minor) { QSurfaceFormat::setDefaultFormat(fmt); //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) QCoreApplication::setAttribute(::Qt::AA_UseDesktopOpenGL); -#endif //We set the locale to avoid any trouble with VTK setlocale(LC_ALL, "C"); From f5065150085558ecf593e456124c379279cdc433 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Tue, 12 Jan 2021 18:24:43 +0100 Subject: [PATCH 164/317] Bug fix in lcc basic viewer when lcc is null --- .../demo/Linear_cell_complex/Viewer.cpp | 3 +-- .../include/CGAL/draw_linear_cell_complex.h | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp index 3f82a3ffab7..dafcccb1695 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp @@ -15,7 +15,7 @@ #include Viewer::Viewer(QWidget* parent) : - Base(parent, NULL, ""), + Base(parent, nullptr, ""), m_previous_scene_empty(true) {} @@ -50,4 +50,3 @@ void Viewer::keyPressEvent(QKeyEvent *e) QString Viewer::helpString() const { return Base::helpString("LCC Demo"); } - diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 6f630b2c0b1..ea7a8e07dfe 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -170,13 +170,17 @@ public: // First draw: vertices; edges, faces; multi-color; inverse normal Base(parent, title, true, true, true, false, false), lcc(alcc), - m_oriented_mark(lcc->get_new_mark()), + m_oriented_mark(LCC::INVALID_MARK), m_nofaces(anofaces), m_random_face_color(false), m_drawing_functor(drawing_functor) { - lcc->orient(m_oriented_mark); - compute_elements(); + if (lcc!=nullptr) + { + lcc->get_new_mark(); + lcc->orient(m_oriented_mark); + compute_elements(); + } } ~SimpleLCCViewerQt() @@ -185,14 +189,20 @@ public: protected: void set_lcc(const LCC* alcc, bool doredraw=true) { + if (lcc==alcc) + { return; } + if (lcc!=nullptr) { lcc->free_mark(m_oriented_mark); } lcc=alcc; - m_oriented_mark=lcc->get_new_mark(); - lcc->orient(m_oriented_mark); + if (lcc!=nullptr) + { + m_oriented_mark=lcc->get_new_mark(); + lcc->orient(m_oriented_mark); + compute_elements(); + } - compute_elements(); if (doredraw) { redraw(); } } From c1158a32c8c6d7cb0343c3141d56c35ed06a5e82 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Tue, 12 Jan 2021 18:58:04 +0100 Subject: [PATCH 165/317] Orient mark is now local to compute element in draw LCC. --- .../include/CGAL/draw_linear_cell_complex.h | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index ea7a8e07dfe..706735aa87a 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -170,21 +170,16 @@ public: // First draw: vertices; edges, faces; multi-color; inverse normal Base(parent, title, true, true, true, false, false), lcc(alcc), - m_oriented_mark(LCC::INVALID_MARK), m_nofaces(anofaces), m_random_face_color(false), m_drawing_functor(drawing_functor) { if (lcc!=nullptr) - { - lcc->get_new_mark(); - lcc->orient(m_oriented_mark); - compute_elements(); - } + { compute_elements(); } } ~SimpleLCCViewerQt() - { lcc->free_mark(m_oriented_mark); } + {} protected: void set_lcc(const LCC* alcc, bool doredraw=true) @@ -192,16 +187,9 @@ protected: if (lcc==alcc) { return; } - if (lcc!=nullptr) - { lcc->free_mark(m_oriented_mark); } - lcc=alcc; if (lcc!=nullptr) - { - m_oriented_mark=lcc->get_new_mark(); - lcc->orient(m_oriented_mark); - compute_elements(); - } + { compute_elements(); } if (doredraw) { redraw(); } } @@ -282,10 +270,13 @@ protected: clear(); if (lcc==nullptr) return; - typename LCC::size_type markvolumes = lcc->get_new_mark(); - typename LCC::size_type markfaces = lcc->get_new_mark(); - typename LCC::size_type markedges = lcc->get_new_mark(); - typename LCC::size_type markvertices = lcc->get_new_mark(); + typename LCC::size_type markvolumes =lcc->get_new_mark(); + typename LCC::size_type markfaces =lcc->get_new_mark(); + typename LCC::size_type markedges =lcc->get_new_mark(); + typename LCC::size_type markvertices =lcc->get_new_mark(); + typename LCC::size_type oriented_mark=lcc->get_new_mark(); + + lcc->orient(oriented_mark); for (typename LCC::Dart_range::const_iterator it=lcc->darts().begin(), itend=lcc->darts().end(); it!=itend; ++it ) @@ -300,7 +291,7 @@ protected: { lcc->mark(itv, markvolumes); // To be sure that all darts of the basic iterator will be marked if (!lcc->is_marked(itv, markfaces) && - lcc->is_marked(itv, m_oriented_mark) && + lcc->is_marked(itv, oriented_mark) && m_drawing_functor.draw_face(*lcc, itv)) { if (!m_drawing_functor.volume_wireframe(*lcc, itv) && @@ -345,13 +336,14 @@ protected: lcc->unmark(it, markedges); lcc->unmark(it, markfaces); lcc->unmark(it, markvolumes); - + lcc->unmark(it, oriented_mark); } lcc->free_mark(markvolumes); lcc->free_mark(markfaces); lcc->free_mark(markedges); lcc->free_mark(markvertices); + lcc->free_mark(oriented_mark); } virtual void init() @@ -382,7 +374,6 @@ protected: protected: const LCC* lcc; - typename LCC::size_type m_oriented_mark; bool m_nofaces; bool m_random_face_color; const DrawingFunctorLCC& m_drawing_functor; From ffc16da931714af49eaec94d8c9479c690e4a26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 13 Jan 2021 13:50:32 +0100 Subject: [PATCH 166/317] close stream --- .../CGAL/Polygon_mesh_processing/repair_self_intersections.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 43569b3ca96..3196b49fd13 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -243,6 +243,7 @@ FaceOutputIterator replace_faces_with_patch(const std::vector Date: Thu, 14 Jan 2021 09:49:57 +0100 Subject: [PATCH 167/317] Fix texture management in AABB demo --- AABB_tree/demo/AABB_tree/Scene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index a48a517423a..b86be7ca292 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -156,11 +156,11 @@ void Scene::compile_shaders() const char tex_fragment_source[] = { "#version 150 \n" - "uniform sampler2D texture;\n" + "uniform sampler2D s_texture;\n" "in highp vec2 texc;\n" "out highp vec4 out_color; \n" "void main(void) { \n" - "out_color = texture2D(texture, texc.st);\n" + "out_color = vec4(texture(s_texture, texc));\n" "} \n" "\n" }; From fa22cd972b660b54894c5907c19fdf06cff38d8e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 14 Jan 2021 13:58:15 +0100 Subject: [PATCH 168/317] Change libpointmatcher_support so it won't fail when old boost has been used to build pointmatcher. --- Installation/cmake/modules/CGAL_pointmatcher_support.cmake | 7 +++---- .../examples/Point_set_processing_3/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index c023102661f..520e4d3a2b2 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -1,7 +1,6 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) - set_target_properties(CGAL::pointmatcher_support PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_POINTMATCHER" - INTERFACE_INCLUDE_DIRECTORIES "${libpointmatcher_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${libpointmatcher_LIBRARIES}") + target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") + target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") + target_link_libraries(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_LIBRARIES}") endif() diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index 83253368016..93dab1bc293 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -93,6 +93,7 @@ if ( CGAL_FOUND ) find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support) if (TARGET CGAL::pointmatcher_support) + find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED) add_executable(registration_with_pointmatcher "registration_with_pointmatcher.cpp") target_link_libraries(registration_with_pointmatcher ${CGAL_libs} CGAL::pointmatcher_support) From ff9d714f85f5b356e70c1029f913ce94b6b36a44 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 14 Jan 2021 14:06:18 +0100 Subject: [PATCH 169/317] Fix input --- .../Point_set_processing_3/registration_with_OpenGR.cpp | 4 ++-- .../registration_with_opengr_pointmatcher_pipeline.cpp | 4 ++-- .../Point_set_processing_3/registration_with_pointmatcher.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_OpenGR.cpp b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_OpenGR.cpp index ae11db41dbf..ff1aa3752d2 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_OpenGR.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_OpenGR.cpp @@ -25,7 +25,7 @@ int main(int argc, const char** argv) const char* fname2 = (argc>2)?argv[2]:"data/hippo2.ply"; std::vector pwns1, pwns2; - std::ifstream input(fname1); + std::ifstream input(fname1, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns1), CGAL::parameters::point_map (CGAL::First_of_pair_property_map()). @@ -36,7 +36,7 @@ int main(int argc, const char** argv) } input.close(); - input.open(fname2); + input.open(fname2, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns2), CGAL::parameters::point_map (Point_map()). diff --git a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_opengr_pointmatcher_pipeline.cpp b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_opengr_pointmatcher_pipeline.cpp index 2af66826d73..a5ab2cc5c36 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_opengr_pointmatcher_pipeline.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_opengr_pointmatcher_pipeline.cpp @@ -28,7 +28,7 @@ int main(int argc, const char** argv) const char* fname2 = (argc>2)?argv[2]:"data/hippo2.ply"; std::vector pwns1, pwns2; - std::ifstream input(fname1); + std::ifstream input(fname1, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns1), CGAL::parameters::point_map (CGAL::First_of_pair_property_map()). @@ -39,7 +39,7 @@ int main(int argc, const char** argv) } input.close(); - input.open(fname2); + input.open(fname2, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns2), CGAL::parameters::point_map (Point_map()). diff --git a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp index f4de0556667..ea903b9b412 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp @@ -28,7 +28,7 @@ int main(int argc, const char** argv) const char* fname2 = (argc>2)?argv[2]:"data/hippo2.ply"; std::vector pwns1, pwns2; - std::ifstream input(fname1); + std::ifstream input(fname1, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns1), CGAL::parameters::point_map (CGAL::First_of_pair_property_map()). @@ -39,7 +39,7 @@ int main(int argc, const char** argv) } input.close(); - input.open(fname2); + input.open(fname2, std::ios::binary); if (!input || !CGAL::read_ply_points(input, std::back_inserter(pwns2), CGAL::parameters::point_map (Point_map()). From 8765c63e9cd23e0b91571932346446c4711b1c43 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 15 Jan 2021 07:55:27 +0000 Subject: [PATCH 170/317] bug fix --- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index 4e84e3eebc7..9712a666403 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -110,8 +110,8 @@ struct Exact_intersect_xy_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si.source(); + q2 = si.target(); return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), Point_3 (q2.hx(),q2.hy(),0,q2.hw())) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 178b8b6ad2c..9b812d958b7 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -109,8 +109,8 @@ struct Exact_intersect_xz_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si.source(); + q2 = si.target(); return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), Point_3 (q2.hx(),0,q2.hy(),q2.hw())) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index 2ff1f85a2c7..7180acbf1e8 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -110,8 +110,8 @@ struct Exact_intersect_yz_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si.source(); + q2 = si.target(); return boost::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), Point_3 (0,q2.hx(),q2.hy(),q2.hw())) )); From 99a31e07fe31d26133eea6d1bcbd2aac5f24a122 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 15 Jan 2021 14:03:12 +0100 Subject: [PATCH 171/317] Move the Boost components in the support file and condition it to windows. --- .../doc/Documentation/Third_party.txt | 4 ++++ .../modules/CGAL_pointmatcher_support.cmake | 21 +++++++++++++++---- .../Point_set_processing_3/CMakeLists.txt | 1 - 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 6019c3057ae..02bffde6a6b 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -154,6 +154,10 @@ executables should be linked with the CMake imported target The \sc{libpointmatcher} web site is `https://github.com/ethz-asl/libpointmatcher`. +\attention On Windows, we only test the following setup : PointMatcher 1.3.1 with Eigen 3.3.7. Also, to make it work, you should follow the instructions at +`https://github.com/ethz-asl/libpointmatcher/blob/master/doc/CompilationWindows.md`, but replace `NABO_INCLUDE_DIR` by `libnabo_INCLUDE_DIRS` +and `NABO_LIBRARY` by `libnabo_LIBRARIES` when configuring PointMatcher. + \subsection thirdpartyLeda LEDA Version 6.2 or later diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index 520e4d3a2b2..7247f399f18 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -1,6 +1,19 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) - add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) - target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") - target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") - target_link_libraries(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_LIBRARIES}") + if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) + find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono) + endif() + if(NOT (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) + OR ( Boost_chrono_FOUND + AND Boost_thread_FOUND + AND Boost_filesystem_FOUND + AND Boost_system_FOUND + AND Boost_program_options_FOUND + AND Boost_date_time_FOUND) ) + add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) + target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") + target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") + target_link_libraries(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_LIBRARIES}") + else() + message(STATUS "NOTICE : the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") + endif() endif() diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index 93dab1bc293..83253368016 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -93,7 +93,6 @@ if ( CGAL_FOUND ) find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support) if (TARGET CGAL::pointmatcher_support) - find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED) add_executable(registration_with_pointmatcher "registration_with_pointmatcher.cpp") target_link_libraries(registration_with_pointmatcher ${CGAL_libs} CGAL::pointmatcher_support) From a46d62b83ed20498e16bff28811079f5e7ab0649 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 15 Jan 2021 15:09:12 +0100 Subject: [PATCH 172/317] WIP testing deprecated IO functions --- BGL/include/CGAL/boost/graph/IO/OFF.h | 4 +-- BGL/test/BGL/CMakeLists.txt | 4 +++ BGL/test/BGL/test_deprecated_io.cpp | 49 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 BGL/test/BGL/test_deprecated_io.cpp diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 0c95c7ea570..507bc04467d 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -284,9 +284,9 @@ bool read_OFF(const std::string& fname, Graph& g, \deprecated This function is deprecated since \cgal 5.2, `CGAL::read_OFF()` should be used instead. */ template -CGAL_DEPRECATED bool read_off(std::ostream& os, Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_BGL_NP_CLASS& np) { - return read_OFF(os, g, np); + return read_OFF(is, g, np); } /*! diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index d6ec47e9cae..3009a3ae873 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -98,6 +98,8 @@ create_single_source_cgal_program( create_single_source_cgal_program( "graph_traits_inheritance.cpp" ) +create_single_source_cgal_program("test_deprecated_io.cpp") + if(OpenMesh_FOUND) target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) @@ -129,6 +131,8 @@ if (VTK_FOUND) if(VTK_LIBRARIES) target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES}) target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK) + target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES}) + target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK) else() message(STATUS "Tests that use VTK will not be compiled.") endif() diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp new file mode 100644 index 00000000000..d195299f1f1 --- /dev/null +++ b/BGL/test/BGL/test_deprecated_io.cpp @@ -0,0 +1,49 @@ +#include + +#include +#include +#include + +#include +#include +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh SM; + +int main() +{ + // OFF + SM sm_in, sm_out; + Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); + CGAL::make_triangle(p0, p1, p2, sm_out); + bool ok = CGAL::write_off("tmp.off", sm_out, CGAL::parameters::all_default()); + assert(ok); + ok = CGAL::read_off("tmp.off", sm_in, CGAL::parameters::all_default()); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + sm_in.clear(); + + std::ofstream os("tmp.off"); + ok = CGAL::write_off(os, sm_out, CGAL::parameters::all_default()); + assert(ok); + os.close(); + std::ifstream is("tmp.off"); + ok = CGAL::read_off(is, sm_in, CGAL::parameters::all_default()); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + is.close(); + sm_in.clear(); + + //vtk + os.open("tmp.vtp"); + ok = CGAL::write_vtp(os, sm_out, CGAL::parameters::all_default()); + assert(ok); + os.close(); + + ok = CGAL::read_VTP("tmp.vtp", sm_in, CGAL::parameters::all_default()); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + sm_in.clear(); + + return EXIT_SUCCESS; +} From 49f68654d6ef5b233e762fadb26579d071a07074 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 18 Jan 2021 11:48:04 +0100 Subject: [PATCH 173/317] WIP --- BGL/test/BGL/test_deprecated_io.cpp | 11 ++- Point_set_3/test/Point_set_3/CMakeLists.txt | 15 ++++ .../Point_set_3/test_deprecated_io_ps.cpp | 82 +++++++++++++++++++ .../Point_set_processing_3/CMakeLists.txt | 2 + .../test_deprecated_io_point_set.cpp | 50 +++++++++++ .../include/CGAL/IO/VRML/File_writer_VRML_2.h | 5 +- 6 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp create mode 100644 Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp index d195299f1f1..b2d48d4c8ca 100644 --- a/BGL/test/BGL/test_deprecated_io.cpp +++ b/BGL/test/BGL/test_deprecated_io.cpp @@ -1,11 +1,15 @@ #include - +#include +#include #include #include #include #include #include +#include + + typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point_3; typedef CGAL::Surface_mesh SM; @@ -45,5 +49,10 @@ int main() assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); + //wrl + os.open("tmp.wrl"); + ok = CGAL::write_wrl(os, sm_out, CGAL::parameters::all_default()); + assert(ok); + os.close(); return EXIT_SUCCESS; } diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index 3fb6595dcea..d6b434e3b60 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -28,3 +28,18 @@ endif() create_single_source_cgal_program("point_set_test.cpp") create_single_source_cgal_program("point_set_test_join.cpp") +create_single_source_cgal_program("test_deprecated_io_ps.cpp") + +#Use LAS +#disable if MSVC 2017 +if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) + find_package(LASLIB) + include(CGAL_LASLIB_support) + if (TARGET CGAL::LASLIB_support) + target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) + else() + message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + endif() +else() + message(STATUS "NOTICE : the LAS reader does not work with Visual Studio 2017.") +endif() diff --git a/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp b/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp new file mode 100644 index 00000000000..6d3a124c357 --- /dev/null +++ b/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp @@ -0,0 +1,82 @@ +#include + +#include + +#include +#include +#include +#include + +#include +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; +typedef Kernel::Vector_3 Vector_3; + +int main() +{ + CGAL::Point_set_3 ps, ps2; + std::ifstream is("data/oni.pwn"); + std::ofstream os; + + if(!CGAL::read_xyz_point_set(is, ps)) + { + std::cerr<<"Error while reading input."< + +#include + +#include +#include +#include + +// Just to try and create ambiguities +#include +#include + +#include + +#include +#include +#include +#include + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; +typedef Kernel::Vector_3 Vector_3; +typedef std::array Color; +typedef std::pair PointWithColor; +typedef CGAL::Nth_of_tuple_property_map<1, PointWithColor> Color_map; + + +int main() +{ + +std::vector points(3); +points[0] = std::make_pair(Point_3(1,0,0), Color(255,0,0,255)); +points[1] = std::make_pair(Point_3(0,1,0), Color(0,255,0,255)); +points[2] = std::make_pair(Point_3(0,0,1), Color(0,0,255,255)); + + +std::ofstream os; +std::ifstream is; +#ifdef CGAL_LINKED_WITH_LASLIB +os.open("tmp.las", std::ios::binary); +bool ok = CGAL::write_las_points_with_properties(os, points, std::make_tuple( + ), + ); +is.open("data/read_test/pig_points.las", std::ios::binary); + + +assert(ok); +#endif + +} diff --git a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h index 48e58fa64ec..86f501a35df 100644 --- a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h +++ b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h @@ -28,6 +28,7 @@ namespace CGAL { class File_writer_VRML_2 { + VRML_2_ostream m_os; std::size_t m_facets; @@ -36,7 +37,7 @@ public: std::ostream& out() const { return m_os.os(); } - void write_header(VRML_2_ostream& o, + void write_header(std::ostream& o, std::size_t vertices, std::size_t halfedges, std::size_t facets, @@ -44,7 +45,7 @@ public: const bool /*normals*/ = false, const bool /*textures*/ = false) { - m_os = o; + m_os = VRML_2_ostream(o); m_facets = facets; out() << " #-- Begin of Polygon Mesh\n"; From 618b409b0fbcef7cb536a4134ae3a424ef5aae45 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 18 Jan 2021 15:40:40 +0100 Subject: [PATCH 174/317] Fix Nef_2 and Nef_S2 IO --- Nef_2/include/CGAL/Nef_2/PM_io_parser.h | 74 ++++++++++++--- Nef_2/include/CGAL/Nef_polyhedron_2.h | 2 + Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h | 106 ++++++++++++++++------ 3 files changed, 142 insertions(+), 40 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h index 85295f3d85a..9b84dd37fbe 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h +++ b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h @@ -200,6 +200,11 @@ bool PM_io_parser::read_vertex(Vertex_handle v) !(in >> p) || !check_sep("}") ) return false; + if(!(f >= 0 && ((iso && f < fn) || (!iso && f < en)))) + { + in.clear(std::ios_base::badbit); + return false; + } if (iso) v->set_face(Face_of[f]); else v->set_halfedge(Halfedge_of[f]); mark(v) = m; point(v) = p; @@ -229,10 +234,14 @@ bool PM_io_parser::read_hedge(Halfedge_handle e) !(in >> f) || !check_sep(",") || !(in >> m) || !check_sep("}") ) return false; - CGAL_assertion_msg - (eo >= 0 || (std::size_t) eo < en || epr >= 0 || (std::size_t) epr < en || ene >= 0 || (std::size_t) ene < en || - v >= 0 || (std::size_t) v < vn || f >= 0 || (std::size_t) f < fn , - "wrong index in read_hedge"); + + if(!(eo >= 0 && (std::size_t) eo < en && epr >= 0 && (std::size_t) epr < en && ene >= 0 && (std::size_t) ene < en && + v >= 0 && (std::size_t) v < vn && f >= 0 && (std::size_t) f < fn )) + { + in.clear(std::ios_base::badbit); + std::cerr<<"wrong index in read_hedge"<opposite()]); @@ -267,14 +276,32 @@ bool PM_io_parser::read_face(Face_handle f) int n, ei, vi; Mark m; if ( !(in >> n) || !check_sep("{") ) return false; if ( !(in >> ei) || !check_sep(",") ) return false; - if (ei >= 0) f->set_halfedge(Halfedge_of[ei]); + if (ei >= 0 && ei < en) + { + f->set_halfedge(Halfedge_of[ei]); + } + else + { + in.clear(std::ios_base::badbit); + return false; + } while (in >> ei) { CGAL_assertion_msg(ei >= 0 && (std::size_t) ei < en, "wrong index in face cycle list."); + if (!(ei >= 0 && ei < en)) + { + in.clear(std::ios_base::badbit); + return false; + } f->store_fc(Halfedge_of[ei]); } in.clear(); if (!check_sep(",")) { return false; } while (in >> vi) { CGAL_assertion_msg(vi >= 0 && (std::size_t) vi < vn, "wrong index in iso vertex list."); + if (!(vi >= 0 && vi < vn)) + { + in.clear(std::ios_base::badbit); + return false; + } f->store_iv(Vertex_of[vi]); } in.clear(); if (!check_sep(",") || !(in >> m) || !check_sep("}") ) @@ -313,13 +340,26 @@ template void PM_io_parser::read() { if ( !check_sep("Plane_map_2") ) - CGAL_error_msg("PM_io_parser::read: no embedded_PM header."); + { + std::cerr<<"PM_io_parser::read: no embedded_PM header."<> vn)) ) - CGAL_error_msg("PM_io_parser::read: wrong node line."); + { + std::cerr<<"PM_io_parser::read: wrong node line."<> en) && (en%2==0)) ) - CGAL_error_msg("PM_io_parser::read: wrong edge line."); + { + std::cerr<<"PM_io_parser::read: wrong edge line."<> fn)) ) - CGAL_error_msg("PM_io_parser::read: wrong face line."); + { + std::cerr<<"PM_io_parser::read: wrong face line."<::read() for(i=0; i> std::cerr << "Nef_polyhedron_2 input corrupted." << std::endl; NP = Nef_polyhedron_2(); } + if(!is) + return is; typename Nef_polyhedron_2::Topological_explorer D(NP.explorer()); D.check_integrity_and_topological_planarity(); return is; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h index 7bddd3036d5..631c63dc5dc 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h @@ -203,8 +203,14 @@ bool SM_io_parser::read_vertex(SVertex_handle v) !(in >> p) || !check_sep("}") ) return false; - if (iso) set_face(v,SFace_of[f]); - else set_first_out_edge(v,Edge_of[f]); + if(f<0 || (iso && f > fn) || (!iso && f > en)) + { + in.clear(std::ios_base::badbit); + return false; + } + + if (iso) this->set_face(v,SFace_of[f]); + else this->set_first_out_edge(v,Edge_of[f]); v->mark() = m; v->point() = p; return true; } @@ -235,17 +241,21 @@ bool SM_io_parser::read_edge(SHalfedge_handle e) !(in >> m) || !check_sep(",") || !(in >> k) || !check_sep("}") ) return false; - CGAL_assertion_msg + if (! (eo >= 0 && eo < en && epr >= 0 && epr < en && ene >= 0 && ene < en && - v >= 0 && v < vn && f >= 0 && f < fn , - "wrong index in read_edge"); + v >= 0 && v < vn && f >= 0 && f < fn )) + { + std::cerr<<"wrong index in read_edge"<twin()]); - set_prev(e,Edge_of[epr]); - set_next(e,Edge_of[ene]); - set_source(e,SVertex_of[v]); - set_face(e,SFace_of[f]); + this->set_prev(e,Edge_of[epr]); + this->set_next(e,Edge_of[ene]); + this->set_source(e,SVertex_of[v]); + this->set_face(e,SFace_of[f]); e->mark() = m; e->circle() = k; return true; @@ -274,7 +284,7 @@ bool SM_io_parser::read_loop(SHalfloop_handle l) CGAL_assertion_msg( (lo >= 0 && lo < 2 && f >= 0 && f < fn),"wrong index in read_edge"); - set_face(l,SFace_of[f]); + this->set_face(l,SFace_of[f]); l->mark() = m; l->circle() = k; return true; @@ -303,21 +313,33 @@ bool SM_io_parser::read_face(SFace_handle f) int n, ei, vi, li; Mark m; if ( !(in >> n) || !check_sep("{") ) return false; while (in >> ei) { - CGAL_assertion_msg(ei >= 0 && ei < en, - "wrong index in face cycle list."); - store_sm_boundary_object(Edge_of[ei],f); + if(!(ei >= 0 && ei < en)) + { + std::cerr<<"wrong index in face cycle list."<store_sm_boundary_object(Edge_of[ei],f); } in.clear(); if (!check_sep(",")) { return false; } while (in >> vi) { - CGAL_assertion_msg(vi >= 0 && vi < vn, - "wrong index in iso vertex list."); - store_sm_boundary_object(SVertex_of[vi],f); + if(!(vi >= 0 && vi < vn)) + { + std::cerr<<"wrong index in iso vertex list."<store_sm_boundary_object(SVertex_of[vi],f); } in.clear(); if (!check_sep(",")) { return false; } while (in >> li) { - CGAL_assertion_msg(li >= 0 && li < 2, - "wrong index in iso vertex list."); - store_sm_boundary_object(Loop_of[li],f); + if(!(li >= 0 && li < 2)) + { + std::cerr<<"wrong index in iso vertex list."<store_sm_boundary_object(Loop_of[li],f); } in.clear(); if (!check_sep(",") || !(in >> m) || !check_sep("}") ) return false; @@ -357,16 +379,36 @@ void SM_io_parser::print() const template void SM_io_parser::read() { + if ( !check_sep("Nef_polyhedron_S2") ) + { + std::cerr<<"Missing line in header"<> vn)) ) - CGAL_error_msg("SM_io_parser::read: wrong vertex line."); + { + std::cerr<<"SM_io_parser::read: wrong vertex line."<> en) && (en%2==0)) ) - CGAL_error_msg("SM_io_parser::read: wrong edge line."); + { + std::cerr<<"SM_io_parser::read: wrong edge line."<> ln)) ) - CGAL_error_msg("SM_io_parser::read: wrong loop line."); + { + std::cerr<<"SM_io_parser::read: wrong loop line."<> fn)) ) - CGAL_error_msg("SM_io_parser::read: wrong face line."); + { + std::cerr<<"SM_io_parser::read: wrong face line."<::read() for(i=0; i Date: Mon, 18 Jan 2021 15:45:39 +0100 Subject: [PATCH 175/317] Fix function properties_and_types() --- Point_set_3/include/CGAL/Point_set_3.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 7a006c3d10a..0103389b0b6 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -17,6 +17,7 @@ #include +#include #include @@ -933,15 +934,15 @@ public: /*! \brief Returns a vector of pairs that describe properties and associated types. */ - std::vector > properties_and_types() const + std::vector > properties_and_types() const { std::vector prop = m_base.properties(); prop.erase (prop.begin()); // remove "index" prop.erase (prop.begin()); // remove "point" - std::vector > out; out.reserve (prop.size()); + std::vector > out; out.reserve (prop.size()); for (std::size_t i = 0; i < prop.size(); ++ i) - out.push_back (std::make_pair (prop[i], m_base.get_type(prop[i]))); + out.push_back (std::make_pair (prop[i], std::type_index(m_base.get_type(prop[i])))); return out; } From e962498b3ab5826804774a66a169adf7a1c4a1e3 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 18 Jan 2021 15:45:51 +0100 Subject: [PATCH 176/317] Add test for properties_and_types() --- Point_set_3/test/Point_set_3/point_set_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Point_set_3/test/Point_set_3/point_set_test.cpp b/Point_set_3/test/Point_set_3/point_set_test.cpp index 4accb458dfa..3089af3eca1 100644 --- a/Point_set_3/test/Point_set_3/point_set_test.cpp +++ b/Point_set_3/test/Point_set_3/point_set_test.cpp @@ -106,6 +106,11 @@ int main (int, char**) point_set.add_property_map ("label", 0); point_set.add_property_map ("intensity", 0.0); + auto pnt = point_set.properties_and_types(); + std::cerr << "Properties = " << std::endl; + for (const auto& p : pnt) + std::cerr << " * " << p.first << " with type " << p.second.name() << std::endl; + test (point_set.base().n_properties() == 4, "point set should have 4 properties."); Point p_before = *(point_set.points().begin()); From 168631b069712863a8963fe69fac34fc321f2dcb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 19 Jan 2021 09:28:57 +0000 Subject: [PATCH 177/317] fix . to -> --- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index 9712a666403..2e37ff476c3 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -110,8 +110,8 @@ struct Exact_intersect_xy_2 } const Segment_2* si = boost::get(&*obj); - p2 = si.source(); - q2 = si.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), Point_3 (q2.hx(),q2.hy(),0,q2.hw())) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 9b812d958b7..9959db3355c 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -109,8 +109,8 @@ struct Exact_intersect_xz_2 } const Segment_2* si = boost::get(&*obj); - p2 = si.source(); - q2 = si.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), Point_3 (q2.hx(),0,q2.hy(),q2.hw())) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index 7180acbf1e8..13710cbebf5 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -110,8 +110,8 @@ struct Exact_intersect_yz_2 } const Segment_2* si = boost::get(&*obj); - p2 = si.source(); - q2 = si.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), Point_3 (0,q2.hx(),q2.hy(),q2.hw())) )); From 5a1ab45058112f8647c14c02f58905ecc597ec76 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 19 Jan 2021 12:24:08 +0100 Subject: [PATCH 178/317] Fix Nef_3 --- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 195 ++++++++++++++++++++++- 1 file changed, 188 insertions(+), 7 deletions(-) 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 5eee7528ee7..04d9d0ac8e8 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -1444,40 +1444,61 @@ void SNC_io_parser::read_items(int plus01) { typename std::vector::iterator vi; for(vi=Vertex_of.begin(); vi!=Vertex_of.end(); ++vi) { if (!read_vertex(*vi)) - CGAL_error_msg("SNC_io_parser::read: error in node line"); + { + std::cerr<<"SNC_io_parser::read: error in node line"<::iterator ei; for(ei=Edge_of.begin(); ei!=Edge_of.end(); ++ei) { if (!read_edge(*ei)) - CGAL_error_msg("SNC_io_parser::read: error in edge line"); + { + std::cerr<<"SNC_io_parser::read: error in edge line"<::iterator vhf_iterator; vhf_iterator fi; for(fi=Halffacet_of.begin(); fi!=Halffacet_of.end(); ++fi) { if (!read_facet(*fi)) - CGAL_error_msg("SNC_io_parser::read: error in facet line"); + { + std::cerr<<"SNC_io_parser::read: error in facet line"<::iterator ci; for(ci=Volume_of.begin()+plus01; ci!=Volume_of.end(); ++ci) { if (!read_volume(*ci)) - CGAL_error_msg("SNC_io_parser::read: error in volume line"); + { + std::cerr<<"SNC_io_parser::read: error in volume line"<::iterator sei; for(sei=SEdge_of.begin(); sei!=SEdge_of.end(); ++sei) { if (!read_sedge(*sei)) - CGAL_error_msg("SNC_io_parser::read: error in sedge line"); + { + std::cerr<<"SNC_io_parser::read: error in sedge line"<::iterator sli; for(sli=SLoop_of.begin(); sli!=SLoop_of.end(); ++sli) { if (!read_sloop(*sli)) - CGAL_error_msg("SNC_io_parser::read: error in sloop line"); + { + std::cerr<<"SNC_io_parser::read: error in sloop line"<::iterator sfi; for(sfi=SFace_of.begin(); sfi!=SFace_of.end(); ++sfi) { if (!read_sface(*sfi)) - CGAL_error_msg("SNC_io_parser::read: error in sface line"); + { + std::cerr<<"SNC_io_parser::read: error in sface line"<sncp()); @@ -1535,21 +1556,56 @@ read_vertex(Vertex_handle vh) { vh->sncp() = this->sncp(); in >> index; + if(index >= int(en)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->svertices_begin() = (index >= 0 ? Edge_of[index] : this->svertices_end()); in >> index; + if(index >= int(en)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->svertices_last() = index >= 0 ? Edge_of[index] : this->svertices_end(); OK = OK && test_string(","); in >> index; + if(index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->shalfedges_begin() = index >= 0 ? SEdge_of[index] : this->shalfedges_end(); in >> index; + if(index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->shalfedges_last() = index >= 0 ? SEdge_of[index] : this->shalfedges_end(); OK = OK && test_string(","); in >> index; + if(index >= int(sfn)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->sfaces_begin() = index >= 0 ? SFace_of[index] : this->sfaces_end(); in >> index; + if(index >= int(sfn)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->sfaces_last() = index >= 0 ? SFace_of[index] : this->sfaces_end(); OK = OK && test_string(","); in >> index; + if(index >= int(sln)) + { + in.clear(std::ios_base::badbit); + return false; + } vh->shalfloop() = index >= 0 ? SLoop_of[index] : this->shalfloops_end(); OK = OK && test_string("|"); #ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT @@ -1604,17 +1660,37 @@ read_edge(Halfedge_handle eh) { OK = OK && test_string("{"); in >> index; + if(index < 0 || index >= int(en)) + { + in.clear(std::ios_base::badbit); + return false; + } eh->twin() = Edge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(vn)) + { + in.clear(std::ios_base::badbit); + return false; + } eh->center_vertex() = Vertex_of[index]; OK = OK && test_string(","); in >> index; if(index == 0) { in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } eh->out_sedge() = SEdge_of[index]; } else { in >> index; + if(index < 0 || index >= int(sfn)) + { + in.clear(std::ios_base::badbit); + return false; + } eh->incident_sface() = SFace_of[index]; } OK = OK && test_string("|"); @@ -1669,6 +1745,11 @@ read_facet(Halffacet_handle fh) { OK = OK && test_string("{"); in >> index; + if(index < 0 || index >= int(fn)) + { + in.clear(std::ios_base::badbit); + return false; + } fh->twin() = Halffacet_of[index]; OK = OK && test_string(","); @@ -1676,6 +1757,11 @@ read_facet(Halffacet_handle fh) { while(isdigit(cc)) { in.putback(cc); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } fh->boundary_entry_objects().push_back(make_object(SEdge_of[index])); in >> cc; } @@ -1684,11 +1770,21 @@ read_facet(Halffacet_handle fh) { while(isdigit(cc)) { in.putback(cc); in >> index; + if(index < 0 || index >= int(sln)) + { + in.clear(std::ios_base::badbit); + return false; + } fh->boundary_entry_objects().push_back(make_object(SLoop_of[index])); in >> cc; } in >> index; + if(index < 0 || index >= int(vn)) + { + in.clear(std::ios_base::badbit); + return false; + } fh->incident_volume() = Volume_of[index+addInfiBox]; OK = OK && test_string("|"); #ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT @@ -1731,6 +1827,11 @@ read_volume(Volume_handle ch) { while(isdigit(cc)) { in.putback(cc); in >> index; + if(index < 0 || index >= int(sfn)) + { + in.clear(std::ios_base::badbit); + return false; + } ch->shell_entry_objects().push_back(make_object(SFace_of[index])); in >> cc; } @@ -1781,27 +1882,67 @@ read_sedge(SHalfedge_handle seh) { OK = OK && test_string("{"); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->twin() = SEdge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->sprev() = SEdge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->snext() = SEdge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(en)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->source() = Edge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(sfn)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->incident_sface() = SFace_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->prev() = SEdge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(sen)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->next() = SEdge_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= int(fn)) + { + in.clear(std::ios_base::badbit); + return false; + } seh->facet() = Halffacet_of[index]; OK = OK && test_string("|"); #ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT @@ -1852,12 +1993,27 @@ read_sloop(SHalfloop_handle slh) { OK = OK && test_string("{"); in >> index; + if(index < 0 || index >= sln) + { + in.clear(std::ios_base::badbit); + return false; + } slh->twin() = SLoop_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= sfn) + { + in.clear(std::ios_base::badbit); + return false; + } slh->incident_sface() = SFace_of[index]; OK = OK && test_string(","); in >> index; + if(index < 0 || index >= fn) + { + in.clear(std::ios_base::badbit); + return false; + } slh->facet() = Halffacet_of[index]; OK = OK && test_string("|"); #ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT @@ -1904,6 +2060,11 @@ read_sface(SFace_handle sfh) { OK = OK && test_string("{"); in >> index; + if(index < 0 || index >= vn) + { + in.clear(std::ios_base::badbit); + return false; + } sfh->center_vertex() = Vertex_of[index]; OK = OK && test_string(","); @@ -1913,6 +2074,11 @@ read_sface(SFace_handle sfh) { in >> index; // sfh->boundary_entry_objects().push_back(SEdge_of[index]); SM_decorator SD(&*sfh->center_vertex()); + if(index < 0 || index >= sen) + { + in.clear(std::ios_base::badbit); + return false; + } SD.link_as_face_cycle(SEdge_of[index],sfh); in >> cc; } @@ -1921,6 +2087,11 @@ read_sface(SFace_handle sfh) { while(isdigit(cc)) { in.putback(cc); in >> index; + if(index < 0 || index >= en) + { + in.clear(std::ios_base::badbit); + return false; + } sfh->boundary_entry_objects().push_back(make_object(Edge_of[index])); this->sncp()->store_sm_boundary_item(Edge_of[index], --(sfh->sface_cycles_end())); in >> cc; @@ -1930,12 +2101,22 @@ read_sface(SFace_handle sfh) { while(isdigit(cc)) { in.putback(cc); in >> index; + if(index < 0 || index >= sln) + { + in.clear(std::ios_base::badbit); + return false; + } sfh->boundary_entry_objects().push_back(make_object(SLoop_of[index])); this->sncp()->store_sm_boundary_item(SLoop_of[index], --(sfh->sface_cycles_end())); in >> cc; } in >> index; + if(index < 0 || index >= vn) + { + in.clear(std::ios_base::badbit); + return false; + } sfh->volume() = Volume_of[index+addInfiBox]; OK = OK && test_string("}"); in >> sfh->mark(); From 3dade2a027fdea0c5770ce5452976c033bc65d45 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 19 Jan 2021 12:35:05 +0000 Subject: [PATCH 179/317] Remove the flush which is not needed for cerr and put parenthesis --- Nef_2/include/CGAL/Nef_2/debug.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/debug.h b/Nef_2/include/CGAL/Nef_2/debug.h index ce77dc610c6..6bd3d00a76a 100644 --- a/Nef_2/include/CGAL/Nef_2/debug.h +++ b/Nef_2/include/CGAL/Nef_2/debug.h @@ -43,35 +43,33 @@ #ifndef NDEBUG #define CGAL_NEF_TRACE(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ - std::cerr<<" "< Date: Tue, 19 Jan 2021 14:04:54 +0100 Subject: [PATCH 180/317] replace cerr by CGAL_warning_msg --- Nef_2/include/CGAL/Nef_2/PM_io_parser.h | 14 +++--- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 53 ++++++++++++++++------- Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h | 18 ++++---- 3 files changed, 54 insertions(+), 31 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h index 9b84dd37fbe..52bc830e115 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h +++ b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h @@ -341,23 +341,23 @@ void PM_io_parser::read() { if ( !check_sep("Plane_map_2") ) { - std::cerr<<"PM_io_parser::read: no embedded_PM header."<> vn)) ) { - std::cerr<<"PM_io_parser::read: wrong node line."<> en) && (en%2==0)) ) { - std::cerr<<"PM_io_parser::read: wrong edge line."<> fn)) ) { - std::cerr<<"PM_io_parser::read: wrong face line."<::read() for(i=0; i void SNC_io_parser::read() { if ( !check_sep("Selective Nef Complex") ) - CGAL_error_msg("SNC_io_parser::read: no SNC header."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: no SNC header."); + returnl + } std::string kernel_type; in >> kernel_type; CGAL_assertion(kernel_type == "standard" || kernel_type == "extended"); if ( !(check_sep("vertices") && (in >> vn)) ) - CGAL_error_msg("SNC_io_parser::read: wrong vertex line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong vertex line."); + return; + } if ( !(check_sep("halfedges") && (in >> en) && (en%2==0)) ) - CGAL_error_msg("SNC_io_parser::read: wrong edge line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong edge line."); + return; + } if ( !(check_sep("facets") && (in >> fn) && (fn%2==0)) ) - CGAL_error_msg("SNC_io_parser::read: wrong facet line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong facet line."); + } if ( !(check_sep("volumes") && (in >> cn)) ) - CGAL_error_msg("SNC_io_parser::read: wrong volume line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong volume line."); + return; + } if ( !(check_sep("shalfedges") && (in >> sen)) ) - CGAL_error_msg("SNC_io_parser::read: wrong sedge line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong sedge line."); + return; + } if ( !(check_sep("shalfloops") && (in >> sln)) ) - CGAL_error_msg("SNC_io_parser::read: wrong sloop line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong sloop line."); + return; + } if ( !(check_sep("sfaces") && (in >> sfn)) ) - CGAL_error_msg("SNC_io_parser::read: wrong sface line."); + { + CGAL_warning_msg(false, "SNC_io_parser::read: wrong sface line."); + return; + } addInfiBox = (kernel_type == "standard" && Infi_box::extended_kernel()); @@ -1445,7 +1468,7 @@ void SNC_io_parser::read_items(int plus01) { for(vi=Vertex_of.begin(); vi!=Vertex_of.end(); ++vi) { if (!read_vertex(*vi)) { - std::cerr<<"SNC_io_parser::read: error in node line"<::read_items(int plus01) { for(ei=Edge_of.begin(); ei!=Edge_of.end(); ++ei) { if (!read_edge(*ei)) { - std::cerr<<"SNC_io_parser::read: error in edge line"<::read_items(int plus01) { for(fi=Halffacet_of.begin(); fi!=Halffacet_of.end(); ++fi) { if (!read_facet(*fi)) { - std::cerr<<"SNC_io_parser::read: error in facet line"<::read_items(int plus01) { for(ci=Volume_of.begin()+plus01; ci!=Volume_of.end(); ++ci) { if (!read_volume(*ci)) { - std::cerr<<"SNC_io_parser::read: error in volume line"<::read_items(int plus01) { for(sei=SEdge_of.begin(); sei!=SEdge_of.end(); ++sei) { if (!read_sedge(*sei)) { - std::cerr<<"SNC_io_parser::read: error in sedge line"<::read_items(int plus01) { for(sli=SLoop_of.begin(); sli!=SLoop_of.end(); ++sli) { if (!read_sloop(*sli)) { - std::cerr<<"SNC_io_parser::read: error in sloop line"<::read_items(int plus01) { for(sfi=SFace_of.begin(); sfi!=SFace_of.end(); ++sfi) { if (!read_sface(*sfi)) { - std::cerr<<"SNC_io_parser::read: error in sface line"<::read() { if ( !check_sep("Nef_polyhedron_S2") ) { - std::cerr<<"Missing line in header"<> vn)) ) { - std::cerr<<"SM_io_parser::read: wrong vertex line."<> en) && (en%2==0)) ) { - std::cerr<<"SM_io_parser::read: wrong edge line."<> ln)) ) { - std::cerr<<"SM_io_parser::read: wrong loop line."<> fn)) ) { - std::cerr<<"SM_io_parser::read: wrong face line."<::read() for(i=0; i::read() for(i=0; i Date: Tue, 19 Jan 2021 15:10:57 +0100 Subject: [PATCH 181/317] LAS and PLY with properties --- .../test_deprecated_io_point_set.cpp | 103 ++++++++++++++++-- 1 file changed, 94 insertions(+), 9 deletions(-) diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp index fdba209e918..84fc487c2ce 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp @@ -1,4 +1,4 @@ -//#include +#include #include @@ -24,27 +24,112 @@ typedef std::array Color; typedef std::pair PointWithColor; typedef CGAL::Nth_of_tuple_property_map<1, PointWithColor> Color_map; +struct GetRedMap{ + typedef PointWithColor key_type; + typedef unsigned short value_type; + typedef const value_type& reference; + typedef boost::lvalue_property_map_tag category; +}; +unsigned short get(const GetRedMap&, const PointWithColor& p) +{ + return p.second[0]; +} + +struct GetGreenMap{ + typedef PointWithColor key_type; + typedef unsigned short value_type; + typedef const value_type& reference; + typedef boost::lvalue_property_map_tag category; +}; +unsigned short get(const GetGreenMap&, const PointWithColor& p) +{ + return p.second[1]; +} + +struct GetBlueMap{ + typedef PointWithColor key_type; + typedef unsigned short value_type; + typedef const value_type& reference; + typedef boost::lvalue_property_map_tag category; +}; +unsigned short get(const GetBlueMap&, const PointWithColor& p) +{ + return p.second[3]; +} + +struct GetAlphaMap{ + typedef PointWithColor key_type; + typedef unsigned short value_type; + typedef const value_type& reference; + typedef boost::lvalue_property_map_tag category; +}; +unsigned short get(const GetAlphaMap&, const PointWithColor& p) +{ + return p.second[4]; +} int main() { std::vector points(3); -points[0] = std::make_pair(Point_3(1,0,0), Color(255,0,0,255)); -points[1] = std::make_pair(Point_3(0,1,0), Color(0,255,0,255)); -points[2] = std::make_pair(Point_3(0,0,1), Color(0,0,255,255)); +points[0] = std::make_pair(Point_3(1,0,0), Color{255,0,0,255}); +points[1] = std::make_pair(Point_3(0,1,0), Color{0,255,0,255}); +points[2] = std::make_pair(Point_3(0,0,1), Color{0,0,255,255}); std::ofstream os; std::ifstream is; +bool ok; #ifdef CGAL_LINKED_WITH_LASLIB os.open("tmp.las", std::ios::binary); -bool ok = CGAL::write_las_points_with_properties(os, points, std::make_tuple( - ), +ok = CGAL::write_las_points_with_properties(os, points, + CGAL::make_las_point_writer(CGAL::First_of_pair_property_map()), + std::make_pair(GetRedMap(),CGAL::LAS_property::R()), + std::make_pair(GetGreenMap(), CGAL::LAS_property::G()), + std::make_pair(GetBlueMap(), CGAL::LAS_property::B()), + std::make_pair(GetAlphaMap(), CGAL::LAS_property::I()) ); -is.open("data/read_test/pig_points.las", std::ios::binary); - - +os.close(); assert(ok); +points.clear(); +is.open("tmp.las", std::ios::binary); +ok = CGAL::read_las_points_with_properties(is, std::back_inserter (points), + CGAL::make_las_point_reader(CGAL::First_of_pair_property_map()), + std::make_tuple(CGAL::Second_of_pair_property_map(), + CGAL::Construct_array(), + CGAL::LAS_property::R(), + CGAL::LAS_property::G(), + CGAL::LAS_property::B(), + CGAL::LAS_property::I())); +is.close(); +assert(ok); +assert(points.size() == 3); +assert(points[1].second[1] == 255); #endif +os.open("tmp.ply"); +ok = CGAL::write_ply_points_with_properties(os, points, + CGAL::make_ply_point_writer (CGAL::First_of_pair_property_map()), + std::make_pair(GetRedMap(),CGAL::PLY_property("red")), + std::make_pair(GetGreenMap(), CGAL::PLY_property("green")), + std::make_pair(GetBlueMap(), CGAL::PLY_property("blue")), + std::make_pair(GetAlphaMap(), CGAL::PLY_property("alpha")) + ); +os.close(); +assert(ok); + +is.open("tmp.ply"); +points.clear(); +ok = CGAL::read_ply_points_with_properties(is, std::back_inserter (points), + CGAL::make_ply_point_reader(CGAL::First_of_pair_property_map()), + std::make_tuple(CGAL::Second_of_pair_property_map(), + CGAL::Construct_array(), + CGAL::PLY_property("red"), + CGAL::PLY_property("green"), + CGAL::PLY_property("blue"), + CGAL::PLY_property("alpha"))); +assert(ok); +assert(points.size() == 3); +assert(points[1].second[1] == 255); + } From 2e592e0027b2d85680273425161581655f4677fd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Jan 2021 08:38:33 +0100 Subject: [PATCH 182/317] Fix typo and use setstate --- Nef_2/include/CGAL/Nef_2/PM_io_parser.h | 10 ++-- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 66 +++++++++++------------ Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h | 10 ++-- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h index 52bc830e115..64a3e94916e 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h +++ b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h @@ -202,7 +202,7 @@ bool PM_io_parser::read_vertex(Vertex_handle v) if(!(f >= 0 && ((iso && f < fn) || (!iso && f < en)))) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } if (iso) v->set_face(Face_of[f]); @@ -238,7 +238,7 @@ bool PM_io_parser::read_hedge(Halfedge_handle e) if(!(eo >= 0 && (std::size_t) eo < en && epr >= 0 && (std::size_t) epr < en && ene >= 0 && (std::size_t) ene < en && v >= 0 && (std::size_t) v < vn && f >= 0 && (std::size_t) f < fn )) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); std::cerr<<"wrong index in read_hedge"<::read_face(Face_handle f) } else { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } while (in >> ei) { CGAL_assertion_msg(ei >= 0 && (std::size_t) ei < en, "wrong index in face cycle list."); if (!(ei >= 0 && ei < en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } f->store_fc(Halfedge_of[ei]); @@ -299,7 +299,7 @@ bool PM_io_parser::read_face(Face_handle f) CGAL_assertion_msg(vi >= 0 && (std::size_t) vi < vn, "wrong index in iso vertex list."); if (!(vi >= 0 && vi < vn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } f->store_iv(Vertex_of[vi]); 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 21c54dd4133..e5530445153 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -1402,7 +1402,7 @@ void SNC_io_parser::read() if ( !check_sep("Selective Nef Complex") ) { CGAL_warning_msg(false, "SNC_io_parser::read: no SNC header."); - returnl + return; } std::string kernel_type; in >> kernel_type; @@ -1581,14 +1581,14 @@ read_vertex(Vertex_handle vh) { in >> index; if(index >= int(en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->svertices_begin() = (index >= 0 ? Edge_of[index] : this->svertices_end()); in >> index; if(index >= int(en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->svertices_last() = index >= 0 ? Edge_of[index] : this->svertices_end(); @@ -1596,14 +1596,14 @@ read_vertex(Vertex_handle vh) { in >> index; if(index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->shalfedges_begin() = index >= 0 ? SEdge_of[index] : this->shalfedges_end(); in >> index; if(index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->shalfedges_last() = index >= 0 ? SEdge_of[index] : this->shalfedges_end(); @@ -1611,14 +1611,14 @@ read_vertex(Vertex_handle vh) { in >> index; if(index >= int(sfn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->sfaces_begin() = index >= 0 ? SFace_of[index] : this->sfaces_end(); in >> index; if(index >= int(sfn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->sfaces_last() = index >= 0 ? SFace_of[index] : this->sfaces_end(); @@ -1626,7 +1626,7 @@ read_vertex(Vertex_handle vh) { in >> index; if(index >= int(sln)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } vh->shalfloop() = index >= 0 ? SLoop_of[index] : this->shalfloops_end(); @@ -1685,7 +1685,7 @@ read_edge(Halfedge_handle eh) { in >> index; if(index < 0 || index >= int(en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } eh->twin() = Edge_of[index]; @@ -1693,7 +1693,7 @@ read_edge(Halfedge_handle eh) { in >> index; if(index < 0 || index >= int(vn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } eh->center_vertex() = Vertex_of[index]; @@ -1703,7 +1703,7 @@ read_edge(Halfedge_handle eh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } eh->out_sedge() = SEdge_of[index]; @@ -1711,7 +1711,7 @@ read_edge(Halfedge_handle eh) { in >> index; if(index < 0 || index >= int(sfn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } eh->incident_sface() = SFace_of[index]; @@ -1770,7 +1770,7 @@ read_facet(Halffacet_handle fh) { in >> index; if(index < 0 || index >= int(fn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } fh->twin() = Halffacet_of[index]; @@ -1782,7 +1782,7 @@ read_facet(Halffacet_handle fh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } fh->boundary_entry_objects().push_back(make_object(SEdge_of[index])); @@ -1795,7 +1795,7 @@ read_facet(Halffacet_handle fh) { in >> index; if(index < 0 || index >= int(sln)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } fh->boundary_entry_objects().push_back(make_object(SLoop_of[index])); @@ -1805,7 +1805,7 @@ read_facet(Halffacet_handle fh) { in >> index; if(index < 0 || index >= int(vn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } fh->incident_volume() = Volume_of[index+addInfiBox]; @@ -1852,7 +1852,7 @@ read_volume(Volume_handle ch) { in >> index; if(index < 0 || index >= int(sfn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } ch->shell_entry_objects().push_back(make_object(SFace_of[index])); @@ -1907,7 +1907,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->twin() = SEdge_of[index]; @@ -1915,7 +1915,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->sprev() = SEdge_of[index]; @@ -1923,7 +1923,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->snext() = SEdge_of[index]; @@ -1931,7 +1931,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->source() = Edge_of[index]; @@ -1939,7 +1939,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sfn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->incident_sface() = SFace_of[index]; @@ -1947,7 +1947,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->prev() = SEdge_of[index]; @@ -1955,7 +1955,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(sen)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->next() = SEdge_of[index]; @@ -1963,7 +1963,7 @@ read_sedge(SHalfedge_handle seh) { in >> index; if(index < 0 || index >= int(fn)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } seh->facet() = Halffacet_of[index]; @@ -2018,7 +2018,7 @@ read_sloop(SHalfloop_handle slh) { in >> index; if(index < 0 || index >= sln) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } slh->twin() = SLoop_of[index]; @@ -2026,7 +2026,7 @@ read_sloop(SHalfloop_handle slh) { in >> index; if(index < 0 || index >= sfn) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } slh->incident_sface() = SFace_of[index]; @@ -2034,7 +2034,7 @@ read_sloop(SHalfloop_handle slh) { in >> index; if(index < 0 || index >= fn) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } slh->facet() = Halffacet_of[index]; @@ -2085,7 +2085,7 @@ read_sface(SFace_handle sfh) { in >> index; if(index < 0 || index >= vn) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } sfh->center_vertex() = Vertex_of[index]; @@ -2099,7 +2099,7 @@ read_sface(SFace_handle sfh) { SM_decorator SD(&*sfh->center_vertex()); if(index < 0 || index >= sen) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } SD.link_as_face_cycle(SEdge_of[index],sfh); @@ -2112,7 +2112,7 @@ read_sface(SFace_handle sfh) { in >> index; if(index < 0 || index >= en) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } sfh->boundary_entry_objects().push_back(make_object(Edge_of[index])); @@ -2126,7 +2126,7 @@ read_sface(SFace_handle sfh) { in >> index; if(index < 0 || index >= sln) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } sfh->boundary_entry_objects().push_back(make_object(SLoop_of[index])); @@ -2137,7 +2137,7 @@ read_sface(SFace_handle sfh) { in >> index; if(index < 0 || index >= vn) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } sfh->volume() = Volume_of[index+addInfiBox]; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h index a9377719f93..d58126bac9c 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h @@ -205,7 +205,7 @@ bool SM_io_parser::read_vertex(SVertex_handle v) if(f<0 || (iso && f > fn) || (!iso && f > en)) { - in.clear(std::ios_base::badbit); + in.setstate(std::ios_base::badbit); return false; } @@ -246,7 +246,7 @@ bool SM_io_parser::read_edge(SHalfedge_handle e) v >= 0 && v < vn && f >= 0 && f < fn )) { std::cerr<<"wrong index in read_edge"<::read_face(SFace_handle f) if(!(ei >= 0 && ei < en)) { std::cerr<<"wrong index in face cycle list."<store_sm_boundary_object(Edge_of[ei],f); @@ -326,7 +326,7 @@ bool SM_io_parser::read_face(SFace_handle f) if(!(vi >= 0 && vi < vn)) { std::cerr<<"wrong index in iso vertex list."<store_sm_boundary_object(SVertex_of[vi],f); @@ -336,7 +336,7 @@ bool SM_io_parser::read_face(SFace_handle f) if(!(li >= 0 && li < 2)) { std::cerr<<"wrong index in iso vertex list."<store_sm_boundary_object(Loop_of[li],f); From 54db0c04d1aebfc00284c3be832ac4c368393e27 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Jan 2021 09:51:56 +0100 Subject: [PATCH 183/317] FInish --- .../test_deprecated_io_point_set.cpp | 60 +++++++++++++++- .../include/CGAL/Surface_mesh/IO/PLY.h | 4 +- Surface_mesh/test/Surface_mesh/CMakeLists.txt | 13 ++++ .../Surface_mesh/test_deprecated_io_sm.cpp | 70 +++++++++++++++++++ 4 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp index 84fc487c2ce..cc55bce3918 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp @@ -80,6 +80,7 @@ points[2] = std::make_pair(Point_3(0,0,1), Color{0,0,255,255}); std::ofstream os; std::ifstream is; bool ok; +//LAS #ifdef CGAL_LINKED_WITH_LASLIB os.open("tmp.las", std::ios::binary); ok = CGAL::write_las_points_with_properties(os, points, @@ -105,8 +106,24 @@ is.close(); assert(ok); assert(points.size() == 3); assert(points[1].second[1] == 255); -#endif +std::vector ps; +ps.push_back(Point_3(1,0,0)); +ps.push_back(Point_3(0,1,0)); +ps.push_back(Point_3(0,0,1)); + +os.open("tmp.las", std::ios_base::binary); +CGAL::write_las_points(os, ps, CGAL::parameters::all_default()); +os.close(); +assert(ok); +ps.clear(); +is.open("tmp.las", std::ios::binary); +ok = CGAL::read_las_points(is, std::back_inserter (ps),CGAL::parameters::all_default()); +is.close(); +assert(ok); +assert(ps.size() == 3); +#endif +//PLY os.open("tmp.ply"); ok = CGAL::write_ply_points_with_properties(os, points, CGAL::make_ply_point_writer (CGAL::First_of_pair_property_map()), @@ -128,8 +145,49 @@ ok = CGAL::read_ply_points_with_properties(is, std::back_inserter (points), CGAL::PLY_property("green"), CGAL::PLY_property("blue"), CGAL::PLY_property("alpha"))); +is.close(); assert(ok); assert(points.size() == 3); assert(points[1].second[1] == 255); +os.open("tmp.ply"); +ok = CGAL::write_ply_points(os, ps, CGAL::parameters::all_default()); +os.close(); +assert(ok); + +is.open("tmp.ply"); +ps.clear(); +ok = CGAL::read_ply_points(is, std::back_inserter (ps), + CGAL::parameters::all_default()); +is.close(); +assert(ok); +assert(ps.size() == 3); + +//OFF +os.open("tmp.off"); +ok = CGAL::write_off_points(os, ps, CGAL::parameters::all_default()); +os.close(); +assert(ok); + +is.open("tmp.off"); +ps.clear(); +ok = CGAL::read_off_points(is, std::back_inserter (ps), + CGAL::parameters::all_default()); +is.close(); +assert(ok); +assert(ps.size() == 3); + +//XYZ +os.open("tmp.xyz"); +ok = CGAL::write_xyz_points(os, ps, CGAL::parameters::all_default()); +os.close(); +assert(ok); + +is.open("tmp.xyz"); +ps.clear(); +ok = CGAL::read_xyz_points(is, std::back_inserter (ps), + CGAL::parameters::all_default()); +is.close(); +assert(ok); +assert(ps.size() == 3); } diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index 3e82506fe8a..dea71e4478e 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -1136,9 +1136,9 @@ bool write_PLY(std::ostream& os, const Surface_mesh

& sm) */ template -CGAL_DEPRECATED bool write_ply(std::istream& is, Surface_mesh

& sm, std::string& comments) +CGAL_DEPRECATED bool write_ply(std::ostream& os, Surface_mesh

& sm, std::string& comments) { - return write_PLY(is, sm, comments); + return write_PLY(os, sm, comments); } #endif // CGAL_NO_DEPRECATED_CODE diff --git a/Surface_mesh/test/Surface_mesh/CMakeLists.txt b/Surface_mesh/test/Surface_mesh/CMakeLists.txt index 81a2d0ae980..6527c9bb721 100644 --- a/Surface_mesh/test/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/test/Surface_mesh/CMakeLists.txt @@ -14,3 +14,16 @@ file( foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") endforeach() + +find_path(3MF_INCLUDE_DIR + NAMES Model/COM/NMR_DLLInterfaces.h + DOC "Path to lib3MF headers" + ) +find_library(3MF_LIBRARIES NAMES 3MF DOC "Path to the lib3MF library") +if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h") + include_directories(${3MF_INCLUDE_DIR}) + target_link_libraries(test_deprecated_io_sm PRIVATE ${3MF_LIBRARIES}) + target_compile_definitions(test_deprecated_io_sm PRIVATE -DCGAL_LINKED_WITH_3MF) +else() + message(STATUS "NOTICE : read_3mf requires the lib3MF library, and will not be tested.") +endif() diff --git a/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp b/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp new file mode 100644 index 00000000000..8607ccba9d7 --- /dev/null +++ b/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh SM; + +int main() +{ + // OFF + SM sm_in, sm_out; + Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); + CGAL::make_triangle(p0, p1, p2, sm_out); + bool ok = CGAL::write_off(sm_out, "tmp.off"); + assert(ok); + ok = CGAL::read_off(sm_in, "tmp.off"); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + sm_in.clear(); + + std::ofstream os("tmp.off"); + ok = CGAL::write_off(os, sm_out); + assert(ok); + os.close(); + std::ifstream is("tmp.off"); + ok = CGAL::read_off(is, sm_in); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + is.close(); + sm_in.clear(); + + //PLY + os.open("tmp.ply"); + std::string comments; + ok = CGAL::write_ply(os, sm_out, comments); + assert(ok); + os.close(); + is.open("tmp.ply"); + ok = CGAL::read_ply(is, sm_in, comments); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + is.close(); + sm_in.clear(); + +#ifdef CGAL_LINKED_WITH_3MF + // 3mf + std::vector output_3mf; + ok = CGAL::read_3mf("test.3mf", output_3mf); + assert(ok); + assert(output_3mf.size() == 2); + sm_in.clear(); +#endif + + //others + ok = CGAL::write_mesh(sm_out, "tmp.off"); + assert(ok); + ok = CGAL::read_mesh(sm_in, "tmp.ply"); + assert(ok); + assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); + sm_in.clear(); + return EXIT_SUCCESS; +} From 78a13fbd03e3495b4f13c9e54e95c5e0f9b31332 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Jan 2021 09:53:35 +0100 Subject: [PATCH 184/317] add missing test file --- Surface_mesh/test/Surface_mesh/test.3mf | Bin 0 -> 2183 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Surface_mesh/test/Surface_mesh/test.3mf diff --git a/Surface_mesh/test/Surface_mesh/test.3mf b/Surface_mesh/test/Surface_mesh/test.3mf new file mode 100644 index 0000000000000000000000000000000000000000..8e8d5e004f271af203da698010b667da1bff1e62 GIT binary patch literal 2183 zcmZ`*2{_bi7yplC3?rtDt!#CtEM=WAUCi8&aqS{YmQjo)1~nsF)~HEZ#FVu{G=#3n zE+mq529vSI5G6|==Azt|YwLTS>ihoB^S;0Hf8TS?^S-}xo^xI+Q*It*001EC0{{y9 z%`SY~{$KzcKpLtdJqQ6Fct4fR83e!peu+(0po(V;vm83kJwm};|n$ZyM)YcE4l<(CcXK4+hSn=%`+fSA`W_nV)rFqN*2Rk@6y&c)LEAdk7 zaYY}?WBsHrzGE(`b}spI6YX~0*B4duS=KR8iQH5~WVNU4 zxT8I2>Upg}b>YEvt|uxFaSdPBkoeHKHOd>$r{|hd!{fylM+)|-xT{`m%Ee9kYd%V9 z%IIBAd3MFXJ>>#Cfw9!IW-NIbN&T9-yhqrBZ8$NlK0B7uIA}}j2bjygTp=3n_klkY zym7FYk2(wsArbane!`b@x4nri3lf3-(1K|6%`*1zsR7W4$dF^heR++!y=ZI1%9`K) z-^$`SzC?^K2U8R*k4HZlb)m5T*{Q`(|BP3Xo8@Xyu^bTq&x)x*^!4Kp!qcF(hg#(z zR|JWU&!ouu&tHfL_OKzEnp7)s$346*yR_wBI^K(##KeQV4(OSajufE#oH$rkN z(&HDIIsnA$x*EJZ)x7fX3Wrzo-f2u{uw^|;w>4P)bpR`a|0F>PQ$3YznIh~QQI;%hsXqDD{FK?j ziqrn0gpksq5j6G5`MV-=;0(1-`q4yQ)m^)dq~UZhmU0CtG7Yr>6f|l@Mf{NEI z%wva~0`(T&=V-pmc$78dydj^_ewQ)KQ(nssV>9u-bnSkf^12PV5=2Dr_*}E&mh0PH z;h*X>+a3qmjH07W7#&SCrBJq!&?-%hZ7mg|n=sOSjo7aod%Uh{|FVLUZ|&-?@|sUjeI^cggcw3ge3Krpd&bxb=M z1y*cFTj#22A#<(>Wnh;3^5iHy4<6l8`P)i)CbdI$vY@T7{|4~qf^z;zA;WR&0uOND z@1kg6DWB8hGoiksgy{b7F%2U!gsga{CeI3ToHOHf$qC%S6Iv z3END?YAC&>C*vOmH&UCuB)Shq*l>@RD6B|CN?Lhkh@L33w2U%CzGvsm+LUB979!hK z>Uw?noo|-n=D7AgB z=ylwn;nzkf@k^uJHUWP2{A23BtqQozWxVGJme|G+3oPKuxL)0XGiJB64>&#ZB xVDO>s<8N`Y^~1fr_8kScqb|w!U%O3d|JLgQ*x0r*<=ynk4R8Y+`Wx&4z`vc Date: Wed, 20 Jan 2021 15:04:32 +0100 Subject: [PATCH 185/317] Fix examples/Mesh_3/mesh_implicit_domains.cpp The error was actually due to an mismatch between `CGAL_LINKED_WITH_TBB` and `CGAL_CONCURRENT_MESH_3`. For CGAL-5.3 we should clean that up! That code using `Parallel_tag` without TBB should not compile, actually. Fix for https://github.com/CGAL/cgal/issues/5375 --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 9683e4ed57a..37237d2a170 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -173,6 +173,7 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) mesh_3D_image_variable_size mesh_3D_image_with_custom_initialization mesh_3D_image_with_features + mesh_implicit_domains mesh_implicit_sphere mesh_implicit_sphere_variable_size mesh_optimization_example From 6fe18d8068897c786ab28f086fbc341084a8b32a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 20 Jan 2021 15:32:23 +0100 Subject: [PATCH 186/317] Enhance the debugging tools in Mesh_3 --- Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h | 2 +- .../CGAL/Mesh_3/mesh_standard_cell_criteria.h | 6 ++--- .../CGAL/Meshes/Double_map_container.h | 25 ++++++++++++++++--- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h index b7d7e050735..7392d5667a9 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -470,7 +470,7 @@ public: std::string debug_info_element_impl(const Cell_handle &ch) const { std::stringstream sstr; - sstr << "Cell { " << std::endl + sstr << "Cell " << (void*)(ch.operator->()) << " { " << std::endl << " " << *ch->vertex(0) << std::endl << " " << *ch->vertex(1) << std::endl << " " << *ch->vertex(2) << std::endl diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h index ec867659a93..fad4622b24d 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h @@ -104,7 +104,7 @@ protected: if ( size > min_sq_length*sq_radius_edge_bound_ ) { #ifdef CGAL_MESH_3_DEBUG_CELL_CRITERIA - std::cerr << "bad cell (radius-edge bound): radius-edge[" + std::cerr << "bad cell " << (void*)(ch.operator->()) << " (radius-edge bound): radius-edge[" << size/min_sq_length << "] bound[" << sq_radius_edge_bound_ << "]\n" ; #endif @@ -185,7 +185,7 @@ protected: if ( size > sq_radius_bound_ ) { #ifdef CGAL_MESH_3_DEBUG_CELL_CRITERIA - std::cerr << "bad cell (radius bound): size[" << size + std::cerr << "bad cell " << (void*)(ch.operator->()) << " (radius bound): size[" << size << "] bound[" << sq_radius_bound_ << "]\n" ; #endif return Is_bad(Quality(sq_radius_bound_/size)); @@ -262,7 +262,7 @@ protected: if ( size > sq_bound ) { #ifdef CGAL_MESH_3_DEBUG_CELL_CRITERIA - std::cerr << "bad cell (radius bound): size[" << size + std::cerr << "bad cell " << (void*)(ch.operator->()) << " (radius bound): size[" << size << "] bound[" << sq_bound << "]\n" ; #endif return Is_bad(Quality(sq_bound/size)); diff --git a/Mesher_level/include/CGAL/Meshes/Double_map_container.h b/Mesher_level/include/CGAL/Meshes/Double_map_container.h index 074cd5f0091..cc4c7bbface 100644 --- a/Mesher_level/include/CGAL/Meshes/Double_map_container.h +++ b/Mesher_level/include/CGAL/Meshes/Double_map_container.h @@ -42,12 +42,25 @@ namespace CGAL { return m.empty(); } +#if CGAL_MESHES_DEBUG_DOUBLE_MAP + template + std::ostream& debug_element(std::ostream& os, const Element_type& e) { + return os << (void*)(e.operator->()); + } + + template + std::ostream& debug_element(std::ostream& os, const std::pair& e) { + return os << "Facet{" << (void*)(e.first.operator->()) << ", " << e.second << "}"; + } +#endif + Element get_next_element_impl() { CGAL_assertion(!m.empty()); #if CGAL_MESHES_DEBUG_DOUBLE_MAP - std::cerr << "get_next_element_impl(" << &*(m.front()->second) - << ")\n"; + std::cerr << "get_next_element_impl("; + debug_element(std::cerr, m.front()->second); + std::cerr << ")\n"; #endif return m.front()->second; @@ -56,7 +69,9 @@ namespace CGAL { void add_bad_element(const Element& e, const Quality& q) { #if CGAL_MESHES_DEBUG_DOUBLE_MAP - std::cerr << "add_bad_element(" << &*e << ")\n"; + std::cerr << "add_bad_element("; + debug_element(std::cerr, e); + std::cerr << ")\n"; #endif m.insert(e, q); } @@ -69,7 +84,9 @@ namespace CGAL { void remove_element(const Element& e) { #if CGAL_MESHES_DEBUG_DOUBLE_MAP - std::cerr << "remove_element(" << &*e << ")\n"; + std::cerr << "remove_element("; + debug_element(std::cerr, e); + std::cerr << ")\n"; #endif m.erase(e); } From 4ef0295891345bd6dea8007dc00b7496f02bdeb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 20 Jan 2021 15:53:52 +0100 Subject: [PATCH 187/317] typo --- .../include/CGAL/Polygon_mesh_processing/manifoldness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h index d818c4c4915..a17c265c3c0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h @@ -284,7 +284,7 @@ std::size_t make_umbrella_manifold(typename boost::graph_traits::ha /// \ingroup PMP_repairing_grp /// collects the non-manifold vertices (if any) present in the mesh. A non-manifold vertex `v` is returned -/// via one incident halfedge `h` such that `target(h, pm) = v` for all the umbrellas that `v` apppears in +/// via one incident halfedge `h` such that `target(h, pm) = v` for all the umbrellas that `v` appears in /// (an umbrella being the set of faces incident to all the halfedges reachable by walking around `v` /// using `hnext = prev(opposite(h, pm), pm)`, starting from `h`). /// From 5ea5e93f4543dc688a3e54c43699dc208fe4ef8c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Jan 2021 15:17:41 +0000 Subject: [PATCH 188/317] Fix warning --- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h | 4 ++-- .../CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index 2e37ff476c3..99b71db68a1 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -63,8 +63,8 @@ struct Exact_intersect_xy_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), Point_3(q2.x(),q2.y(),0) ) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 9959db3355c..7d77eaae669 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -62,8 +62,8 @@ struct Exact_intersect_xz_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), Point_3(q2.x(),0,q2.y()) ) )); diff --git a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index 13710cbebf5..a98b74fd144 100644 --- a/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -63,8 +63,8 @@ struct Exact_intersect_yz_2 } const Segment_2* si = boost::get(&*obj); - p2 = s2.source(); - q2 = s2.target(); + p2 = si->source(); + q2 = si->target(); return boost::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), Point_3(0,q2.x(),q2.y()) ) )); From 361598fe8fbad0532619d08d72a495e73dd4c3e0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Jan 2021 15:39:50 +0000 Subject: [PATCH 189/317] Cherry-picked 581ba10 (Thank you Giles) --- Nef_2/include/CGAL/Nef_2/debug.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/debug.h b/Nef_2/include/CGAL/Nef_2/debug.h index 6bd3d00a76a..a8581420761 100644 --- a/Nef_2/include/CGAL/Nef_2/debug.h +++ b/Nef_2/include/CGAL/Nef_2/debug.h @@ -45,33 +45,33 @@ #define CGAL_NEF_TRACE(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<(0)) #endif #ifndef NDEBUG #define CGAL_NEF_TRACEV(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<<#t<<" = "<<(t)<(0)) #endif #ifndef NDEBUG #define CGAL_NEF_TRACEN(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<< " "<(0)) #endif #ifndef NDEBUG #define CGAL_NEF_CTRACE(b,t) if(b) {std::cerr<<" "<(0)) #endif #ifndef NDEBUG #define CGAL_NEF_CTRACEN(b,t) if(b){ std::cerr<<" "<(0)) #endif #endif // CGAL_NEF_2_DEBUG_H From fbecff56922cae8f445ccc1f3cbac99492fd940b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Jan 2021 16:06:32 +0000 Subject: [PATCH 190/317] Use CGAL::cpp98::random_shuffle() --- .../Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h | 3 ++- .../include/CGAL/Constraints_loader.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h b/GraphicsView/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h index 1a3a2f3621f..66899ca4237 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/include/CGAL/Constraints_loader.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -96,7 +97,7 @@ class Constraints_loader { for(Points_iterator it = points.begin(); it != points.end(); ++it) { indices.push_back(it); } - std::random_shuffle(indices.begin(), indices.end()); + CGAL::cpp98::random_shuffle(indices.begin(), indices.end()); CGAL::spatial_sort(indices.begin(), indices.end(), sort_traits); diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h index 1a3a2f3621f..66899ca4237 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/include/CGAL/Constraints_loader.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -96,7 +97,7 @@ class Constraints_loader { for(Points_iterator it = points.begin(); it != points.end(); ++it) { indices.push_back(it); } - std::random_shuffle(indices.begin(), indices.end()); + CGAL::cpp98::random_shuffle(indices.begin(), indices.end()); CGAL::spatial_sort(indices.begin(), indices.end(), sort_traits); From dfc613c342437c641bf75e40744a5f586b0a6fbd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Jan 2021 10:22:51 +0100 Subject: [PATCH 191/317] Add missing makeCurrent() --- Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h | 1 + Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp | 8 ++++++++ Circular_kernel_3/demo/Circular_kernel_3/Viewer.h | 1 + .../demo/Periodic_3_triangulation_3/Scene.h | 1 + Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h | 1 + Polyhedron/demo/Polyhedron/Viewer.cpp | 1 + 6 files changed, 13 insertions(+) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h index ff19159d837..289ae385c1e 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h @@ -21,6 +21,7 @@ public: Viewer(QWidget* parent); ~Viewer() { + makeCurrent(); buffers[0].destroy(); buffers[1].destroy(); buffers[2].destroy(); diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index 69901dbbd1c..aa5a06c1354 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -11,6 +11,14 @@ Viewer::Viewer(QWidget* parent ) { extension_is_found = false; } +Viewer::~Viewer() +{ + makeCurrent(); + for(int i=0; i<3; ++i) + vao[i].destroy(); + for(int i=0; i<9; ++i) + buffers[i].destroy(); +} void Viewer::compile_shaders() { diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.h b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.h index ea178e756a0..cad037ce2c8 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.h +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.h @@ -13,6 +13,7 @@ class Viewer : public CGAL::QGLViewer { public: Viewer(QWidget* parent = 0); + ~Viewer(); GLuint dl_nb; protected : virtual void draw(); diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.h b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.h index 41d4311ebe8..32f3926c802 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.h +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.h @@ -76,6 +76,7 @@ public: } ~Scene() { + ui->viewer->makeCurrent(); for(int i=0; i<24; i++) buffers[i].destroy(); for(int i=0; i<12; i++) diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h index 1ea4397cf4c..7ba3534a6d2 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h @@ -27,6 +27,7 @@ public: {} ~Viewer() { + makeCurrent(); for(int i=0; i<4; i++) { buffers[i].destroy(); diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 95ede4b08db..67106261b3e 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -374,6 +374,7 @@ Viewer::Viewer(QWidget* parent, Viewer::~Viewer() { + makeCurrent(); QSettings viewer_settings; viewer_settings.setValue("cam_pos", QString("%1,%2,%3") From a91d63699fc82831b002e98f5421573ceb69453f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Jan 2021 11:06:01 +0100 Subject: [PATCH 192/317] Fix PCA demo and remove debug warnings --- AABB_tree/demo/AABB_tree/MainWindow.cpp | 1 + GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 10 ---------- .../demo/Principal_component_analysis/MainWindow.cpp | 1 + .../demo/Principal_component_analysis/Scene.cpp | 1 + 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/MainWindow.cpp b/AABB_tree/demo/AABB_tree/MainWindow.cpp index c5d00c638bb..78a8336f076 100644 --- a/AABB_tree/demo/AABB_tree/MainWindow.cpp +++ b/AABB_tree/demo/AABB_tree/MainWindow.cpp @@ -45,6 +45,7 @@ MainWindow::MainWindow(QWidget* parent) MainWindow::~MainWindow() { + m_pViewer->makeCurrent(); delete ui; } diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index b097030d1ea..5e6ab9dae8a 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -216,16 +216,6 @@ void CGAL::QGLViewer::initializeGL() { || QCoreApplication::arguments().contains(QStringLiteral("--old"))) { - format.setDepthBufferSize(24); - format.setStencilBufferSize(8); - format.setVersion(2,0); - format.setRenderableType(QSurfaceFormat::OpenGLES); - format.setSamples(0); - format.setOption(QSurfaceFormat::DebugContext); - QSurfaceFormat::setDefaultFormat(format); - - needNewContext(); - qDebug()<<"GL 4.3 context initialization failed. "; is_ogl_4_3 = false; } else diff --git a/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp b/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp index 0676b175517..13dde23e2a2 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp @@ -48,6 +48,7 @@ MainWindow::MainWindow(QWidget* parent) MainWindow::~MainWindow() { + m_pViewer->makeCurrent(); delete ui; } diff --git a/Principal_component_analysis/demo/Principal_component_analysis/Scene.cpp b/Principal_component_analysis/demo/Principal_component_analysis/Scene.cpp index e75392cb62d..a4c60dd0a54 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/Scene.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/Scene.cpp @@ -28,6 +28,7 @@ Scene::Scene() Scene::~Scene() { + delete m_pPolyhedron; } From e0dd8bd74a5b53f7c8c04992df1495e0b9aadeb7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 21 Jan 2021 15:23:57 +0100 Subject: [PATCH 193/317] Update AdaptationTraits_2.h Add namespace --- .../doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h index 24e544b3412..4cc31a5b14c 100644 --- a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h +++ b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Concepts/AdaptationTraits_2.h @@ -5,7 +5,7 @@ The concept `AdaptationTraits_2` defines the functors required for accessing geometric information in the Delaunay graph that is needed by the -`Voronoi_diagram_2` class. +`CGAL::Voronoi_diagram_2` class. It optionally defines a functor for performing nearest site queries. A tag is provided for determining whether this functor is defined or not. From 556764d6385109df857b2609845dcdd2d84583cc Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Fri, 22 Jan 2021 09:52:53 +0100 Subject: [PATCH 194/317] Add copy constructor to remove a warning (implicitly-declared is deprecated [-Wdeprecated-copy]) --- .../internal/Path_on_surface_with_rle.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h index a8e984fd348..398479cf176 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h @@ -81,6 +81,8 @@ public: Light_MQ(const Local_map& m): m_map(m) {} + Light_MQ(const Light_MQ& lmq): m_map(lmq.m_map) + {} const Local_map& get_local_map() const { return m_map; } @@ -141,6 +143,17 @@ public: #endif //CGAL_PWRLE_TURN_V2 {} + Path_on_surface_with_rle(const Self& apath): m_MQ(apath.m_MQ), + m_path(apath.m_path), + m_is_closed(apath.m_is_closed), + m_length(apath.m_length), + m_use_only_positive(apath.m_use_only_positive), + m_use_only_negative(apath.m_use_only_negative) +#ifdef CGAL_PWRLE_TURN_V2 + , m_darts_ids(apath.m_darts_ids) +#endif //CGAL_PWRLE_TURN_V2 + {} + /// Creates a Path_on_surface_with_rle from a Path_on_surface. /// If use_only_positive, consider only positive flats and not negative ones. /// If use_only_negative, consider only negative flats and not positive ones. From 15a323e3fa6c3813e8f09a5f1e5229fea599dcfa Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Fri, 22 Jan 2021 17:48:08 +0100 Subject: [PATCH 195/317] Use default for copy constructors --- .../internal/Path_on_surface_with_rle.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h index 398479cf176..6b2ad7c3495 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h @@ -81,8 +81,7 @@ public: Light_MQ(const Local_map& m): m_map(m) {} - Light_MQ(const Light_MQ& lmq): m_map(lmq.m_map) - {} + Light_MQ(const Light_MQ&) = default; const Local_map& get_local_map() const { return m_map; } @@ -143,16 +142,7 @@ public: #endif //CGAL_PWRLE_TURN_V2 {} - Path_on_surface_with_rle(const Self& apath): m_MQ(apath.m_MQ), - m_path(apath.m_path), - m_is_closed(apath.m_is_closed), - m_length(apath.m_length), - m_use_only_positive(apath.m_use_only_positive), - m_use_only_negative(apath.m_use_only_negative) -#ifdef CGAL_PWRLE_TURN_V2 - , m_darts_ids(apath.m_darts_ids) -#endif //CGAL_PWRLE_TURN_V2 - {} + Path_on_surface_with_rle(const Self&) = default; /// Creates a Path_on_surface_with_rle from a Path_on_surface. /// If use_only_positive, consider only positive flats and not negative ones. From 0b4620ffd091187f71760e6a707c9a0265212312 Mon Sep 17 00:00:00 2001 From: magritte Date: Fri, 22 Jan 2021 16:22:24 +0100 Subject: [PATCH 196/317] Fix script for ctest testsuite --- .../autotest_cgal_with_ctest | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index 3cfe83b02c0..5049e1d0db9 100755 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -24,7 +24,7 @@ export GUNZIP="gunzip" export COMPRESSOR="gzip" export CONSOLE_OUTPUT="y" export CGAL_HOME=`pwd` -export USE_TARGZ="n" +export USE_TARGZ="y" export USE_TARBZ="n" export CGAL_RELEASE="" export LOGS_DIR="" @@ -35,6 +35,15 @@ export INSTALLATION_DIR="" export TESTSUITE_DIR="" USE_LATEST_UNZIPPED="" +# ---------------------------------------------------------------------------------------- +# produce a string containing the actual date/time +# (used to identify files) +# ---------------------------------------------------------------------------------------- +datestr() +{ + date +%d%m%Y%H%M +} + # ---------------------------------------------------------------------------------------- # Logging functions # ---------------------------------------------------------------------------------------- @@ -61,7 +70,24 @@ log_done() printf "\n-------------------------------------------------------\n" >> "${1}" } - +error() +{ + if [ -n "${CONSOLE_OUTPUT}" ]; then + printf "\nERROR: ${*}, exiting.\n" >&2 + fi + printf "\nERROR: ${*}, exiting.\n" >> "${ACTUAL_LOGFILE}" + ${COMPRESSOR} -9f "${ACTUAL_LOGFILE}" + FILENAME="${CGAL_RELEASE_ID}-log`datestr`.gz" + mv "${ACTUAL_LOGFILE}.gz" "${LOGS_DIR}/${FILENAME}" + if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then + for i in ${MAIL_ADDRESS}; do + printf "ERROR\n${LOGS_DIR}/${FILENAME}\n" | \ + ${SENDMAIL} -s "completed autotest" "${i}" + done + fi + rm -rf "$LOCK_FILE"; + exit 1 +} # ---------------------------------------------------------------------------------------- # Downloads the file "LATEST" whose contents indicates which release to test From 490e8845e50539b10a1762908ddcd190abe486bb Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Jan 2021 11:36:21 +0100 Subject: [PATCH 197/317] Fix after merge in master. --- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 238e333c399..680189f0227 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -140,6 +140,10 @@ if(IPE_FOUND AND IPE_VERSION) add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation) target_link_libraries(simple_triangulation CGAL::Eigen3_support ${IPE_LIBRARIES}) + target_include_directories(simple_triangulation BEFORE PRIVATE ${IPE_INCLUDE_DIR}) + if (WITH_IPE_7) + target_compile_definitions(simple_triangulation PRIVATE CGAL_USE_IPE_7) + endif() cgal_add_compilation_test(simple_triangulation) else() From ffa019712b0ad3b20e3d02edad4d731fda04a2ef Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Jan 2021 12:59:48 +0100 Subject: [PATCH 198/317] First face may be -1, don't fail on it, just don't use it --- Nef_2/include/CGAL/Nef_2/PM_io_parser.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h index 64a3e94916e..d08b08180d6 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h +++ b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h @@ -280,11 +280,7 @@ bool PM_io_parser::read_face(Face_handle f) { f->set_halfedge(Halfedge_of[ei]); } - else - { - in.setstate(std::ios_base::badbit); - return false; - } + while (in >> ei) { CGAL_assertion_msg(ei >= 0 && (std::size_t) ei < en, "wrong index in face cycle list."); if (!(ei >= 0 && ei < en)) From 01374debeb87070867f77ffbfc38e6ebcdf1c322 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Jan 2021 13:39:36 +0100 Subject: [PATCH 199/317] Drop Ipe 6 support --- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 36 +++---------------- CGAL_ipelets/demo/CGAL_ipelets/generator.cpp | 4 --- CGAL_ipelets/demo/CGAL_ipelets/hull.cpp | 31 ---------------- CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h | 4 --- Installation/CMakeLists.txt | 3 -- Installation/cmake/modules/FindIPE.cmake | 8 ++--- 6 files changed, 8 insertions(+), 78 deletions(-) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 680189f0227..4d66a2089a4 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -32,15 +32,11 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -find_package(IPE 6) +find_package(IPE 7) if(IPE_FOUND) - if (${IPE_VERSION} EQUAL "7") - set(WITH_IPE_7 ON) - elseif(${IPE_VERSION} EQUAL "6") - set(WITH_IPE_7 OFF) - else() - message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).") + if ( NOT ${IPE_VERSION} EQUAL "7") + message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") set(IPE_FOUND FALSE) endif() endif() @@ -52,7 +48,6 @@ if(IPE_FOUND AND IPE_VERSION) #setting installation directory get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH) if (IPE_FOUND AND NOT IPELET_INSTALL_DIR) - if (WITH_IPE_7) remove_leading_zero(IPE_MINOR_VERSION_1) remove_leading_zero(IPE_MINOR_VERSION_2) set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/") @@ -62,24 +57,6 @@ if(IPE_FOUND AND IPE_VERSION) DOC "The folder where ipelets will be installed" ENV IPELETPATH ) - else() - foreach (VER RANGE 28 40) - string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" ) - set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) - endforeach() - set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) - set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib64/ipe/6.0/ipelets) - set(INSTALL_PATHS ${INSTALL_PATHS} /usr/lib/ipe/6.0/ipelets) - - find_library( - IPELET_INSTALL_DIR_FILES - NAMES align - PATHS ${INSTALL_PATHS} ENV IPELETPATH) - if(IPELET_INSTALL_DIR_FILES) - get_filename_component(IPELET_INSTALL_DIR ${IPELET_INSTALL_DIR_FILES} - PATH) - endif() - endif() endif() set(CGAL_IPELETS ${CGAL_IPELETS}) @@ -116,18 +93,13 @@ if(IPE_FOUND AND IPE_VERSION) foreach(IPELET ${CGAL_IPELETS}) add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp) target_include_directories(CGAL_${IPELET} BEFORE PRIVATE ${IPE_INCLUDE_DIR}) - if (WITH_IPE_7) - target_compile_definitions(CGAL_${IPELET} PRIVATE CGAL_USE_IPE_7) - endif() add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET}) target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen3_support ${IPE_LIBRARIES}) if(IPELET_INSTALL_DIR) install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR}) - if (WITH_IPE_7) - install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7 - endif() + install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7 endif () cgal_add_compilation_test(CGAL_${IPELET}) endforeach(IPELET) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp b/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp index 7c99e967f8b..92104a15cff 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/generator.cpp @@ -110,11 +110,7 @@ void generator::protected_run(int fn) else segments.reserve(nbelements); - #ifdef CGAL_USE_IPE_7 get_IpePage()->deselectAll(); - #else - get_IpePage()->DeselectAll(); - #endif switch(fn){ case 0:{//random point in a circle diff --git a/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp b/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp index 4e43d342d5b..abd2a7842b5 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp @@ -126,7 +126,6 @@ void enveloppeIpelet::protected_run(int fn) Vsite0.insert(Vsite0.end(),*(Vsite0.begin()+1)); std::vector::iterator Vsiteite0 = Vsite0.begin(); std::vector::iterator Vsiteite00 = Vsite0.end()-2; - #ifdef CGAL_USE_IPE_7 for(std::vector::iterator it=Vsiteite00 ; it!=Vsiteite0 ; --it){//draw precise convex hull computing tangency point to circles double c_rad = it->weight(); if(c_rad!=0){ @@ -155,36 +154,6 @@ void enveloppeIpelet::protected_run(int fn) ipe::Shape shape; shape.appendSubPath(SSPseg_ipe); get_IpePage()->append(ipe::EPrimarySelected,CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); - #else - for(std::vector::iterator it=Vsiteite00 ; it!=Vsiteite0 ; --it){//draw precise convex hull computing tangency point to circles - double c_rad = it->weight(); - if(c_rad!=0){ - Point_2 p_pt = (it-1)->point(); //previous neighbor - Point_2 c_pt = it->point(); - Point_2 n_pt = (it+1)->point(); //next neighbor - double p_rad = (it-1)->weight(); - double n_rad = (it+1)->weight(); - IpeVector pt_ipe=tangency_point(c_rad,p_rad,c_pt,p_pt); - IpeVector pt_ipe0=tangency_point(c_rad,n_rad,c_pt,n_pt,-1); - - if(it!=Vsiteite00) - SSPseg_ipe->AppendSegment(pt_ipe1,pt_ipe0); - SSPseg_ipe->AppendArc(IpeMatrix(c_rad,0,0,c_rad,c_pt.x(),c_pt.y()),pt_ipe0,pt_ipe); - pt_ipe1=pt_ipe; - } - else{ - Point_2 c_pt = it->point(); - IpeVector pt_ipe=IpeVector(c_pt.x(),c_pt.y()); - if(it!=Vsiteite00) - SSPseg_ipe->AppendSegment(pt_ipe1,pt_ipe); - pt_ipe1=pt_ipe; - } - } - SSPseg_ipe->SetClosed(true); - IpePath* obj_ipe1 = new IpePath(get_IpeletHelper()->Attributes()); - obj_ipe1 -> AddSubPath(SSPseg_ipe); - get_IpePage()->push_back(IpePgObject(IpePgObject::ESecondary,get_IpeletHelper()->CurrentLayer(),obj_ipe1)); - #endif } break; diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h index a3062e941ad..1b82d19a3e2 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h @@ -13,8 +13,4 @@ #include -#ifdef CGAL_USE_IPE_7 #include -#else -#include -#endif diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 9697b7a6f99..473581d2eb5 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1056,9 +1056,6 @@ because OpenCV_FOUND is false") message(STATUS "Skip header \"CGAL/CGAL_ipelet_base.h\" \ because IPE_FOUND is false.") endif() - if("${IPE_VERSION}" EQUAL "7") - set(compile_options "${compile_options} -DCGAL_USE_IPE_7") - endif() if(CGAL_ENABLE_CHECK_HEADERS) set(flag "-fsyntax-only") diff --git a/Installation/cmake/modules/FindIPE.cmake b/Installation/cmake/modules/FindIPE.cmake index 784bc90a817..ddd0c3ec1f2 100644 --- a/Installation/cmake/modules/FindIPE.cmake +++ b/Installation/cmake/modules/FindIPE.cmake @@ -10,14 +10,14 @@ # Is it already configured? if (IPE_INCLUDE_DIR AND IPE_LIBRARIES AND IPE_FULL_VERSION) set(IPE_FOUND TRUE) -else() - find_path(IPE_INCLUDE_DIR +else() + find_path(IPE_INCLUDE_DIR NAMES ipelib.h PATHS /usr/include /usr/local/include ) - find_library(IPE_LIBRARIES + find_library(IPE_LIBRARIES NAMES ipe PATHS /usr/lib /usr/local/lib @@ -26,7 +26,7 @@ else() if(IPE_INCLUDE_DIR) file(READ "${IPE_INCLUDE_DIR}/ipebase.h" IPEBASE_H) - string(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([67])([0-9][0-9])([0-9][0-9]);" FOUND_IPE_VERSION "${IPEBASE_H}") + string(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([7])([0-9][0-9])([0-9][0-9]);" FOUND_IPE_VERSION "${IPEBASE_H}") if (FOUND_IPE_VERSION) set(IPE_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "Ipe version major number") set(IPE_MINOR_VERSION_1 ${CMAKE_MATCH_2} CACHE INTERNAL "Ipe version minor number") From c5da5251b10b187beacd71daa128e7d670b81244 Mon Sep 17 00:00:00 2001 From: Maxime GIMENO Date: Mon, 25 Jan 2021 14:54:00 +0100 Subject: [PATCH 200/317] Update Installation/cmake/modules/FindIPE.cmake Co-authored-by: Laurent Rineau --- Installation/cmake/modules/FindIPE.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/FindIPE.cmake b/Installation/cmake/modules/FindIPE.cmake index ddd0c3ec1f2..e9885a56e12 100644 --- a/Installation/cmake/modules/FindIPE.cmake +++ b/Installation/cmake/modules/FindIPE.cmake @@ -26,7 +26,7 @@ else() if(IPE_INCLUDE_DIR) file(READ "${IPE_INCLUDE_DIR}/ipebase.h" IPEBASE_H) - string(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([7])([0-9][0-9])([0-9][0-9]);" FOUND_IPE_VERSION "${IPEBASE_H}") + string(REGEX MATCH "IPELIB_VERSION[ ]*=[ ]*([6789])([0-9][0-9])([0-9][0-9]);" FOUND_IPE_VERSION "${IPEBASE_H}") if (FOUND_IPE_VERSION) set(IPE_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "Ipe version major number") set(IPE_MINOR_VERSION_1 ${CMAKE_MATCH_2} CACHE INTERNAL "Ipe version minor number") From 631aa064eb8595804b0bdc4b013b6c9097e48492 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Jan 2021 15:28:35 +0100 Subject: [PATCH 201/317] Rephrase the doc --- Documentation/doc/Documentation/Third_party.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 02bffde6a6b..f3001865058 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -154,9 +154,9 @@ executables should be linked with the CMake imported target The \sc{libpointmatcher} web site is `https://github.com/ethz-asl/libpointmatcher`. -\attention On Windows, we only test the following setup : PointMatcher 1.3.1 with Eigen 3.3.7. Also, to make it work, you should follow the instructions at -`https://github.com/ethz-asl/libpointmatcher/blob/master/doc/CompilationWindows.md`, but replace `NABO_INCLUDE_DIR` by `libnabo_INCLUDE_DIRS` -and `NABO_LIBRARY` by `libnabo_LIBRARIES` when configuring PointMatcher. +\attention On Windows, we only support version 1.3.1 of PointMatcher with version 3.3.7 of Eigen, with some changes to the recipe at +`https://github.com/ethz-asl/libpointmatcher/blob/master/doc/CompilationWindows.md`:`NABO_INCLUDE_DIR` becomes `libnabo_INCLUDE_DIRS` +and `NABO_LIBRARY` becomes `libnabo_LIBRARIES` in the "Build libpointmatcher" section. \subsection thirdpartyLeda LEDA From 4ed3b0129c3894758ac921cd7baa6468b521950c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Jan 2021 15:35:27 +0100 Subject: [PATCH 202/317] make the dependencies to boost general, not just for windows --- .../cmake/modules/CGAL_pointmatcher_support.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index 7247f399f18..7323feae702 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -1,14 +1,11 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) - if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) - find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono) - endif() - if(NOT (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) - OR ( Boost_chrono_FOUND + find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono) + if(Boost_chrono_FOUND AND Boost_thread_FOUND AND Boost_filesystem_FOUND AND Boost_system_FOUND AND Boost_program_options_FOUND - AND Boost_date_time_FOUND) ) + AND Boost_date_time_FOUND) add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") From fba2e1fc45e6137249fc6cfc04bc5cb8a9bf1b51 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 14 Jan 2021 15:18:24 +0100 Subject: [PATCH 203/317] Remove false (outdated) dependency to Boost IO Stream / Serialization in code --- .../CGAL/Classification/ETHZ/Random_forest_classifier.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h b/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h index 6b22c41ad00..9df36610a44 100644 --- a/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h +++ b/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h @@ -290,14 +290,10 @@ public: The output file is written in a binary format that is readable by the `load_configuration()` method. */ -#if defined(DOXYGEN_RUNNING) || \ - (defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && \ - defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION)) void save_configuration (std::ostream& output) const { m_rfc->write(output); } -#endif /*! \brief loads a configuration from the stream `input`. @@ -314,9 +310,6 @@ public: format for ETHZ Random Forest changed in CGAL 5.2. */ -#if defined(DOXYGEN_RUNNING) || \ - (defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && \ - defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION)) void load_configuration (std::istream& input) { CGAL::internal::liblearning::RandomForest::ForestParams params; @@ -324,7 +317,6 @@ public: m_rfc->read(input); } -#endif /// @} From 8ce047066116d83d9cd829dfaf70e4b5a361db6a Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 14 Jan 2021 15:19:15 +0100 Subject: [PATCH 204/317] Make Boost IO Stream and Serialization optional for compiling Classification plugin --- .../Plugins/Classification/CMakeLists.txt | 91 +++++++++---------- .../Classification/Classification_plugin.cpp | 5 + .../Classification/Item_classification_base.h | 2 + 3 files changed, 48 insertions(+), 50 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index 9477b7bc01d..7c63ffd2a22 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -2,25 +2,14 @@ include(polyhedron_demo_macros) if(TARGET CGAL::Eigen3_support) - set(Classification_dependencies_met TRUE) - find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) - if(NOT TARGET CGAL::Boost_serialization_support) + if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) message( STATUS - "NOTICE: Boost Serialization not found. Classification plugin won't be available." + "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible." ) - set(Classification_dependencies_met FALSE) - endif() - - if(NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: Boost IOStreams not found. Classification plugin won't be available." - ) - set(Classification_dependencies_met FALSE) endif() find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning @@ -35,7 +24,6 @@ if(TARGET CGAL::Eigen3_support) STATUS "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available." ) - endif() find_package(TensorFlow QUIET) @@ -53,45 +41,48 @@ if(TARGET CGAL::Eigen3_support) ) endif() - if(Classification_dependencies_met) - qt5_wrap_ui(classificationUI_FILES Classification_widget.ui - Classification_advanced_widget.ui) - polyhedron_demo_plugin( - classification_plugin - Classification_plugin - Point_set_item_classification.cpp - Cluster_classification.cpp - Surface_mesh_item_classification.cpp - ${classificationUI_FILES} - KEYWORDS - Classification) - target_link_libraries( - classification_plugin - PUBLIC scene_points_with_normal_item - scene_polylines_item - scene_polygon_soup_item - scene_surface_mesh_item - scene_selection_item - scene_color_ramp - CGAL::Eigen3_support - CGAL::Boost_serialization_support - CGAL::Boost_iostreams_support) + qt5_wrap_ui(classificationUI_FILES Classification_widget.ui + Classification_advanced_widget.ui) + polyhedron_demo_plugin( + classification_plugin + Classification_plugin + Point_set_item_classification.cpp + Cluster_classification.cpp + Surface_mesh_item_classification.cpp + ${classificationUI_FILES} + KEYWORDS + Classification) + target_link_libraries( + classification_plugin + PUBLIC scene_points_with_normal_item + scene_polylines_item + scene_polygon_soup_item + scene_surface_mesh_item + scene_selection_item + scene_color_ramp + CGAL::Eigen_support) - if(OpenCV_FOUND) - target_link_libraries(classification_plugin PUBLIC CGAL::OpenCV_support) - endif() - if(TensorFlow_FOUND) - target_link_libraries(classification_plugin - PUBLIC CGAL::TensorFlow_support) - endif() - if(TBB_FOUND) - target_link_libraries(classification_plugin PUBLIC CGAL::TBB_support) - endif() - - add_dependencies(classification_plugin point_set_selection_plugin - selection_plugin) + if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) + target_link_libraries(classification_plugin PUBLIC + CGAL::Boost_serialization_support + CGAL::Boost_iostreams_support) endif() + if(TARGET CGAL::OpenCV_support) + target_link_libraries(classification_plugin PUBLIC CGAL::OpenCV_support) + endif() + + if(TARGET CGAL::TensorFlow_support) + target_link_libraries(classification_plugin PUBLIC CGAL::TensorFlow_support) + endif() + + if(TARGET CGAL::TBB_support) + target_link_libraries(classification_plugin PUBLIC CGAL::TBB_support) + endif() + + add_dependencies(classification_plugin point_set_selection_plugin + selection_plugin) + else() message( STATUS diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp index 75cc2aed755..209ced92bfe 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Classification_plugin.cpp @@ -708,7 +708,12 @@ public Q_SLOTS: filename = QFileDialog::getOpenFileName(mw, tr("Open ETHZ random forest configuration"), ".", +#if defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION) "ETHZ random forest configuration (*.bin);Deprecated compressed ETHZ random forest configuration (*.gz);All Files (*)"); +#else + "ETHZ random forest configuration (*.bin);All Files (*)"); +#endif + #ifdef CGAL_LINKED_WITH_OPENCV else if (classifier == CGAL_CLASSIFICATION_OPENCV_NUMBER) // Random Forest (OpenCV) filename = QFileDialog::getOpenFileName(mw, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Item_classification_base.h b/Polyhedron/demo/Polyhedron/Plugins/Classification/Item_classification_base.h index 5d763d90b2f..25fe070004d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Item_classification_base.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Item_classification_base.h @@ -235,10 +235,12 @@ public: m_ethz = new ETHZ_random_forest (m_labels, m_features); std::ifstream f (filename, std::ios_base::in | std::ios_base::binary); +#if defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION) // Handle deprecated files if (std::string(filename).find(".gz") != std::string::npos) m_ethz->load_deprecated_configuration(f); else +#endif m_ethz->load_configuration (f); } else if (classifier == CGAL_CLASSIFICATION_OPENCV_NUMBER) From fd371ef96be8c88d3220fbc0e4159a584d02c1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 25 Jan 2021 16:09:17 +0100 Subject: [PATCH 205/317] refactor the facet patch id maps + update the default --- .../Mesh_3/experimental/Get_facet_patch_id.h | 125 ++++++------------ .../Lipschitz_sizing_experimental.h | 2 +- .../Sizing_field_with_aabb_tree.h | 3 +- .../Polyhedron/Plugins/Mesh_3/Mesh_function.h | 22 +-- 4 files changed, 46 insertions(+), 106 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h index ab4862f6b99..7e62f6f41ce 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h @@ -11,113 +11,70 @@ // Author(s) : Laurent Rineau // -#ifndef CGAL_MESH_3_GET_FACET_PATCH_ID_H -#define CGAL_MESH_3_GET_FACET_PATCH_ID_H +#ifndef CGAL_MESH_3_FACET_PATCH_ID_MAP_H +#define CGAL_MESH_3_FACET_PATCH_ID_MAP_H #include #include #include -#include +#include namespace CGAL { namespace Mesh_3 { -namespace internal { -BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Primitive_has_Id, Id, false) -} // end namespace CGAL::Mesh_3::internal +/// A property map that, from a primitive of a AABB tree +/// retrieve the patch_id() of the facet. +template ::value > +struct Facet_patch_id_map; -/// A property map that, from a primitive of a AABB tree of polyhedron -/// facets, retrieve the patch_id() of the facet. -template -struct Get_facet_patch_id{}; - - -// generic version, that test if Primitive::Id exists -template ::value > -struct Get_facet_patch_id_property_traits { -}; - -// specialization when Primitive::Id exists -template -struct Get_facet_patch_id_property_traits +// Primitive::Id is an iterator type +template +struct Facet_patch_id_map { typedef typename Primitive::Id Id; typedef typename std::iterator_traits::value_type Face; typedef typename Face::Patch_id value_type; - typedef value_type& reference; - typedef Primitive key_type; + typedef const value_type& reference; + typedef typename Primitive::Id key_type; typedef boost::readable_property_map_tag category; + + friend reference get(Facet_patch_id_map, key_type primitive_id) + { + return primitive_id->patch_id(); + } }; -}} // end namespace CGAL::Mesh_3 - -namespace boost { - // specialization for using pointers as property maps - template - struct property_traits > - : public CGAL::Mesh_3::Get_facet_patch_id_property_traits {}; -} - -namespace CGAL { namespace Mesh_3 { - -template -typename boost::property_traits< Get_facet_patch_id >::value_type -get(const Get_facet_patch_id, const typename Primitive::Id& primitive_id) { - return primitive_id->patch_id(); -} - - - -/// A property map that, from a primitive of a AABB tree of Gwdwg -/// facets, retrieve the patch_id() of the facet. -template < typename MeshDomain> -struct Get_facet_patch_id_sm{}; - - -// generic version, that test if Primitive::Id exists +// Primitive::Id is a std::pair template ::value> -struct Get_facet_patch_id_sm_property_traits { -}; - -// specialization when Primitive::Id exists -template -struct Get_facet_patch_id_sm_property_traits + typename Primitive> +struct Facet_patch_id_map { typedef typename MeshDomain::AABB_primitive::Id Id; typedef typename MeshDomain::Patch_id value_type; - - typedef value_type& reference; - typedef typename MeshDomain::AABB_primitive key_type; + typedef const value_type& reference; + typedef typename MeshDomain::AABB_primitive::Id key_type; typedef boost::readable_property_map_tag category; + + friend reference get(Facet_patch_id_map, key_type primitive_id) + { + typedef typename boost::property_map< + typename MeshDomain::Polyhedron, + face_patch_id_t >::type Fpim; + Fpim fpim = get(face_patch_id_t(), + *(primitive_id.second)); + typename MeshDomain::Patch_id patch_index = get(fpim, + primitive_id.first); + return patch_index; + } }; -}} // end namespace CGAL::Mesh_3 - -namespace boost { - // specialization for using pointers as property maps - template - struct property_traits > - : public CGAL::Mesh_3::Get_facet_patch_id_sm_property_traits {}; -} - -namespace CGAL { namespace Mesh_3 { - +// backward compatibility with user code template -typename boost::property_traits< Get_facet_patch_id_sm >::value_type -get(const Get_facet_patch_id_sm, - const typename MeshDomain::AABB_primitive::Id& primitive_id) -{ - typedef typename boost::property_map< - typename MeshDomain::Polyhedron, - face_patch_id_t >::type Fpim; - Fpim fpim = get(face_patch_id_t(), - *(primitive_id.second)); - typename MeshDomain::Patch_id patch_index = get(fpim, - primitive_id.first); - return patch_index; -} +using Get_facet_patch_id_sm = Facet_patch_id_map; + }} // end namespace CGAL::Mesh_3 -#endif // CGAL_MESH_3_GET_FACET_PATCH_ID_H +#endif // CGAL_MESH_3_FACET_PATCH_ID_MAP_H diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h index 2288db7ef27..cd099a1edcf 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h @@ -78,7 +78,7 @@ public: typedef typename CGAL::Default::Get< Get_facet_patch_id_, - CGAL::Mesh_3::Get_facet_patch_id + CGAL::Mesh_3::Facet_patch_id_map >::type Get_facet_patch_id; typedef CGAL::Mesh_3::Filtered_projection_traits< diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h index c27f99353ec..0807f9cdde1 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h @@ -67,7 +67,8 @@ struct Sizing_field_with_aabb_tree >::type Get_curve_index; typedef typename CGAL::Default::Get< Get_facet_patch_id_, - CGAL::Mesh_3::Get_facet_patch_id + CGAL::Mesh_3::Facet_patch_id_map >::type Get_facet_patch_id; Sizing_field_with_aabb_tree diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index 43b1bbadf12..4e5ee780351 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -40,18 +40,7 @@ namespace CGAL { class Image_3; } -namespace internal{ -//general case for polyhedron -template -struct Get_facet_patch_id_selector { - typedef CGAL::Default type; -}; -//specialization for surface_mesh -template<> -struct Get_facet_patch_id_selector { - typedef CGAL::Mesh_3::Get_facet_patch_id_sm type; -}; -}//end internal + struct Mesh_parameters { double facet_angle; @@ -264,14 +253,7 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag) { if(p_.use_sizing_field_with_aabb_tree) { typedef typename Domain::Surface_patch_index_set Set_of_patch_ids; - typedef Sizing_field_with_aabb_tree - < - Kernel - , Domain - , typename Domain::AABB_tree - , CGAL::Default - , typename internal::Get_facet_patch_id_selector::type - > Mesh_sizing_field; // type of sizing field for 0D and 1D features + typedef Sizing_field_with_aabb_tree Mesh_sizing_field; // type of sizing field for 0D and 1D features typedef std::vector Patches_ids_vector; typedef typename Domain::Curve_index Curve_index; const Curve_index max_index = domain_->maximal_curve_index(); From bf128b3fda6746763d107f2674e2d6d2d22bf274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 25 Jan 2021 16:19:23 +0100 Subject: [PATCH 206/317] rename typedef to make clear it is a property map --- .../Mesh_3/experimental/Facet_patch_id_map.h | 76 +++++++++++++++++++ .../Mesh_3/experimental/Get_facet_patch_id.h | 59 +------------- .../Lipschitz_sizing_experimental.h | 16 ++-- .../Sizing_field_with_aabb_tree.h | 30 ++++---- .../Polyhedron/Plugins/Mesh_3/Mesh_function.h | 1 - 5 files changed, 103 insertions(+), 79 deletions(-) create mode 100644 Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h new file mode 100644 index 00000000000..19bb594e35e --- /dev/null +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h @@ -0,0 +1,76 @@ +// Copyright (c) 2010,2012 GeometryFactory Sarl (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) : Laurent Rineau +// + +#ifndef CGAL_MESH_3_FACET_PATCH_ID_MAP_H +#define CGAL_MESH_3_FACET_PATCH_ID_MAP_H + +#include + +#include +#include +#include + +namespace CGAL { namespace Mesh_3 { + +/// A property map that, from a primitive of a AABB tree +/// retrieve the patch_id() of the facet. +template ::value > +struct Facet_patch_id_map; + +// Primitive::Id is an iterator type +template +struct Facet_patch_id_map +{ + typedef typename Primitive::Id Id; + typedef typename std::iterator_traits::value_type Face; + typedef typename Face::Patch_id value_type; + typedef const value_type& reference; + typedef typename Primitive::Id key_type; + typedef boost::readable_property_map_tag category; + + friend reference get(Facet_patch_id_map, key_type primitive_id) + { + return primitive_id->patch_id(); + } +}; + +// Primitive::Id is a std::pair +template +struct Facet_patch_id_map +{ + typedef typename MeshDomain::AABB_primitive::Id Id; + typedef typename MeshDomain::Patch_id value_type; + typedef const value_type& reference; + typedef typename MeshDomain::AABB_primitive::Id key_type; + typedef boost::readable_property_map_tag category; + + friend reference get(Facet_patch_id_map, key_type primitive_id) + { + typedef typename boost::property_map< + typename MeshDomain::Polyhedron, + face_patch_id_t >::type Fpim; + Fpim fpim = get(face_patch_id_t(), + *(primitive_id.second)); + typename MeshDomain::Patch_id patch_index = get(fpim, + primitive_id.first); + return patch_index; + } +}; + +}} // end namespace CGAL::Mesh_3 + +#endif // CGAL_MESH_3_FACET_PATCH_ID_MAP_H diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h index 7e62f6f41ce..926cad5a1aa 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h @@ -11,70 +11,19 @@ // Author(s) : Laurent Rineau // -#ifndef CGAL_MESH_3_FACET_PATCH_ID_MAP_H -#define CGAL_MESH_3_FACET_PATCH_ID_MAP_H +#ifndef CGAL_MESH_3_GET_FACET_PATCH_ID_H +#define CGAL_MESH_3_GET_FACET_PATCH_ID_H #include -#include -#include -#include +#include namespace CGAL { namespace Mesh_3 { -/// A property map that, from a primitive of a AABB tree -/// retrieve the patch_id() of the facet. -template ::value > -struct Facet_patch_id_map; - -// Primitive::Id is an iterator type -template -struct Facet_patch_id_map -{ - typedef typename Primitive::Id Id; - typedef typename std::iterator_traits::value_type Face; - typedef typename Face::Patch_id value_type; - typedef const value_type& reference; - typedef typename Primitive::Id key_type; - typedef boost::readable_property_map_tag category; - - friend reference get(Facet_patch_id_map, key_type primitive_id) - { - return primitive_id->patch_id(); - } -}; - -// Primitive::Id is a std::pair -template -struct Facet_patch_id_map -{ - typedef typename MeshDomain::AABB_primitive::Id Id; - typedef typename MeshDomain::Patch_id value_type; - typedef const value_type& reference; - typedef typename MeshDomain::AABB_primitive::Id key_type; - typedef boost::readable_property_map_tag category; - - friend reference get(Facet_patch_id_map, key_type primitive_id) - { - typedef typename boost::property_map< - typename MeshDomain::Polyhedron, - face_patch_id_t >::type Fpim; - Fpim fpim = get(face_patch_id_t(), - *(primitive_id.second)); - typename MeshDomain::Patch_id patch_index = get(fpim, - primitive_id.first); - return patch_index; - } -}; - // backward compatibility with user code template using Get_facet_patch_id_sm = Facet_patch_id_map; }} // end namespace CGAL::Mesh_3 -#endif // CGAL_MESH_3_FACET_PATCH_ID_MAP_H +#endif // CGAL_MESH_3_GET_FACET_PATCH_ID_H diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h index cd099a1edcf..a0e2524dbb6 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include @@ -45,7 +45,7 @@ namespace Mesh_3 template @@ -77,12 +77,12 @@ public: typedef std::vector Patches_ids_map; typedef typename CGAL::Default::Get< - Get_facet_patch_id_, + Facet_patch_id_map_, CGAL::Mesh_3::Facet_patch_id_map - >::type Get_facet_patch_id; + >::type Facet_patch_id_map; typedef CGAL::Mesh_3::Filtered_projection_traits< - typename Tree::AABB_traits, Get_facet_patch_id> AABB_filtered_traits; + typename Tree::AABB_traits, Facet_patch_id_map> AABB_filtered_traits; private: typedef CGAL::Search_traits_3 KdTreeTraits; @@ -106,7 +106,7 @@ private: //help to accelerate aabb_tree queries in m_ptree boost::shared_ptr m_kd_tree; - Get_facet_patch_id m_get_facet_patch_id; + Facet_patch_id_map m_facet_patch_id_map; const Patches_ids_map& patches_ids_map; #endif @@ -136,7 +136,7 @@ public: , m_bbox(bbox) , m_domain_is_a_box(domain_is_a_box) #ifdef CGAL_MESH_3_EXPERIMENTAL_USE_PATCHES_IDS - , m_get_facet_patch_id() + , m_facet_patch_id_map() , patches_ids_map(patches_ids_map) #endif { @@ -425,7 +425,7 @@ private: boundary_ids.begin(), boundary_ids.end(), m_ptree->traits(), - m_get_facet_patch_id); + m_facet_patch_id_map); kd_tree();//build it if needed Neighbor_search search(*m_kd_tree, p, 1); projection_traits.reset(search.begin()->first); diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h index 0807f9cdde1..a2a67d32730 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h @@ -17,7 +17,7 @@ #include #include -#include "Get_facet_patch_id.h" +#include "Facet_patch_id_map.h" #include "Get_curve_index.h" #include // for weight_modifier @@ -32,7 +32,7 @@ template struct Sizing_field_with_aabb_tree { @@ -66,23 +66,23 @@ struct Sizing_field_with_aabb_tree CGAL::Mesh_3::Get_curve_index >::type Get_curve_index; typedef typename CGAL::Default::Get< - Get_facet_patch_id_, + Facet_patch_id_map_, CGAL::Mesh_3::Facet_patch_id_map - >::type Get_facet_patch_id; + >::type Facet_patch_id_map; Sizing_field_with_aabb_tree (typename Kernel_::FT d, const Input_facets_AABB_tree_& aabb_tree, const MeshDomain& domain, Get_curve_index get_curve_index = Get_curve_index(), - Get_facet_patch_id get_facet_patch_id = Get_facet_patch_id() + Facet_patch_id_map facet_patch_id_map = Facet_patch_id_map() ) : d_(d), aabb_tree(aabb_tree), domain(domain), dt(), get_curve_index(get_curve_index), - get_facet_patch_id(get_facet_patch_id) + facet_patch_id_map(facet_patch_id_map) { { Corner_index maximal_corner_index = 0; @@ -231,10 +231,10 @@ struct Sizing_field_with_aabb_tree CGAL::Mesh_3::Filtered_projection_traits< typename Input_facets_AABB_tree_::AABB_traits, - Get_facet_patch_id + Facet_patch_id_map > projection_traits(ids.begin(), ids.end(), aabb_tree.traits(), - get_facet_patch_id); + facet_patch_id_map); aabb_tree.traversal(p, projection_traits); @@ -258,7 +258,7 @@ struct Sizing_field_with_aabb_tree "Ids are { ") % group(setprecision(17),result) % group(setprecision(17),p) - % CGAL::oformat(get(get_facet_patch_id, + % CGAL::oformat(get(facet_patch_id_map, projection_traits.closest_point_and_primitive().second)) % group(setprecision(17), projection_traits.closest_point_and_primitive().first); @@ -294,10 +294,10 @@ struct Sizing_field_with_aabb_tree CGAL::Mesh_3::Filtered_projection_traits < typename Input_facets_AABB_tree_::AABB_traits - , Get_facet_patch_id + , Facet_patch_id_map > projection_traits(ids.begin(), ids.end(), aabb_tree.traits(), - get_facet_patch_id); + facet_patch_id_map); aabb_tree.traversal(p, projection_traits); @@ -308,7 +308,7 @@ struct Sizing_field_with_aabb_tree return result; } - CGAL_assertion(ids.count(get(get_facet_patch_id, + CGAL_assertion(ids.count(get(facet_patch_id_map, projection_traits.closest_point_and_primitive().second)) == 0); result = @@ -327,7 +327,7 @@ struct Sizing_field_with_aabb_tree "Closest face id: %4%\n" "Ids are { ") % result % p % curve_id - % CGAL::oformat(get(get_facet_patch_id, + % CGAL::oformat(get(facet_patch_id_map, projection_traits.closest_point_and_primitive().second)); for(Patch_index i : ids) { s << CGAL::oformat(i) << " "; @@ -346,7 +346,7 @@ struct Sizing_field_with_aabb_tree "Closest face id: %4%\n" "Ids are { ") % result % p % curve_id - % CGAL::oformat(get(get_facet_patch_id, + % CGAL::oformat(get(facet_patch_id_map, projection_traits.closest_point_and_primitive().second)); for(Patch_index i : ids) { s << CGAL::oformat(i) << " "; @@ -528,7 +528,7 @@ private: Corners_incident_patches corners_incident_patches; Corners_incident_curves corners_incident_curves; Get_curve_index get_curve_index; - Get_facet_patch_id get_facet_patch_id; + Facet_patch_id_map facet_patch_id_map; }; #endif // CGAL_MESH_3_SIZING_FIELD_WITH_AABB_TREE_H diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index 4e5ee780351..2763f615c05 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -35,7 +35,6 @@ #include #include -#include namespace CGAL { class Image_3; From 92c80c4203b2a8b32f6264dbb0b6fcec7040b2e1 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 26 Jan 2021 08:44:03 +0100 Subject: [PATCH 207/317] Fix outdated CGAL Eigen importent target --- .../demo/Polyhedron/Plugins/Classification/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index 7c63ffd2a22..04aff587cb9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -60,7 +60,7 @@ if(TARGET CGAL::Eigen3_support) scene_surface_mesh_item scene_selection_item scene_color_ramp - CGAL::Eigen_support) + CGAL::Eigen3_support) if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) target_link_libraries(classification_plugin PUBLIC From 02d5819b5b16e3f9aedcf58120dc4c4a482c5e63 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 09:35:13 +0100 Subject: [PATCH 208/317] Fixes --- BGL/test/BGL/test_deprecated_io.cpp | 4 ++-- Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp | 4 ++-- .../test_deprecated_io_point_set.cpp | 9 ++++----- Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp index b2d48d4c8ca..e66247ffc1b 100644 --- a/BGL/test/BGL/test_deprecated_io.cpp +++ b/BGL/test/BGL/test_deprecated_io.cpp @@ -37,7 +37,7 @@ int main() assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); is.close(); sm_in.clear(); - +#ifdef CGAL_USE_VTK //vtk os.open("tmp.vtp"); ok = CGAL::write_vtp(os, sm_out, CGAL::parameters::all_default()); @@ -48,7 +48,7 @@ int main() assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); - +#endif //wrl os.open("tmp.wrl"); ok = CGAL::write_wrl(os, sm_out, CGAL::parameters::all_default()); diff --git a/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp b/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp index 6d3a124c357..8876da2d1aa 100644 --- a/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp +++ b/Point_set_3/test/Point_set_3/test_deprecated_io_ps.cpp @@ -27,11 +27,11 @@ int main() return EXIT_FAILURE; } is.close(); - + bool ok = false; #ifdef CGAL_LINKED_WITH_LASLIB //LAS os.open("tmp.las", std::ios::binary); - bool ok = CGAL::write_las_point_set(os, ps); + ok = CGAL::write_las_point_set(os, ps); os.close(); assert (ok); diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp index cc55bce3918..1327b5854ce 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp @@ -80,6 +80,10 @@ points[2] = std::make_pair(Point_3(0,0,1), Color{0,0,255,255}); std::ofstream os; std::ifstream is; bool ok; +std::vector ps; +ps.push_back(Point_3(1,0,0)); +ps.push_back(Point_3(0,1,0)); +ps.push_back(Point_3(0,0,1)); //LAS #ifdef CGAL_LINKED_WITH_LASLIB os.open("tmp.las", std::ios::binary); @@ -107,11 +111,6 @@ assert(ok); assert(points.size() == 3); assert(points[1].second[1] == 255); -std::vector ps; -ps.push_back(Point_3(1,0,0)); -ps.push_back(Point_3(0,1,0)); -ps.push_back(Point_3(0,0,1)); - os.open("tmp.las", std::ios_base::binary); CGAL::write_las_points(os, ps, CGAL::parameters::all_default()); os.close(); diff --git a/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h b/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h index 618dc6c2959..5659c0c800f 100644 --- a/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h +++ b/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h @@ -28,9 +28,9 @@ template & P) { - IO::internal::Generic_facegraph_printer, - File_writer_VRML_2> printer(out); + File_writer_VRML_2> printer(out.os()); printer(P); return out; From a85cf6ed52eade983031312d831a66ebd0591f17 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 09:45:18 +0100 Subject: [PATCH 209/317] Move the include in the ifdef --- Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h | 2 +- Nef_3/include/CGAL/draw_nef_3.h | 2 +- .../include/CGAL/draw_periodic_2_triangulation_2.h | 2 +- Point_set_3/include/CGAL/draw_point_set_3.h | 2 +- Polygon/include/CGAL/draw_polygon_2.h | 3 +-- Polygon/include/CGAL/draw_polygon_with_holes_2.h | 3 +-- Polyhedron/include/CGAL/draw_polyhedron.h | 3 +-- Surface_mesh/include/CGAL/draw_surface_mesh.h | 2 +- .../include/CGAL/draw_face_graph_with_paths.h | 2 +- Triangulation_2/include/CGAL/draw_triangulation_2.h | 2 +- Triangulation_3/include/CGAL/draw_triangulation_3.h | 2 +- Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h | 2 +- 12 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 8a3a34b6523..1464fde443a 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -13,9 +13,9 @@ #define CGAL_DRAW_LCC_H #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Nef_3/include/CGAL/draw_nef_3.h b/Nef_3/include/CGAL/draw_nef_3.h index 1f397471e6c..bcdb6c61ae3 100644 --- a/Nef_3/include/CGAL/draw_nef_3.h +++ b/Nef_3/include/CGAL/draw_nef_3.h @@ -15,10 +15,10 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include #include diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index 6e192e321fd..e4859ea033f 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -14,10 +14,10 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Point_set_3/include/CGAL/draw_point_set_3.h b/Point_set_3/include/CGAL/draw_point_set_3.h index ef02b438a68..510ba937a0c 100644 --- a/Point_set_3/include/CGAL/draw_point_set_3.h +++ b/Point_set_3/include/CGAL/draw_point_set_3.h @@ -15,7 +15,6 @@ #include #include -#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -36,6 +35,7 @@ void draw(const PS& aps); #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Polygon/include/CGAL/draw_polygon_2.h b/Polygon/include/CGAL/draw_polygon_2.h index fe31f51deca..60522c9263d 100644 --- a/Polygon/include/CGAL/draw_polygon_2.h +++ b/Polygon/include/CGAL/draw_polygon_2.h @@ -18,7 +18,6 @@ #define CGAL_DRAW_POLYGON_2_H #include -#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -39,7 +38,7 @@ void draw(const P& ap); #endif #ifdef CGAL_USE_BASIC_VIEWER - +#include #include #include diff --git a/Polygon/include/CGAL/draw_polygon_with_holes_2.h b/Polygon/include/CGAL/draw_polygon_with_holes_2.h index 0b9d5260c1f..0781eb883f7 100644 --- a/Polygon/include/CGAL/draw_polygon_with_holes_2.h +++ b/Polygon/include/CGAL/draw_polygon_with_holes_2.h @@ -18,7 +18,6 @@ #define CGAL_DRAW_POLYGON_WITH_HOLES_2_H #include -#include #ifdef DOXYGEN_RUNNING namespace CGAL { @@ -38,7 +37,7 @@ void draw(const PH& aph); #endif #ifdef CGAL_USE_BASIC_VIEWER - +#include #include #include diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index 58610cd5891..1800b380900 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -14,10 +14,9 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER - +#include #include #include diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index 5ebbc221af3..4710d00046c 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -29,10 +29,10 @@ void draw(const SM& asm); #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index dfa4af1cc26..726cf03efd1 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -18,10 +18,10 @@ #include #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include namespace CGAL { diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index a5a0f5331d2..fef579d2ff0 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -14,10 +14,10 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index 4cac6b42526..0c778ca08a7 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -14,10 +14,10 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 53c38de359e..66f7d364293 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -14,10 +14,10 @@ #include #include -#include #ifdef CGAL_USE_BASIC_VIEWER +#include #include #include #include From 7cf6a3bed05dcc88176b05743abc34276e77da79 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 10:05:13 +0100 Subject: [PATCH 210/317] Fix VRML_2 logic --- BGL/include/CGAL/boost/graph/IO/WRL.h | 7 ++++--- Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h | 4 ++-- Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h | 6 +++--- Stream_support/include/CGAL/IO/polygon_soup_io.h | 3 --- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index c9d2f69b6b5..8f63b2e82ae 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -70,7 +70,8 @@ bool write_WRL(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) { - IO::internal::Generic_facegraph_printer printer(os); + CGAL::VRML_2_ostream vos(os); + IO::internal::Generic_facegraph_printer printer(vos); return printer(g, np); } @@ -108,8 +109,8 @@ bool write_WRL(std::ostream& os, template bool write_WRL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) { - std::ifstream is(fname); - return write_WRL(is, g, np); + std::ofstream os(fname); + return write_WRL(os, g, np); } template diff --git a/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h b/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h index 5659c0c800f..618dc6c2959 100644 --- a/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h +++ b/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h @@ -28,9 +28,9 @@ template & P) { - IO::internal::Generic_facegraph_printer, - File_writer_VRML_2> printer(out.os()); + File_writer_VRML_2> printer(out); printer(P); return out; diff --git a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h index 86f501a35df..6bc7249d1f5 100644 --- a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h +++ b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h @@ -37,15 +37,15 @@ public: std::ostream& out() const { return m_os.os(); } - void write_header(std::ostream& o, + void write_header(VRML_2_ostream& o, std::size_t vertices, std::size_t halfedges, std::size_t facets, const bool /*colors*/ = false, const bool /*normals*/ = false, - const bool /*textures*/ = false) + const bool /*te xtures*/ = false) { - m_os = VRML_2_ostream(o); + m_os = o; m_facets = facets; out() << " #-- Begin of Polygon Mesh\n"; diff --git a/Stream_support/include/CGAL/IO/polygon_soup_io.h b/Stream_support/include/CGAL/IO/polygon_soup_io.h index c5814f34be1..718e95f317a 100644 --- a/Stream_support/include/CGAL/IO/polygon_soup_io.h +++ b/Stream_support/include/CGAL/IO/polygon_soup_io.h @@ -18,12 +18,9 @@ #include #include #include -// #include #include #include -// #include #include -// #include #include #include From d78842712cdfcbb3bdfc5f7cb252d3772fd6a16f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 09:55:20 +0100 Subject: [PATCH 211/317] Fix conversion warnigns --- Nef_2/include/CGAL/Nef_2/PM_io_parser.h | 8 ++++---- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h index d08b08180d6..39b99b37d7c 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_io_parser.h +++ b/Nef_2/include/CGAL/Nef_2/PM_io_parser.h @@ -200,7 +200,7 @@ bool PM_io_parser::read_vertex(Vertex_handle v) !(in >> p) || !check_sep("}") ) return false; - if(!(f >= 0 && ((iso && f < fn) || (!iso && f < en)))) + if(!(f >= 0 && ((iso && (std::size_t)f < fn) || (!iso && (std::size_t)f < en)))) { in.setstate(std::ios_base::badbit); return false; @@ -276,14 +276,14 @@ bool PM_io_parser::read_face(Face_handle f) int n, ei, vi; Mark m; if ( !(in >> n) || !check_sep("{") ) return false; if ( !(in >> ei) || !check_sep(",") ) return false; - if (ei >= 0 && ei < en) + if (ei >= 0 && (std::size_t) ei < en) { f->set_halfedge(Halfedge_of[ei]); } while (in >> ei) { CGAL_assertion_msg(ei >= 0 && (std::size_t) ei < en, "wrong index in face cycle list."); - if (!(ei >= 0 && ei < en)) + if (!(ei >= 0 && (std::size_t)ei < en)) { in.setstate(std::ios_base::badbit); return false; @@ -293,7 +293,7 @@ bool PM_io_parser::read_face(Face_handle f) if (!check_sep(",")) { return false; } while (in >> vi) { CGAL_assertion_msg(vi >= 0 && (std::size_t) vi < vn, "wrong index in iso vertex list."); - if (!(vi >= 0 && vi < vn)) + if (!(vi >= 0 && (std::size_t)vi < vn)) { in.setstate(std::ios_base::badbit); return false; 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 e5530445153..1dde7f8d0b3 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -1579,7 +1579,7 @@ read_vertex(Vertex_handle vh) { vh->sncp() = this->sncp(); in >> index; - if(index >= int(en)) + if(index >= (int)en) { in.setstate(std::ios_base::badbit); return false; @@ -2016,7 +2016,7 @@ read_sloop(SHalfloop_handle slh) { OK = OK && test_string("{"); in >> index; - if(index < 0 || index >= sln) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; @@ -2024,7 +2024,7 @@ read_sloop(SHalfloop_handle slh) { slh->twin() = SLoop_of[index]; OK = OK && test_string(","); in >> index; - if(index < 0 || index >= sfn) + if(index < 0 || index >= (int)(sfn)) { in.setstate(std::ios_base::badbit); return false; @@ -2032,7 +2032,7 @@ read_sloop(SHalfloop_handle slh) { slh->incident_sface() = SFace_of[index]; OK = OK && test_string(","); in >> index; - if(index < 0 || index >= fn) + if(index < 0 || index >= (int)(fn)) { in.setstate(std::ios_base::badbit); return false; @@ -2083,7 +2083,7 @@ read_sface(SFace_handle sfh) { OK = OK && test_string("{"); in >> index; - if(index < 0 || index >= vn) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; @@ -2097,7 +2097,7 @@ read_sface(SFace_handle sfh) { in >> index; // sfh->boundary_entry_objects().push_back(SEdge_of[index]); SM_decorator SD(&*sfh->center_vertex()); - if(index < 0 || index >= sen) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; @@ -2110,7 +2110,7 @@ read_sface(SFace_handle sfh) { while(isdigit(cc)) { in.putback(cc); in >> index; - if(index < 0 || index >= en) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; @@ -2124,7 +2124,7 @@ read_sface(SFace_handle sfh) { while(isdigit(cc)) { in.putback(cc); in >> index; - if(index < 0 || index >= sln) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; @@ -2135,7 +2135,7 @@ read_sface(SFace_handle sfh) { } in >> index; - if(index < 0 || index >= vn) + if(index < 0 || index >= (int)(sln)) { in.setstate(std::ios_base::badbit); return false; From 3551d0224bc84911463944edc948019c82001dbb Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 26 Jan 2021 10:38:03 +0100 Subject: [PATCH 212/317] fixed IO interface + the bug with misplaced assertions --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 2 ++ .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- .../triangulate_hole_with_cdt_2_test.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index b7db5e2e80d..606a5a5f5b8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1263,6 +1263,7 @@ bool is_planar_2( } // Here, avg_squared_distance is a little bit more tolerant than avg_distance^2. + CGAL_assertion(avg_normal != Vector_3()); const Plane_3 plane = Plane_3(centroid, avg_normal); FT avg_squared_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { @@ -1273,6 +1274,7 @@ bool is_planar_2( avg_squared_distance /= static_cast(n); // std::cout << "avg squared distance: " << avg_squared_distance << std::endl; + CGAL_assertion(max_squared_distance >= FT(0)); if (avg_squared_distance > max_squared_distance) { return false; // the user distance criteria are not satisfied! } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index be8ec391de8..9c61f808406 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -167,8 +167,8 @@ namespace Polygon_mesh_processing { max_squared_distance = default_squared_distance; if (threshold_distance >= typename GeomTraits::FT(0)) max_squared_distance = threshold_distance * threshold_distance; + CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0)); } - CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0)); return internal::triangulate_hole_polygon_mesh( pmesh, diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 2e656139b3e..3a22ddec348 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -64,7 +64,7 @@ void test_triangulate_hole_with_cdt_2( std::string path = "data/" + file_name + ".off"; std::ifstream in(path.c_str(), std::ios_base::in); CGAL::set_ascii_mode(in); - CGAL::read_off(in, pmesh); + CGAL::read_OFF(in, pmesh); in.close(); if (verbose) { std::cout << "* finished reading the file" << std::endl; @@ -109,7 +109,7 @@ void test_triangulate_hole_with_cdt_2( path += "4464_" + file_name + ".off"; std::ofstream out(path.c_str(), std::ios_base::out); CGAL::set_ascii_mode(out); - CGAL::write_off(out, pmesh); + CGAL::write_OFF(out, pmesh); out.close(); std::cout << "* finished writing the file" << std::endl; } From 19a10eddfce84f93bf2db3d1c171a449abb9c667 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 10:40:06 +0100 Subject: [PATCH 213/317] add missing overloads --- BGL/include/CGAL/boost/graph/IO/OFF.h | 23 +++++++++++++++++++++++ BGL/include/CGAL/boost/graph/IO/VTK.h | 6 ++++++ BGL/include/CGAL/boost/graph/IO/WRL.h | 6 ++++++ BGL/test/BGL/test_deprecated_io.cpp | 14 +++++++------- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 507bc04467d..a3bee6c7d13 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -300,6 +300,19 @@ CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_BGL_NP_CLA return read_OFF(fname, g, np); } + +template +CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g) +{ + return read_off(is, g, parameters::all_default()); +} + +template +CGAL_DEPRECATED bool read_off(const char* fname, Graph& g) +{ + return read_off(fname, g, parameters::all_default()); +} + #endif // CGAL_NO_DEPRECATED_CODE //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -510,6 +523,11 @@ CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_BGL_ return write_OFF(os, g, np); } +template +CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g) +{ + return write_off(os, g, CGAL::parameters::all_default()); +} /*! \ingroup PkgBGLIOFctDeprecated @@ -521,6 +539,11 @@ CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_BGL return write_OFF(fname, g, np); } +template +CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g) +{ + return write_off(fname, g, parameters::all_default()); +} #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 1ba37f19d6c..4715e954ea3 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -564,6 +564,12 @@ CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_BGL_ return write_VTP(os, g, np); } +template +CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g) +{ + return write_vtp(os, g, parameters::all_default()); +} + #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index 8f63b2e82ae..40b5af310c9 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -131,6 +131,12 @@ CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_BGL_ return write_WRL(os, g, np); } +template +CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g) +{ + return write_wrl(os, g, parameters::all_default()); +} + #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp index e66247ffc1b..5bd037191cc 100644 --- a/BGL/test/BGL/test_deprecated_io.cpp +++ b/BGL/test/BGL/test_deprecated_io.cpp @@ -20,19 +20,19 @@ int main() SM sm_in, sm_out; Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); CGAL::make_triangle(p0, p1, p2, sm_out); - bool ok = CGAL::write_off("tmp.off", sm_out, CGAL::parameters::all_default()); + bool ok = CGAL::write_off("tmp.off", sm_out); assert(ok); - ok = CGAL::read_off("tmp.off", sm_in, CGAL::parameters::all_default()); + ok = CGAL::read_off("tmp.off", sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); std::ofstream os("tmp.off"); - ok = CGAL::write_off(os, sm_out, CGAL::parameters::all_default()); + ok = CGAL::write_off(os, sm_out); assert(ok); os.close(); std::ifstream is("tmp.off"); - ok = CGAL::read_off(is, sm_in, CGAL::parameters::all_default()); + ok = CGAL::read_off(is, sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); is.close(); @@ -40,18 +40,18 @@ int main() #ifdef CGAL_USE_VTK //vtk os.open("tmp.vtp"); - ok = CGAL::write_vtp(os, sm_out, CGAL::parameters::all_default()); + ok = CGAL::write_vtp(os, sm_out); assert(ok); os.close(); - ok = CGAL::read_VTP("tmp.vtp", sm_in, CGAL::parameters::all_default()); + ok = CGAL::read_VTP("tmp.vtp", sm_in); assert(ok); assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); sm_in.clear(); #endif //wrl os.open("tmp.wrl"); - ok = CGAL::write_wrl(os, sm_out, CGAL::parameters::all_default()); + ok = CGAL::write_wrl(os, sm_out); assert(ok); os.close(); return EXIT_SUCCESS; From 56a0cb15e42548b425dad3e8aa2a156271cb524b Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 26 Jan 2021 10:48:17 +0100 Subject: [PATCH 214/317] added missing type --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 606a5a5f5b8..f51ca3e861c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1221,6 +1221,7 @@ bool is_planar_2( typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; typedef typename Traits::Plane_3 Plane_3; + typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Construct_projected_point_3 Projection_3; typedef typename Traits::Compute_squared_distance_3 Squared_distance_3; From bd75d6f4d84196288a76929393c504ca555dfd3e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 26 Jan 2021 13:31:26 +0000 Subject: [PATCH 215/317] Filtered Kernel: Add static filter for Compare_distance_3 --- .../Static_filters/Compare_distance_3.h | 166 ++++++++++++++++++ .../internal/Static_filters/Static_filters.h | 7 +- 2 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h new file mode 100644 index 00000000000..4f63ac19eb9 --- /dev/null +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h @@ -0,0 +1,166 @@ +// Copyright (c) 2011 GeometryFactory Sarl (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) : Andreas Fabri + + +#ifndef CGAL_INTERNAL_STATIC_FILTERS_COMPARE_DISTANCE_3_H +#define CGAL_INTERNAL_STATIC_FILTERS_COMPARE_DISTANCE_3_H + +#include +#include +#include +#include + +namespace CGAL { + +namespace internal { + +namespace Static_filters_predicates { + + +template < typename K_base > +class Compare_distance_3 + : public K_base::Compare_distance_3 +{ + typedef typename K_base::Point_3 Point_3; + typedef typename K_base::Vector_3 Vector_3; + typedef typename K_base::Compare_distance_3 Base; + +public: + + typedef typename Base::result_type result_type; + + using Base::operator(); + + result_type operator()(const Point_3 &p, const Point_3& q, const Point_3& r) const + { + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + + std::string(CGAL_PRETTY_FUNCTION), tmp); + + Get_approx get_approx; // Identity functor for all points + // but lazy points + + if(q == r){ + return EQUAL; + } + double px, py, pz, qx, qy, qz, rx, ry, rz; + + if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && + fit_in_double(get_approx(p).z(), pz) && + fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && + fit_in_double(get_approx(q).z(), qz) && + fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) && + fit_in_double(get_approx(r).z(), rz)) + { + CGAL_BRANCH_PROFILER_BRANCH(tmp); + double qpx; + qpx = (qx - px); + double qpy; + qpy = (qy - py); + double qpz; + qpz = (qz - pz); + double qp2; + qp2 = ((square( qpx ) + square( qpy )) + square( qpz )); + double rpx; + rpx = (rx - px); + double rpy; + rpy = (ry - py); + double rpz; + rpz = (rz - pz); + double rp2; + rp2 = ((square( rpx ) + square( rpy )) + square( rpz )); + Sign int_tmp_result = EQUAL; + double double_tmp_result; + double eps; + double_tmp_result = (qp2 - rp2); + double max1 = CGAL::abs(qpx); + if( (max1 < CGAL::abs(qpy)) ) + { + max1 = CGAL::abs(qpy); + } + if( (max1 < CGAL::abs(qpz)) ) + { + max1 = CGAL::abs(qpz); + } + if( (max1 < CGAL::abs(rpx)) ) + { + max1 = CGAL::abs(rpx); + } + if( (max1 < CGAL::abs(rpy)) ) + { + max1 = CGAL::abs(rpy); + } + if( (max1 < CGAL::abs(rpz)) ) + { + max1 = CGAL::abs(rpz); + } + if( (max1 < 2.42701102401884262260e-147) ) + { + return Base::operator()(p, q, r); + } + else + { + if( (max1 > 8.37987995621411946582e+152) ) + { + return Base::operator()(p, q, r); + } + eps = (3.77746921267322435884e-15 * (max1 * max1)); + if( (double_tmp_result > eps) ) + { + int_tmp_result = LARGER; + } + else + { + if( (double_tmp_result < -eps) ) + { + int_tmp_result = SMALLER; + } + else + { + return Base::operator()(p, q, r); + } + } + } + return int_tmp_result; + } + return Base::operator()(p, q, r); + } + + + result_type operator()(const Vector_3 &p, const Vector_3& q) const + { + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + + std::string(CGAL_PRETTY_FUNCTION), tmp); + + Get_approx get_approx; // Identity functor for all points + // but lazy points + double px, py, pz, qx, qy, qz; + + if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && + fit_in_double(get_approx(p).z(), pz) && + fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && + fit_in_double(get_approx(q).z(), qz) ) + { + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return px == qx && py == qy && pz == qz; + } + return Base::operator()(p, q); + } + +}; // end class Compare_distance_3 + +} // end namespace Static_filters_predicates + +} // end namespace internal + +} // end namespace CGAL + +#endif // CGAL_INTERNAL_STATIC_FILTERS_COMPARE_DISTANCE_3_H diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h index 7d03fa1217c..1aa86abb78a 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h @@ -71,7 +71,7 @@ #include #include #include - +#include // #include // #include @@ -126,6 +126,8 @@ public: typedef Static_filters_predicates::Compare_weighted_squared_radius_3 Compare_weighted_squared_radius_3; typedef Static_filters_predicates::Power_side_of_oriented_power_sphere_3 Power_side_of_oriented_power_sphere_3; + typedef Static_filters_predicates::Compare_distance_3 Compare_distance_3; + Orientation_2 orientation_2_object() const { return Orientation_2(); } @@ -195,6 +197,9 @@ public: compare_weighted_squared_radius_3_object() const { return Compare_weighted_squared_radius_3(); } + Compare_distance_3 + compare_distance_3_object() const + { return Compare_distance_3();} enum { Has_static_filters = true }; From 01d83513830e4a8e95e4dcfb6f72607fb6f4af1c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Jan 2021 14:46:40 +0100 Subject: [PATCH 216/317] Restore Isotropic remeshing of a selection of faces --- .../demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index d1a13d435d6..5bcf30de208 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -342,7 +342,7 @@ public Q_SLOTS: if (poly_item || selection_item) { - if(selection_item && selection_item->selected_edges.empty()) + if(selection_item && selection_item->selected_edges.empty() && selection_item->selected_facets.empty()) { QMessageBox::warning(mw, "Empty Edges", "There are no selected edges. Aborting."); return; From cdbc2c6976cf5f1dc9bca0201b461c382cc8ada0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 26 Jan 2021 13:56:45 +0000 Subject: [PATCH 217/317] cleanup --- .../Static_filters/Compare_distance_3.h | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h index 4f63ac19eb9..11a95b86b76 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Compare_distance_3.h @@ -135,26 +135,6 @@ public: } - result_type operator()(const Vector_3 &p, const Vector_3& q) const - { - CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + - std::string(CGAL_PRETTY_FUNCTION), tmp); - - Get_approx get_approx; // Identity functor for all points - // but lazy points - double px, py, pz, qx, qy, qz; - - if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && - fit_in_double(get_approx(p).z(), pz) && - fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && - fit_in_double(get_approx(q).z(), qz) ) - { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return px == qx && py == qy && pz == qz; - } - return Base::operator()(p, q); - } - }; // end class Compare_distance_3 } // end namespace Static_filters_predicates From 026abdb175efd23d23bd15e5c46833d4c3922a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 27 Jan 2021 10:17:42 +0100 Subject: [PATCH 218/317] handle isolated vertices in the target mesh --- .../CGAL/boost/graph/copy_face_graph.h | 2 + BGL/test/BGL/test_Euler_operations.cpp | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index c396484f4ed..19755ac8e46 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -167,6 +167,8 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, for(tm_vertex_descriptor v : vertices(tm)) { tm_halfedge_descriptor h = halfedge(v, tm); + if (h==boost::graph_traits::null_halfedge()) + continue; tm_halfedge_descriptor next_around_vertex=h; do{ next_around_vertex=opposite(next(next_around_vertex, tm), tm); diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 0711cf379ed..6e9418c8ca8 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -35,6 +35,57 @@ test_copy_face_graph_nm_umbrella() } } +template +void +test_copy_face_graph_isolated_vertices() +{ + typedef Kernel::Point_3 Point_3; + + { + T s, t; + add_vertex(s); + CGAL::copy_face_graph(s, t); + } + + { + T s, t; + add_vertex(t); + CGAL::copy_face_graph(s, t); + } + + { + T s, t; + CGAL::make_triangle(Point_3(), Point_3(), Point_3(), s); + add_vertex(s); + t=s; + CGAL::copy_face_graph(s, t); + } + + { + T s, t; + CGAL::make_triangle(Point_3(), Point_3(), Point_3(), s); + add_vertex(s); + add_vertex(t); + CGAL::copy_face_graph(s, t); + } + + { + T s, t; + CGAL::make_tetrahedron(Point_3(), Point_3(), Point_3(), Point_3(), s); + add_vertex(s); + t=s; + CGAL::copy_face_graph(s, t); + } + + { + T s, t; + CGAL::make_tetrahedron(Point_3(), Point_3(), Point_3(), Point_3(), s); + add_vertex(s); + add_vertex(t); + CGAL::copy_face_graph(s, t); + } +} + template void join_face_test() @@ -619,6 +670,7 @@ void test_Euler_operations() { test_copy_face_graph_nm_umbrella(); + test_copy_face_graph_isolated_vertices(); join_face_test(); add_vertex_and_face_to_border_test(); add_face_to_border_test(); From 23cc6b0f4a2ac6061b01d86411d58b6da7ff5a34 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 10:04:45 +0100 Subject: [PATCH 219/317] Fix read_sface --- .../Convex_decomposition_3/check_decomposition.cpp | 2 ++ Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp b/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp index dd97caf9e5a..afb45e7f07d 100644 --- a/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp +++ b/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp @@ -48,5 +48,7 @@ int main() { Nef_polyhedron_3 N; std::cin >> N; + if(!is) + return EXIT_FAILURE; check_decomposition(N); } 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 1dde7f8d0b3..a31a07c5d99 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -1803,7 +1803,7 @@ read_facet(Halffacet_handle fh) { } in >> index; - if(index < 0 || index >= int(vn)) + if(index < 0 || index >= int(cn)) { in.setstate(std::ios_base::badbit); return false; @@ -2083,7 +2083,7 @@ read_sface(SFace_handle sfh) { OK = OK && test_string("{"); in >> index; - if(index < 0 || index >= (int)(sln)) + if(index < 0 || index >= (int)(vn)) { in.setstate(std::ios_base::badbit); return false; @@ -2097,7 +2097,7 @@ read_sface(SFace_handle sfh) { in >> index; // sfh->boundary_entry_objects().push_back(SEdge_of[index]); SM_decorator SD(&*sfh->center_vertex()); - if(index < 0 || index >= (int)(sln)) + if(index < 0 || index >= (int)(sen)) { in.setstate(std::ios_base::badbit); return false; @@ -2110,7 +2110,7 @@ read_sface(SFace_handle sfh) { while(isdigit(cc)) { in.putback(cc); in >> index; - if(index < 0 || index >= (int)(sln)) + if(index < 0 || index >= (int)(en)) { in.setstate(std::ios_base::badbit); return false; @@ -2135,7 +2135,7 @@ read_sface(SFace_handle sfh) { } in >> index; - if(index < 0 || index >= (int)(sln)) + if(index < 0 || index >= (int)(cn)) { in.setstate(std::ios_base::badbit); return false; From b71b8f203467cda00c871951116bece2a1b2ed43 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 11:33:49 +0100 Subject: [PATCH 220/317] Don't add isolated vertices after hole filling polyline --- .../demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp | 2 +- .../demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp | 4 +++- Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index a6ed020b18e..ff4fdaed929 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -169,7 +169,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){ std::string line_remainder; std::getline(ifs, line_remainder); QString metadata(line_remainder.c_str()); - if(metadata[0].isSpace()) { + if(!metadata.isEmpty() && metadata[0].isSpace()) { metadata.remove(0, 1); } polylines_metadata << metadata; diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index f4957d69d63..fbfdc6e1239 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -961,7 +961,9 @@ void Polyhedron_demo_hole_filling_plugin::hole_filling_polyline_action() { } } SMesh* poly = new SMesh; - CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(*it, + std::vector ps(it->begin(), it->end()); + ps.pop_back(); + CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(ps, patch, *poly); diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index 857e5ca0835..cd5e589d2d4 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -334,6 +334,15 @@ void Scene_surface_mesh_item::standard_constructor(SMesh* sm) d->textFItems = new TextListItem(this); are_buffers_filled = false; invalidate(ALL); + std::size_t isolated_v = 0; + for(vertex_descriptor v : vertices(*sm)) + { + if(sm->is_isolated(v)) + { + ++isolated_v; + } + } + setNbIsolatedvertices(isolated_v); } Scene_surface_mesh_item::Scene_surface_mesh_item(SMesh* sm) From 766a65e1c0b50bca5783298d7f76a669c81684e5 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 27 Jan 2021 12:33:45 +0100 Subject: [PATCH 221/317] Fix NewKernel_d/Eigen compatibility some bitrot... --- .../include/CGAL/NewKernel_d/LA_eigen/constructors.h | 8 +++----- Number_types/include/CGAL/Interval_nt.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h index 9fb8ef02107..1bb4b2a33ef 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h @@ -91,11 +91,9 @@ namespace CGAL { }; struct Initializer_list { - // Fix T==NT? - template - result_type operator()(std::initializer_list l) const { - return Iterator()(l.size(),l.begin(),l.end()); - } + result_type operator()(std::initializer_list l) const { + return Iterator()(l.size(),l.begin(),l.end()); + } }; struct Values { diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index ec9f7288966..8a51e7cd860 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -1594,6 +1594,16 @@ namespace Eigen { }; }; + templatestruct ScalarBinaryOpTraits; + template + struct ScalarBinaryOpTraits, double, BinaryOp> { + typedef CGAL::Interval_nt ReturnType; + }; + template + struct ScalarBinaryOpTraits, BinaryOp> { + typedef CGAL::Interval_nt ReturnType; + }; + namespace internal { template struct significant_decimals_impl; template From d53d306c435f07a6201b14f3e5074910ccb68497 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 13:19:13 +0100 Subject: [PATCH 222/317] Add an inflate_mesh action to the Offset_meshing_plugin --- .../Surface_mesh/Offset_meshing_plugin.cpp | 61 +++++++++++++++++-- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp index ddcea01a397..aa4fdaea8c4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -390,27 +390,80 @@ public: connect(actionOffsetMeshing, SIGNAL(triggered()), this, SLOT(offset_meshing())); } + + actionInflateMesh= new QAction(tr("Inflate Mesh"), mw); + actionInflateMesh->setProperty("subMenuName", "Operations on Polyhedra"); + if(actionInflateMesh) { + connect(actionInflateMesh, SIGNAL(triggered()), + this, SLOT(inflate_mesh())); + } } - bool applicable(QAction*) const { + bool applicable(QAction* a) const { Scene_item* item = scene->item(scene->mainSelectionIndex()); + return - qobject_cast(item) || - qobject_cast(item); + qobject_cast(item) || + (a == actionOffsetMeshing && qobject_cast(item)); } QList actions() const { - return QList() << actionOffsetMeshing; + return QList() << actionOffsetMeshing + << actionInflateMesh; } public Q_SLOTS: void offset_meshing(); + void inflate_mesh(); private: QAction* actionOffsetMeshing; + QAction* actionInflateMesh; Scene_interface *scene; QMainWindow *mw; }; // end class Polyhedron_demo_offset_meshing_plugin +void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() +{ + const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); + Scene_item* item = scene->item(index); + Scene_surface_mesh_item* sm_item = + qobject_cast(item); + + SMesh* sMesh = sm_item->face_graph(); + if(!sMesh) + return; + Scene_item::Bbox box = bbox(sMesh); + + double X=(box.max)(0)-(box.min)(0), + Y = (box.max)(1)-(box.min)(1), + Z = (box.max)(2)-(box.min)(2); + double diag = 0; + diag = CGAL::sqrt(X*X+Y*Y+Z*Z); + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Inflate Value"), + QString("Offset Value (use negative number for deflate)"), + 0.1*diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10); + SMesh* smesh = sm_item->face_graph(); + for(const auto& v : vertices(*smesh)) + { + auto vpm = get(CGAL::vertex_point,*smesh); + SMesh::Property_map vnm = + smesh->property_map("v:normal").first; + + Point_3 p = get(vpm, v); + EPICK::Vector_3 n = get(vnm, v); + n/=(CGAL::sqrt(n.squared_length())); + put(vpm, v, Point_3( + p.x()+offset_value*n.x(), + p.y()+offset_value*n.y(), + p.z()+offset_value*n.z()) + ); + } + sm_item->invalidateOpenGLBuffers(); +} + void Polyhedron_demo_offset_meshing_plugin::offset_meshing() { const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); From 59cb6fd3e8e493b6eb05498d1701dc65aa9e924d Mon Sep 17 00:00:00 2001 From: Maxime GIMENO Date: Wed, 27 Jan 2021 13:47:48 +0100 Subject: [PATCH 223/317] Update Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp Co-authored-by: Sebastien Loriot --- .../Plugins/Surface_mesh/Offset_meshing_plugin.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp index aa4fdaea8c4..51dc5967775 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -455,11 +455,7 @@ void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() Point_3 p = get(vpm, v); EPICK::Vector_3 n = get(vnm, v); n/=(CGAL::sqrt(n.squared_length())); - put(vpm, v, Point_3( - p.x()+offset_value*n.x(), - p.y()+offset_value*n.y(), - p.z()+offset_value*n.z()) - ); + put(vpm, v, p + offset_value*n); } sm_item->invalidateOpenGLBuffers(); } From 9b57095f7199d7ad315d7b41802fb877c5b0693d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 14:02:33 +0100 Subject: [PATCH 224/317] Clean-up --- .../Plugins/Surface_mesh/Offset_meshing_plugin.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp index 51dc5967775..8400574be2c 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -437,8 +437,7 @@ void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() double X=(box.max)(0)-(box.min)(0), Y = (box.max)(1)-(box.min)(1), Z = (box.max)(2)-(box.min)(2); - double diag = 0; - diag = CGAL::sqrt(X*X+Y*Y+Z*Z); + double diag = sm_item->diagonalBbox(); double offset_value = QInputDialog::getDouble(mw, QString("Choose Inflate Value"), QString("Offset Value (use negative number for deflate)"), @@ -446,12 +445,11 @@ void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() -(std::numeric_limits::max)(), (std::numeric_limits::max)(), 10); SMesh* smesh = sm_item->face_graph(); + auto vpm = get(CGAL::vertex_point,*smesh); + auto vnm = + smesh->property_map("v:normal").first; for(const auto& v : vertices(*smesh)) { - auto vpm = get(CGAL::vertex_point,*smesh); - SMesh::Property_map vnm = - smesh->property_map("v:normal").first; - Point_3 p = get(vpm, v); EPICK::Vector_3 n = get(vnm, v); n/=(CGAL::sqrt(n.squared_length())); From 41c823c08344c764c723976985e4ed97488477eb Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 15:36:23 +0100 Subject: [PATCH 225/317] replace default value of stream precision --- BGL/include/CGAL/boost/graph/IO/GOCAD.h | 17 +++++++++++++---- .../boost/graph/IO/Generic_facegraph_printer.h | 9 +++++++-- BGL/include/CGAL/boost/graph/IO/OBJ.h | 10 +++++++++- BGL/include/CGAL/boost/graph/IO/OFF.h | 5 ++++- BGL/include/CGAL/boost/graph/IO/PLY.h | 13 ++++++++++--- BGL/include/CGAL/boost/graph/IO/STL.h | 13 ++++++++++--- BGL/include/CGAL/boost/graph/IO/VTK.h | 16 ++++++++++++---- BGL/include/CGAL/boost/graph/IO/WRL.h | 5 ++++- Point_set_3/include/CGAL/Point_set_3/IO/OFF.h | 2 +- Point_set_3/include/CGAL/Point_set_3/IO/PLY.h | 13 ++++++++++--- Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h | 5 ++++- .../include/CGAL/IO/write_off_points.h | 12 +++++++++--- .../include/CGAL/IO/write_ply_points.h | 13 ++++++++++--- .../include/CGAL/IO/write_xyz_points.h | 14 +++++++++++--- Stream_support/include/CGAL/IO/GOCAD.h | 13 ++++++++++--- Stream_support/include/CGAL/IO/Generic_writer.h | 8 ++++++-- Stream_support/include/CGAL/IO/OBJ.h | 6 +++++- Stream_support/include/CGAL/IO/OFF.h | 6 +++++- Stream_support/include/CGAL/IO/PLY.h | 13 ++++++++++--- Stream_support/include/CGAL/IO/STL.h | 13 ++++++++++--- Stream_support/include/CGAL/IO/VTK.h | 13 ++++++++++--- Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h | 2 +- Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 10 +++++++--- 23 files changed, 178 insertions(+), 53 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/GOCAD.h b/BGL/include/CGAL/boost/graph/IO/GOCAD.h index 25cdf0ce780..9b58a78b75e 100644 --- a/BGL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/BGL/include/CGAL/boost/graph/IO/GOCAD.h @@ -271,7 +271,7 @@ bool read_GOCAD(const std::string& fname, Graph& g, /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`6`} +/// \cgalParamDefault{`the precision of the given stream`} /// \cgalParamNEnd /// \cgalNamedParamsEnd /// @@ -303,8 +303,12 @@ bool write_GOCAD(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } os << "GOCAD TSurf 1\n" "HEADER {\n" @@ -380,7 +384,7 @@ bool write_GOCAD(std::ostream& os, const char* name, const Graph& g, /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`6`} +/// \cgalParamDefault{`the precision of the given stream`} /// \cgalParamNEnd /// \cgalNamedParamsEnd /// @@ -454,6 +458,11 @@ bool write_GOCAD(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); + + return write_GOCAD(os, fname.c_str(), g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index 4ab13c13192..08b6c69c84b 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -117,8 +117,13 @@ public: if(!m_os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - m_os.precision(precision); + if(!CGAL::parameters::is_default_parameter( + get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter( + get_parameter(np, internal_np::stream_precision), 6); + m_os.precision(precision); + } VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, g)); diff --git a/BGL/include/CGAL/boost/graph/IO/OBJ.h b/BGL/include/CGAL/boost/graph/IO/OBJ.h index 8e1c9b5ea89..cc44fb1ef32 100644 --- a/BGL/include/CGAL/boost/graph/IO/OBJ.h +++ b/BGL/include/CGAL/boost/graph/IO/OBJ.h @@ -231,7 +231,7 @@ bool read_OBJ(const std::string& fname, Graph& g, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamNEnd \cgalNamedParamsEnd @@ -285,6 +285,11 @@ bool write_OBJ(std::ostream& os, const Graph& g, \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` must be available in `Graph`.} \cgalParamNEnd + \cgalParamNBegin{stream_precision} + \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} + \cgalParamType{int} + \cgalParamDefault{`6`} + \cgalParamNEnd \cgalNamedParamsEnd \returns `true` if writing was successful, `false` otherwise. @@ -303,6 +308,9 @@ bool write_OBJ(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_OBJ(os, g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index a3bee6c7d13..3219385eced 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -387,7 +387,7 @@ bool write_OFF_BGL(std::ostream& os, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamNEnd \cgalNamedParamsEnd @@ -496,6 +496,9 @@ bool write_OFF(const std::string& fname, std::cerr<<"Could not create file."; return false; } + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_OFF(os, g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index ff65a977f7b..1eb6e6781b8 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -311,7 +311,7 @@ bool read_PLY(const std::string& fname, Graph& g, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -361,8 +361,12 @@ bool write_PLY(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } // Write header os << "ply" << std::endl @@ -550,6 +554,9 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_PLY(os, g, comments, np); } } diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index de10a9a95a5..96e786c82ff 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -231,7 +231,7 @@ bool read_STL(const std::string& fname, Graph& g) { return read_STL(fname, g, pa \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -262,8 +262,12 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } if(get_mode(os) == IO::BINARY) { @@ -372,6 +376,9 @@ bool write_STL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_STL(os, g, np); } } diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 4715e954ea3..496a82a1737 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -420,7 +420,7 @@ void write_polys_points(std::ostream& os, * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`6`} + * \cgalParamDefault{`the precision of the given stream`} * \cgalParamNEnd * \cgalNamedParamsEnd * @@ -439,8 +439,12 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } os << "\n" << " bool write_WRL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) { std::ofstream os(fname); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_WRL(os, g, np); } diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h index 5425fbfa4b9..fbeda69c4fc 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h @@ -134,7 +134,7 @@ CGAL_DEPRECATED bool read_off_point_set(std::istream& is, ///< input stream. \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamNEnd \cgalNamedParamsEnd diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 1e60eac251f..50dd0f026c4 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -456,7 +456,7 @@ CGAL_DEPRECATED bool read_ply_point_set(std::istream& is, ///< input stream. \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -493,8 +493,12 @@ bool write_PLY(std::ostream& os, return false; } - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } os << "ply" << std::endl << ((get_mode(os) == IO::BINARY) ? "format binary_little_endian 1.0" : "format ascii 1.0") << std::endl @@ -756,6 +760,9 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_PLY(os, point_set, comments, np); } } diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h index 4f5ba04a550..24648b4cf98 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h @@ -132,7 +132,7 @@ CGAL_DEPRECATED bool read_xyz_point_set(std::istream& is, CGAL::Point_set_3& point_set, const CGAL_BGL_NP_CLASS& np) { std::ofstream os(fname); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_XYZ(os, point_set, np); } diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index c35a500f705..e843e770de0 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -66,8 +66,12 @@ bool write_OFF_PSP(std::ostream& os, return false; } - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } // Write header os << "NOFF" << std::endl; @@ -125,7 +129,7 @@ bool write_OFF_PSP(std::ostream& os, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} + \cgalParamDefault{`the precision of the given stream`} \cgalParamNEnd \cgalNamedParamsEnd @@ -208,6 +212,8 @@ bool write_OFF(const std::string& filename, ) { std::ofstream os(filename); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) return write_OFF(os, points, np); } diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index f4264d4e322..b28cc04f1a3 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -175,7 +175,7 @@ template writer(os); return writer(points, polygons, np); } diff --git a/Stream_support/include/CGAL/IO/PLY.h b/Stream_support/include/CGAL/IO/PLY.h index dc6518096ca..1c444a60ca5 100644 --- a/Stream_support/include/CGAL/IO/PLY.h +++ b/Stream_support/include/CGAL/IO/PLY.h @@ -444,7 +444,7 @@ bool read_PLY(const std::string& fname, PointRange& points, PolygonRange& polygo * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`6`} + * \cgalParamDefault{`the precision of the given stream`} * \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} * \cgalParamNEnd * \cgalNamedParamsEnd @@ -467,8 +467,12 @@ bool write_PLY(std::ostream& out, if(!out.good()) return false; - const int precision = parameters::choose_parameter(parameters::get_parameter(np, internal_np::stream_precision), 6); - out.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + out.precision(precision); + } // Write header out << "ply" << std::endl @@ -563,6 +567,9 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_PLY(os, points, polygons, np); } } diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index 6865fd03464..738d87a2eb0 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -284,7 +284,7 @@ bool read_STL(const std::string& fname, PointRange& points, TriangleRange& facet * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`6`} + * \cgalParamDefault{`the precision of the given stream`} * \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} * \cgalParamNEnd * \cgalNamedParamsEnd @@ -317,8 +317,12 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } if(get_mode(os) == IO::BINARY) { @@ -433,6 +437,9 @@ bool write_STL(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); + if(parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + os.precision(6); return write_STL(os, points, facets, np); } } diff --git a/Stream_support/include/CGAL/IO/VTK.h b/Stream_support/include/CGAL/IO/VTK.h index 0723baceadd..f5041748cab 100644 --- a/Stream_support/include/CGAL/IO/VTK.h +++ b/Stream_support/include/CGAL/IO/VTK.h @@ -373,7 +373,7 @@ void write_soup_polys_points(std::ostream& os, * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`6`} + * \cgalParamDefault{`the precision of the given stream`} * \cgalParamNEnd * \cgalNamedParamsEnd * @@ -393,8 +393,12 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } os << "\n" << "& sm, std::string /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`6`} +/// \cgalParamDefault{`the precision of the given stream`} /// \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} /// \cgalParamNEnd /// \cgalNamedParamsEnd @@ -921,8 +921,12 @@ bool write_PLY(std::ostream& os, if(!os.good()) return false; - const int precision = parameters::choose_parameter(parameters::get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter(parameters::get_parameter(np, internal_np::stream_precision), 6); + os.precision(precision); + } os << "ply" << std::endl << ((get_mode(os) == IO::BINARY) ? "format binary_little_endian 1.0" : "format ascii 1.0") << std::endl From 2d59464b2b7e7f8df06256b0fb89cae571012272 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Jan 2021 15:49:42 +0100 Subject: [PATCH 226/317] remove os.precision(6) as it is the default. --- BGL/include/CGAL/boost/graph/IO/GOCAD.h | 3 --- BGL/include/CGAL/boost/graph/IO/OBJ.h | 3 --- BGL/include/CGAL/boost/graph/IO/OFF.h | 4 +--- BGL/include/CGAL/boost/graph/IO/PLY.h | 4 +--- BGL/include/CGAL/boost/graph/IO/STL.h | 4 +--- BGL/include/CGAL/boost/graph/IO/VTK.h | 7 ++----- BGL/include/CGAL/boost/graph/IO/WRL.h | 3 --- Point_set_3/include/CGAL/Point_set_3/IO/PLY.h | 3 --- Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h | 3 --- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 3 --- Point_set_processing_3/include/CGAL/IO/write_xyz_points.h | 3 --- Stream_support/include/CGAL/IO/GOCAD.h | 3 --- Stream_support/include/CGAL/IO/OBJ.h | 3 --- Stream_support/include/CGAL/IO/OFF.h | 3 --- Stream_support/include/CGAL/IO/PLY.h | 3 --- Stream_support/include/CGAL/IO/STL.h | 3 --- Stream_support/include/CGAL/IO/VTK.h | 3 --- 17 files changed, 5 insertions(+), 53 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/GOCAD.h b/BGL/include/CGAL/boost/graph/IO/GOCAD.h index 9b58a78b75e..0c0692b5b6f 100644 --- a/BGL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/BGL/include/CGAL/boost/graph/IO/GOCAD.h @@ -458,9 +458,6 @@ bool write_GOCAD(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_GOCAD(os, fname.c_str(), g, np); diff --git a/BGL/include/CGAL/boost/graph/IO/OBJ.h b/BGL/include/CGAL/boost/graph/IO/OBJ.h index cc44fb1ef32..7ab9cbd29d4 100644 --- a/BGL/include/CGAL/boost/graph/IO/OBJ.h +++ b/BGL/include/CGAL/boost/graph/IO/OBJ.h @@ -308,9 +308,6 @@ bool write_OBJ(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_OBJ(os, g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 3219385eced..6ea0f68a6b9 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -496,9 +496,7 @@ bool write_OFF(const std::string& fname, std::cerr<<"Could not create file."; return false; } - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); + return write_OFF(os, g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index 1eb6e6781b8..667fed4672a 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -554,9 +554,7 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); + return write_PLY(os, g, comments, np); } } diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 96e786c82ff..4ab8df78ab0 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -376,9 +376,7 @@ bool write_STL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); + return write_STL(os, g, np); } } diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 496a82a1737..ab3ed3c02cb 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -541,12 +541,9 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS os.open(fname, std::ios::binary); CGAL::set_mode(os, CGAL::IO::BINARY); } - else{ - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); + else os.open(fname); - } + return write_VTP(os, g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index 595e45bb3bf..2506f1ab8e8 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -110,9 +110,6 @@ template bool write_WRL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) { std::ofstream os(fname); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_WRL(os, g, np); } diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 50dd0f026c4..0d5e13db927 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -760,9 +760,6 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_PLY(os, point_set, comments, np); } } diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h index 24648b4cf98..fee680c1e50 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h @@ -190,9 +190,6 @@ template & point_set, const CGAL_BGL_NP_CLASS& np) { std::ofstream os(fname); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_XYZ(os, point_set, np); } diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index b28cc04f1a3..e4c573ec0af 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -308,9 +308,6 @@ bool write_PLY(const std::string& filename, { std::ofstream os(filename); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_PLY(os, points, np); } } diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index 9634455b192..b726dd5bac1 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -206,9 +206,6 @@ bool write_XYZ(const std::string& filename, ) { std::ofstream os(filename); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_XYZ(os, points, np); } diff --git a/Stream_support/include/CGAL/IO/GOCAD.h b/Stream_support/include/CGAL/IO/GOCAD.h index 6070f471081..09e90e26949 100644 --- a/Stream_support/include/CGAL/IO/GOCAD.h +++ b/Stream_support/include/CGAL/IO/GOCAD.h @@ -434,9 +434,6 @@ bool write_GOCAD(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return IO::internal::write_GOCAD(os, fname.c_str(), points, polygons, np); } diff --git a/Stream_support/include/CGAL/IO/OBJ.h b/Stream_support/include/CGAL/IO/OBJ.h index 794e6b8e077..8e472d0657a 100644 --- a/Stream_support/include/CGAL/IO/OBJ.h +++ b/Stream_support/include/CGAL/IO/OBJ.h @@ -393,9 +393,6 @@ bool write_OBJ(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_OBJ(os, points, polygons, np); } diff --git a/Stream_support/include/CGAL/IO/OFF.h b/Stream_support/include/CGAL/IO/OFF.h index fad93a7f7ba..654a933b562 100644 --- a/Stream_support/include/CGAL/IO/OFF.h +++ b/Stream_support/include/CGAL/IO/OFF.h @@ -367,9 +367,6 @@ bool write_OFF(const std::string& fname, ) { std::ofstream os(fname); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); Generic_writer writer(os); return writer(points, polygons, np); diff --git a/Stream_support/include/CGAL/IO/PLY.h b/Stream_support/include/CGAL/IO/PLY.h index 1c444a60ca5..e3fb7d356e8 100644 --- a/Stream_support/include/CGAL/IO/PLY.h +++ b/Stream_support/include/CGAL/IO/PLY.h @@ -567,9 +567,6 @@ bool write_PLY(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_PLY(os, points, polygons, np); } } diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index 738d87a2eb0..4e5c082b24e 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -437,9 +437,6 @@ bool write_STL(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_STL(os, points, facets, np); } } diff --git a/Stream_support/include/CGAL/IO/VTK.h b/Stream_support/include/CGAL/IO/VTK.h index f5041748cab..304078d2939 100644 --- a/Stream_support/include/CGAL/IO/VTK.h +++ b/Stream_support/include/CGAL/IO/VTK.h @@ -499,9 +499,6 @@ bool write_VTP(const std::string& fname, { std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - os.precision(6); return write_VTP(os, points, polygons, np); } } From bdc0ce34cd38243db19ae1e02e6306af5252813c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 27 Jan 2021 16:33:59 +0100 Subject: [PATCH 227/317] test with eigen --- .../include/CGAL/NewKernel_d/Cartesian_LA_base.h | 10 ++++++---- NewKernel_d/test/NewKernel_d/Epick_d_eigen.cpp | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 NewKernel_d/test/NewKernel_d/Epick_d_eigen.cpp diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h index 180101e7867..b5de315b902 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h @@ -34,16 +34,18 @@ namespace CGAL { template < typename FT_, typename Dim_, -#if 1 +#ifndef CGAL_NEWKERNEL_D_USE_EIGEN_VECTOR +# if 1 typename Vec_=Mix_vector, Vector_vector, FT_, Dim_>, -#elif 0 +# elif 0 typename Vec_=Array_vector, -#elif 0 +# else typename Vec_=Vector_vector, +# endif #else - // Dangerous because of alignment. Ok on x86_64 without AVX. + // Dangerous before C++17 because of alignment. Ok on x86_64 without AVX. typename Vec_=LA_eigen, #endif typename LA_=LA_eigen > diff --git a/NewKernel_d/test/NewKernel_d/Epick_d_eigen.cpp b/NewKernel_d/test/NewKernel_d/Epick_d_eigen.cpp new file mode 100644 index 00000000000..ad71d0ba46b --- /dev/null +++ b/NewKernel_d/test/NewKernel_d/Epick_d_eigen.cpp @@ -0,0 +1,6 @@ +#if __cpp_aligned_new >= 201606L +# define CGAL_NEWKERNEL_D_USE_EIGEN_VECTOR 1 +# include "Epick_d.cpp" +#else +int main(){} +#endif From 7bf9c14f721f476694abfa9d3fc3cfc48581894c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Jan 2021 10:01:52 +0100 Subject: [PATCH 228/317] Factorization --- BGL/include/CGAL/boost/graph/IO/GOCAD.h | 9 ++------- .../CGAL/boost/graph/IO/Generic_facegraph_printer.h | 8 +------- BGL/include/CGAL/boost/graph/IO/PLY.h | 7 +------ BGL/include/CGAL/boost/graph/IO/STL.h | 7 +------ BGL/include/CGAL/boost/graph/IO/VTK.h | 7 +------ BGL/include/CGAL/boost/graph/named_params_helper.h | 12 ++++++++++++ Point_set_3/include/CGAL/Point_set_3/IO/PLY.h | 7 +------ .../include/CGAL/IO/write_off_points.h | 7 +------ .../include/CGAL/IO/write_ply_points.h | 7 +------ .../include/CGAL/IO/write_xyz_points.h | 7 +------ Stream_support/include/CGAL/IO/GOCAD.h | 7 +------ Stream_support/include/CGAL/IO/Generic_writer.h | 7 +------ Stream_support/include/CGAL/IO/PLY.h | 8 ++------ Stream_support/include/CGAL/IO/STL.h | 7 +------ Stream_support/include/CGAL/IO/VTK.h | 9 +++------ Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 7 +------ 16 files changed, 31 insertions(+), 92 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/GOCAD.h b/BGL/include/CGAL/boost/graph/IO/GOCAD.h index 0c0692b5b6f..ac5ea9957c0 100644 --- a/BGL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/BGL/include/CGAL/boost/graph/IO/GOCAD.h @@ -18,7 +18,7 @@ #include #include #include - +#include #include #include @@ -303,12 +303,7 @@ bool write_GOCAD(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); os << "GOCAD TSurf 1\n" "HEADER {\n" diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index 08b6c69c84b..53709564546 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -117,13 +117,7 @@ public: if(!m_os.good()) return false; - if(!CGAL::parameters::is_default_parameter( - get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter( - get_parameter(np, internal_np::stream_precision), 6); - m_os.precision(precision); - } + set_default_stream_precision(m_os, np); VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, g)); diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index 667fed4672a..6ad32267952 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -361,12 +361,7 @@ bool write_PLY(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); // Write header os << "ply" << std::endl diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 4ab8df78ab0..11005c1dfb4 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -262,12 +262,7 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); if(get_mode(os) == IO::BINARY) { diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index ab3ed3c02cb..a62f3e1cb91 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -439,12 +439,7 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); os << "\n" << "::fa Alpha_expansion_boost_adjacency_list_tag >::type type; }; + + template + void set_default_stream_precision(std::ostream& os, const NP& np) + { + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::stream_precision)); + os.precision(precision); + } + } } //namespace CGAL diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 0d5e13db927..ae2d6ad7fb7 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -493,12 +493,7 @@ bool write_PLY(std::ostream& os, return false; } - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); os << "ply" << std::endl << ((get_mode(os) == IO::BINARY) ? "format binary_little_endian 1.0" : "format ascii 1.0") << std::endl diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index e843e770de0..0f075981d0b 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -66,12 +66,7 @@ bool write_OFF_PSP(std::ostream& os, return false; } - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); // Write header os << "NOFF" << std::endl; diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index e4c573ec0af..84e5442e810 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -212,12 +212,7 @@ bool write_PLY(std::ostream& os, return false; } - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); if (has_normals) return write_PLY_with_properties(os, points, diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index b726dd5bac1..2a4ef60d17b 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -67,12 +67,7 @@ bool write_XYZ_PSP(std::ostream& os, return false; } - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); // Write positions + normals for(typename PointRange::const_iterator it = points.begin(); it != points.end(); it++) diff --git a/Stream_support/include/CGAL/IO/GOCAD.h b/Stream_support/include/CGAL/IO/GOCAD.h index 09e90e26949..2be6af7a0ad 100644 --- a/Stream_support/include/CGAL/IO/GOCAD.h +++ b/Stream_support/include/CGAL/IO/GOCAD.h @@ -299,12 +299,7 @@ bool write_GOCAD(std::ostream& os, set_ascii_mode(os); // GOCAD is ASCII only - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); os << "GOCAD TSurf 1\n" "HEADER {\n" diff --git a/Stream_support/include/CGAL/IO/Generic_writer.h b/Stream_support/include/CGAL/IO/Generic_writer.h index 6b31a609014..c9700536edd 100644 --- a/Stream_support/include/CGAL/IO/Generic_writer.h +++ b/Stream_support/include/CGAL/IO/Generic_writer.h @@ -49,12 +49,7 @@ public: if(!m_os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - m_os.precision(precision); - } + set_default_stream_precision(m_os, np); m_writer.write_header(m_os, points.size(), 0, polygons.size()); for(std::size_t i=0, end=points.size(); i #include +#include #include #include @@ -467,12 +468,7 @@ bool write_PLY(std::ostream& out, if(!out.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - out.precision(precision); - } + set_default_stream_precision(out, np); // Write header out << "ply" << std::endl diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index 4e5c082b24e..437d7f410bb 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -317,12 +317,7 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); if(get_mode(os) == IO::BINARY) { diff --git a/Stream_support/include/CGAL/IO/VTK.h b/Stream_support/include/CGAL/IO/VTK.h index 304078d2939..76c13581d4e 100644 --- a/Stream_support/include/CGAL/IO/VTK.h +++ b/Stream_support/include/CGAL/IO/VTK.h @@ -19,6 +19,8 @@ #include #include +#include + #ifdef CGAL_USE_VTK #include @@ -393,12 +395,7 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = choose_parameter(get_parameter(np, internal_np::stream_precision), 6); - os.precision(precision); - } + set_default_stream_precision(os, np); os << "\n" << " Date: Thu, 28 Jan 2021 10:04:41 +0100 Subject: [PATCH 229/317] clean-up --- .../test/Convex_decomposition_3/check_decomposition.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp b/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp index afb45e7f07d..dd97caf9e5a 100644 --- a/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp +++ b/Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cpp @@ -48,7 +48,5 @@ int main() { Nef_polyhedron_3 N; std::cin >> N; - if(!is) - return EXIT_FAILURE; check_decomposition(N); } From b2861aefa3b7dfc4db54461a1e4b2ec99b488eea Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 28 Jan 2021 10:57:01 +0100 Subject: [PATCH 230/317] fixed warning with Vector 3 type --- .../internal/Hole_filling/Triangulate_hole_polyline.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index f51ca3e861c..2c41228dc8a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1221,7 +1221,6 @@ bool is_planar_2( typedef typename Traits::FT FT; typedef typename Traits::Point_3 Point_3; typedef typename Traits::Plane_3 Plane_3; - typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Construct_projected_point_3 Projection_3; typedef typename Traits::Compute_squared_distance_3 Squared_distance_3; @@ -1264,7 +1263,7 @@ bool is_planar_2( } // Here, avg_squared_distance is a little bit more tolerant than avg_distance^2. - CGAL_assertion(avg_normal != Vector_3()); + CGAL_assertion(avg_normal != typename Traits::Vector_3()); const Plane_3 plane = Plane_3(centroid, avg_normal); FT avg_squared_distance = FT(0); for (std::size_t i = 0; i < n; ++i) { From f58e6e67d37a7c3bc8d027156d9aa76a58aab72c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Jan 2021 12:19:55 +0100 Subject: [PATCH 231/317] Replace Value by Distance --- .../Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp index 8400574be2c..c267e1bf9ca 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -439,8 +439,8 @@ void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() Z = (box.max)(2)-(box.min)(2); double diag = sm_item->diagonalBbox(); double offset_value = QInputDialog::getDouble(mw, - QString("Choose Inflate Value"), - QString("Offset Value (use negative number for deflate)"), + QString("Choose Inflate Distance"), + QString("Inflate Distance (use negative number for deflate)"), 0.1*diag, -(std::numeric_limits::max)(), (std::numeric_limits::max)(), 10); From ce75d010e93c6cc0ca0ed3997d925b89d7eb161b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Jan 2021 14:19:22 +0100 Subject: [PATCH 232/317] First try: use nullptr as a criterion to detect a moved-from object --- Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index 0831c09c656..1fb2611c15d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -114,6 +114,7 @@ public: , random(std::move(other.random)) { hierarchy[0] = this; + other.hierarchy[0] = nullptr; for(int i=1; i:: clear() { - for(int i=0;iclear(); } From b4256accb94cbecef9413b894a87d25589696f98 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Jan 2021 16:04:27 +0100 Subject: [PATCH 233/317] WIP: Second try Something is off, because the test suite does not pass. --- .../include/CGAL/Triangulation_hierarchy_3.h | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index 1fb2611c15d..da7ce4ff8d7 100644 --- a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -92,7 +92,26 @@ public: private: + template + constexpr std::array + make_array_of_triangulations(const Geom_traits& traits, std::index_sequence) + { + return {{(static_cast(Is), traits)...}}; + } + template + constexpr std::array create_array_of_triangulation(const Geom_traits& traits) + { + return make_array_of_triangulations(traits, std::make_index_sequence()); + } + + void init_hierarchy() { + hierarchy[0] = this; + for(int i=1; i hierarchy_triangulations; std::array hierarchy; boost::rand48 random; @@ -111,25 +130,20 @@ public: Triangulation_hierarchy_3(Triangulation_hierarchy_3&& other) noexcept( noexcept(Tr_Base(std::move(other))) ) : Tr_Base(std::move(other)) + , hierarchy_triangulations(std::move(other.hierarchy_triangulations)) , random(std::move(other.random)) { - hierarchy[0] = this; - other.hierarchy[0] = nullptr; - for(int i=1; i Triangulation_hierarchy_3(InputIterator first, InputIterator last, const Geom_traits& traits = Geom_traits()) : Tr_Base(traits) + , hierarchy_triangulations(create_array_of_triangulation(traits)) { - hierarchy[0] = this; - for(int i=1; i(*this) = std::move(other); - hierarchy[0] = this; - for(int i=1; i Triangulation_hierarchy_3:: Triangulation_hierarchy_3(const Geom_traits& traits) : Tr_Base(traits) + , hierarchy_triangulations(create_array_of_triangulation(traits)) { - hierarchy[0] = this; - for(int i=1;i Triangulation_hierarchy_3:: Triangulation_hierarchy_3(const Triangulation_hierarchy_3 &tr) : Tr_Base(tr) + , hierarchy_triangulations(tr.hierarchy_triangulations) { - hierarchy[0] = this; - for(int i=1; i:: clear() { - if(hierarchy[0] == nullptr) return; // moved-from object - for(int i=1;iclear(); } From 51086d5678633943398d03241cd46f1a92de7ca8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 28 Jan 2021 17:12:26 +0000 Subject: [PATCH 234/317] When using a reference for the functor we must generate a new functor in the for loop --- Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h index 0b4ae797fb3..bcd0f1b13c0 100644 --- a/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h +++ b/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h @@ -42,7 +42,6 @@ ch_bykat(InputIterator first, InputIterator last, typedef typename Traits::Equal_2 Equal_2; Left_turn_2 left_turn = ch_traits.left_turn_2_object(); - Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); Equal_2 equal_points = ch_traits.equal_2_object(); if (first == last) return result; @@ -81,6 +80,8 @@ ch_bykat(InputIterator first, InputIterator last, for (;;) { + // This functor must be in the for loop so that the Convex_hull_constructive traits_2 works correctly + Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); if ( l != r) { Point_2 c = *std::min_element( l, r, [&less_dist,&a,&b](const Point_2&p1, const Point_2& p2) From 8e23769d8ef007a3c4c5e07294199751a7831c06 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 29 Jan 2021 09:28:51 +0100 Subject: [PATCH 235/317] Add missing overloads for set_default_stream_precision() --- Stream_support/include/CGAL/IO/OI/Inventor_ostream.h | 12 ++++++++++++ Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 42d2cd78182..20f4f5d25c0 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -89,6 +89,18 @@ private: } }; +template +void set_default_stream_precision(Inventor_ostream_base& os, const NP& np) +{ + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::stream_precision)); + os.os().precision(precision); + } +} + } // namespace CGAL #endif // CGAL_IO_INVENTOR_OSTREAM_H diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index 1de37df3967..cb8ef7ecc47 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -104,6 +104,17 @@ inline VRML_2_ostream& operator<<(VRML_2_ostream& os, return os; } +template +void set_default_stream_precision(VRML_2_ostream& os, const NP& np) +{ + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::stream_precision)); + os.os().precision(precision); + } +} } // namespace CGAL #endif // CGAL_IO_VRML_2_OSTREAM_H @@ -315,4 +326,5 @@ operator<<(VRML_2_ostream& os, } //namespace CGAL #endif // CGAL_IO_VRML_VRML_2_SEGMENT_3 + #endif // CGAL_SPHERE_3_H From 91f8b4a09fe0bacd661c3621739fc6facca0a56e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 29 Jan 2021 09:43:53 +0100 Subject: [PATCH 236/317] fix write_off_points() --- Point_set_processing_3/include/CGAL/IO/write_off_points.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 0f075981d0b..0300012f350 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -207,8 +207,7 @@ bool write_OFF(const std::string& filename, ) { std::ofstream os(filename); - if(parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) + set_default_stream_precision(os, np); return write_OFF(os, points, np); } From 8f0b2bb446ab4b987cb75429c35103de3159cea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 27 Jan 2021 19:09:29 +0100 Subject: [PATCH 237/317] add an example do the union of a set of meshes in parallel --- .../Polygon_mesh_processing/CMakeLists.txt | 3 ++ .../corefinement_parallel_union_meshes.cpp | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 3cc60a4a650..e34c91b8892 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -123,6 +123,9 @@ if(TARGET CGAL::TBB_support) target_link_libraries(self_intersections_example PUBLIC CGAL::TBB_support) target_link_libraries(hausdorff_distance_remeshing_example PUBLIC CGAL::TBB_support) + + create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") + target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) else() message( STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp new file mode 100644 index 00000000000..0e5c68282da --- /dev/null +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp @@ -0,0 +1,53 @@ +#include +#include +#include + +#include +#include + +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh Mesh; + +namespace PMP = CGAL::Polygon_mesh_processing; + +int main(int argc, char** argv) +{ + std::ifstream in(argc>1?argv[1]:"data/eight.off"); + int nb_copies = argc > 2 ? atoi(argv[2]) : 100; + if (nb_copies<=0) return 1; + std::vector meshes(nb_copies); + in >> meshes[0]; + for (int i=1; i trans(CGAL::Translation(), Kernel::Vector_3(i*0.2, 0, 0)); + meshes[i]=meshes[0]; + PMP::transform(trans, meshes[i]); + } + + // lambda function used to do the union of two meshes: + // we join the left part of the mesh vector with the right part + // as the right part will be discarded by the resize in the while loop + auto f = [&meshes](const tbb::blocked_range& range) + { + for( std::size_t k = range.begin(); k != range.end(); ++k) + { + PMP::corefine_and_compute_union(meshes[k], meshes[meshes.size() - k - 1], meshes[k]); + } + }; + + // do the union of meshes in parallel + while (meshes.size()>1) + { + tbb::parallel_for(tbb::blocked_range(0, meshes.size()/2), f); + meshes.resize((meshes.size() + 1) / 2); + } + + std::ofstream out("multiple_union.off"); + out << std::setprecision(17) << meshes[0]; + + return 0; +} From 2f2b33c0ae5eda72870ae919314d1d81bfe6a838 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 29 Jan 2021 10:16:52 +0100 Subject: [PATCH 238/317] clean-up --- .../Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp index c267e1bf9ca..428d3ad6114 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp @@ -432,11 +432,7 @@ void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() SMesh* sMesh = sm_item->face_graph(); if(!sMesh) return; - Scene_item::Bbox box = bbox(sMesh); - double X=(box.max)(0)-(box.min)(0), - Y = (box.max)(1)-(box.min)(1), - Z = (box.max)(2)-(box.min)(2); double diag = sm_item->diagonalBbox(); double offset_value = QInputDialog::getDouble(mw, QString("Choose Inflate Distance"), From a91f0239cdbcdb7ff830e9a4f58cd2aa64a2e835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 29 Jan 2021 10:05:48 +0100 Subject: [PATCH 239/317] Fix QP solver test: raw replacement that is working --- QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h | 5 ++--- QP_solver/include/CGAL/QP_solver/QP_solver.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h index f3f879d8bb7..04e8f3f36d4 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h @@ -178,11 +178,10 @@ z_replace_original_by_original(ForwardIterator y_l_it, // tmp_l -part std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(), - [&s_delta](const ET& v1, const ET& v2){ return v1 + v2 * s_delta; }); - + [&s_delta](const ET& v1, const ET& v2){ return std::plus()(v1, s_delta * v2); }); // tmp_x -part std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(), - [&s_delta](const ET& v1, const ET& v2){ return v1 + v2 * s_delta; }); + [&s_delta](const ET& v1, const ET& v2){ return std::plus()(v1, s_delta * v2); }); tmp_x[k_i] -= d; // prepare \hat{k}_{2} -scalar diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver.h b/QP_solver/include/CGAL/QP_solver/QP_solver.h index ff3676702d6..889fdf25a1b 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver.h @@ -1599,7 +1599,7 @@ ratio_test_1__q_x_S( Tag_false) q_x_S.begin(), [this](const ET& n1, const RT& n2) { - return n1 - this->d * NT_converter() (n2); + return std::minus()(n1,this->d * NT_converter() (n2)); }); } @@ -1940,13 +1940,13 @@ compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/, x_B_S.begin(), x_B_S.begin(), [this](const ET& n1, const ET& n2) - { return this->d * n1 - n2; }); + { return std::minus()(this->d * n1, n2); }); // b_S_B - ( A_S_BxB_O * x_B_O) - r_S_B std::transform(x_B_S.begin(), x_B_S.begin()+S_B.size(), r_S_B.begin(), x_B_S.begin(), [this](const ET& n1, const ET& n2) - { return n1 - this->d * n2; }); + { return std::minus()(n1, this->d * n2); }); // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O) Value_iterator x_it = x_B_S.begin(); From 557cf7f2f194354c0d3d3ffb383c9b9d8769a84f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 29 Jan 2021 10:36:59 +0000 Subject: [PATCH 240/317] Use invoke_result for C++-17 --- Matrix_search/include/CGAL/Cartesian_matrix.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Matrix_search/include/CGAL/Cartesian_matrix.h b/Matrix_search/include/CGAL/Cartesian_matrix.h index 1bad69fc2d4..d3ad276a715 100644 --- a/Matrix_search/include/CGAL/Cartesian_matrix.h +++ b/Matrix_search/include/CGAL/Cartesian_matrix.h @@ -18,6 +18,7 @@ #include #include +#include namespace CGAL { @@ -26,7 +27,12 @@ template < class Operation, class RandomAccessIC_column > class Cartesian_matrix { public: + +#if CGAL_CXX17 && __has_cpp_attribute(nodiscard) + typedef typename std::invoke_result::value_type, typename std::iterator_traits::value_type>::type Value; +#else typedef typename Operation::result_type Value; +#endif Cartesian_matrix(RandomAccessIC_row r_f, RandomAccessIC_row r_l, From 55e23ae840b833f931752980069e73119540021a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 29 Jan 2021 10:37:41 +0000 Subject: [PATCH 241/317] Remove types from Binary_compose_2 (which is not documented --- STL_Extension/include/CGAL/function_objects.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/STL_Extension/include/CGAL/function_objects.h b/STL_Extension/include/CGAL/function_objects.h index 09fdf6343a6..c9182f971b6 100644 --- a/STL_Extension/include/CGAL/function_objects.h +++ b/STL_Extension/include/CGAL/function_objects.h @@ -426,18 +426,13 @@ compose1_2(const Op1& op1, const Op2& op2) template < class Op1, class Op2, class Op3 > class Binary_compose_2 - : public CGAL::cpp98::binary_function< typename Op2::argument_type, - typename Op3::argument_type, - typename Op1::result_type > + { protected: Op1 op1; Op2 op2; Op3 op3; public: - typedef typename Op2::argument_type first_argument_type; - typedef typename Op3::argument_type second_argument_type; - typedef typename Op1::result_type result_type; Binary_compose_2(const Op1& x, const Op2& y, const Op3& z) : op1(x), op2(y), op3(z) {} @@ -455,7 +450,8 @@ public: return *this; } - result_type + template + decltype(auto) operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x), op3(y)); } From 0cb34126afcba5d8ee9c4ebb8c66c6f0b38ada42 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 29 Jan 2021 12:35:16 +0000 Subject: [PATCH 242/317] Remove typedefs --- STL_Extension/include/CGAL/function_objects.h | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/STL_Extension/include/CGAL/function_objects.h b/STL_Extension/include/CGAL/function_objects.h index c9182f971b6..ae9601bbd02 100644 --- a/STL_Extension/include/CGAL/function_objects.h +++ b/STL_Extension/include/CGAL/function_objects.h @@ -349,19 +349,16 @@ class Creator_uniform_d { template < class Op1, class Op2 > class Unary_compose_1 - : public CGAL::cpp98::unary_function< typename Op2::argument_type, - typename Op1::result_type > { protected: Op1 op1; Op2 op2; public: - typedef typename Op2::argument_type argument_type; - typedef typename Op1::result_type result_type; Unary_compose_1(const Op1& x, const Op2& y) : op1(x), op2(y) {} - result_type + template + decltype(auto) operator()(const argument_type& x) const { return op1(op2(x)); } }; @@ -373,21 +370,19 @@ compose1_1(const Op1& op1, const Op2& op2) template < class Op1, class Op2, class Op3 > class Binary_compose_1 - : public CGAL::cpp98::unary_function< typename Op2::argument_type, - typename Op1::result_type > { protected: Op1 op1; Op2 op2; Op3 op3; public: - typedef typename Op2::argument_type argument_type; - typedef typename Op1::result_type result_type; + Binary_compose_1(const Op1& x, const Op2& y, const Op3& z) : op1(x), op2(y), op3(z) {} - result_type + template + decltype(auto) operator()(const argument_type& x) const { return op1(op2(x), op3(x)); } }; @@ -399,21 +394,16 @@ compose2_1(const Op1& op1, const Op2& op2, const Op3& op3) template < class Op1, class Op2 > class Unary_compose_2 - : public CGAL::cpp98::binary_function< typename Op2::first_argument_type, - typename Op2::second_argument_type, - typename Op1::result_type > { protected: Op1 op1; Op2 op2; public: - typedef typename Op2::first_argument_type first_argument_type; - typedef typename Op2::second_argument_type second_argument_type; - typedef typename Op1::result_type result_type; Unary_compose_2(const Op1& x, const Op2& y) : op1(x), op2(y) {} - result_type + template + decltype(auto) operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x, y)); } From 2ac1b9632b2cf241010e3f9a7e0f1c9946e958f3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 29 Jan 2021 12:35:52 +0000 Subject: [PATCH 243/317] Fix composition testsuite --- STL_Extension/test/STL_Extension/test_composition.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/STL_Extension/test/STL_Extension/test_composition.cpp b/STL_Extension/test/STL_Extension/test_composition.cpp index c9a3caaea61..a0631437393 100644 --- a/STL_Extension/test/STL_Extension/test_composition.cpp +++ b/STL_Extension/test/STL_Extension/test_composition.cpp @@ -28,7 +28,6 @@ struct Myf { int main() { plus< int > pl; - multiplies< int > mu; std::function op1 = [](int i){ return i+1; }; std::function op2 = [](int i){ return i * 2; }; @@ -48,7 +47,7 @@ int main() // compose2_1: transform(b, b + 5, a, compose2_1(pl, op2, op2)); - transform(b, b + 5, b, bind1st(mu, 4)); + transform(b, b + 5, b, [](int i) { return 4 * i;} ); assert(equal(a, a + 5, b)); // compare_to_less From fd2844092754f9254404f03ff7d9d35fc0e9da53 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 29 Jan 2021 12:36:45 +0000 Subject: [PATCH 244/317] Don't use iterator_traits --- .../include/CGAL/Rectangular_p_center_traits_2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h index 4233123e225..9e2345a82f7 100644 --- a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h +++ b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h @@ -290,8 +290,9 @@ bounding_box_2(ForwardIterator f, ForwardIterator l, const Traits& t) return rect(v(rect(*xmin, *ymin), 0), v(rect(*xmax, *ymax), 2)); } // bounding_box_2(f, l, t) template < class ForwardIterator > -inline typename -std::iterator_traits< ForwardIterator >::value_type::R::Iso_rectangle_2 +inline +//typename std::iterator_traits< ForwardIterator >::value_type::R::Iso_rectangle_2 +decltype(auto) bounding_box_2(ForwardIterator f, ForwardIterator l) // PRE: f != l. { From 89d199616b0ea9ccdeb69d081b393075ed82342c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 29 Jan 2021 15:56:13 +0100 Subject: [PATCH 245/317] Remove remaining not header_only code --- Installation/CMakeLists.txt | 2 -- Installation/cmake/modules/UseCGAL.cmake | 14 +++----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 9697b7a6f99..16d808ab400 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -698,8 +698,6 @@ set(CGAL_INSTALL_MAN_DIR message("== Generating build files ==") -set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib) - set(CGAL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include) foreach(package ${CGAL_CONFIGURED_PACKAGES}) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 963354f8aee..4d44ca90219 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -44,16 +44,8 @@ if(NOT USE_CGAL_FILE_INCLUDED) include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ) add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ) - if (CGAL_HEADER_ONLY) - if(NOT CGAL_NO_BLANKET_LINKING) - link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - endif() - else() - if(NOT CGAL_NO_BLANKET_LINKING) - link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - endif() + if(NOT CGAL_NO_BLANKET_LINKING) + link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) + link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) endif() - endif() From e49fd1e7323461384063837f86d0c4e6e3bb4e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 29 Jan 2021 18:04:19 +0100 Subject: [PATCH 246/317] deref it once --- Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h | 2 +- Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp | 3 ++- STL_Extension/include/CGAL/function_objects.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h index 9e2345a82f7..8b2c9e70339 100644 --- a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h +++ b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h @@ -290,7 +290,7 @@ bounding_box_2(ForwardIterator f, ForwardIterator l, const Traits& t) return rect(v(rect(*xmin, *ymin), 0), v(rect(*xmax, *ymax), 2)); } // bounding_box_2(f, l, t) template < class ForwardIterator > -inline +inline //typename std::iterator_traits< ForwardIterator >::value_type::R::Iso_rectangle_2 decltype(auto) bounding_box_2(ForwardIterator f, ForwardIterator l) diff --git a/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp b/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp index cc50d5f5c1b..019ede1ed24 100644 --- a/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp +++ b/Convex_hull_2/examples/Convex_hull_2/ch_graham_anderson.cpp @@ -22,7 +22,8 @@ ch_graham_anderson( InputIterator first, InputIterator beyond, std::vector< Point_2 > V (first, beyond); typename std::vector< Point_2 >::iterator it = std::min_element(V.begin(), V.end(), Less_xy_2()); - std::sort( V.begin(), V.end(), [it](const Point_2& p1, const Point_2& p2){return Less_rotate_ccw_2()(*it, p1, p2);} ); + const Point_2 p = *it; + std::sort( V.begin(), V.end(), [&p](const Point_2& p1, const Point_2& p2){return Less_rotate_ccw_2()(p, p1, p2);} ); if ( *(V.begin()) != *(V.rbegin()) ) { result = CGAL::ch_graham_andrew_scan( V.begin(), V.end(), result, ch_traits); diff --git a/STL_Extension/include/CGAL/function_objects.h b/STL_Extension/include/CGAL/function_objects.h index ae9601bbd02..11bcf352a00 100644 --- a/STL_Extension/include/CGAL/function_objects.h +++ b/STL_Extension/include/CGAL/function_objects.h @@ -376,7 +376,6 @@ protected: Op2 op2; Op3 op3; public: - Binary_compose_1(const Op1& x, const Op2& y, const Op3& z) : op1(x), op2(y), op3(z) {} From 83d7a89f22585a2da956b411bcd1817c80908f49 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 29 Jan 2021 17:32:05 +0000 Subject: [PATCH 247/317] Calculate normals for facets more efficiently --- Nef_3/include/CGAL/normal_vector_newell_3.h | 100 +++++++++++++++----- 1 file changed, 78 insertions(+), 22 deletions(-) diff --git a/Nef_3/include/CGAL/normal_vector_newell_3.h b/Nef_3/include/CGAL/normal_vector_newell_3.h index 282f8e5b5cb..5e34f350d33 100644 --- a/Nef_3/include/CGAL/normal_vector_newell_3.h +++ b/Nef_3/include/CGAL/normal_vector_newell_3.h @@ -23,6 +23,8 @@ #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 79 #include +#include +#include namespace CGAL { @@ -30,32 +32,74 @@ namespace internal_nef { template CGAL_MEDIUM_INLINE -void newell_single_step_3( const Handle& p, const Handle& q, Vector& n ) +void newell_single_step_3( const Handle& p, const Handle& q, Vector& n, const Homogeneous_tag&) { + typedef typename Kernel_traits::Kernel::RT RT; + const RT& phw = p.hw(); + const RT& qhw = q.hw(); + const RT& nhw = n.hw(); + const RT& sq = phw * phw * qhw * qhw; + const RT& phyqhw = p.hy() * qhw; + const RT& qhyphw = q.hy() * phw; + const RT& phxqhw = p.hx() * qhw; + const RT& qhxphw = q.hx() * phw; + const RT& phzqhw = p.hz() * qhw; + const RT& qhzphw = q.hz() * phw; + n = Vector( n.hx() - * p.hw() * p.hw() - * q.hw() * q.hw() - + n.hw() - * ( p.hy() * q.hw() - q.hy() * p.hw()) - * ( p.hz() * q.hw() + q.hz() * p.hw()), + * sq + + nhw + * ( phyqhw - qhyphw ) + * ( phzqhw + qhzphw ), n.hy() - * p.hw() * p.hw() - * q.hw() * q.hw() - + n.hw() - * ( p.hz() * q.hw() - q.hz() * p.hw()) - * ( p.hx() * q.hw() + q.hx() * p.hw()), + * sq + + nhw + * ( phzqhw - qhzphw ) + * ( phxqhw + qhxphw ), n.hz() - * p.hw() * p.hw() - * q.hw() * q.hw() - + n.hw() - * ( p.hx() * q.hw() - q.hx() * p.hw()) - * ( p.hy() * q.hw() + q.hy() * p.hw()), + * sq + + nhw + * ( phxqhw - qhxphw ) + * ( phyqhw + qhyphw ), n.hw() - * p.hw() * p.hw() - * q.hw() * q.hw() + * sq ); } + +template +CGAL_MEDIUM_INLINE +void newell_single_step_3( const Handle& p, const Handle& q, Vector& n, const Cartesian_tag&) +{ + typedef typename Kernel_traits::Kernel::FT FT; + const FT& phy = p.hy(); + const FT& qhy = q.hy(); + const FT& phx = p.hx(); + const FT& qhx = q.hx(); + const FT& phz = p.hz(); + const FT& qhz = q.hz(); + + n = Vector( + n.hx() + + ( phy - qhy ) + * ( phz + qhz ), + n.hy() + + ( phz - qhz ) + * ( phx + qhx ), + n.hz() + + ( phx - qhx ) + * ( phy + qhy ) + ); +} + +template +bool is_triangle_3( const IC& first ) +{ + IC last(first); + ++last; ++last; ++last; + return first==last; +} + } template @@ -70,6 +114,12 @@ void normal_vector_newell_3( IC first, IC last, Vector& n ) // three. { CGAL_assertion( !CGAL::is_empty_range( first, last)); + if(internal_nef::is_triangle_3(first)) { + n = orthogonal_vector(*first,*(++first),*(++first)); + return; + } + + typedef typename Kernel_traits::Kernel R; // Compute facet normals via the Newell-method as described in // Filippo Tampieri: Newell's Method for Computing the Plane // Equation of a Polygon. Graphics Gems III, David Kirk, @@ -80,11 +130,11 @@ void normal_vector_newell_3( IC first, IC last, Vector& n ) IC prev = first; ++first; while( first != last) { - internal_nef::newell_single_step_3( *prev, *first, n); + internal_nef::newell_single_step_3( *prev, *first, n, typename R::Kernel_tag()); prev = first; ++first; } - internal_nef::newell_single_step_3( *prev, *start_point, n); + internal_nef::newell_single_step_3( *prev, *start_point, n, typename R::Kernel_tag()); CGAL_NEF_TRACEN("newell normal vector "< void normal_vector_newell_3( IC first, IC last, VertexPointMap vpm, Vector& n ) { CGAL_assertion( !CGAL::is_empty_range( first, last)); + if(internal_nef::is_triangle_3(first)) { + n = orthogonal_vector(get(vpm,*first),get(vpm,*(++first)),get(vpm,*(++first))); + return; + } + + typedef typename Kernel_traits::Kernel R; // Compute facet normals via the Newell-method as described in // Filippo Tampieri: Newell's Method for Computing the Plane // Equation of a Polygon. Graphics Gems III, David Kirk, @@ -102,11 +158,11 @@ void normal_vector_newell_3( IC first, IC last, VertexPointMap vpm, Vector& n ) IC prev = first; ++first; while( first != last) { - internal_nef::newell_single_step_3( get(vpm,*prev), get(vpm,*first), n); + internal_nef::newell_single_step_3( get(vpm,*prev), get(vpm,*first), n, typename R::Kernel_tag()); prev = first; ++first; } - internal_nef::newell_single_step_3( get(vpm,*prev), get(vpm,*start_point), n); + internal_nef::newell_single_step_3( get(vpm,*prev), get(vpm,*start_point), n, typename R::Kernel_tag()); CGAL_NEF_TRACEN("newell normal vector "< Date: Fri, 29 Jan 2021 18:40:01 +0100 Subject: [PATCH 248/317] boost transform iterator cannot use raw lambdas as begin/end iterator types must be identicals --- .../gfx/Curve_renderer_internals.h | 4 ++-- .../gfx/Curve_renderer_traits.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h index 37c15966a21..4ae4f7f0d24 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h @@ -907,9 +907,9 @@ void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly) if(not_cached||not_found) { poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), - [&key1](Poly_1 poly){ return evaluate(poly, key1); }), + std::function([&key1](const Poly_1& poly){ return evaluate(poly, key1); })), ::boost::make_transform_iterator(coeffs->end(), - [&key1](Poly_1 poly){ return evaluate(poly, key1); })); + std::function([&key1](const Poly_1& poly){ return evaluate(poly, key1); }))); if(not_cached) return; // all available space consumed: drop the least recently used entry diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index 01ecfd0bd6e..41a884f52a1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -16,7 +16,6 @@ #include #include -#include /*! \file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h * \brief @@ -107,11 +106,12 @@ struct Transform { template OutputPoly_2 operator()(const CGAL::Polynomial& p, Op op = Op()) const { - - Transform tr; + typedef typename InputPoly_2::NT NT_in; + typedef typename OutputPoly_2::NT NT_out; + Transform tr; return OutputPoly_2( - ::boost::make_transform_iterator(p.begin(), [&op, &tr](const auto& v){ return tr(v, op); }), - ::boost::make_transform_iterator(p.end(), [&op, &tr](const auto& v){ return tr(v, op); })); + ::boost::make_transform_iterator(p.begin(), std::function([&op, &tr](const NT_in& v){ return tr(v, op); })), + ::boost::make_transform_iterator(p.end(), std::function([&op, &tr](const NT_in& v){ return tr(v, op); }))); } OutputPoly_2 operator()( From 87b2c5e2876ff7929cfa049cb3015585858f1734 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Sat, 30 Jan 2021 11:36:41 +0000 Subject: [PATCH 249/317] Improvements to normal vector newell after review --- Nef_3/include/CGAL/normal_vector_newell_3.h | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Nef_3/include/CGAL/normal_vector_newell_3.h b/Nef_3/include/CGAL/normal_vector_newell_3.h index 5e34f350d33..2735532899a 100644 --- a/Nef_3/include/CGAL/normal_vector_newell_3.h +++ b/Nef_3/include/CGAL/normal_vector_newell_3.h @@ -38,7 +38,7 @@ void newell_single_step_3( const Handle& p, const Handle& q, Vector& n, const Ho const RT& phw = p.hw(); const RT& qhw = q.hw(); const RT& nhw = n.hw(); - const RT& sq = phw * phw * qhw * qhw; + const RT& sq = square(phw) * square(qhw); const RT& phyqhw = p.hy() * qhw; const RT& qhyphw = q.hy() * phw; const RT& phxqhw = p.hx() * qhw; @@ -72,23 +72,23 @@ CGAL_MEDIUM_INLINE void newell_single_step_3( const Handle& p, const Handle& q, Vector& n, const Cartesian_tag&) { typedef typename Kernel_traits::Kernel::FT FT; - const FT& phy = p.hy(); - const FT& qhy = q.hy(); - const FT& phx = p.hx(); - const FT& qhx = q.hx(); - const FT& phz = p.hz(); - const FT& qhz = q.hz(); + const FT& py = p.y(); + const FT& qy = q.y(); + const FT& px = p.x(); + const FT& qx = q.x(); + const FT& pz = p.z(); + const FT& qz = q.z(); n = Vector( - n.hx() - + ( phy - qhy ) - * ( phz + qhz ), - n.hy() - + ( phz - qhz ) - * ( phx + qhx ), - n.hz() - + ( phx - qhx ) - * ( phy + qhy ) + n.x() + + ( py - qy ) + * ( pz + qz ), + n.y() + + ( pz - qz ) + * ( px + qx ), + n.z() + + ( px - qx ) + * ( py + qy ) ); } From 4271f6e19ce7420ec8bc20e409f86d07929fed97 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 1 Feb 2021 09:21:29 +0100 Subject: [PATCH 250/317] Restore the CMakelist.txt in the Minimal Example Using Qt5 --- .../create_and_use_a_cmakelist.txt | 11 ++++++++--- Surface_mesh/examples/Surface_mesh/CMakeLists.txt | 14 +++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 0fffe791b9b..44baf0d84aa 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -30,11 +30,16 @@ This section describes a minimal example of a program that uses \cgal and Qt5 fo \subsection subcmake CMakeLists.txt \dontinclude Surface_mesh/CMakeLists.txt -\skip cmake -\until if ( CGAL_FOUND ) +\skip cmake_minimum_required +\until project + +\skip #CGAL_Qt5 is needed for the drawing. +\until endif() + \skip #create the executable of the application \until "draw_surface_mesh.cpp" -\skip if(CGAL_Qt5_FOUND ) + +\skip if(CGAL_Qt5_FOUND) \until target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Qt5) \skip endif \until #end of the file diff --git a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt index cbad83f22db..351342fb9ec 100644 --- a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt @@ -1,6 +1,11 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. +#/!\ /!\ +#/!\ /!\ +# Used in /CGAL/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt. +# Careful when modifying + cmake_minimum_required(VERSION 3.1...3.15) project(Surface_mesh_Examples) @@ -35,17 +40,16 @@ create_single_source_cgal_program("sm_iterators.cpp") create_single_source_cgal_program("sm_kruskal.cpp") create_single_source_cgal_program("sm_memory.cpp") create_single_source_cgal_program("sm_properties.cpp") - -#create the executable of the application - -create_single_source_cgal_program("draw_surface_mesh.cpp") create_single_source_cgal_program("sm_draw_small_faces.cpp") create_single_source_cgal_program("check_orientation.cpp") + +#create the executable of the application +create_single_source_cgal_program("draw_surface_mesh.cpp") if(CGAL_Qt5_FOUND) #link it with the required CGAL libraries - target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Qt5) + target_link_libraries(sm_draw_small_faces PUBLIC CGAL::CGAL_Qt5) endif() From 0199c5794c3efc1acd73b28fec5df003a7ff4a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 1 Feb 2021 09:36:30 +0100 Subject: [PATCH 251/317] remove doc from concept that applies only to current models --- Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 34c54c85e42..de17fd5beb0 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -3848,10 +3848,6 @@ public: If `l1` and `l2` are parallel, then the bisector is defined as the line which has the same direction as `l1`, and which is at the same distance from `l1` and `l2`. - If `Kernel::FT` is not a model of `FieldWithSqrt` - an approximation of the square root will be used in this function, - impacting the exactness of the result even with an (exact) multiprecision - number type. */ Kernel::Line_2 operator()(const Kernel::Line_2&l1, const Kernel::Line_2&l2); @@ -3893,10 +3889,6 @@ public: If `h1` and `h2` are parallel, then the bisector is defined as the plane which has the same oriented normal vector as `h1`, and which is at the same distance from `h1` and `h2`. - If `Kernel::FT` is not a model of `FieldWithSqrt` - an approximation of the square root will be used in this function, - impacting the exactness of the result even with an (exact) multiprecision - number type. */ Kernel::Plane_3 operator()(const Kernel::Plane_3&h1, const Kernel::Plane_3&h2); From d4b6a55a688a3ca79e602378a17496cd9b1dd979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 1 Feb 2021 09:36:47 +0100 Subject: [PATCH 252/317] remove unused typedefs --- Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h | 1 - Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h | 1 - 2 files changed, 2 deletions(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h index 28ec8a3d1ea..05df87c02f1 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_line_2.h @@ -53,7 +53,6 @@ _test_fct_line_2(const R& ) std::cout << "Testing functions Line_2" ; typedef typename R::RT RT; - typedef typename R::FT FT; typedef typename R::Point_2 Point_2; typedef typename R::Line_2 Line_2; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h index a5502ad4c3b..17578d544ce 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_plane_3.h @@ -53,7 +53,6 @@ _test_fct_plane_3(const R& ) std::cout << "Testing functions Plane_3" ; typedef typename R::RT RT; - typedef typename R::FT FT; typedef typename R::Point_3 Point_3; typedef typename R::Plane_3 Plane_3; From f218fb8d3a64cb3c34340fe2b7de4467ca8a5e6a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 14:46:37 +0100 Subject: [PATCH 253/317] Fix the segfault in the previous commit (WIP: Second try) --- Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index da7ce4ff8d7..ad0f1e61fef 100644 --- a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -167,8 +167,8 @@ public: void swap(Triangulation_hierarchy_3 &tr) { Tr_Base::swap(tr); - for(int i=1; i Date: Mon, 1 Feb 2021 14:47:18 +0100 Subject: [PATCH 254/317] Add tests for move constructors --- .../include/CGAL/_test_cls_delaunay_3.h | 15 ++++++++++++++- .../include/CGAL/_test_cls_regular_3.h | 14 ++++++++++++-- .../include/CGAL/_test_cls_triangulation_3.h | 15 ++++++++++++++- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index f7d4579828c..471e3791fd4 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -421,7 +421,20 @@ _test_cls_delaunay_3(const Triangulation &) assert(T1.number_of_vertices() == 0); assert(T1.is_valid()); - + // move constructor + { + Cls T_copy(T0); + assert(T_copy.dimension() == 3); + assert(T_copy.number_of_vertices() == 4); + assert(T_copy.is_valid()); + Cls T_move_constructed(std::move(T_copy)); + assert(T_move_constructed.dimension() == 3); + assert(T_move_constructed.number_of_vertices() == 4); + assert(T_move_constructed.is_valid()); + assert(T_copy.dimension() == -2); + assert(T_copy.number_of_vertices() == -1); + assert(T_copy.is_valid()); + } // Affectation : T1=T0; diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index fba2db023fd..1da16d061c7 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -205,6 +205,16 @@ _test_cls_regular_3(const Triangulation &) << T.number_of_vertices() << std::endl; assert(T.is_valid()); assert(T.dimension()==3); + + // move constructor + { + Triangulation T_copy(T); + assert(T_copy == T); + assert(T_copy == T); + Triangulation T_move_constructed(std::move(T_copy)); + assert(T_move_constructed == T); + assert(T_copy.dimension() == -2); + assert(T_copy.number_of_vertices() == -1); + assert(T_copy.is_valid()); + } } - - diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index ded18a9175f..ca8b84ac193 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -286,7 +286,20 @@ _test_cls_triangulation_3(const Triangulation &) assert(T1.number_of_vertices() == 0); assert(T1.is_valid()); - + // move constructor + { + Cls T_copy(T0); + assert(T_copy.dimension() == 3); + assert(T_copy.number_of_vertices() == 4); + assert(T_copy.is_valid()); + Cls T_move_constructed(std::move(T_copy)); + assert(T_move_constructed.dimension() == 3); + assert(T_move_constructed.number_of_vertices() == 4); + assert(T_move_constructed.is_valid()); + assert(T_copy.dimension() == -2); + assert(T_copy.number_of_vertices() == -1); + assert(T_copy.is_valid()); + } // Assignment T1=T0; From 1a693828e14056f55658ceb04967cb90a9c3ab18 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 1 Feb 2021 16:01:11 +0100 Subject: [PATCH 255/317] Clean-up boost-program_options usage --- .../examples/Jet_fitting_3/CMakeLists.txt | 22 +++++++-------- Ridges_3/examples/Ridges_3/CMakeLists.txt | 27 ++++++++++--------- .../Surface_mesh_shortest_path/CMakeLists.txt | 17 +++++------- 3 files changed, 29 insertions(+), 37 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index fce1694719b..afc0c1a9c4d 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -12,22 +12,18 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - if(Boost_PROGRAM_OPTIONS_FOUND) - if(TARGET Boost::program_options) - set(Boost_PROGRAM_OPTIONS_LIBRARY Boost::program_options) - endif() - if(CGAL_AUTO_LINK_ENABLED) - message(STATUS "Boost.ProgramOptions library: found") - else() - message( - STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}") - endif() - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) + if(Boost_PROGRAM_OPTIONS_FOUND) + target_compile_definitions(Mesh_estimation PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + if(TARGET Boost::filesystem) + target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) + else() + target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + endif() + endif() + create_single_source_cgal_program("Single_estimation.cpp") target_link_libraries(Single_estimation PUBLIC CGAL::Eigen3_support) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index b82b65141c5..914ad661e7f 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -11,19 +11,6 @@ if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - if(TARGET Boost::program_options) - set(Boost_PROGRAM_OPTIONS_LIBRARY Boost::program_options) - endif() - if(Boost_PROGRAM_OPTIONS_FOUND) - if(CGAL_AUTO_LINK_ENABLED) - message(STATUS "Boost.ProgramOptions library: found") - else() - message( - STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}") - endif() - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) @@ -32,6 +19,20 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) + if(Boost_PROGRAM_OPTIONS_FOUND) + target_compile_definitions(Compute_Ridges_Umbilics PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + target_compile_definitions(Ridges_Umbilics_SM PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + target_compile_definitions(Ridges_Umbilics_LCC PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + if(TARGET Boost::filesystem) + target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) + target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) + target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) + else() + target_link_libraries(Compute_Ridges_Umbilics PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(Ridges_Umbilics_SM PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(Ridges_Umbilics_LCC PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + endif() + endif() else() message( diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index fb93da6bdfe..05cfb06b98c 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -20,19 +20,14 @@ create_single_source_cgal_program("Surface_mesh_shortest_path_traits_test.cpp") # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) - if(TARGET Boost::program_options) - set(Boost_PROGRAM_OPTIONS_LIBRARY Boost::program_options) - endif() - if(CGAL_AUTO_LINK_ENABLED) - message(STATUS "Boost.ProgramOptions library: found") - else() - message( - STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}") - endif() - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") + target_compile_definitions(TestMesh PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + if(TARGET Boost::filesystem) + target_link_libraries(TestMesh PRIVATE Boost::program_options) + else() + target_link_libraries(TestMesh PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + endif() else() message( STATUS From 0e39a42f86f38086a29c0979991d44844049de7c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 1 Feb 2021 16:27:41 +0100 Subject: [PATCH 256/317] Fix shader --- Polyhedron/demo/Polyhedron/resources/shader_with_texture.vert | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/resources/shader_with_texture.vert b/Polyhedron/demo/Polyhedron/resources/shader_with_texture.vert index 03e6cd6b3c8..cdcc60f82bd 100644 --- a/Polyhedron/demo/Polyhedron/resources/shader_with_texture.vert +++ b/Polyhedron/demo/Polyhedron/resources/shader_with_texture.vert @@ -25,7 +25,7 @@ void main(void) norm_matrix_3[0] = norm_matrix[0].xyz; norm_matrix_3[1] = norm_matrix[1].xyz; norm_matrix_3[2] = norm_matrix[2].xyz; - fN = norm_matrix_3* normals; + vec3 N = norm_matrix_3* normals; vec3 L = light_pos.xyz - P.xyz; N = normalize(N); L = normalize(L); From 0e0c536c025dcd91977c2ee0cb64a1d4fdc0361c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 20:42:37 +0100 Subject: [PATCH 257/317] Do not test is_valid(): a moved-from triangulation is not valid A moved-from triangulation do not have the infinite vertex, and it is of dimension -2. That is a valid TDS, but not a valid CGAL triangulation. --- .../test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h | 3 +-- .../test/Triangulation_3/include/CGAL/_test_cls_regular_3.h | 3 +-- .../Triangulation_3/include/CGAL/_test_cls_triangulation_3.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 471e3791fd4..9f9bea50e27 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -432,8 +432,7 @@ _test_cls_delaunay_3(const Triangulation &) assert(T_move_constructed.number_of_vertices() == 4); assert(T_move_constructed.is_valid()); assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() == -1); - assert(T_copy.is_valid()); + assert(T_copy.number_of_vertices() + 1 == 0); } // Affectation : diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index 1da16d061c7..f7f195ee29d 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -214,7 +214,6 @@ _test_cls_regular_3(const Triangulation &) Triangulation T_move_constructed(std::move(T_copy)); assert(T_move_constructed == T); assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() == -1); - assert(T_copy.is_valid()); + assert(T_copy.number_of_vertices() + 1 == 0); } } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index ca8b84ac193..1737aff8a4a 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -297,8 +297,7 @@ _test_cls_triangulation_3(const Triangulation &) assert(T_move_constructed.number_of_vertices() == 4); assert(T_move_constructed.is_valid()); assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() == -1); - assert(T_copy.is_valid()); + assert(T_copy.number_of_vertices() + 1 == 0); } // Assignment From 3b0cea9a47a81d8d1dc9637fa350a0426756c34f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 20:43:42 +0100 Subject: [PATCH 258/317] Check that clear() can be called on a moved-from triangulation --- .../test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h | 5 +++++ .../test/Triangulation_3/include/CGAL/_test_cls_regular_3.h | 5 +++++ .../Triangulation_3/include/CGAL/_test_cls_triangulation_3.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 9f9bea50e27..db27d607d10 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -433,6 +433,11 @@ _test_cls_delaunay_3(const Triangulation &) assert(T_move_constructed.is_valid()); assert(T_copy.dimension() == -2); assert(T_copy.number_of_vertices() + 1 == 0); + + Cls T_copy2(T0); + Cls T_move_constructed2(std::move(T_copy2)); + T_copy2.clear(); + assert(T_copy2 == Cls()); } // Affectation : diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index f7f195ee29d..040e243e673 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -215,5 +215,10 @@ _test_cls_regular_3(const Triangulation &) assert(T_move_constructed == T); assert(T_copy.dimension() == -2); assert(T_copy.number_of_vertices() + 1 == 0); + + Cls T_copy2(T); + Cls T_move_constructed2(std::move(T_copy2)); + T_copy2.clear(); + assert(T_copy2 == Cls()); } } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index 1737aff8a4a..d24115cc7bc 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -298,6 +298,11 @@ _test_cls_triangulation_3(const Triangulation &) assert(T_move_constructed.is_valid()); assert(T_copy.dimension() == -2); assert(T_copy.number_of_vertices() + 1 == 0); + + Cls T_copy2(T0); + Cls T_move_constructed2(std::move(T_copy2)); + T_copy2.clear(); + assert(T_copy2 == Cls()); } // Assignment From fe99ad3a2fd310f50163522c2fb97e9708c9322f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 21:06:47 +0100 Subject: [PATCH 259/317] Check that a moved-from triangulation can be assigned --- .../test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h | 5 +++++ .../test/Triangulation_3/include/CGAL/_test_cls_regular_3.h | 5 +++++ .../Triangulation_3/include/CGAL/_test_cls_triangulation_3.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index db27d607d10..0e5ded48030 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -438,6 +438,11 @@ _test_cls_delaunay_3(const Triangulation &) Cls T_move_constructed2(std::move(T_copy2)); T_copy2.clear(); assert(T_copy2 == Cls()); + + Cls T_copy3(T0); + Cls T_move_constructed3(std::move(T_copy3)); + T_copy3 = T0; + assert(T_copy3 == T0); } // Affectation : diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index 040e243e673..2100ec9d03b 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -220,5 +220,10 @@ _test_cls_regular_3(const Triangulation &) Cls T_move_constructed2(std::move(T_copy2)); T_copy2.clear(); assert(T_copy2 == Cls()); + + Cls T_copy3(T); + Cls T_move_constructed3(std::move(T_copy3)); + T_copy3 = T; + assert(T_copy3 == T); } } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index d24115cc7bc..fcda1f921b0 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -303,6 +303,11 @@ _test_cls_triangulation_3(const Triangulation &) Cls T_move_constructed2(std::move(T_copy2)); T_copy2.clear(); assert(T_copy2 == Cls()); + + Cls T_copy3(T0); + Cls T_move_constructed3(std::move(T_copy3)); + T_copy3 = T0; + assert(T_copy3 == T0); } // Assignment From de8bf2fd87ed41346cc468c8204c734e005f2d44 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 23:17:21 +0100 Subject: [PATCH 260/317] Fix Triangulation_hierarchy_3::operator=(Triangulation_hierarchy_3&&) --- Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index ad0f1e61fef..e55b8eab5b3 100644 --- a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -157,8 +157,7 @@ public: noexcept( noexcept(Triangulation_hierarchy_3(std::move(other))) ) { static_cast(*this) = std::move(other); - hierarchy_triangulations = std::move(hierarchy_triangulations); - init_hierarchy(); + hierarchy_triangulations = std::move(other.hierarchy_triangulations); return *this; } From f14ab371ae320732c1aad9b02436767fb4f4987a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 1 Feb 2021 23:17:46 +0100 Subject: [PATCH 261/317] Test move-assignments --- .../include/CGAL/_test_cls_delaunay_3.h | 12 ++++++++++++ .../include/CGAL/_test_cls_regular_3.h | 11 +++++++++++ .../include/CGAL/_test_cls_triangulation_3.h | 12 ++++++++++++ 3 files changed, 35 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 0e5ded48030..1dfd828dd04 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -444,6 +444,18 @@ _test_cls_delaunay_3(const Triangulation &) T_copy3 = T0; assert(T_copy3 == T0); } + // move-assignment + { + Cls T_copy4(T0); + Cls T_move_assigned; + T_move_assigned = std::move(T_copy4); + assert(T_copy4.dimension() == -2); + assert(T_copy4.number_of_vertices() + 1 == 0); + assert(T_move_assigned.dimension() == 3); + assert(T_move_assigned.number_of_vertices() == 4); + assert(T_move_assigned.is_valid()); + assert(T_move_assigned == T0); + } // Affectation : T1=T0; diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index 2100ec9d03b..43d397d14fe 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -226,4 +226,15 @@ _test_cls_regular_3(const Triangulation &) T_copy3 = T; assert(T_copy3 == T); } + // move-assignment + { + Cls T_copy4(T); + Cls T_move_assigned; + T_move_assigned = std::move(T_copy4); + assert(T_copy4.dimension() == -2); + assert(T_copy4.number_of_vertices() + 1 == 0); + assert(T_move_assigned.dimension() == 3); + assert(T_move_assigned.is_valid()); + assert(T_move_assigned == T); + } } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index fcda1f921b0..c903a39ed16 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -309,6 +309,18 @@ _test_cls_triangulation_3(const Triangulation &) T_copy3 = T0; assert(T_copy3 == T0); } + // move-assignment + { + Cls T_copy4(T0); + Cls T_move_assigned; + T_move_assigned = std::move(T_copy4); + assert(T_copy4.dimension() == -2); + assert(T_copy4.number_of_vertices() + 1 == 0); + assert(T_move_assigned.dimension() == 3); + assert(T_move_assigned.number_of_vertices() == 4); + assert(T_move_assigned.is_valid()); + assert(T_move_assigned == T0); + } // Assignment T1=T0; From e87432f257ba49c5591e6820c42b9738324f235c Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Tue, 2 Feb 2021 08:14:32 +0000 Subject: [PATCH 262/317] Use std:next for is_triangle_3 in normal vector newell Co-authored-by: Sebastien Loriot --- Nef_3/include/CGAL/normal_vector_newell_3.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Nef_3/include/CGAL/normal_vector_newell_3.h b/Nef_3/include/CGAL/normal_vector_newell_3.h index 2735532899a..95810d73e7e 100644 --- a/Nef_3/include/CGAL/normal_vector_newell_3.h +++ b/Nef_3/include/CGAL/normal_vector_newell_3.h @@ -95,9 +95,7 @@ void newell_single_step_3( const Handle& p, const Handle& q, Vector& n, const Ca template bool is_triangle_3( const IC& first ) { - IC last(first); - ++last; ++last; ++last; - return first==last; + return std::next(first,3) == first; } } From 1f7b43d1417601be5bbf42fabd2f0e81418c8b30 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 2 Feb 2021 09:16:35 +0100 Subject: [PATCH 263/317] Don't build the programs if boost_program_options is not found --- .../examples/Jet_fitting_3/CMakeLists.txt | 8 ++++-- .../Jet_fitting_3/Mesh_estimation.cpp | 2 -- Ridges_3/examples/Ridges_3/CMakeLists.txt | 25 +++++++++---------- .../Ridges_3/Compute_Ridges_Umbilics.cpp | 6 +---- .../examples/Ridges_3/Ridges_Umbilics_LCC.cpp | 2 -- .../examples/Ridges_3/Ridges_Umbilics_SM.cpp | 2 -- .../Surface_mesh_shortest_path/CMakeLists.txt | 1 - .../Surface_mesh_shortest_path/TestMesh.cpp | 12 --------- 8 files changed, 19 insertions(+), 39 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index afc0c1a9c4d..3e5ffb5b93b 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -14,14 +14,18 @@ if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET COMPONENTS program_options) create_single_source_cgal_program("Mesh_estimation.cpp") - target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) if(Boost_PROGRAM_OPTIONS_FOUND) - target_compile_definitions(Mesh_estimation PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") + target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) if(TARGET Boost::filesystem) target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) else() target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() + else() + message( + STATUS + "NOTICE: This program requires Boost Program Options and will not be compiled." + ) endif() create_single_source_cgal_program("Single_estimation.cpp") diff --git a/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp b/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp index 207fee3c121..0945986b171 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp +++ b/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp @@ -6,10 +6,8 @@ #include -#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; -#endif using namespace std; diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 914ad661e7f..0ea9b19d09c 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -12,18 +12,14 @@ if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) - target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program(Ridges_Umbilics_SM.cpp) - target_link_libraries(Ridges_Umbilics_SM PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) - target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) - if(Boost_PROGRAM_OPTIONS_FOUND) - target_compile_definitions(Compute_Ridges_Umbilics PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") - target_compile_definitions(Ridges_Umbilics_SM PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") - target_compile_definitions(Ridges_Umbilics_LCC PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") - if(TARGET Boost::filesystem) + create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) + target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program(Ridges_Umbilics_SM.cpp) + target_link_libraries(Ridges_Umbilics_SM PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) + target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) + if(TARGET Boost::program_options) target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) @@ -32,12 +28,15 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_SM PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) target_link_libraries(Ridges_Umbilics_LCC PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() + else() + message( + STATUS + "NOTICE: This programs require Boost Program Options and will not be compiled." + ) endif() else() - message( STATUS "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." ) - endif() diff --git a/Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics.cpp b/Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics.cpp index 47e014a1102..66516d5e092 100644 --- a/Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics.cpp +++ b/Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics.cpp @@ -9,13 +9,9 @@ #include #include #include - - - -#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include + namespace po = boost::program_options; -#endif typedef PolyhedralSurf::Traits Kernel; diff --git a/Ridges_3/examples/Ridges_3/Ridges_Umbilics_LCC.cpp b/Ridges_3/examples/Ridges_3/Ridges_Umbilics_LCC.cpp index 247a6badd3d..5ce258d2909 100644 --- a/Ridges_3/examples/Ridges_3/Ridges_Umbilics_LCC.cpp +++ b/Ridges_3/examples/Ridges_3/Ridges_Umbilics_LCC.cpp @@ -11,10 +11,8 @@ #include #include -#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; -#endif typedef CGAL::Simple_cartesian Kernel; diff --git a/Ridges_3/examples/Ridges_3/Ridges_Umbilics_SM.cpp b/Ridges_3/examples/Ridges_3/Ridges_Umbilics_SM.cpp index 458d1e8ff5a..b73f19cb409 100644 --- a/Ridges_3/examples/Ridges_3/Ridges_Umbilics_SM.cpp +++ b/Ridges_3/examples/Ridges_3/Ridges_Umbilics_SM.cpp @@ -8,10 +8,8 @@ #include #include -#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; -#endif typedef CGAL::Simple_cartesian Kernel; diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index 05cfb06b98c..235ec1b7ef9 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -22,7 +22,6 @@ find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") - target_compile_definitions(TestMesh PRIVATE "CGAL_USE_BOOST_PROGRAM_OPTIONS") if(TARGET Boost::filesystem) target_link_libraries(TestMesh PRIVATE Boost::program_options) else() diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 95613fdbb30..389cc215f11 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -1,8 +1,5 @@ #include #include - -#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) - #include #include #include @@ -350,12 +347,3 @@ int main(int argc, char** argv) return 0; } - - -#else - int main() - { - std::cout << "TestMesh.cpp needs Boost Program Options" << std::endl; - return 0; - } -#endif From 99d8d94631d4bf5981e0b500b91065118c276327 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 2 Feb 2021 09:36:38 +0100 Subject: [PATCH 264/317] add missing header --- Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index cb8ef7ecc47..402bfb98220 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -21,6 +21,7 @@ #include #include +#include namespace CGAL { From 5da7e84bab6f45664c98ebf5fda240c3737ba24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 2 Feb 2021 10:58:31 +0100 Subject: [PATCH 265/317] decltype(auto) -> auto --- .../include/CGAL/Rectangular_p_center_traits_2.h | 3 +-- STL_Extension/include/CGAL/function_objects.h | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h index 8b2c9e70339..bc93c75bf74 100644 --- a/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h +++ b/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h @@ -291,8 +291,7 @@ bounding_box_2(ForwardIterator f, ForwardIterator l, const Traits& t) } // bounding_box_2(f, l, t) template < class ForwardIterator > inline -//typename std::iterator_traits< ForwardIterator >::value_type::R::Iso_rectangle_2 -decltype(auto) +auto bounding_box_2(ForwardIterator f, ForwardIterator l) // PRE: f != l. { diff --git a/STL_Extension/include/CGAL/function_objects.h b/STL_Extension/include/CGAL/function_objects.h index 11bcf352a00..82709ab1265 100644 --- a/STL_Extension/include/CGAL/function_objects.h +++ b/STL_Extension/include/CGAL/function_objects.h @@ -358,7 +358,7 @@ public: Unary_compose_1(const Op1& x, const Op2& y) : op1(x), op2(y) {} template - decltype(auto) + auto operator()(const argument_type& x) const { return op1(op2(x)); } }; @@ -381,7 +381,7 @@ public: : op1(x), op2(y), op3(z) {} template - decltype(auto) + auto operator()(const argument_type& x) const { return op1(op2(x), op3(x)); } }; @@ -402,7 +402,7 @@ public: Unary_compose_2(const Op1& x, const Op2& y) : op1(x), op2(y) {} template - decltype(auto) + auto operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x, y)); } @@ -440,7 +440,7 @@ public: } template - decltype(auto) + auto operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x), op3(y)); } From 32b31fdc9b0f5066fe65864f1696ffb01cf86e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 2 Feb 2021 11:09:46 +0100 Subject: [PATCH 266/317] use one lambda --- .../gfx/Curve_renderer_internals.h | 7 +++---- .../gfx/Curve_renderer_traits.h | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h index 4ae4f7f0d24..47afb1f2f68 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h @@ -906,10 +906,9 @@ void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly) // } if(not_cached||not_found) { - poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), - std::function([&key1](const Poly_1& poly){ return evaluate(poly, key1); })), - ::boost::make_transform_iterator(coeffs->end(), - std::function([&key1](const Poly_1& poly){ return evaluate(poly, key1); }))); + auto fn = [&key1](const Poly_1& poly){ return evaluate(poly, key1); }; + poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), fn), + ::boost::make_transform_iterator(coeffs->end(), fn)); if(not_cached) return; // all available space consumed: drop the least recently used entry diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index 41a884f52a1..56595cd3835 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -109,9 +109,10 @@ struct Transform { typedef typename InputPoly_2::NT NT_in; typedef typename OutputPoly_2::NT NT_out; Transform tr; + auto fn = [&op, &tr](const NT_in& v){ return tr(v, op); }; return OutputPoly_2( - ::boost::make_transform_iterator(p.begin(), std::function([&op, &tr](const NT_in& v){ return tr(v, op); })), - ::boost::make_transform_iterator(p.end(), std::function([&op, &tr](const NT_in& v){ return tr(v, op); }))); + ::boost::make_transform_iterator(p.begin(), fn), + ::boost::make_transform_iterator(p.end(), fn)); } OutputPoly_2 operator()( From d678d0fc922d0d8e3acec61ef23c4ce5e3984152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 2 Feb 2021 11:12:16 +0100 Subject: [PATCH 267/317] include right header --- Bounding_volumes/include/CGAL/min_quadrilateral_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h index 5072dce39ed..dfa0eb1e30c 100644 --- a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h +++ b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #ifdef CGAL_OPTIMISATION_EXPENSIVE_PRECONDITION_TAG #include From 27360a0362aace88986884fc7dd1637509657ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 2 Feb 2021 13:36:45 +0100 Subject: [PATCH 268/317] remove std::function --- Bounding_volumes/include/CGAL/Min_annulus_d.h | 3 +- .../include/CGAL/rectangular_3_center_2.h | 32 +++++++------------ 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Min_annulus_d.h b/Bounding_volumes/include/CGAL/Min_annulus_d.h index 0bf6532dbd0..0be72c1b427 100644 --- a/Bounding_volumes/include/CGAL/Min_annulus_d.h +++ b/Bounding_volumes/include/CGAL/Min_annulus_d.h @@ -32,9 +32,10 @@ #include #include #include -#include #include +#include + // here is how it works. We have d+2 variables: // R (big radius), r (small radius), c (center). The problem is // diff --git a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h index c119e8118de..cd3a1f14bee 100644 --- a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h +++ b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h @@ -49,7 +49,6 @@ rectangular_2_center_2( P_below_right; typedef typename Traits::Construct_point_2_below_left_implicit_point_2 P_below_left; - typedef std::function Gamma; // fetch function objects from traits class CVertex v = t.construct_vertex_2_object(); @@ -68,9 +67,9 @@ rectangular_2_center_2( // two cases: top-left & bottom-right or top-right & bottom-left Min< FT > minft; - Gamma gamma1 = + auto gamma1 = [&minft, &bb, &dist, &v](const Point& p){ return minft(dist( v(bb, 0), p), dist(v(bb, 2),p));}; - Gamma gamma2 = + auto gamma2 = [&minft, &bb, &dist, &v](const Point& p){ return minft(dist( v(bb, 1), p), dist(v(bb, 3),p));}; pair< ForwardIterator, ForwardIterator > cand = @@ -117,7 +116,6 @@ rectangular_3_center_2_type1( P_below_right; typedef typename Traits::Construct_point_2_below_left_implicit_point_2 P_below_left; - typedef std::function Gamma; // fetch function objects from traits class Rect rect = t.construct_iso_rectangle_2_object(); @@ -151,7 +149,7 @@ rectangular_3_center_2_type1( RandomAccessIterator e = l; bool b_empty = true; Min< FT > minft; - Gamma gamma = [&minft, &dist, &v, &r, i](const Point& p) + auto gamma = [&minft, &dist, &v, &r, i](const Point& p) { return minft(dist(v(r, i), p), dist(v(r, 2 + i), p)); }; while (e - s > 1) { @@ -895,7 +893,7 @@ rectangular_3_center_2_type2( op.place_y_square(op.place_y_square(Q_r_empty, Q_r, *pos.second, r), r, rad); - std::function le_rad = [&rad](const FT& v){return rad >= v;}; + auto le_rad = [&rad](const FT& v){return rad >= v;}; RandomAccessIterator b1 = partition(m, l, [&le_rad, &op, q_t](const Point& p){ return le_rad(op.distance()(q_t, p)); }); RandomAccessIterator b2 = @@ -924,8 +922,7 @@ rectangular_3_center_2_type2( Point q_r = op.place_y_square(q_r_afap, r, op.delta()(*m)); // check for covering - std::function - le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; + auto le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; RandomAccessIterator b1 = partition(m + 1, e, [&le_delta_m, &op, & q_t](const Point& p){ return le_delta_m(op.distance()(q_t, p)); }); RandomAccessIterator b2 = @@ -995,8 +992,7 @@ rectangular_3_center_2_type2( // partition the range [m+1, e) into ranges // [m+1, b1), [b1, b2), [b2, b3) and [b3, e) // R G cap q_t G cap q_r none - std::function - le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; + auto le_delta_m = [&op, m](const FT& v){ return op.delta()(*m) >= v; }; RandomAccessIterator b2 = partition(m + 1, e, [&le_delta_m, &op, &q_t](const Point& p) { return le_delta_m(op.distance()(q_t, p)); }); @@ -1126,8 +1122,7 @@ CGAL_3CENTER_REPEAT_CHECK: // partition the range [s_b+1, e) into ranges // [s_b+1, b1), [b1, b2), [b2, b3) and [b3, e) // R G cap q_t G cap q_r none - std::function - le_delta_sb = [&op, s_b](const FT& v){ return op.delta()(*s_b) >= v;} ; + auto le_delta_sb = [&op, s_b](const FT& v){ return op.delta()(*s_b) >= v;} ; b2 = partition(s_b + 1, e, [&le_delta_sb, &op, &q_t](const Point& p) @@ -1231,8 +1226,7 @@ CGAL_3CENTER_REPEAT_CHECK: q_r = op.place_y_square(q_r_afap, r, op.delta()(*next)); // again check for covering - std::function - le_delta_next = [&op, next](const FT& v){ return op.delta()(*next) >= v; }; + auto le_delta_next = [&op, next](const FT& v){ return op.delta()(*next) >= v; }; b2 = partition(s_b, e, [&op, &le_delta_next, &q_t](const Point& p){ return le_delta_next( op.distance()(q_t,p) ); }); b1 = partition(s_b, b2, @@ -1335,8 +1329,7 @@ CGAL_3CENTER_REPEAT_CHECK: q_r = op.place_y_square(q_r_afap, r, try_rho); // check for covering - std::function - greater_rho_max = [&try_rho](const FT& v){ return try_rho < v; }; + auto greater_rho_max = [&try_rho](const FT& v){ return try_rho < v; }; if ((!Q_t_empty && op.compute_x_distance(q_t, Q_t) > try_rho) || (!Q_r_empty && op.compute_y_distance(q_r, Q_r) > try_rho) || e != find_if( @@ -1381,10 +1374,9 @@ CGAL_3CENTER_REPEAT_CHECK: CGAL_optimisation_assertion(rho_min >= 0); FT rad_2 = q_t_q_r_cover_at_rho_min; if (s_at_rho_min != e_at_rho_min) { - std::function - mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p) - { return Min()( op.distance()(q_t_at_rho_min, p), - op.distance()(q_r_at_rho_min, p)); }; + auto mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p) + { return Min()( op.distance()(q_t_at_rho_min, p), + op.distance()(q_r_at_rho_min, p)); }; rad_2 = max BOOST_PREVENT_MACRO_SUBSTITUTION ( rad_2, From 98ffbba6485bee3f92a0b7f6197534adf0b45b7b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 2 Feb 2021 14:55:50 +0100 Subject: [PATCH 269/317] Fix warning --- BGL/test/BGL/test_bgl_read_write.cpp | 42 +++++++++---------- .../pmp_compute_normals_test.cpp | 4 +- .../test_is_polygon_soup_a_polygon_mesh.cpp | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/BGL/test/BGL/test_bgl_read_write.cpp b/BGL/test/BGL/test_bgl_read_write.cpp index de6fd4918bb..5be2d9e33e9 100644 --- a/BGL/test/BGL/test_bgl_read_write.cpp +++ b/BGL/test/BGL/test_bgl_read_write.cpp @@ -171,10 +171,10 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(num_vertices(fg) == 8 && num_faces(fg) == 4); - for(const auto v : vertices(fg)) + for(auto v : vertices(fg)) assert(get(vcm, v) != CGAL::Color()); - for(const auto f : faces(fg)) + for(auto f : faces(fg)) assert(get(fcm, f) != CGAL::Color()); // write with OFF @@ -192,10 +192,10 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) assert(get(vcm2, v) != CGAL::Color()); - for(const auto f : faces(fg2)) + for(auto f : faces(fg2)) assert(get(fcm2, f) != CGAL::Color()); } @@ -211,7 +211,7 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) assert(get(vcm2, v) != CGAL::Color()); } } @@ -224,7 +224,7 @@ void test_bgl_OFF(const char* filename) ok = CGAL::read_OFF("data/mesh_with_normals.off", fg, CGAL::parameters::vertex_normal_map(vnm)); assert(ok); - for(const auto v : vertices(fg)) + for(auto v : vertices(fg)) assert(get(vnm, v) != CGAL::NULL_VECTOR); // write with OFF @@ -240,7 +240,7 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) assert(get(vnm2, v) != CGAL::NULL_VECTOR); } @@ -256,7 +256,7 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) assert(get(vnm2, v) != CGAL::NULL_VECTOR); } } @@ -278,13 +278,13 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(num_vertices(fg) != 0 && num_faces(fg) != 0); - for(const auto v : vertices(fg)) + for(auto v : vertices(fg)) { assert(get(vnm2, v) != CGAL::NULL_VECTOR); assert(get(vcm2, v) != CGAL::Color()); } - for(const auto f : faces(fg)) + for(auto f : faces(fg)) assert(get(fcm2, f) != CGAL::Color()); fg.clear(); is.close(); @@ -301,7 +301,7 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(num_vertices(fg) != 0 && num_faces(fg) != 0); - for(const auto v : vertices(fg)) + for(auto v : vertices(fg)) { assert(get(vnm, v) != CGAL::NULL_VECTOR); assert(get(vcm, v) != CGAL::Color()); @@ -328,13 +328,13 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) { assert(get(vnm2, v) != CGAL::NULL_VECTOR); assert(get(vcm2, v) != CGAL::Color()); } - for(const auto f : faces(fg2)) + for(auto f : faces(fg2)) assert(get(fcm2, f) != CGAL::Color()); } @@ -359,13 +359,13 @@ void test_bgl_OFF(const char* filename) assert(ok); assert(are_equal_meshes(fg, fg2)); - for(const auto v : vertices(fg2)) + for(auto v : vertices(fg2)) { assert(get(vnm2, v) != CGAL::NULL_VECTOR); assert(get(vcm2, v) != CGAL::Color()); } - for(const auto f : faces(fg2)) + for(auto f : faces(fg2)) assert(get(fcm2, f) != CGAL::Color()); } } @@ -526,12 +526,12 @@ void test_bgl_PLY(const std::string filename, assert(ok); assert(num_vertices(fg) == 4 && num_faces(fg) == 4); - for(const auto v : vertices(fg)) + for(auto v : vertices(fg)) { assert(get(vcm, v) != CGAL::Color()); } - for(const auto f : faces(fg)) + for(auto f : faces(fg)) assert(get(fcm, f) != CGAL::Color()); // write with PLY @@ -561,10 +561,10 @@ void test_bgl_PLY(const std::string filename, assert(are_equal_meshes(fg, fg2)); // @tmp -// for(const auto v : vertices(fg2)) +// for(auto v : vertices(fg2)) // assert(get(vcm2, v) != CGAL::Color()); -// for(const auto f : faces(fg2)) +// for(auto f : faces(fg2)) // assert(get(fcm2, f) != CGAL::Color()); } @@ -586,10 +586,10 @@ void test_bgl_PLY(const std::string filename, assert(are_equal_meshes(fg, fg2)); // @tmp -// for(const auto v : vertices(fg2)) +// for(auto v : vertices(fg2)) // assert(get(vcm2, v) != CGAL::Color()); -// for(const auto f : faces(fg2)) +// for(auto f : faces(fg2)) // assert(get(fcm2, f) != CGAL::Color()); } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp index a243df48db2..311b483fd38 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp @@ -93,7 +93,7 @@ void test(const Mesh& mesh, #endif // Check sanity of output - for(const face_descriptor f : faces(mesh)) + for(face_descriptor f : faces(mesh)) { // tests on non triangular meshes are @todo if(CGAL::is_triangle(halfedge(f, mesh), mesh)) @@ -105,7 +105,7 @@ void test(const Mesh& mesh, } } - for(const vertex_descriptor v : vertices(mesh)) + for(vertex_descriptor v : vertices(mesh)) { if(get(vnormals, v) == CGAL::NULL_VECTOR) { diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp index 7fca90f43ec..c6e889e008f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp @@ -75,7 +75,7 @@ void test_polygon_soup(std::string fname, bool expected) assert(!CGAL::is_empty(p) && CGAL::is_valid_polygon_mesh(p)); std::set ppts; - for(const vertex_descriptor v : vertices(p)) + for( vertex_descriptor v : vertices(p)) ppts.insert(get(vpm, v)); assert(ppts.size() == num_vertices(p)); From e6fe1c203191fe76c10acb6fda8dd881d880d1e9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 2 Feb 2021 20:52:49 +0100 Subject: [PATCH 270/317] Add the testcase from issue #5396 --- .../include/CGAL/_test_cls_delaunay_3.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 1dfd828dd04..d8cf1d38e7e 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -1228,6 +1228,18 @@ _test_cls_delaunay_3(const Triangulation &) _test_remove_cluster(); } + // Test from issue https://github.com/CGAL/cgal/issues/5396 + { + auto Triangulate = []() -> Triangulation + { + Triangulation tri; + for (int i=0; i<10; i++) + tri.insert(Point(i+1, i+2, i+3)); + + return std::move(tri); // the move prevents the NRVO + }; + Triangulation t = Triangulate(); + } } #endif // CGAL_TEST_CLS_DELAUNAY_C From 7f537a19cb2f3b05d6cdf7696e0b2ac1b22e3442 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 3 Feb 2021 08:59:54 +0100 Subject: [PATCH 271/317] add missing headers --- Stream_support/include/CGAL/IO/OBJ.h | 1 + Stream_support/include/CGAL/IO/OI/Inventor_ostream.h | 1 + 2 files changed, 2 insertions(+) diff --git a/Stream_support/include/CGAL/IO/OBJ.h b/Stream_support/include/CGAL/IO/OBJ.h index 8e472d0657a..701233fb3ac 100644 --- a/Stream_support/include/CGAL/IO/OBJ.h +++ b/Stream_support/include/CGAL/IO/OBJ.h @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 20f4f5d25c0..4d0d1e41e65 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -21,6 +21,7 @@ #include #include +#include // OpenInventor and VRML 1.0 are quite similar formats, so // output operators could be shared if they use the following From 38275753ca6a537e3a69a05588e647629a051e84 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 3 Feb 2021 10:03:42 +0000 Subject: [PATCH 272/317] Remove typedef .., argument_type --- Matrix_search/include/CGAL/Transform_iterator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Matrix_search/include/CGAL/Transform_iterator.h b/Matrix_search/include/CGAL/Transform_iterator.h index 4797271123d..f60718c64c0 100644 --- a/Matrix_search/include/CGAL/Transform_iterator.h +++ b/Matrix_search/include/CGAL/Transform_iterator.h @@ -34,7 +34,7 @@ struct Transform_iterator { typedef std::_Unchecked_iterator_tag _Checked_iterator_category; typedef std::output_iterator_tag iterator_category; typedef Transform_iterator< OutputIterator, Operation > self; - typedef typename Operation::argument_type argument_type; +// typedef typename Operation::argument_type argument_type; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::value_type value_type; @@ -54,6 +54,7 @@ struct Transform_iterator { self& operator++( int) { return *this; } + template self& operator=( const argument_type& a) { *(o_++) = op_( a); return *this; From 4b472db95ea8301c2067b7761dbe7fac163226f4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 3 Feb 2021 10:57:36 +0000 Subject: [PATCH 273/317] cleanup --- Matrix_search/include/CGAL/Transform_iterator.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Matrix_search/include/CGAL/Transform_iterator.h b/Matrix_search/include/CGAL/Transform_iterator.h index f60718c64c0..c3ab6e8c437 100644 --- a/Matrix_search/include/CGAL/Transform_iterator.h +++ b/Matrix_search/include/CGAL/Transform_iterator.h @@ -34,7 +34,6 @@ struct Transform_iterator { typedef std::_Unchecked_iterator_tag _Checked_iterator_category; typedef std::output_iterator_tag iterator_category; typedef Transform_iterator< OutputIterator, Operation > self; -// typedef typename Operation::argument_type argument_type; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::value_type value_type; From 22724728e700673f3de690e8d73acc1b931ab2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Feb 2021 12:48:50 +0100 Subject: [PATCH 274/317] do not emit warning as hole filling can fail --- .../Hole_filling/Triangulate_hole_polyline.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 2fc28eec9a6..10eae8a9956 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -782,11 +782,13 @@ public: std::pair range(0, n-1); boost::tuple, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist); if(!res.template get<2>()) { +#ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE CGAL_warning_msg(false, "Returning no output. Dimension of 3D Triangulation is below 2!"); #else std::cerr << "W: Returning no output. Dimension of 3D Triangulation is below 2!\n"; #endif +#endif return Weight::NOT_VALID(); } @@ -806,11 +808,13 @@ public: } if(W.get(0, n-1) == Weight::NOT_VALID()) { +#ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE CGAL_warning_msg(false, "Returning no output. No possible triangulation is found!"); #else std::cerr << "W: Returning no output. No possible triangulation is found!\n"; #endif +#endif return Weight::NOT_VALID(); } @@ -1002,7 +1006,9 @@ private: Triangulate_hole_polyline all_space; all_space.triangulate_all(P, Q, WC, std::make_pair(h.first, h.second), W, lambda); if(W.get(h.first, h.second) == Weight::NOT_VALID()) { +#ifdef CGAL_HOLE_FILLING_VERBOSE CGAL_warning_msg(false, "Returning no output. Filling hole with incomplete patches is not successful!"); +#endif return Weight::NOT_VALID(); } } @@ -1023,7 +1029,9 @@ private: Triangulate_hole_polyline all_space; all_space.triangulate_all(P, Q, WC, std::make_pair(h.first, h.second), W, lambda); if(W.get(h.first, h.second) == Weight::NOT_VALID()) { +#ifdef CGAL_HOLE_FILLING_VERBOSE CGAL_warning_msg(false, "Returning no output. Filling hole with incomplete patches is not successful!"); +#endif return Weight::NOT_VALID(); } } @@ -1038,7 +1046,9 @@ private: tr.clear(); boost::tuple, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist); if(!boost::get<0>(res)) { +#ifdef CGAL_HOLE_FILLING_VERBOSE CGAL_warning_msg(false, "Returning no output. Filling hole with incomplete patches is not successful!"); +#endif return Weight::NOT_VALID(); } start_edge = *boost::get<0>(res); @@ -1098,12 +1108,14 @@ private: (P, Q, W, lambda, e_start, edge_graph, WC, false); if(W.get(0, n-1) == Weight::NOT_VALID()) { +#ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE CGAL_warning_msg(false, "Returning no output using Delaunay triangulation.\n Falling back to the general Triangulation framework."); #else std::cerr << "W: Returning no output using Delaunay triangulation.\n" << "Falling back to the general Triangulation framework.\n"; #endif +#endif return Weight::NOT_VALID(); } @@ -1144,11 +1156,13 @@ public: triangulate_all(P, Q, WC, std::make_pair(0,n-1), W, lambda); if(W.get(0,n-1) == Weight::NOT_VALID() || n <= 2) { +#ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE CGAL_warning_msg(false, "Returning no output. No possible triangulation is found!"); #else std::cerr << "W: Returning no output. No possible triangulation is found!\n"; #endif +#endif return Weight::NOT_VALID(); } From df50c4cd0a46ca06269c34f61b4944d301a872a9 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 3 Feb 2021 14:30:21 +0100 Subject: [PATCH 275/317] replace WARNING: with NOTE: to avoid confusing the testsuite --- Stream_support/include/CGAL/IO/OBJ.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Stream_support/include/CGAL/IO/OBJ.h b/Stream_support/include/CGAL/IO/OBJ.h index 701233fb3ac..b51c725e7c1 100644 --- a/Stream_support/include/CGAL/IO/OBJ.h +++ b/Stream_support/include/CGAL/IO/OBJ.h @@ -159,9 +159,9 @@ bool read_OBJ(std::istream& is, } if(norm_found && verbose) - std::cout<<"WARNING: normals were found in this file, but were discarded."< Date: Wed, 3 Feb 2021 15:40:58 +0100 Subject: [PATCH 276/317] Fix test psp --- .../Point_set_processing_3/test_deprecated_io_point_set.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp index 1327b5854ce..6c1be92bcc1 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp @@ -54,7 +54,7 @@ struct GetBlueMap{ }; unsigned short get(const GetBlueMap&, const PointWithColor& p) { - return p.second[3]; + return p.second[2]; } struct GetAlphaMap{ @@ -65,7 +65,7 @@ struct GetAlphaMap{ }; unsigned short get(const GetAlphaMap&, const PointWithColor& p) { - return p.second[4]; + return p.second[3]; } int main() From cbc73a8fc4abf1a80cbf3961f3f3791d61cb1f5a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 3 Feb 2021 12:47:33 +0100 Subject: [PATCH 277/317] Add the testsuite for Triangulation_2, factorize it with T_3 I have added the file `Testsuite/include/CGAL/Testsuite/Triangulation_23/test_move_semantic.h` so that is can be reused in the tests for `Triangulation_2` and `Triangulation_3`. So far, the tests in `test_delaunay_hierarchy_2.cpp` fail... --- .../Triangulation_23/test_move_semantic.h | 69 +++++++++++++++++++ .../CGAL/_test_cls_triangulation_short_2.h | 10 +++ .../include/CGAL/_test_cls_delaunay_3.h | 43 +++--------- .../include/CGAL/_test_cls_regular_3.h | 35 ++-------- .../include/CGAL/_test_cls_triangulation_3.h | 44 +++--------- 5 files changed, 100 insertions(+), 101 deletions(-) create mode 100644 Testsuite/include/CGAL/Testsuite/Triangulation_23/test_move_semantic.h diff --git a/Testsuite/include/CGAL/Testsuite/Triangulation_23/test_move_semantic.h b/Testsuite/include/CGAL/Testsuite/Triangulation_23/test_move_semantic.h new file mode 100644 index 00000000000..3254fb6571f --- /dev/null +++ b/Testsuite/include/CGAL/Testsuite/Triangulation_23/test_move_semantic.h @@ -0,0 +1,69 @@ +// Copyright (c) 2021 GeometryFactory Sarl (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) : Laurent Rineau +// + + +#include + +namespace CGAL { + namespace Testsuite { + namespace Triangulation_23 { + template + void test_move_semantic(Tr source_tr) { + const auto dimension = source_tr.dimension(); + const auto nb_of_vertices = source_tr.number_of_vertices(); + auto check_triangulation_validity = [&](const Tr& tr) { + assert(tr.is_valid()); + assert(tr.number_of_vertices() == nb_of_vertices); + assert(tr.dimension() == dimension); + }; + auto check_moved_from_triangulation = [](const Tr& tr_copy) { + assert(tr_copy.dimension() == -2); + assert(tr_copy.number_of_vertices() + 1 == 0); + }; + auto check_empty_triangulation = [](const Tr& tr_copy2) { + assert(tr_copy2.dimension() == -1); + assert(tr_copy2.number_of_vertices() == 0); + }; + // move constructor + { + Tr tr_copy(source_tr); + check_triangulation_validity(tr_copy); + + Tr tr_move_constructed(std::move(tr_copy)); + check_triangulation_validity(tr_move_constructed); + check_moved_from_triangulation(tr_copy); + + Tr tr_copy2(source_tr); + Tr tr_move_constructed2(std::move(tr_copy2)); + check_moved_from_triangulation(tr_copy2); + tr_copy2.clear(); + check_empty_triangulation(tr_copy2); + + Tr tr_copy3(source_tr); + Tr tr_move_constructed3(std::move(tr_copy3)); + check_moved_from_triangulation(tr_copy3); + tr_copy3 = source_tr; + check_triangulation_validity(tr_copy3); + } + // move-assignment + { + Tr tr_copy4(source_tr); + Tr tr_move_assigned; + tr_move_assigned = std::move(tr_copy4); + check_triangulation_validity(tr_move_assigned); + check_moved_from_triangulation(tr_copy4); + } + }; + } + } +} diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_short_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_short_2.h index d34268631cf..249b1d9e115 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_short_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_short_2.h @@ -31,6 +31,7 @@ #include #include #include +#include template @@ -281,6 +282,15 @@ _test_cls_triangulation_short_2( const Triangul &) assert( T2_3_4.number_of_vertices() == 11 ); assert( T2_3_4.is_valid() ); + /****************************/ + /******* MOVE SEMANTIC*******/ + + std::cout << " move constructors and move assignment" << std::endl; + namespace test_tr_23 = CGAL::Testsuite::Triangulation_23; + test_tr_23::test_move_semantic(T0_1); + test_tr_23::test_move_semantic(T1_5); + test_tr_23::test_move_semantic(T2_8); + test_tr_23::test_move_semantic(T2_3); /*********************************************/ /****** FINITE/INFINITE VERTICES/FACES *******/ diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index d8cf1d38e7e..307db51472a 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -31,6 +31,7 @@ #include #include #include +#include // Accessory set of functions to differentiate between // Delaunay::nearest_vertex[_in_cell] and @@ -421,41 +422,8 @@ _test_cls_delaunay_3(const Triangulation &) assert(T1.number_of_vertices() == 0); assert(T1.is_valid()); - // move constructor - { - Cls T_copy(T0); - assert(T_copy.dimension() == 3); - assert(T_copy.number_of_vertices() == 4); - assert(T_copy.is_valid()); - Cls T_move_constructed(std::move(T_copy)); - assert(T_move_constructed.dimension() == 3); - assert(T_move_constructed.number_of_vertices() == 4); - assert(T_move_constructed.is_valid()); - assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() + 1 == 0); - - Cls T_copy2(T0); - Cls T_move_constructed2(std::move(T_copy2)); - T_copy2.clear(); - assert(T_copy2 == Cls()); - - Cls T_copy3(T0); - Cls T_move_constructed3(std::move(T_copy3)); - T_copy3 = T0; - assert(T_copy3 == T0); - } - // move-assignment - { - Cls T_copy4(T0); - Cls T_move_assigned; - T_move_assigned = std::move(T_copy4); - assert(T_copy4.dimension() == -2); - assert(T_copy4.number_of_vertices() + 1 == 0); - assert(T_move_assigned.dimension() == 3); - assert(T_move_assigned.number_of_vertices() == 4); - assert(T_move_assigned.is_valid()); - assert(T_move_assigned == T0); - } + namespace test_tr_23 = CGAL::Testsuite::Triangulation_23; + test_tr_23::test_move_semantic(T0); // Affectation : T1=T0; @@ -488,6 +456,7 @@ _test_cls_delaunay_3(const Triangulation &) assert(T1_0.dimension()==1); assert(T1_0.number_of_vertices()==n); assert(T1_0.is_valid()); + test_tr_23::test_move_semantic(T1_0); std::cout << " Constructor7 " << std::endl; Cls T1_1; n = T1_1.insert(l2.begin(),l2.end()); @@ -548,6 +517,8 @@ _test_cls_delaunay_3(const Triangulation &) assert(T2_0.dimension()==2); assert(T2_0.number_of_vertices()==8); + test_tr_23::test_move_semantic(T2_0); + { Cls Tfromfile; std::cout << " I/O" << std::endl; @@ -596,6 +567,8 @@ _test_cls_delaunay_3(const Triangulation &) assert(T3_0.number_of_vertices()==125); assert(T3_0.dimension()==3); + test_tr_23::test_move_semantic(T3_0); + if (del) { std::cout << " deletion in Delaunay - grid case - (dim 3) " << std::endl; diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h index 43d397d14fe..ea40d75963e 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_regular_3.h @@ -17,6 +17,8 @@ #include #include #include +#include + template void _test_cls_regular_3(const Triangulation &) @@ -206,35 +208,6 @@ _test_cls_regular_3(const Triangulation &) assert(T.is_valid()); assert(T.dimension()==3); - // move constructor - { - Triangulation T_copy(T); - assert(T_copy == T); - assert(T_copy == T); - Triangulation T_move_constructed(std::move(T_copy)); - assert(T_move_constructed == T); - assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() + 1 == 0); - - Cls T_copy2(T); - Cls T_move_constructed2(std::move(T_copy2)); - T_copy2.clear(); - assert(T_copy2 == Cls()); - - Cls T_copy3(T); - Cls T_move_constructed3(std::move(T_copy3)); - T_copy3 = T; - assert(T_copy3 == T); - } - // move-assignment - { - Cls T_copy4(T); - Cls T_move_assigned; - T_move_assigned = std::move(T_copy4); - assert(T_copy4.dimension() == -2); - assert(T_copy4.number_of_vertices() + 1 == 0); - assert(T_move_assigned.dimension() == 3); - assert(T_move_assigned.is_valid()); - assert(T_move_assigned == T); - } + namespace test_tr_23 = CGAL::Testsuite::Triangulation_23; + test_tr_23::test_move_semantic(T); } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index c903a39ed16..a2afe749131 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -23,6 +23,7 @@ #include #include #include +#include template bool check_all_are_finite(Triangulation* tr, const Container& cont) @@ -286,41 +287,8 @@ _test_cls_triangulation_3(const Triangulation &) assert(T1.number_of_vertices() == 0); assert(T1.is_valid()); - // move constructor - { - Cls T_copy(T0); - assert(T_copy.dimension() == 3); - assert(T_copy.number_of_vertices() == 4); - assert(T_copy.is_valid()); - Cls T_move_constructed(std::move(T_copy)); - assert(T_move_constructed.dimension() == 3); - assert(T_move_constructed.number_of_vertices() == 4); - assert(T_move_constructed.is_valid()); - assert(T_copy.dimension() == -2); - assert(T_copy.number_of_vertices() + 1 == 0); - - Cls T_copy2(T0); - Cls T_move_constructed2(std::move(T_copy2)); - T_copy2.clear(); - assert(T_copy2 == Cls()); - - Cls T_copy3(T0); - Cls T_move_constructed3(std::move(T_copy3)); - T_copy3 = T0; - assert(T_copy3 == T0); - } - // move-assignment - { - Cls T_copy4(T0); - Cls T_move_assigned; - T_move_assigned = std::move(T_copy4); - assert(T_copy4.dimension() == -2); - assert(T_copy4.number_of_vertices() + 1 == 0); - assert(T_move_assigned.dimension() == 3); - assert(T_move_assigned.number_of_vertices() == 4); - assert(T_move_assigned.is_valid()); - assert(T_move_assigned == T0); - } + namespace test_tr_23 = CGAL::Testsuite::Triangulation_23; + test_tr_23::test_move_semantic(T0); // Assignment T1=T0; @@ -397,12 +365,14 @@ _test_cls_triangulation_3(const Triangulation &) assert(T2_0.dimension()==1); assert(T2_0.number_of_vertices()==3); + test_tr_23::test_move_semantic(T2_0); v0=T2_0.insert(p4); assert(T2_0.is_valid()); assert(T2_0.dimension()==2); assert(T2_0.number_of_vertices()==4); + test_tr_23::test_move_semantic(T2_0); v0=T2_0.insert(p5); v0=T2_0.insert(p6); @@ -414,6 +384,8 @@ _test_cls_triangulation_3(const Triangulation &) assert(T2_0.dimension()==2); assert(T2_0.number_of_vertices()==8); + test_tr_23::test_move_semantic(T2_0); + if (! del) // to avoid doing the following tests for both Delaunay // and non Delaunay triangulations { @@ -437,6 +409,8 @@ _test_cls_triangulation_3(const Triangulation &) assert( T2_1.dimension()==2 ); assert( T2_1.is_valid() ); + test_tr_23::test_move_semantic(T2_1); + std::cout << " Constructor11 " << std::endl; // 3-dimensional triangulations // This is a simple grid : From 8dbf50a94b0f2065521617c94403f2c6455f2584 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 3 Feb 2021 21:50:10 +0100 Subject: [PATCH 278/317] Create CGAL::make_filled_array That function template will replace my adhoc `create_array_of_triangulation`. --- STL_Extension/include/CGAL/array.h | 14 ++++++++++++++ .../include/CGAL/Triangulation_hierarchy_3.h | 17 +++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 1900a8b1ba0..2f2cf3de44b 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -18,6 +18,7 @@ #else # include #endif +#include namespace CGAL { @@ -68,6 +69,19 @@ struct Construct_array } }; +template +constexpr std::array +make_filled_array_aux(const T& value, std::index_sequence) +{ + return {(static_cast(Is), value)...}; +} + +template +constexpr std::array make_filled_array(const T& value) +{ + return make_filled_array_aux(value, std::make_index_sequence()); +} + } //namespace CGAL #endif // CGAL_ARRAY_H diff --git a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index e55b8eab5b3..6fc656ca9eb 100644 --- a/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -51,6 +51,7 @@ #include #include +#include #endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO @@ -92,18 +93,6 @@ public: private: - template - constexpr std::array - make_array_of_triangulations(const Geom_traits& traits, std::index_sequence) - { - return {{(static_cast(Is), traits)...}}; - } - template - constexpr std::array create_array_of_triangulation(const Geom_traits& traits) - { - return make_array_of_triangulations(traits, std::make_index_sequence()); - } - void init_hierarchy() { hierarchy[0] = this; for(int i=1; i(traits)) + , hierarchy_triangulations(make_filled_array(traits)) { init_hierarchy(); insert(first, last); @@ -465,7 +454,7 @@ template Triangulation_hierarchy_3:: Triangulation_hierarchy_3(const Geom_traits& traits) : Tr_Base(traits) - , hierarchy_triangulations(create_array_of_triangulation(traits)) + , hierarchy_triangulations(make_filled_array(traits)) { init_hierarchy(); } From 9799879eefdc538d5d4ea949116bcf1914ae2f35 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 3 Feb 2021 21:51:00 +0100 Subject: [PATCH 279/317] Modernize a bit assuming C++14 --- STL_Extension/include/CGAL/array.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 2f2cf3de44b..5a80d1335fe 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -13,11 +13,7 @@ #define CGAL_ARRAY_H #include -#ifndef CGAL_CFG_NO_CPP0X_ARRAY -# include -#else -# include -#endif +#include #include namespace CGAL { @@ -50,8 +46,7 @@ namespace CGAL { // It's also untrue that this is not documented... It is ! template< typename T, typename... Args > -inline -std::array< T, 1 + sizeof...(Args) > +constexpr std::array< T, 1 + sizeof...(Args) > make_array(const T & t, const Args & ... args) { std::array< T, 1 + sizeof...(Args) > a = { { t, static_cast(args)... } }; @@ -63,7 +58,9 @@ make_array(const T & t, const Args & ... args) struct Construct_array { template - std::array operator()(const T& t, const Args& ... args) + constexpr + std::array + operator()(const T& t, const Args& ... args) { return make_array (t, args...); } From b8bb3ffc09ebf6079cb6cf2e0f6afba736e4d8e1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 4 Feb 2021 09:21:36 +0100 Subject: [PATCH 280/317] Apply on triangulation_hierarchy_2 the same fix as in 3D --- .../include/CGAL/Triangulation_hierarchy_2.h | 61 +++++++------------ 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h index 266c4964e03..679ace59a24 100644 --- a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h @@ -37,6 +37,7 @@ #include #include #include +#include namespace CGAL { @@ -82,7 +83,14 @@ public: #endif private: - // here is the stack of triangulations which form the hierarchy + void init_hierarchy() { + hierarchy[0] = this; + for(int i=1; i hierarchy_triangulations; std::array hierarchy; boost::rand48 random; @@ -93,13 +101,10 @@ public: Triangulation_hierarchy_2(Triangulation_hierarchy_2&& other) noexcept( noexcept(Tr_Base(std::move(other))) ) : Tr_Base(std::move(other)) + , hierarchy_triangulations(std::move(other.hierarchy_triangulations)) , random(std::move(other.random)) { - hierarchy[0] = this; - for(int i=1; i @@ -107,10 +112,7 @@ public: const Geom_traits& traits = Geom_traits()) : Tr_Base(traits) { - hierarchy[0] = this; - for(int i=1;i(*this) = std::move(other); - hierarchy[0] = this; - for(int i=1; i Triangulation_hierarchy_2:: Triangulation_hierarchy_2(const Geom_traits& traits) : Tr_Base(traits) + , hierarchy_triangulations( + make_filled_array(traits)) { - hierarchy[0] = this; - for(int i=1;i Triangulation_hierarchy_2:: Triangulation_hierarchy_2(const Triangulation_hierarchy_2 &tr) - : Tr_Base() + : Triangulation_hierarchy_2(tr.geom_traits()) { - // create an empty triangulation to be able to delete it ! - hierarchy[0] = this; - for(int i=1;i:: swap(Triangulation_hierarchy_2 &tr) { - Tr_Base* temp; Tr_Base::swap(tr); - for(int i= 1; i -Triangulation_hierarchy_2:: -~Triangulation_hierarchy_2() -{ - clear(); - for(int i= 1; i From 61d3ce86d2ee179c44573896b397ddc54fddbbeb Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 2 Feb 2021 11:30:43 +0100 Subject: [PATCH 281/317] Fix qt5 installation test --- Installation/test/Installation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index f22bddd7708..dcc881d25c9 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -77,7 +77,7 @@ else() endif() if(WITH_CGAL_Qt5) - find_package(Qt5 QUIET) + find_package(Qt5 QUIET COMPONENTS Core Widgets Xml OpenGL Gui) if(Qt5_FOUND) create_link_to_program(CGAL_Qt5) endif() From 611735495064d8ccffafe35340a091c45c7d35ae Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 4 Feb 2021 10:33:55 +0100 Subject: [PATCH 282/317] Add missing links for demo_framework --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 19d7cc93284..a057727c87b 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -69,7 +69,7 @@ include(${CGAL_USE_FILE}) find_package( Qt5 QUIET - COMPONENTS OpenGL Script + COMPONENTS OpenGL Script Xml OPTIONAL_COMPONENTS ScriptTools WebSockets) set_package_properties( @@ -233,8 +233,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) Primitive_container.cpp Polyhedron_demo_plugin_helper.cpp CGAL_double_edit.cpp) - target_link_libraries(demo_framework PUBLIC Qt5::OpenGL Qt5::Widgets Qt5::Gui - Qt5::Script) + target_link_libraries(demo_framework PUBLIC Qt5::OpenGL Qt5::Widgets Qt5::Gui Qt5::Xml + Qt5::Script CGAL::CGAL_Qt5) if(TARGET Qt5::WebSockets) target_link_libraries(demo_framework PUBLIC Qt5::WebSockets) message( From 46cb451bde38d78fc85a4c8b14cef478d6182a46 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 4 Feb 2021 10:47:52 +0100 Subject: [PATCH 283/317] Force a move-construction in the test case for issue #5396 --- .../test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 307db51472a..21178f53eed 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -1209,9 +1209,10 @@ _test_cls_delaunay_3(const Triangulation &) for (int i=0; i<10; i++) tri.insert(Point(i+1, i+2, i+3)); - return std::move(tri); // the move prevents the NRVO + return tri; }; - Triangulation t = Triangulate(); + auto t = Triangulate(); + auto t2 = std::move(t); } } From c23b0c33e30d819bb3aee3ed335becc93b7aff14 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 4 Feb 2021 12:01:14 +0100 Subject: [PATCH 284/317] limit the number of qt5 components in installation test --- Installation/test/Installation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index dcc881d25c9..6295a9e968a 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -77,7 +77,7 @@ else() endif() if(WITH_CGAL_Qt5) - find_package(Qt5 QUIET COMPONENTS Core Widgets Xml OpenGL Gui) + find_package(Qt5 QUIET COMPONENTS Core) if(Qt5_FOUND) create_link_to_program(CGAL_Qt5) endif() From c30056b126f794d3fb2e9379a5a33162a6e042fd Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Fri, 5 Feb 2021 13:51:21 +0100 Subject: [PATCH 285/317] use move assignment --- .../include/CGAL/Side_of_triangle_mesh.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 08dd5262afe..c634e2a1fe7 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -186,20 +186,10 @@ public: * location with minimal memory copy. * @param other The instance to be moved */ - Side_of_triangle_mesh(Side_of_triangle_mesh&& other) : - tm_ptr{std::move(other.tm_ptr)}, - opt_vpm{std::move(other.opt_vpm)}, - own_tree{std::move(other.own_tree)}, - box{std::move(other.box)}, - #ifdef CGAL_HAS_THREADS - atomic_tree_ptr{other.atomic_tree_ptr.load()} - #else - tree_ptr{std::move(other.tree_ptr)} - #endif + Side_of_triangle_mesh(Side_of_triangle_mesh&& other) { - other.own_tree = false; + *this = std::move(other); } - ~Side_of_triangle_mesh() { if (own_tree) From 2dac31f36f00394436c26651262e34a22b2cb1fd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 5 Feb 2021 14:14:11 +0100 Subject: [PATCH 286/317] Clean-up and fix doc --- BGL/include/CGAL/boost/graph/IO/GOCAD.h | 5 ++--- .../CGAL/boost/graph/IO/Generic_facegraph_printer.h | 2 +- BGL/include/CGAL/boost/graph/IO/OBJ.h | 2 +- BGL/include/CGAL/boost/graph/IO/OFF.h | 3 +-- BGL/include/CGAL/boost/graph/IO/PLY.h | 4 ++-- BGL/include/CGAL/boost/graph/IO/STL.h | 4 ++-- BGL/include/CGAL/boost/graph/IO/VTK.h | 4 ++-- BGL/include/CGAL/boost/graph/IO/WRL.h | 2 +- BGL/include/CGAL/boost/graph/named_params_helper.h | 12 +++++++----- .../infrastructure/cgal.geometryfactory.com/crontab | 2 +- Point_set_3/include/CGAL/Point_set_3/IO/OFF.h | 2 +- Point_set_3/include/CGAL/Point_set_3/IO/PLY.h | 4 ++-- Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h | 2 +- .../include/CGAL/IO/write_off_points.h | 6 +++--- .../include/CGAL/IO/write_ply_points.h | 4 ++-- .../include/CGAL/IO/write_xyz_points.h | 5 ++--- Stream_support/include/CGAL/IO/GOCAD.h | 4 ++-- Stream_support/include/CGAL/IO/Generic_writer.h | 2 +- Stream_support/include/CGAL/IO/OBJ.h | 2 +- Stream_support/include/CGAL/IO/OFF.h | 3 +-- Stream_support/include/CGAL/IO/OI/Inventor_ostream.h | 10 ++-------- Stream_support/include/CGAL/IO/PLY.h | 4 ++-- Stream_support/include/CGAL/IO/STL.h | 4 ++-- .../include/CGAL/IO/VRML/File_writer_VRML_2.h | 3 +-- Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h | 10 ++-------- Stream_support/include/CGAL/IO/VTK.h | 5 ++--- Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h | 2 +- Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 4 ++-- 28 files changed, 50 insertions(+), 66 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/GOCAD.h b/BGL/include/CGAL/boost/graph/IO/GOCAD.h index ac5ea9957c0..111bdc0ccfe 100644 --- a/BGL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/BGL/include/CGAL/boost/graph/IO/GOCAD.h @@ -271,7 +271,7 @@ bool read_GOCAD(const std::string& fname, Graph& g, /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`the precision of the given stream`} +/// \cgalParamDefault{`the precision of the stream `os``} /// \cgalParamNEnd /// \cgalNamedParamsEnd /// @@ -379,7 +379,7 @@ bool write_GOCAD(std::ostream& os, const char* name, const Graph& g, /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`the precision of the given stream`} +/// \cgalParamDefault{`the precision of the stream `os``} /// \cgalParamNEnd /// \cgalNamedParamsEnd /// @@ -454,7 +454,6 @@ bool write_GOCAD(const std::string& fname, std::ofstream os(fname); CGAL::set_mode(os, CGAL::IO::ASCII); - return write_GOCAD(os, fname.c_str(), g, np); } diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index 53709564546..5fb75be5363 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -117,7 +117,7 @@ public: if(!m_os.good()) return false; - set_default_stream_precision(m_os, np); + set_stream_precision_from_NP(m_os, np); VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, g)); diff --git a/BGL/include/CGAL/boost/graph/IO/OBJ.h b/BGL/include/CGAL/boost/graph/IO/OBJ.h index 7ab9cbd29d4..7d733c9f8b4 100644 --- a/BGL/include/CGAL/boost/graph/IO/OBJ.h +++ b/BGL/include/CGAL/boost/graph/IO/OBJ.h @@ -231,7 +231,7 @@ bool read_OBJ(const std::string& fname, Graph& g, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamNEnd \cgalNamedParamsEnd diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 6ea0f68a6b9..57685046e79 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -300,7 +300,6 @@ CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_BGL_NP_CLA return read_OFF(fname, g, np); } - template CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g) { @@ -387,7 +386,7 @@ bool write_OFF_BGL(std::ostream& os, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamNEnd \cgalNamedParamsEnd diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index 6ad32267952..c571c07d629 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -311,7 +311,7 @@ bool read_PLY(const std::string& fname, Graph& g, \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -361,7 +361,7 @@ bool write_PLY(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); // Write header os << "ply" << std::endl diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 11005c1dfb4..78bd1fcb588 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -231,7 +231,7 @@ bool read_STL(const std::string& fname, Graph& g) { return read_STL(fname, g, pa \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -262,7 +262,7 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); if(get_mode(os) == IO::BINARY) { diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index a62f3e1cb91..894b3598b09 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -420,7 +420,7 @@ void write_polys_points(std::ostream& os, * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`the precision of the given stream`} + * \cgalParamDefault{`the precision of the stream `os``} * \cgalParamNEnd * \cgalNamedParamsEnd * @@ -439,7 +439,7 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); os << "\n" << "::fa }; template - void set_default_stream_precision(std::ostream& os, const NP& np) + void set_stream_precision_from_NP(std::ostream& os, const NP& np) { - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) + using parameters::get_parameter; + using parameters::choose_parameter; + + if(!is_default_parameter(get_parameter(np, internal_np::stream_precision))) { - const int precision = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::stream_precision)); + const int precision = choose_parameter(get_parameter(np, + internal_np::stream_precision)); os.precision(precision); } } diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 34829fff40e..c023da89fcf 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -67,7 +67,7 @@ LC_CTYPE=en_US.UTF-8 18 * * * * $HOME/bin/dump_crontab # Docker check every hour -#0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 +0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 # cgal->cgal2 with git-multimail */5 * * * * cd $HOME/Git/cgal-dev-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-dev cgal-dev-receiver diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h index fbeda69c4fc..b8882c97fdc 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h @@ -134,7 +134,7 @@ CGAL_DEPRECATED bool read_off_point_set(std::istream& is, ///< input stream. \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamNEnd \cgalNamedParamsEnd diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index ae2d6ad7fb7..4646ffbd974 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -456,7 +456,7 @@ CGAL_DEPRECATED bool read_ply_point_set(std::istream& is, ///< input stream. \cgalParamNBegin{stream_precision} \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`the precision of the given stream`} + \cgalParamDefault{`the precision of the stream `os``} \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} \cgalParamNEnd \cgalNamedParamsEnd @@ -493,7 +493,7 @@ bool write_PLY(std::ostream& os, return false; } - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); os << "ply" << std::endl << ((get_mode(os) == IO::BINARY) ? "format binary_little_endian 1.0" : "format ascii 1.0") << std::endl diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h index fee680c1e50..a7b243fc192 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h @@ -132,7 +132,7 @@ CGAL_DEPRECATED bool read_xyz_point_set(std::istream& is, CGAL::Point_set_3 writer(os); return writer(points, polygons, np); } diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 4d0d1e41e65..45324fb7c7a 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -91,15 +91,9 @@ private: }; template -void set_default_stream_precision(Inventor_ostream_base& os, const NP& np) +void set_stream_precision_from_NP(Inventor_ostream_base& os, const NP& np) { - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::stream_precision)); - os.os().precision(precision); - } + return set_stream_precision_from_NP(os.os(), np); } } // namespace CGAL diff --git a/Stream_support/include/CGAL/IO/PLY.h b/Stream_support/include/CGAL/IO/PLY.h index 0a9346159c2..bfcebbf8d7c 100644 --- a/Stream_support/include/CGAL/IO/PLY.h +++ b/Stream_support/include/CGAL/IO/PLY.h @@ -445,7 +445,7 @@ bool read_PLY(const std::string& fname, PointRange& points, PolygonRange& polygo * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`the precision of the given stream`} + * \cgalParamDefault{`the precision of the stream `os``} * \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} * \cgalParamNEnd * \cgalNamedParamsEnd @@ -468,7 +468,7 @@ bool write_PLY(std::ostream& out, if(!out.good()) return false; - set_default_stream_precision(out, np); + set_stream_precision_from_NP(out, np); // Write header out << "ply" << std::endl diff --git a/Stream_support/include/CGAL/IO/STL.h b/Stream_support/include/CGAL/IO/STL.h index 437d7f410bb..009e90b1ad4 100644 --- a/Stream_support/include/CGAL/IO/STL.h +++ b/Stream_support/include/CGAL/IO/STL.h @@ -284,7 +284,7 @@ bool read_STL(const std::string& fname, PointRange& points, TriangleRange& facet * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`the precision of the given stream`} + * \cgalParamDefault{`the precision of the stream `os``} * \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} * \cgalParamNEnd * \cgalNamedParamsEnd @@ -317,7 +317,7 @@ bool write_STL(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); if(get_mode(os) == IO::BINARY) { diff --git a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h index 6bc7249d1f5..48e58fa64ec 100644 --- a/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h +++ b/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h @@ -28,7 +28,6 @@ namespace CGAL { class File_writer_VRML_2 { - VRML_2_ostream m_os; std::size_t m_facets; @@ -43,7 +42,7 @@ public: std::size_t facets, const bool /*colors*/ = false, const bool /*normals*/ = false, - const bool /*te xtures*/ = false) + const bool /*textures*/ = false) { m_os = o; m_facets = facets; diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index 402bfb98220..08e8fdd7e49 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -106,15 +106,9 @@ inline VRML_2_ostream& operator<<(VRML_2_ostream& os, } template -void set_default_stream_precision(VRML_2_ostream& os, const NP& np) +void set_stream_precision_from_NP(VRML_2_ostream& os, const NP& np) { - if(!parameters::is_default_parameter( - parameters::get_parameter(np, internal_np::stream_precision))) - { - const int precision = parameters::choose_parameter( - parameters::get_parameter(np, internal_np::stream_precision)); - os.os().precision(precision); - } + return set_stream_precision_from_NP(os.os(), np); } } // namespace CGAL diff --git a/Stream_support/include/CGAL/IO/VTK.h b/Stream_support/include/CGAL/IO/VTK.h index 76c13581d4e..d56dd2f0d11 100644 --- a/Stream_support/include/CGAL/IO/VTK.h +++ b/Stream_support/include/CGAL/IO/VTK.h @@ -21,7 +21,6 @@ #include #include - #ifdef CGAL_USE_VTK #include #include @@ -375,7 +374,7 @@ void write_soup_polys_points(std::ostream& os, * \cgalParamNBegin{stream_precision} * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} * \cgalParamType{int} - * \cgalParamDefault{`the precision of the given stream`} + * \cgalParamDefault{`the precision of the stream `os``} * \cgalParamNEnd * \cgalNamedParamsEnd * @@ -395,7 +394,7 @@ bool write_VTP(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); os << "\n" << "& sm, std::string /// \cgalParamNBegin{stream_precision} /// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} /// \cgalParamType{int} -/// \cgalParamDefault{`the precision of the given stream`} +/// \cgalParamDefault{`the precision of the stream `os``} /// \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.} /// \cgalParamNEnd /// \cgalNamedParamsEnd @@ -921,7 +921,7 @@ bool write_PLY(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); os << "ply" << std::endl << ((get_mode(os) == IO::BINARY) ? "format binary_little_endian 1.0" : "format ascii 1.0") << std::endl From 8914b2fc829a67c2d5858bbe2161f8ce8515d8be Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 5 Feb 2021 14:43:29 +0100 Subject: [PATCH 287/317] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h Co-authored-by: Sebastien Loriot --- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 9c61f808406..98c33a0c0f0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -144,7 +144,7 @@ namespace Polygon_mesh_processing { #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 false; #else - choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), true); + choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); #endif typename GeomTraits::FT max_squared_distance = typename GeomTraits::FT(-1); From ce7d06d5f45ad084cf260f9bdf481f673fbf348e Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Sat, 5 Dec 2020 08:12:56 +0000 Subject: [PATCH 288/317] Disable NEF trace unless the user specifically wants it --- Nef_2/include/CGAL/Nef_2/debug.h | 17 +++++++------- Nef_3/include/CGAL/Nef_3/K3_tree.h | 23 +++++++++---------- .../CGAL/Nef_3/SNC_external_structure.h | 2 +- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/debug.h b/Nef_2/include/CGAL/Nef_2/debug.h index a8581420761..d4ccc190ddc 100644 --- a/Nef_2/include/CGAL/Nef_2/debug.h +++ b/Nef_2/include/CGAL/Nef_2/debug.h @@ -16,15 +16,14 @@ #include #ifdef NDEBUG -#undef CGAL_NEF_DEBUG -#define CGAL_NEF_DEBUG 1 +#undef CGAL_USE_TRACE #endif #ifndef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 1 #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE static int debugthread=1; #endif @@ -35,40 +34,40 @@ #undef CGAL_NEF_CTRACEN #undef CGAL_NEF_SETDTHREAD -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_SETDTHREAD(l) debugthread=l #else #define CGAL_NEF_SETDTHREAD(l) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACE(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACEV(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<<#t<<" = "<<(t)<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACEN(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<< " "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_CTRACE(b,t) if(b) {std::cerr<<" "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_CTRACEN(b,t) if(b){ std::cerr<<" "<(0)) diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 6c4a3fa6f42..c3b8aaecffc 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -524,19 +524,18 @@ else { Segment_3 s = S.front().second; S.pop_front(); if( n->is_leaf()) { -#ifndef NDEBUG + CGAL_assertion_code( - if( first_segment) { - first_segment = false; - CGAL_NEF_TRACEN("operator++: prev_segment=(none), segment="< Date: Mon, 8 Feb 2021 09:06:57 +0100 Subject: [PATCH 289/317] add missing using --- BGL/include/CGAL/boost/graph/named_params_helper.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 429b4be92e0..cc38868738d 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -566,6 +566,7 @@ CGAL_DEF_GET_INITIALIZED_INDEX_MAP(face, typename boost::graph_traits::fa { using parameters::get_parameter; using parameters::choose_parameter; + using parameters::is_default_parameter; if(!is_default_parameter(get_parameter(np, internal_np::stream_precision))) { From e7197d89d23ace20d2a0412c0264f1f524ad8f49 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 8 Feb 2021 09:28:13 +0100 Subject: [PATCH 290/317] replace remaining wrong function call --- BGL/include/CGAL/boost/graph/IO/GOCAD.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/include/CGAL/boost/graph/IO/GOCAD.h b/BGL/include/CGAL/boost/graph/IO/GOCAD.h index 111bdc0ccfe..966e4f4219d 100644 --- a/BGL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/BGL/include/CGAL/boost/graph/IO/GOCAD.h @@ -303,7 +303,7 @@ bool write_GOCAD(std::ostream& os, if(!os.good()) return false; - set_default_stream_precision(os, np); + set_stream_precision_from_NP(os, np); os << "GOCAD TSurf 1\n" "HEADER {\n" From 7f189620d863fc5019adbbb41f5dae62809fcd2c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 8 Feb 2021 10:06:23 +0100 Subject: [PATCH 291/317] Remove CMAKE_CXX_STANDARD commands in cmake scripts --- .../demo/Arrangement_on_surface_2/CMakeLists.txt | 3 --- Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt | 4 ---- Polyhedron/demo/Polyhedron/CMakeLists.txt | 4 ---- .../examples/Set_movable_separability_2/CMakeLists.txt | 3 --- .../test/Set_movable_separability_2/CMakeLists.txt | 3 --- Shape_detection/benchmark/Shape_detection/CMakeLists.txt | 2 -- Shape_detection/examples/Shape_detection/CMakeLists.txt | 2 -- Shape_detection/test/Shape_detection/CMakeLists.txt | 2 -- 8 files changed, 23 deletions(-) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 9d17f95361a..91b9ed0b08b 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -3,9 +3,6 @@ cmake_minimum_required(VERSION 3.1...3.15) project(Arrangement_on_surface_2_Demo) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) - if(NOT POLICY CMP0070 AND POLICY CMP0053) # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) diff --git a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt index 831697fb97a..295d50fdbc2 100644 --- a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt +++ b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt @@ -11,10 +11,6 @@ project(Minkowski_sum_2_Tests) # return() # endif() -# # Use C++11 for this directory and its sub-directories. -# set(CMAKE_CXX_STANDARD 11) -# set(CMAKE_CXX_STANDARD_REQUIRED TRUE) - find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index a9fb73257da..9de69df0b92 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -16,10 +16,6 @@ if(has_cpp11 LESS 0) return() endif() -# Use C++11 for this directory and its sub-directories. -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) - #Defines flags to emulate windows behavior for linking error generation if(CMAKE_CXX_COMPILER_ID EQUAL Clang OR CMAKE_COMPILER_IS_GNUCC diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt index dc42d213320..1ee57d6555d 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt @@ -13,9 +13,6 @@ if(has_cpp11 LESS 0) return() endif() -# Use C++11 for this directory and its sub-directories. -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) find_package(CGAL REQUIRED) diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index bdfe6863ec3..93b6cedc5c6 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -20,9 +20,6 @@ if(has_cpp11 LESS 0) return() endif() -# Use C++11 for this directory and its sub-directories. -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) find_package(CGAL REQUIRED) diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 359f4c43c9c..ed3a3691f64 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.15) project(Shape_detection_Benchmarks) -set(CMAKE_CXX_STANDARD 11) - find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index 2bf4b6dfbe7..bebfffaafbd 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.15) project(Shape_detection_Examples) -set(CMAKE_CXX_STANDARD 11) - find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index fbbfad50b4a..82ec5d66487 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.15) project(Shape_detection_Tests) -set(CMAKE_CXX_STANDARD 11) - find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) From 0eae59b8cd650fa995b8c9905abb30e4a2c89625 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 09:58:12 +0100 Subject: [PATCH 292/317] Add tests for the demo --- .github/test.sh | 13 +++++++++++++ .github/workflows/demo.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 .github/test.sh create mode 100644 .github/workflows/demo.yml diff --git a/.github/test.sh b/.github/test.sh new file mode 100755 index 00000000000..a744f6d5b08 --- /dev/null +++ b/.github/test.sh @@ -0,0 +1,13 @@ +#!/bin/bash +/usr/local/bin/cmake --version +FACTOR=$1 +set -ex +cd Polyhedron/demo +LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build . -t help | egrep 'plugin$' |& cut -d\ -f2) +PLUGINS_ARRAY=(${LIST_OF_PLUGINS}); +NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]} +DEL=$(($NB_OF_PLUGINS / 4)) +mkdir build +cd build +/usr/local/bin/cmake -DCGAL_DIR=$2 ../Polyhedron +make -j2 ${PLUGINS_ARRAY[@]:$(($FACTOR * $DEL)):$((($FACTOR + 1) * $DEL))} diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 00000000000..7d3a31bfd49 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,37 @@ +name: Test Polyhedron Demo + +on: [push, pull_request] + +jobs: + batch_1: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.0.0 + - name: install dependencies + run: .github/install.sh + - name: run1 + run: ./.github/test.sh 0 ${{ github.workspace }} + batch_2: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.0.0 + - name: install dependencies + run: .github/install.sh + - name: run2 + run: ./.github/test.sh 1 ${{ github.workspace }} + batch_3: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.0.0 + - name: install dependencies + run: .github/install.sh + - name: run3 + run: ./.github/test.sh 2 ${{ github.workspace }} + batch_4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.0.0 + - name: install dependencies + run: .github/install.sh + - name: run4 + run: ./.github/test.sh 3 ${{ github.workspace }} From 9cd0d450f9df991172ef4b0499730846a54f085b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 11:31:34 +0100 Subject: [PATCH 293/317] Remove QDomElements and need for QtXml --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 4 +- .../demo/Alpha_shapes_3/CMakeLists.txt | 2 +- .../demo/Circular_kernel_3/CMakeLists.txt | 2 +- .../demo/Alpha_shapes_2/CMakeLists.txt | 2 +- .../demo/Apollonius_graph_2/CMakeLists.txt | 2 +- .../demo/Bounding_volumes/CMakeLists.txt | 2 +- .../demo/Circular_kernel_2/CMakeLists.txt | 2 +- GraphicsView/demo/Generator/CMakeLists.txt | 2 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 2 +- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 2 +- .../demo/Largest_empty_rect_2/CMakeLists.txt | 2 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 2 +- GraphicsView/demo/Polygon/CMakeLists.txt | 2 +- .../Segment_Delaunay_graph_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Snap_rounding_2/CMakeLists.txt | 2 +- .../demo/Spatial_searching_2/CMakeLists.txt | 2 +- .../demo/Stream_lines_2/CMakeLists.txt | 2 +- GraphicsView/include/CGAL/Qt/camera.h | 10 - GraphicsView/include/CGAL/Qt/camera_impl.h | 149 -------- GraphicsView/include/CGAL/Qt/domUtils.h | 183 --------- GraphicsView/include/CGAL/Qt/frame.h | 8 - GraphicsView/include/CGAL/Qt/frame_impl.h | 62 ---- .../include/CGAL/Qt/keyFrameInterpolator.h | 8 - .../CGAL/Qt/keyFrameInterpolator_impl.h | 80 ---- .../include/CGAL/Qt/manipulatedCameraFrame.h | 9 - .../CGAL/Qt/manipulatedCameraFrame_impl.h | 63 ---- .../include/CGAL/Qt/manipulatedFrame.h | 9 - .../include/CGAL/Qt/manipulatedFrame_impl.h | 65 ---- GraphicsView/include/CGAL/Qt/qglviewer.h | 3 - GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 346 +----------------- GraphicsView/include/CGAL/Qt/quaternion.h | 6 - .../include/CGAL/Qt/quaternion_impl.h | 65 ---- GraphicsView/include/CGAL/Qt/vec.h | 8 - GraphicsView/include/CGAL/Qt/vec_impl.h | 94 ----- Installation/CMakeLists.txt | 6 +- .../demo/Linear_cell_complex/CMakeLists.txt | 2 +- .../Periodic_3_triangulation_3/CMakeLists.txt | 2 +- .../demo/Periodic_Lloyd_3/CMakeLists.txt | 2 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 +- .../Plugins/Three_examples/CMakeLists.txt | 2 +- .../Polyline_simplification_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Surface_mesher/CMakeLists.txt | 4 +- .../demo/Triangulation_3/CMakeLists.txt | 4 +- 45 files changed, 33 insertions(+), 1201 deletions(-) delete mode 100644 GraphicsView/include/CGAL/Qt/domUtils.h diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 7c006dec292..4ee33e3e45f 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -23,7 +23,7 @@ include_directories(BEFORE ./ ./include) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) # Find Qt5 itself -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Gui Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -54,7 +54,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) #${CGAL_Qt5_MOC_FILES} ) # Link with Qt libraries - target_link_libraries(AABB_demo PRIVATE Qt5::OpenGL Qt5::Gui Qt5::Xml + target_link_libraries(AABB_demo PRIVATE Qt5::OpenGL Qt5::Gui CGAL::CGAL CGAL::CGAL_Qt5) add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index ede9b5e1367..4c7ecd50b4e 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -18,7 +18,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 78bf951d49a..3df4da89e33 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -12,7 +12,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL) +find_package(Qt5 QUIET COMPONENTS Script OpenGL) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index d4cf857a00e..c1f805372c6 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 908428488e8..9898f7c0a7a 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index c0a12b255fc..af8b531f4b8 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 99ddd23a398..279535431fa 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index e7e4e3afc16..8b1cce296ed 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -14,7 +14,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 6fec9bd067b..8b4f82c65df 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -14,7 +14,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index dd3ecf5491a..4fc20a4c8da 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index c7cda2cb1b6..cb8f1dea52c 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 4d75fc2dcbc..d52af8a768d 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -12,7 +12,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 4ea9ebf497c..67d2b2ed983 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -25,7 +25,7 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 5a22d88a978..033b647dc34 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -20,7 +20,7 @@ set(QT_USE_QTMAIN TRUE) set(QT_USE_QTSCRIPT TRUE) set(QT_USE_QTOPENGL TRUE) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 46723a27011..45bedf14c38 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -20,7 +20,7 @@ set(QT_USE_QTMAIN TRUE) set(QT_USE_QTSCRIPT TRUE) set(QT_USE_QTOPENGL TRUE) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) include_directories(BEFORE ./include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index c4092df8007..34069835976 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_AUTOMOC ON) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 6ff2a9bacae..dd4ac996e12 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 2c5c3c33005..5ae748db9d1 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/GraphicsView/include/CGAL/Qt/camera.h b/GraphicsView/include/CGAL/Qt/camera.h index 96a88574e51..bda76bafb05 100644 --- a/GraphicsView/include/CGAL/Qt/camera.h +++ b/GraphicsView/include/CGAL/Qt/camera.h @@ -14,7 +14,6 @@ #ifndef QGLVIEWER_CAMERA_H #define QGLVIEWER_CAMERA_H #include -#include #include #include #include @@ -435,15 +434,6 @@ public Q_SLOTS: void setFlySpeed(qreal speed); //@} - /*! @name XML representation */ - //@{ -public: - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; -public Q_SLOTS: - virtual void initFromDOMElement(const QDomElement &element); - //@} - private Q_SLOTS: void onFrameModified(); diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index d79ce8af56d..7321b58a0c7 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -45,7 +45,6 @@ Camera::Camera(QObject *parent) // Requires the interpolationKfi_ setFrame(new ManipulatedCameraFrame()); - // #CONNECTION# All these default values identical in initFromDOMElement. // Requires fieldOfView() to define focusDistance() setSceneRadius(1.0); @@ -61,7 +60,6 @@ Camera::Camera(QObject *parent) // projectionMatrix_ below. setType(PERSPECTIVE); - // #CONNECTION# initFromDOMElement default values setZNearCoefficient(0.005); setZClippingCoefficient(sqrt(3.0)); @@ -2016,153 +2014,6 @@ void Camera::deletePath(unsigned int i) { //////////////////////////////////////////////////////////////////////////////// -/*! Returns an XML \c QDomElement that represents the Camera. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - Concatenates the Camera parameters, the ManipulatedCameraFrame::domElement() - and the paths' KeyFrameInterpolator::domElement(). - - Use initFromDOMElement() to restore the Camera state from the resulting \c - QDomElement. - - If you want to save the Camera state in a file, use: - \code - QDomDocument document("myCamera"); - doc.appendChild( myCamera->domElement("Camera", document) ); - - QFile f("myCamera.xml"); - if (f.open(IO_WriteOnly)) - { - QTextStream out(&f); - document.save(out, 2); - } - \endcode - - Note that the CGAL::QGLViewer::camera() is automatically saved by - CGAL::QGLViewer::saveStateToFile() when a CGAL::QGLViewer is closed. Use - CGAL::QGLViewer::restoreStateFromFile() to restore it back. */ -CGAL_INLINE_FUNCTION -QDomElement Camera::domElement(const QString &name, - QDomDocument &document) const { - QDomElement de = document.createElement(name); - QDomElement paramNode = document.createElement("Parameters"); - paramNode.setAttribute("fieldOfView", QString::number(fieldOfView())); - paramNode.setAttribute("zNearCoefficient", - QString::number(zNearCoefficient())); - paramNode.setAttribute("zClippingCoefficient", - QString::number(zClippingCoefficient())); - paramNode.setAttribute("orthoCoef", QString::number(orthoCoef_)); - paramNode.setAttribute("sceneRadius", QString::number(sceneRadius())); - paramNode.appendChild(sceneCenter().domElement("SceneCenter", document)); - - switch (type()) { - case Camera::PERSPECTIVE: - paramNode.setAttribute("Type", "PERSPECTIVE"); - break; - case Camera::ORTHOGRAPHIC: - paramNode.setAttribute("Type", "ORTHOGRAPHIC"); - break; - } - de.appendChild(paramNode); - - de.appendChild(frame()->domElement("ManipulatedCameraFrame", document)); - - // KeyFrame paths - for (QMap::ConstIterator - it = kfi_.begin(), - end = kfi_.end(); - it != end; ++it) { - QDomElement kfNode = - (it.value())->domElement("KeyFrameInterpolator", document); - kfNode.setAttribute("index", QString::number(it.key())); - de.appendChild(kfNode); - } - - return de; -} - -/*! Restores the Camera state from a \c QDomElement created by domElement(). - - Use the following code to retrieve a Camera state from a file created using - domElement(): \code - // Load DOM from file - QDomDocument document; - QFile f("myCamera.xml"); - if (f.open(IO_ReadOnly)) - { - document.setContent(&f); - f.close(); - } - - // Parse the DOM tree - QDomElement main = document.documentElement(); - myCamera->initFromDOMElement(main); - \endcode - - The frame() pointer is not modified by this method. The frame() state is - however modified. - - \attention The original keyFrameInterpolator() are deleted and should be copied - first if they are shared. */ -CGAL_INLINE_FUNCTION -void Camera::initFromDOMElement(const QDomElement &element) { - QDomElement child = element.firstChild().toElement(); - - QMutableMapIterator it(kfi_); - while (it.hasNext()) { - it.next(); - deletePath(it.key()); - } - - while (!child.isNull()) { - if (child.tagName() == "Parameters") { - // #CONNECTION# Default values set in constructor - //setFieldOfView(DomUtils::qrealFromDom(child, "fieldOfView", CGAL_PI / 4.0)); - setZNearCoefficient( - DomUtils::qrealFromDom(child, "zNearCoefficient", 0.005)); - setZClippingCoefficient( - DomUtils::qrealFromDom(child, "zClippingCoefficient", sqrt(3.0))); - orthoCoef_ = - DomUtils::qrealFromDom(child, "orthoCoef", tan(fieldOfView() / 2.0)); - setSceneRadius( - DomUtils::qrealFromDom(child, "sceneRadius", sceneRadius())); - - setType(PERSPECTIVE); - QString type = child.attribute("Type", "PERSPECTIVE"); - if (type == "PERSPECTIVE") - setType(Camera::PERSPECTIVE); - if (type == "ORTHOGRAPHIC") - setType(Camera::ORTHOGRAPHIC); - - QDomElement child2 = child.firstChild().toElement(); - while (!child2.isNull()) { - /* Although the scene does not change when a camera is loaded, restore - the saved center and radius values. Mainly useful when a the viewer is - restored on startup, with possible additional cameras. */ - if (child2.tagName() == "SceneCenter") - setSceneCenter(Vec(child2)); - - child2 = child2.nextSibling().toElement(); - } - } - - if (child.tagName() == "ManipulatedCameraFrame") - frame()->initFromDOMElement(child); - - - if (child.tagName() == "KeyFrameInterpolator") { - unsigned int index = DomUtils::uintFromDom(child, "index", 0); - setKeyFrameInterpolator(index, new KeyFrameInterpolator(frame())); - if (keyFrameInterpolator(index)) - keyFrameInterpolator(index)->initFromDOMElement(child); - } - - child = child.nextSibling().toElement(); - } -} - /*! Gives the coefficients of a 3D half-line passing through the Camera eye and pixel (x,y). diff --git a/GraphicsView/include/CGAL/Qt/domUtils.h b/GraphicsView/include/CGAL/Qt/domUtils.h deleted file mode 100644 index 36e2e69b803..00000000000 --- a/GraphicsView/include/CGAL/Qt/domUtils.h +++ /dev/null @@ -1,183 +0,0 @@ -/**************************************************************************** - - Copyright (c) 2018 GeometryFactory Sarl (France). - Copyright (C) 2002-2014 Gilles Debunne. All rights reserved. - - This file is part of a fork of the QGLViewer library version 2.7.0. - -*****************************************************************************/ -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-only -#ifndef QGLVIEWER_DOMUTILS_H -#define QGLVIEWER_DOMUTILS_H -#include -#include -#include -#include -#include - -#include - -#ifndef DOXYGEN - -// QDomElement loading with syntax checking. -class DomUtils { -private: - static void warning(const QString &message) { - qWarning("%s", message.toLatin1().constData()); - } - -public: - static qreal qrealFromDom(const QDomElement &e, const QString &attribute, - qreal defValue) { - qreal value = defValue; - if (e.hasAttribute(attribute)) { - const QString s = e.attribute(attribute); - bool ok; - value = s.toDouble(&ok); - if (!ok) { - warning(QString("'%1' is not a valid qreal syntax for attribute \"%2\" " - "in initialization of \"%3\". Setting value to %4.") - .arg(s) - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(defValue))); - value = defValue; - } - } else { - warning(QString("\"%1\" attribute missing in initialization of \"%2\". " - "Setting value to %3.") - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(value))); - } - -#if defined(isnan) - // The "isnan" method may not be available on all platforms. - // Find its equivalent or simply remove these two lines - if (isnan(value)) - warning( - QString( - "Warning, attribute \"%1\" initialized to Not a Number in \"%2\"") - .arg(attribute) - .arg(e.tagName())); -#endif - - return value; - } - - static int intFromDom(const QDomElement &e, const QString &attribute, - int defValue) { - int value = defValue; - if (e.hasAttribute(attribute)) { - const QString s = e.attribute(attribute); - bool ok; - value = s.toInt(&ok); - if (!ok) { - warning( - QString("'%1' is not a valid integer syntax for attribute \"%2\" " - "in initialization of \"%3\". Setting value to %4.") - .arg(s) - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(defValue))); - value = defValue; - } - } else { - warning(QString("\"%1\" attribute missing in initialization of \"%2\". " - "Setting value to %3.") - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(value))); - } - - return value; - } - - static unsigned int uintFromDom(const QDomElement &e, - const QString &attribute, - unsigned int defValue) { - unsigned int value = defValue; - if (e.hasAttribute(attribute)) { - const QString s = e.attribute(attribute); - bool ok; - value = s.toUInt(&ok); - if (!ok) { - warning( - QString("'%1' is not a valid unsigned integer syntax for attribute " - "\"%2\" in initialization of \"%3\". Setting value to %4.") - .arg(s) - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(defValue))); - value = defValue; - } - } else { - warning(QString("\"%1\" attribute missing in initialization of \"%2\". " - "Setting value to %3.") - .arg(attribute) - .arg(e.tagName()) - .arg(QString::number(value))); - } - - return value; - } - - static bool boolFromDom(const QDomElement &e, const QString &attribute, - bool defValue) { - bool value = defValue; - if (e.hasAttribute(attribute)) { - const QString s = e.attribute(attribute); - if (s.toLower() == QString("true")) - value = true; - else if (s.toLower() == QString("false")) - value = false; - else { - warning( - QString("'%1' is not a valid boolean syntax for attribute \"%2\" " - "in initialization of \"%3\". Setting value to %4.") - .arg(s) - .arg(attribute) - .arg(e.tagName()) - .arg(defValue ? "true" : "false")); - } - } else { - warning(QString("\"%1\" attribute missing in initialization of \"%2\". " - "Setting value to %3.") - .arg(attribute) - .arg(e.tagName()) - .arg(value ? "true" : "false")); - } - - return value; - } - - static void setBoolAttribute(QDomElement &element, const QString &attribute, - bool value) { - element.setAttribute(attribute, (value ? "true" : "false")); - } - - static QDomElement QColorDomElement(const QColor &color, const QString &name, - QDomDocument &doc) { - QDomElement de = doc.createElement(name); - de.setAttribute("red", QString::number(color.red())); - de.setAttribute("green", QString::number(color.green())); - de.setAttribute("blue", QString::number(color.blue())); - return de; - } - - static QColor QColorFromDom(const QDomElement &e) { - int color[3]; - QStringList attribute; - attribute << "red" - << "green" - << "blue"; - for (int i = 0; i < attribute.count(); ++i) - color[i] = DomUtils::intFromDom(e, attribute[i], 0); - return QColor(color[0], color[1], color[2]); - } -}; - -#endif // DOXYGEN -#endif //QGLVIEWER_DOMUTILS_H diff --git a/GraphicsView/include/CGAL/Qt/frame.h b/GraphicsView/include/CGAL/Qt/frame.h index 7bf7a31eda8..23110350fce 100644 --- a/GraphicsView/include/CGAL/Qt/frame.h +++ b/GraphicsView/include/CGAL/Qt/frame.h @@ -425,14 +425,6 @@ public: } //@} - /*! @name XML representation */ - //@{ -public: - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; -public Q_SLOTS: - virtual void initFromDOMElement(const QDomElement &element); - //@} private: // P o s i t i o n a n d o r i e n t a t i o n diff --git a/GraphicsView/include/CGAL/Qt/frame_impl.h b/GraphicsView/include/CGAL/Qt/frame_impl.h index 2f5e925fa72..9ba5bfc5941 100644 --- a/GraphicsView/include/CGAL/Qt/frame_impl.h +++ b/GraphicsView/include/CGAL/Qt/frame_impl.h @@ -999,68 +999,6 @@ void Frame::getTransformOfFrom(const qreal src[3], qreal res[3], res[i] = r[i]; } -//////////////////////////// STATE ////////////////////////////// - -/*! Returns an XML \c QDomElement that represents the Frame. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - The resulting QDomElement looks like: - \code - - - - - \endcode - - Use initFromDOMElement() to restore the Frame state from the resulting \c - QDomElement. - - - See Vec::domElement() for a complete example. See also - - Quaternion::domElement(), Camera::domElement()... - - \attention The constraint() and referenceFrame() are not saved in the - QDomElement. */ -CGAL_INLINE_FUNCTION -QDomElement Frame::domElement(const QString &name, - QDomDocument &document) const { - // TODO: use translation and rotation instead when referenceFrame is coded... - QDomElement e = document.createElement(name); - e.appendChild(position().domElement("position", document)); - e.appendChild(orientation().domElement("orientation", document)); - return e; -} - -/*! Restores the Frame state from a \c QDomElement created by domElement(). - - See domElement() for the \c QDomElement syntax. See the - Vec::initFromDOMElement() and Quaternion::initFromDOMElement() documentations - for details on default values if an argument is missing. - - \attention The constraint() and referenceFrame() are not restored by this - method and are left unchanged. */ -CGAL_INLINE_FUNCTION -void Frame::initFromDOMElement(const QDomElement &element) { - // TODO: use translation and rotation instead when referenceFrame is coded... - - // Reset default values. Attention: destroys constraint. - // *this = Frame(); - // This instead ? Better : what is not set is not changed. - // setPositionAndOrientation(Vec(), Quaternion()); - - QDomElement child = element.firstChild().toElement(); - while (!child.isNull()) { - if (child.tagName() == "position") - setPosition(Vec(child)); - if (child.tagName() == "orientation") - setOrientation(Quaternion(child).normalized()); - - child = child.nextSibling().toElement(); - } -} ///////////////////////////////// ALIGN ///////////////////////////////// diff --git a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h index 381ac37bad6..30b87fe0507 100644 --- a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h +++ b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h @@ -281,14 +281,6 @@ public Q_SLOTS: virtual void interpolateAtTime(qreal time); //@} - /*! @name XML representation */ - //@{ -public: - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; - virtual void initFromDOMElement(const QDomElement &element); - //@} - private Q_SLOTS: virtual void update(); virtual void invalidateValues() { diff --git a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h index 143a1b2175f..067aba57041 100644 --- a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h +++ b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h @@ -37,7 +37,6 @@ KeyFrameInterpolator::KeyFrameInterpolator(Frame *frame) interpolationSpeed_(1.0), interpolationStarted_(false), closedPath_(false), loopInterpolation_(false), pathIsValid_(false), valuesAreValid_(true), currentFrameValid_(false) -// #CONNECTION# Values cut pasted initFromDOMElement() { setFrame(frame); for (int i = 0; i < 4; ++i) @@ -458,85 +457,6 @@ void KeyFrameInterpolator::interpolateAtTime(qreal time) { Q_EMIT interpolated(); } -/*! Returns an XML \c QDomElement that represents the KeyFrameInterpolator. - - The resulting QDomElement holds the KeyFrameInterpolator parameters as well as - the path keyFrames (if the keyFrame is defined by a pointer to a Frame, use its - current value). - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - Use initFromDOMElement() to restore the ManipulatedFrame state from the - resulting QDomElement. - - - See Vec::domElement() for a complete example. See also - Quaternion::domElement(), Camera::domElement()... - - Note that the Camera::keyFrameInterpolator() are automatically saved by - CGAL::QGLViewer::saveStateToFile() when a CGAL::QGLViewer is closed. */ -CGAL_INLINE_FUNCTION -QDomElement KeyFrameInterpolator::domElement(const QString &name, - QDomDocument &document) const { - QDomElement de = document.createElement(name); - int count = 0; - Q_FOREACH (KeyFrame *kf, keyFrame_) { - Frame fr(kf->position(), kf->orientation()); - QDomElement kfNode = fr.domElement("KeyFrame", document); - kfNode.setAttribute("index", QString::number(count)); - kfNode.setAttribute("time", QString::number(kf->time())); - de.appendChild(kfNode); - ++count; - } - de.setAttribute("nbKF", QString::number(keyFrame_.count())); - de.setAttribute("time", QString::number(interpolationTime())); - de.setAttribute("speed", QString::number(interpolationSpeed())); - de.setAttribute("period", QString::number(interpolationPeriod())); - DomUtils::setBoolAttribute(de, "closedPath", closedPath()); - DomUtils::setBoolAttribute(de, "loop", loopInterpolation()); - return de; -} - -/*! Restores the KeyFrameInterpolator state from a \c QDomElement created by - domElement(). - - Note that the frame() pointer is not included in the domElement(): you need to - setFrame() after this method to attach a Frame to the KeyFrameInterpolator. - - See Vec::initFromDOMElement() for a complete code example. - - See also Camera::initFromDOMElement() and Frame::initFromDOMElement(). */ -CGAL_INLINE_FUNCTION -void KeyFrameInterpolator::initFromDOMElement(const QDomElement &element) { - qDeleteAll(keyFrame_); - keyFrame_.clear(); - QDomElement child = element.firstChild().toElement(); - while (!child.isNull()) { - if (child.tagName() == "KeyFrame") { - Frame fr; - fr.initFromDOMElement(child); - qreal time = DomUtils::qrealFromDom(child, "time", 0.0); - addKeyFrame(fr, time); - } - - child = child.nextSibling().toElement(); - } - - // #CONNECTION# Values cut pasted from constructor - setInterpolationTime(DomUtils::qrealFromDom(element, "time", 0.0)); - setInterpolationSpeed(DomUtils::qrealFromDom(element, "speed", 1.0)); - setInterpolationPeriod(DomUtils::intFromDom(element, "period", 40)); - setClosedPath(DomUtils::boolFromDom(element, "closedPath", false)); - setLoopInterpolation(DomUtils::boolFromDom(element, "loop", false)); - - // setFrame(nullptr); - pathIsValid_ = false; - valuesAreValid_ = false; - currentFrameValid_ = false; - - stopInterpolation(); -} #ifndef DOXYGEN diff --git a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h index a481686f55c..4b9a7b6c563 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h @@ -199,15 +199,6 @@ protected Q_SLOTS: virtual void spin(); //@} - /*! @name XML representation */ - //@{ -public: - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; -public Q_SLOTS: - virtual void initFromDOMElement(const QDomElement &element); -//@} - #ifndef DOXYGEN protected: virtual void startAction( diff --git a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h index c3cae0c5b71..ec959a4a986 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h @@ -117,69 +117,6 @@ void ManipulatedCameraFrame::updateSceneUpVector() { sceneUpVector_ = inverseTransformOf(Vec(0.0, 1.0, 0.0)); } -//////////////////////////////////////////////////////////////////////////////// -// S t a t e s a v i n g a n d r e s t o r i n g // -//////////////////////////////////////////////////////////////////////////////// - -/*! Returns an XML \c QDomElement that represents the ManipulatedCameraFrame. - - Adds to the ManipulatedFrame::domElement() the ManipulatedCameraFrame specific - informations in a \c ManipulatedCameraParameters child QDomElement. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - Use initFromDOMElement() to restore the ManipulatedCameraFrame state from the - resulting \c QDomElement. - - See Vec::domElement() for a complete example. See also - Quaternion::domElement(), Frame::domElement(), Camera::domElement()... */ -CGAL_INLINE_FUNCTION -QDomElement ManipulatedCameraFrame::domElement(const QString &name, - QDomDocument &document) const { - QDomElement e = ManipulatedFrame::domElement(name, document); - QDomElement mcp = document.createElement("ManipulatedCameraParameters"); - mcp.setAttribute("flySpeed", QString::number(flySpeed())); - DomUtils::setBoolAttribute(mcp, "rotatesAroundUpVector", - rotatesAroundUpVector()); - DomUtils::setBoolAttribute(mcp, "zoomsOnPivotPoint", zoomsOnPivotPoint()); - mcp.appendChild(sceneUpVector().domElement("sceneUpVector", document)); - e.appendChild(mcp); - return e; -} - -/*! Restores the ManipulatedCameraFrame state from a \c QDomElement created by -domElement(). - -First calls ManipulatedFrame::initFromDOMElement() and then initializes -ManipulatedCameraFrame specific parameters. */ -CGAL_INLINE_FUNCTION -void ManipulatedCameraFrame::initFromDOMElement(const QDomElement &element) { - // No need to initialize, since default sceneUpVector and flySpeed are not - // meaningful. It's better to keep current ones. And it would destroy - // constraint() and referenceFrame(). *this = ManipulatedCameraFrame(); - ManipulatedFrame::initFromDOMElement(element); - - QDomElement child = element.firstChild().toElement(); - while (!child.isNull()) { - if (child.tagName() == "ManipulatedCameraParameters") { - setFlySpeed(DomUtils::qrealFromDom(child, "flySpeed", flySpeed())); - setRotatesAroundUpVector( - DomUtils::boolFromDom(child, "rotatesAroundUpVector", false)); - setZoomsOnPivotPoint( - DomUtils::boolFromDom(child, "zoomsOnPivotPoint", false)); - - QDomElement schild = child.firstChild().toElement(); - while (!schild.isNull()) { - if (schild.tagName() == "sceneUpVector") - setSceneUpVector(Vec(schild)); - - schild = schild.nextSibling().toElement(); - } - } - child = child.nextSibling().toElement(); - } -} //////////////////////////////////////////////////////////////////////////////// // M o u s e h a n d l i n g // diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h index bbef82923c0..88566c14097 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h @@ -302,15 +302,6 @@ public: virtual void checkIfGrabsMouse(int x, int y, const Camera *const camera); //@} - /*! @name XML representation */ - //@{ -public: - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; -public Q_SLOTS: - virtual void initFromDOMElement(const QDomElement &element); -//@} - #ifndef DOXYGEN protected: Quaternion deformedBallQuaternion(int x, int y, qreal cx, qreal cy, diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h index e99c1acb99e..954c49c3553 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h @@ -43,7 +43,6 @@ namespace qglviewer{ CGAL_INLINE_FUNCTION ManipulatedFrame::ManipulatedFrame() : action_(NO_MOUSE_ACTION), keepsGrabbingMouse_(false) { - // #CONNECTION# initFromDOMElement and accessor docs setRotationSensitivity(1.0); setTranslationSensitivity(1.0); setSpinningSensitivity(0.3); @@ -101,71 +100,7 @@ void ManipulatedFrame::checkIfGrabsMouse(int x, int y, (fabs(y - proj.y) < thresold))); } -//////////////////////////////////////////////////////////////////////////////// -// S t a t e s a v i n g a n d r e s t o r i n g // -//////////////////////////////////////////////////////////////////////////////// -/*! Returns an XML \c QDomElement that represents the ManipulatedFrame. - - Adds to the Frame::domElement() the ManipulatedFrame specific informations in a - \c ManipulatedParameters child QDomElement. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - Use initFromDOMElement() to restore the ManipulatedFrame state from the - resulting \c QDomElement. - - See Vec::domElement() for a complete example. See also - Quaternion::domElement(), Camera::domElement()... */ -CGAL_INLINE_FUNCTION -QDomElement ManipulatedFrame::domElement(const QString &name, - QDomDocument &document) const { - QDomElement e = Frame::domElement(name, document); - QDomElement mp = document.createElement("ManipulatedParameters"); - mp.setAttribute("rotSens", QString::number(rotationSensitivity())); - mp.setAttribute("transSens", QString::number(translationSensitivity())); - mp.setAttribute("spinSens", QString::number(spinningSensitivity())); - mp.setAttribute("wheelSens", QString::number(wheelSensitivity())); - mp.setAttribute("zoomSens", QString::number(zoomSensitivity())); - e.appendChild(mp); - return e; -} - -/*! Restores the ManipulatedFrame state from a \c QDomElement created by -domElement(). - -Fields that are not described in \p element are set to their default values (see -ManipulatedFrame()). - -First calls Frame::initFromDOMElement() and then initializes ManipulatedFrame -specific parameters. Note that constraint() and referenceFrame() are not -restored and are left unchanged. - - -See Vec::initFromDOMElement() for a complete code example. */ -CGAL_INLINE_FUNCTION -void ManipulatedFrame::initFromDOMElement(const QDomElement &element) { - // Not called since it would set constraint() and referenceFrame() to nullptr. - // *this = ManipulatedFrame(); - Frame::initFromDOMElement(element); - - stopSpinning(); - - QDomElement child = element.firstChild().toElement(); - while (!child.isNull()) { - if (child.tagName() == "ManipulatedParameters") { - // #CONNECTION# constructor default values and accessor docs - setRotationSensitivity(DomUtils::qrealFromDom(child, "rotSens", 1.0)); - setTranslationSensitivity( - DomUtils::qrealFromDom(child, "transSens", 1.0)); - setSpinningSensitivity(DomUtils::qrealFromDom(child, "spinSens", 0.3)); - setWheelSensitivity(DomUtils::qrealFromDom(child, "wheelSens", 1.0)); - setZoomSensitivity(DomUtils::qrealFromDom(child, "zoomSens", 1.0)); - } - child = child.nextSibling().toElement(); - } -} //////////////////////////////////////////////////////////////////////////////// // M o u s e h a n d l i n g // diff --git a/GraphicsView/include/CGAL/Qt/qglviewer.h b/GraphicsView/include/CGAL/Qt/qglviewer.h index 8b3ff179e9c..aed3e95103d 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer.h @@ -921,13 +921,10 @@ protected: //@{ public: QString stateFileName() const; - virtual QDomElement domElement(const QString &name, - QDomDocument &document) const; Q_SIGNALS: void needNewContext(); public Q_SLOTS: - virtual void initFromDOMElement(const QDomElement &element); virtual void saveStateToFile(); // cannot be const because of QMessageBox virtual bool restoreStateFromFile(); diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index a4f378e84da..0f263a6c0cf 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -103,7 +103,6 @@ void CGAL::QGLViewer::defaultConstructor() { // It will be set when setFullScreen(false) is called after // setFullScreen(true) - // #CONNECTION# default values in initFromDOMElement() manipulatedFrame_ = nullptr; manipulatedFrameIsACamera_ = false; mouseGrabberIsAManipulatedFrame_ = false; @@ -118,7 +117,6 @@ void CGAL::QGLViewer::defaultConstructor() { showEntireScene(); setStateFileName(".qglviewer.xml"); - // #CONNECTION# default values in initFromDOMElement() setAxisIsDrawn(false); setGridIsDrawn(false); setFPSIsDisplayed(false); @@ -179,11 +177,6 @@ other viewer's indexes) and allocated memory is released. The camera() is deleted and should be copied before if it is shared by an other viewer. */ CGAL_INLINE_FUNCTION CGAL::QGLViewer::~QGLViewer() { - // See closeEvent comment. Destructor is called (and not closeEvent) only when - // the widget is embedded. Hence we saveToFile here. It is however a bad idea - // if virtual domElement() has been overloaded ! if (parent()) - // saveStateToFileForAllViewers(); - CGAL::QGLViewer::QGLViewerPool().removeAll(this); camera()->deleteLater(); @@ -656,7 +649,7 @@ void CGAL::QGLViewer::setCameraIsEdited(bool edit) { cameraIsEdited_ = edit; if (edit) { previousCameraZClippingCoefficient_ = camera()->zClippingCoefficient(); - // #CONNECTION# 5.0 also used in domElement() and in initFromDOMElement(). + camera()->setZClippingCoefficient(5.0); } else camera()->setZClippingCoefficient(previousCameraZClippingCoefficient_); @@ -3569,343 +3562,6 @@ void CGAL::QGLViewer::saveStateToFileForAllViewers() { } } -////////////////////////////////////////////////////////////////////////// -// S a v e s t a t e b e t w e e n s e s s i o n s // -////////////////////////////////////////////////////////////////////////// - -/*! Returns the state file name. Default value is \c .qglviewer.xml. - -This is the name of the XML file where saveStateToFile() saves the viewer state -(camera state, widget geometry, display flags... see domElement()) on exit. Use -restoreStateFromFile() to restore this state later (usually in your init() -method). - -Setting this value to \c QString() will disable the automatic state file -saving that normally occurs on exit. - -If more than one viewer are created by the application, this function will -return a numbered file name (as in ".qglviewer1.xml", ".qglviewer2.xml"... using -QGLViewer::QGLViewerIndex()) for extra viewers. Each viewer will then read back -its own information in restoreStateFromFile(), provided that the viewers are -created in the same order, which is usually the case. */ -CGAL_INLINE_FUNCTION -QString CGAL::QGLViewer::stateFileName() const { - QString name = stateFileName_; - - if (!name.isEmpty() && QGLViewer::QGLViewerIndex(this) > 0) { - QFileInfo fi(name); - if (fi.suffix().isEmpty()) - name += QString::number(QGLViewer::QGLViewerIndex(this)); - else - name = fi.absolutePath() + '/' + fi.completeBaseName() + - QString::number(QGLViewer::QGLViewerIndex(this)) + "." + - fi.suffix(); - } - - return name; -} - -/*! Saves in stateFileName() an XML representation of the CGAL::QGLViewer state, -obtained from domElement(). - -Use restoreStateFromFile() to restore this viewer state. - -This method is automatically called when a viewer is closed (using Escape or -using the window's upper right \c x close button). setStateFileName() to \c -QString() to prevent this. */ -CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::saveStateToFile() { - QString name = stateFileName(); - - if (name.isEmpty()) - return; - - QFileInfo fileInfo(name); - - if (fileInfo.isDir()) { - QMessageBox::warning( - this, tr("Save to file error", "Message box window title"), - tr("State file name (%1) references a directory instead of a file.") - .arg(name)); - return; - } - - const QString dirName = fileInfo.absolutePath(); - if (!QFileInfo(dirName).exists()) { - QDir dir; - if (!(dir.mkdir(dirName))) { - QMessageBox::warning(this, - tr("Save to file error", "Message box window title"), - tr("Unable to create directory %1").arg(dirName)); - return; - } - } - - // Write the DOM tree to file - QFile f(name); - if (f.open(QIODevice::WriteOnly)) { - QTextStream out(&f); - QDomDocument doc("QGLVIEWER"); - doc.appendChild(domElement("CGAL::QGLViewer", doc)); - doc.save(out, 2); - f.flush(); - f.close(); - } else - QMessageBox::warning( - this, tr("Save to file error", "Message box window title"), - tr("Unable to save to file %1").arg(name) + ":\n" + f.errorString()); -} - -/*! Restores the CGAL::QGLViewer state from the stateFileName() file using -initFromDOMElement(). - -States are saved using saveStateToFile(), which is automatically called on -viewer exit. - -Returns \c true when the restoration is successful. Possible problems are an non -existing or unreadable stateFileName() file, an empty stateFileName() or an XML -syntax error. - -A manipulatedFrame() should be defined \e before calling this method, so that -its state can be restored. Initialization code put \e after this function will -override saved values: \code void Viewer::init() -{ -// Default initialization goes here (including the declaration of a possible -manipulatedFrame). - -if (!restoreStateFromFile()) -showEntireScene(); // Previous state cannot be restored: fit camera to scene. - -// Specific initialization that overrides file savings goes here. -} -\endcode */ -CGAL_INLINE_FUNCTION -bool CGAL::QGLViewer::restoreStateFromFile() { - QString name = stateFileName(); - - if (name.isEmpty()) - return false; - - QFileInfo fileInfo(name); - - if (!fileInfo.isFile()) - // No warning since it would be displayed at first start. - return false; - - if (!fileInfo.isReadable()) { - QMessageBox::warning( - this, tr("Problem in state restoration", "Message box window title"), - tr("File %1 is not readable.").arg(name)); - return false; - } - - // Read the DOM tree form file - QFile f(name); - if (f.open(QIODevice::ReadOnly)) { - QDomDocument doc; - doc.setContent(&f); - f.close(); - QDomElement main = doc.documentElement(); - initFromDOMElement(main); - } else { - QMessageBox::warning( - this, tr("Open file error", "Message box window title"), - tr("Unable to open file %1").arg(name) + ":\n" + f.errorString()); - return false; - } - - return true; -} - -/*! Returns an XML \c QDomElement that represents the CGAL::QGLViewer. - -Used by saveStateToFile(). restoreStateFromFile() uses initFromDOMElement() to -restore the CGAL::QGLViewer state from the resulting \c QDomElement. - -\p name is the name of the QDomElement tag. \p doc is the \c QDomDocument -factory used to create QDomElement. - -The created QDomElement contains state values (axisIsDrawn(), FPSIsDisplayed(), -isFullScreen()...), viewer geometry, as well as camera() (see -CGAL::qglviewer::Camera::domElement()) and manipulatedFrame() (if defined, see -CGAL::qglviewer::ManipulatedFrame::domElement()) states. - -Overload this method to add your own attributes to the state file: -\code -CGAL_INLINE_FUNCTION -QDomElement Viewer::domElement(const QString& name, QDomDocument& document) -const -{ -// Creates a custom node for a light -QDomElement de = document.createElement("Light"); -de.setAttribute("state", (lightIsOn()?"on":"off")); -// Note the include of the ManipulatedFrame domElement method. -de.appendChild(lightManipulatedFrame()->domElement("LightFrame", document)); - -// Get default state domElement and append custom node -CGAL_INLINE_FUNCTION -QDomElement res = CGAL::QGLViewer::domElement(name, document); -res.appendChild(de); -return res; -} -\endcode -See initFromDOMElement() for the associated restoration code. - -\attention For the manipulatedFrame(), CGAL::qglviewer::Frame::constraint() and -CGAL::qglviewer::Frame::referenceFrame() are not saved. See -CGAL::qglviewer::Frame::domElement(). */ -CGAL_INLINE_FUNCTION -QDomElement CGAL::QGLViewer::domElement(const QString &name, - QDomDocument &document) const { - QDomElement de = document.createElement(name); - - QDomElement stateNode = document.createElement("State"); - // hasMouseTracking() is not saved - stateNode.appendChild(DomUtils::QColorDomElement( - foregroundColor(), "foregroundColor", document)); - stateNode.appendChild(DomUtils::QColorDomElement( - backgroundColor(), "backgroundColor", document)); - // Revolve or fly camera mode is not saved - de.appendChild(stateNode); - - QDomElement displayNode = document.createElement("Display"); - DomUtils::setBoolAttribute(displayNode, "axisIsDrawn", axisIsDrawn()); - DomUtils::setBoolAttribute(displayNode, "gridIsDrawn", gridIsDrawn()); - DomUtils::setBoolAttribute(displayNode, "FPSIsDisplayed", FPSIsDisplayed()); - DomUtils::setBoolAttribute(displayNode, "cameraIsEdited", cameraIsEdited()); - // textIsEnabled() is not saved - de.appendChild(displayNode); - - QDomElement geometryNode = document.createElement("Geometry"); - DomUtils::setBoolAttribute(geometryNode, "fullScreen", isFullScreen()); - if (isFullScreen()) { - geometryNode.setAttribute("prevPosX", QString::number(prevPos_.x())); - geometryNode.setAttribute("prevPosY", QString::number(prevPos_.y())); - } else { - QWidget *tlw = topLevelWidget(); - geometryNode.setAttribute("width", QString::number(tlw->width())); - geometryNode.setAttribute("height", QString::number(tlw->height())); - geometryNode.setAttribute("posX", QString::number(tlw->pos().x())); - geometryNode.setAttribute("posY", QString::number(tlw->pos().y())); - } - de.appendChild(geometryNode); - - // Restore original Camera zClippingCoefficient before saving. - if (cameraIsEdited()) - camera()->setZClippingCoefficient(previousCameraZClippingCoefficient_); - de.appendChild(camera()->domElement("Camera", document)); - if (cameraIsEdited()) - // #CONNECTION# 5.0 from setCameraIsEdited() - camera()->setZClippingCoefficient(5.0); - - if (manipulatedFrame()) - de.appendChild( - manipulatedFrame()->domElement("ManipulatedFrame", document)); - - return de; -} - -/*! Restores the CGAL::QGLViewer state from a \c QDomElement created by domElement(). - -Used by restoreStateFromFile() to restore the CGAL::QGLViewer state from a file. - -Overload this method to retrieve custom attributes from the CGAL::QGLViewer state -file. This code corresponds to the one given in the domElement() documentation: -\code -CGAL_INLINE_FUNCTION -void Viewer::initFromDOMElement(const QDomElement& element) -{ -// Restore standard state -CGAL_INLINE_FUNCTION -CGAL::QGLViewer::initFromDOMElement(element); - -QDomElement child=element.firstChild().toElement(); -while (!child.isNull()) -{ -if (child.tagName() == "Light") -{ -if (child.hasAttribute("state")) -setLightOn(child.attribute("state").toLower() == "on"); - -// Assumes there is only one child. Otherwise you need to parse child's children -recursively. QDomElement lf = child.firstChild().toElement(); if (!lf.isNull() -&& lf.tagName() == "LightFrame") -lightManipulatedFrame()->initFromDomElement(lf); -} -child = child.nextSibling().toElement(); -} -} -\endcode - -CGAL_INLINE_FUNCTION -See also CGAL::qglviewer::Camera::initFromDOMElement(), -CGAL::qglviewer::ManipulatedFrame::initFromDOMElement(). - -\note The manipulatedFrame() \e pointer is not modified by this method. If -defined, its state is simply set from the \p element values. */ -CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::initFromDOMElement(const QDomElement &element) { - QDomElement child = element.firstChild().toElement(); - bool tmpCameraIsEdited = cameraIsEdited(); - while (!child.isNull()) { - if (child.tagName() == "State") { - // #CONNECTION# default values from defaultConstructor() - // setMouseTracking(DomUtils::boolFromDom(child, "mouseTracking", false)); - // if ((child.attribute("cameraMode", "revolve") == "fly") && - // (cameraIsInRevolveMode())) toggleCameraMode(); - - QDomElement ch = child.firstChild().toElement(); - while (!ch.isNull()) { - if (ch.tagName() == "foregroundColor") - setForegroundColor(DomUtils::QColorFromDom(ch)); - if (ch.tagName() == "backgroundColor") - setBackgroundColor(DomUtils::QColorFromDom(ch)); - ch = ch.nextSibling().toElement(); - } - } - - if (child.tagName() == "Display") { - // #CONNECTION# default values from defaultConstructor() - setAxisIsDrawn(DomUtils::boolFromDom(child, "axisIsDrawn", false)); - setGridIsDrawn(DomUtils::boolFromDom(child, "gridIsDrawn", false)); - setFPSIsDisplayed(DomUtils::boolFromDom(child, "FPSIsDisplayed", false)); - } - - if (child.tagName() == "Geometry") { - setFullScreen(DomUtils::boolFromDom(child, "fullScreen", false)); - - if (!isFullScreen()) - { - int width = DomUtils::intFromDom(child, "width", 600); - int height = DomUtils::intFromDom(child, "height", 400); - topLevelWidget()->resize(width, height); - camera()->setScreenWidthAndHeight(this->width(), this->height()); - - QPoint pos; - pos.setX(DomUtils::intFromDom(child, "posX", 0)); - pos.setY(DomUtils::intFromDom(child, "posY", 0)); - topLevelWidget()->move(pos); - } - } - - child = child.nextSibling().toElement(); - } - - // The Camera always stores its "real" zClippingCoef in domElement(). If it is - // edited, its "real" coef must be saved and the coef set to 5.0, as is done - // in setCameraIsEdited(). BUT : Camera and Display are read in an arbitrary - // order. We must initialize Camera's "real" coef BEFORE calling - // setCameraIsEdited. Hence this temp cameraIsEdited and delayed call - cameraIsEdited_ = tmpCameraIsEdited; - if (cameraIsEdited_) { - previousCameraZClippingCoefficient_ = camera()->zClippingCoefficient(); - // #CONNECTION# 5.0 from setCameraIsEdited. - camera()->setZClippingCoefficient(5.0); - } -} - - - CGAL_INLINE_FUNCTION void CGAL::QGLViewer::copyBufferToTexture(GLint , GLenum ) { } diff --git a/GraphicsView/include/CGAL/Qt/quaternion.h b/GraphicsView/include/CGAL/Qt/quaternion.h index ae9fc6365d6..5322db4bea9 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion.h +++ b/GraphicsView/include/CGAL/Qt/quaternion.h @@ -300,12 +300,6 @@ public: static Quaternion randomQuaternion(); //@} - /*! @name XML representation */ - //@{ - explicit Quaternion(const QDomElement &element); - QDomElement domElement(const QString &name, QDomDocument &document) const; - void initFromDOMElement(const QDomElement &element); -//@} #ifdef DOXYGEN /*! @name Output stream */ diff --git a/GraphicsView/include/CGAL/Qt/quaternion_impl.h b/GraphicsView/include/CGAL/Qt/quaternion_impl.h index 6f5f8fff5fa..cf520688276 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion_impl.h +++ b/GraphicsView/include/CGAL/Qt/quaternion_impl.h @@ -211,71 +211,6 @@ qreal Quaternion::angle() const { return (angle <= CGAL_PI) ? angle : 2.0 * CGAL_PI - angle; } -/*! Returns an XML \c QDomElement that represents the Quaternion. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - When output to a file, the resulting QDomElement will look like: - \code - - \endcode - - Use initFromDOMElement() to restore the Quaternion state from the resulting \c - QDomElement. See also the Quaternion(const QDomElement&) constructor. - -CGAL_INLINE_FUNCTION - See the Vec::domElement() documentation for a complete QDomDocument creation - and saving example. - -CGAL_INLINE_FUNCTION - See also Frame::domElement(), Camera::domElement(), -CGAL_INLINE_FUNCTION - KeyFrameInterpolator::domElement()... */ -CGAL_INLINE_FUNCTION -QDomElement Quaternion::domElement(const QString &name, - QDomDocument &document) const { - QDomElement de = document.createElement(name); - de.setAttribute("q0", QString::number(q[0])); - de.setAttribute("q1", QString::number(q[1])); - de.setAttribute("q2", QString::number(q[2])); - de.setAttribute("q3", QString::number(q[3])); - return de; -} - -/*! Restores the Quaternion state from a \c QDomElement created by domElement(). - - The \c QDomElement should contain the \c q0, \c q1 , \c q2 and \c q3 - attributes. If one of these attributes is missing or is not a number, a warning - is displayed and these fields are respectively set to 0.0, 0.0, 0.0 and 1.0 - (identity Quaternion). - - See also the Quaternion(const QDomElement&) constructor. */ -CGAL_INLINE_FUNCTION -void Quaternion::initFromDOMElement(const QDomElement &element) { - Quaternion q(element); - *this = q; -} - -/*! Constructs a Quaternion from a \c QDomElement representing an XML code of - the form \code< anyTagName q0=".." q1=".." q2=".." q3=".." />\endcode - - If one of these attributes is missing or is not a number, a warning is - displayed and the associated value is respectively set to 0, 0, 0 and 1 - (identity Quaternion). - - See also domElement() and initFromDOMElement(). */ -CGAL_INLINE_FUNCTION -Quaternion::Quaternion(const QDomElement &element) { - QStringList attribute; - attribute << "q0" - << "q1" - << "q2" - << "q3"; - for (int i = 0; i < attribute.size(); ++i) - q[i] = DomUtils::qrealFromDom(element, attribute[i], ((i < 3) ? 0.0 : 1.0)); -} - /*! Returns the Quaternion associated 4x4 OpenGL rotation matrix. Use \c glMultMatrixd(q.matrix()) to apply the rotation represented by diff --git a/GraphicsView/include/CGAL/Qt/vec.h b/GraphicsView/include/CGAL/Qt/vec.h index 615df43987e..903db34f0f9 100644 --- a/GraphicsView/include/CGAL/Qt/vec.h +++ b/GraphicsView/include/CGAL/Qt/vec.h @@ -16,8 +16,6 @@ #include #include -#include - // Included by all files as vec.h is at the end of the include hierarchy #include @@ -334,12 +332,6 @@ Normalizing a null vector will result in \c NaN values. */ void projectOnPlane(const Vec &normal); //@} - /*! @name XML representation */ - //@{ - explicit Vec(const QDomElement &element); - QDomElement domElement(const QString &name, QDomDocument &document) const; - void initFromDOMElement(const QDomElement &element); -//@} #ifdef DOXYGEN /*! @name Output stream */ diff --git a/GraphicsView/include/CGAL/Qt/vec_impl.h b/GraphicsView/include/CGAL/Qt/vec_impl.h index 84f8296159f..ed7911d0f19 100644 --- a/GraphicsView/include/CGAL/Qt/vec_impl.h +++ b/GraphicsView/include/CGAL/Qt/vec_impl.h @@ -72,100 +72,6 @@ Vec Vec::orthogonalVec() const { return Vec(-y, x, 0.0); } -/*! Constructs a Vec from a \c QDomElement representing an XML code of the form - \code< anyTagName x=".." y=".." z=".." />\endcode - -If one of these attributes is missing or is not a number, a warning is displayed -and the associated value is set to 0.0. - -See also domElement() and initFromDOMElement(). */ -CGAL_INLINE_FUNCTION -Vec::Vec(const QDomElement &element) { - QStringList attribute; - attribute << "x" - << "y" - << "z"; - for (int i = 0; i < attribute.size(); ++i) -#ifdef QGLVIEWER_UNION_NOT_SUPPORTED - this->operator[](i) = DomUtils::qrealFromDom(element, attribute[i], 0.0); -#else - v_[i] = DomUtils::qrealFromDom(element, attribute[i], 0.0); -#endif -} - -/*! Returns an XML \c QDomElement that represents the Vec. - - \p name is the name of the QDomElement tag. \p doc is the \c QDomDocument - factory used to create QDomElement. - - When output to a file, the resulting QDomElement will look like: - \code - - \endcode - - Use initFromDOMElement() to restore the Vec state from the resulting \c - QDomElement. See also the Vec(const QDomElement&) constructor. - - Here is complete example that creates a QDomDocument and saves it into a file: - \code - Vec sunPos; - QDomDocument document("myDocument"); - QDomElement sunElement = document.createElement("Sun"); - document.appendChild(sunElement); - sunElement.setAttribute("brightness", sunBrightness()); - sunElement.appendChild(sunPos.domElement("sunPosition", document)); - // Other additions to the document hierarchy... - - // Save doc document - QFile f("myFile.xml"); - if (f.open(IO_WriteOnly)) - { - QTextStream out(&f); - document.save(out, 2); - f.close(); - } - \endcode - -CGAL_INLINE_FUNCTION - See also Quaternion::domElement(), Frame::domElement(), Camera::domElement()... - */ -CGAL_INLINE_FUNCTION -QDomElement Vec::domElement(const QString &name, QDomDocument &document) const { - QDomElement de = document.createElement(name); - de.setAttribute("x", QString::number(x)); - de.setAttribute("y", QString::number(y)); - de.setAttribute("z", QString::number(z)); - return de; -} - -/*! Restores the Vec state from a \c QDomElement created by domElement(). - - The \c QDomElement should contain \c x, \c y and \c z attributes. If one of - these attributes is missing or is not a number, a warning is displayed and the - associated value is set to 0.0. - - To restore the Vec state from an xml file, use: - \code - // Load DOM from file - QDomDocument doc; - QFile f("myFile.xml"); - if (f.open(IO_ReadOnly)) - { - doc.setContent(&f); - f.close(); - } - // Parse the DOM tree and initialize - QDomElement main=doc.documentElement(); - myVec.initFromDOMElement(main); - \endcode - - See also the Vec(const QDomElement&) constructor. */ -CGAL_INLINE_FUNCTION -void Vec::initFromDOMElement(const QDomElement &element) { - const Vec v(element); - *this = v; -} - CGAL_INLINE_FUNCTION std::ostream &operator<<(std::ostream &o, const Vec &v) { return o << v.x << '\t' << v.y << '\t' << v.z; diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 99281d11635..5890f968422 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1157,7 +1157,7 @@ if(CGAL_BRANCH_BUILD) find_package(GMP REQUIRED) find_package(Doxygen REQUIRED) find_package(Eigen3 REQUIRED) - find_package(Qt5 COMPONENTS Core Widgets Xml OpenGL Gui REQUIRED) + find_package(Qt5 COMPONENTS Core Widgets OpenGL Gui REQUIRED) find_package(VTK COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) find_package(IPE) find_package(RS3) @@ -1168,10 +1168,9 @@ if(CGAL_BRANCH_BUILD) set(compile_options "\ ${CMAKE_CXX_FLAGS} -DCGAL_EIGEN3_ENABLED -DCGAL_PROFILE \ -${Qt5Widgets_DEFINITIONS} ${Qt5Xml_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5Gui_DEFINITIONS} \ +${Qt5Widgets_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5Gui_DEFINITIONS} \ ${Qt5OpenGL_EXECUTABLE_COMPILE_FLAGS} -fPIC \ ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} \ -${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} \ ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} \ ${CGAL_DEFINITIONS}") message("COMPILATION OPTIONS ARE : ${compile_options}") @@ -1267,7 +1266,6 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") ${GMP_INCLUDE_DIR} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} - ${Qt5Xml_INCLUDE_DIRS} ${Qt5Gui_DEFINITIONS} ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS}) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 1d49f69cf2f..76b250600d2 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -37,7 +37,7 @@ add_definitions(-DCGAL_PROFILE_LCC_DEMO) ################## find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Svg) if(NOT (CGAL_Qt5_FOUND diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index bbbeecc0371..811619b9522 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -17,7 +17,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) # Find Qt5 itself -find_package(Qt5 QUIET COMPONENTS Xml OpenGL Help Core) +find_package(Qt5 QUIET COMPONENTS OpenGL Help Core) if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index ee10c5ac9ca..4f73377504b 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -19,7 +19,7 @@ set(CMAKE_AUTOMOC ON) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS Xml Script Help OpenGL Svg) +find_package(Qt5 QUIET COMPONENTS Script Help OpenGL Svg) if(Qt5Help_VERSION VERSION_LESS 5.12) set(CGAL_QCOLLECTIONGENERATOR_TARGET Qt5::qcollectiongenerator) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index a057727c87b..8c84a62592a 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -69,7 +69,7 @@ include(${CGAL_USE_FILE}) find_package( Qt5 QUIET - COMPONENTS OpenGL Script Xml + COMPONENTS OpenGL Script OPTIONAL_COMPONENTS ScriptTools WebSockets) set_package_properties( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt index 6cde165b88d..9457b7bdc5d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 ImageIO) # Find Qt5 itself find_package( Qt5 QUIET - COMPONENTS OpenGL Script Svg Xml + COMPONENTS OpenGL Script Svg OPTIONAL_COMPONENTS ScriptTools WebSockets) if(RUNNING_CGAL_AUTO_TEST) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 65c33cb6436..19f85245921 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) set(CMAKE_INCLUDE_CURRENT_DIR ON) -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Widgets Svg) +find_package(Qt5 QUIET COMPONENTS Script OpenGL Widgets Svg) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index df54844c7b7..67a8e78c844 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -28,7 +28,7 @@ if(NOT TARGET CGAL::Eigen3_support) endif() # Find Qt5 itself -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL) +find_package(Qt5 QUIET COMPONENTS Script OpenGL) if(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 3402ae6a380..96e3edb9472 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -39,14 +39,14 @@ endforeach() include_directories(./) -# QGLViwer needs Qt5 configured with QtOpenGL and QtXml support +# QGLViewer needs Qt5 configured with QtOpenGL find_package(CGAL REQUIRED COMPONENTS ImageIO Qt5) if(CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) add_definitions(-DQT_NO_KEYWORDS) - find_package(Qt5 QUIET COMPONENTS OpenGL Xml Svg) + find_package(Qt5 QUIET COMPONENTS OpenGL Svg) find_package(OpenGL) if(Qt5_FOUND diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index ddd0963b4a9..1c4f8aade5d 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -20,7 +20,7 @@ set(CMAKE_AUTOMOC ON) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Qt5 QUIET COMPONENTS OpenGL Xml) +find_package(Qt5 QUIET COMPONENTS OpenGL) if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) @@ -70,7 +70,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_to_cached_list(CGAL_EXECUTABLE_TARGETS T3_demo) target_link_libraries(T3_demo PRIVATE CGAL::CGAL CGAL::CGAL_Qt5) - target_link_libraries(T3_demo PRIVATE Qt5::OpenGL Qt5::Xml) + target_link_libraries(T3_demo PRIVATE Qt5::OpenGL) if(TARGET CGAL::TBB_support) target_link_libraries(T3_demo PUBLIC CGAL::TBB_support) endif() From c9a020bb1a5559ab14ab74d412e27733aced9f10 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 12:12:56 +0100 Subject: [PATCH 294/317] Remove remaining includes --- .../include/CGAL/Qt/Basic_viewer_qt.h | 2 - .../include/CGAL/Qt/DemosMainWindow_impl.h | 4 -- GraphicsView/include/CGAL/Qt/camera_impl.h | 1 - GraphicsView/include/CGAL/Qt/frame_impl.h | 1 - .../CGAL/Qt/keyFrameInterpolator_impl.h | 1 - .../CGAL/Qt/manipulatedCameraFrame_impl.h | 1 - .../include/CGAL/Qt/manipulatedFrame_impl.h | 1 - GraphicsView/include/CGAL/Qt/qglviewer.h | 33 ++---------- GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 52 ------------------- .../include/CGAL/Qt/quaternion_impl.h | 1 - GraphicsView/include/CGAL/Qt/vec_impl.h | 1 - .../Linear_cell_complex/basic_viewer.h | 1 - Polyhedron/demo/Polyhedron/MainWindow.cpp | 2 - 13 files changed, 3 insertions(+), 98 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 11058fe04e6..0727222ee01 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -1262,8 +1262,6 @@ protected: virtual void init() { - // Restore previous viewer state. - restoreStateFromFile(); initializeOpenGLFunctions(); // Light default parameters diff --git a/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h b/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h index be82c3fecca..009b142b963 100644 --- a/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h +++ b/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h @@ -458,10 +458,6 @@ void DemosMainWindow::readState(QString groupname, Options /*what_to_save*/) move(pos); } - QByteArray mainWindowState = settings.value("state").toByteArray(); - if(!mainWindowState.isNull()) { - this->restoreState(mainWindowState); - } settings.endGroup(); } diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 7321b58a0c7..21c7eb8966c 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -21,7 +21,6 @@ #include #include -#include #include namespace CGAL{ diff --git a/GraphicsView/include/CGAL/Qt/frame_impl.h b/GraphicsView/include/CGAL/Qt/frame_impl.h index 9ba5bfc5941..bb8089dc65c 100644 --- a/GraphicsView/include/CGAL/Qt/frame_impl.h +++ b/GraphicsView/include/CGAL/Qt/frame_impl.h @@ -21,7 +21,6 @@ #include #include -#include #include namespace CGAL{ diff --git a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h index 067aba57041..fb0b2564ba6 100644 --- a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h +++ b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h @@ -19,7 +19,6 @@ #endif #include -#include namespace CGAL{ namespace qglviewer{ diff --git a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h index ec959a4a986..885ce76c7c2 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h index 954c49c3553..dbf263c30d4 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/GraphicsView/include/CGAL/Qt/qglviewer.h b/GraphicsView/include/CGAL/Qt/qglviewer.h index aed3e95103d..22f190be7ec 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer.h @@ -179,9 +179,7 @@ public: /*! Returns the background color of the viewer. This method is provided for convenience since the background color is an - OpenGL state variable set with \c glClearColor(). However, this internal - representation has the advantage that it is saved (resp. restored) with - saveStateToFile() (resp. restoreStateFromFile()). + OpenGL state variable set with \c glClearColor(). Use setBackgroundColor() to define and activate a background color. @@ -667,9 +665,8 @@ protected: initialize some of the OpenGL flags. The default implementation is empty. See initializeGL(). - Typical usage include camera() initialization (showEntireScene()), previous - viewer state restoration (restoreStateFromFile()), OpenGL state modification - and display list creation. + Typical usage include camera() initialization (showEntireScene()), + OpenGL state modification and display list creation. Note that initializeGL() modifies the standard OpenGL context. These values can be restored back in this method. @@ -719,7 +716,6 @@ protected: virtual void keyPressEvent(QKeyEvent *); virtual void keyReleaseEvent(QKeyEvent *); virtual void timerEvent(QTimerEvent *); - virtual void closeEvent(QCloseEvent *); //@} /*! @name Object selection */ @@ -924,29 +920,8 @@ public: Q_SIGNALS: void needNewContext(); -public Q_SLOTS: - virtual void saveStateToFile(); // cannot be const because of QMessageBox - virtual bool restoreStateFromFile(); - - /*! Defines the stateFileName() used by saveStateToFile() and - restoreStateFromFile(). - - The file name can have an optional prefix directory (no prefix meaning - current directory). If the directory does not exist, it will be created by - saveStateToFile(). - - \code - // Name depends on the displayed 3D model. Saved in current directory. - setStateFileName(3DModelName() + ".xml"); - - // Files are stored in a dedicated directory under user's home directory. - setStateFileName(QDir::homeDirPath + "/.config/myApp.xml"); - \endcode */ - void setStateFileName(const QString &name) { stateFileName_ = name; } - protected: - static void saveStateToFileForAllViewers(); //@} /*! @name QGLViewer pool */ @@ -1165,8 +1140,6 @@ protected: QMap clickBinding_; ::Qt::Key currentlyPressedKey_; - // S t a t e F i l e - QString stateFileName_; // H e l p w i n d o w QTabWidget *helpWidget_; diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 0f263a6c0cf..6788abc80f4 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -115,7 +114,6 @@ void CGAL::QGLViewer::defaultConstructor() { setSceneRadius(1.0); showEntireScene(); - setStateFileName(".qglviewer.xml"); setAxisIsDrawn(false); setGridIsDrawn(false); @@ -1066,46 +1064,6 @@ void CGAL::QGLViewer::stopAnimation() { killTimer(animationTimerId_); } -/*! Overloading of the \c QWidget method. - -Saves the viewer state using saveStateToFile() and then calls -QOpenGLWidget::closeEvent(). */ -CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::closeEvent(QCloseEvent *e) { - // When the user clicks on the window close (x) button: - // - If the viewer is a top level window, closeEvent is called and then saves - // to file. - Otherwise, nothing happen s:( When the user press the - // EXIT_VIEWER keyboard shortcut: - If the viewer is a top level window, - // saveStateToFile() is also called - Otherwise, closeEvent is NOT called and - // keyPressEvent does the job. - - /* After tests: - E : Embedded widget - N : Widget created with new - C : closeEvent called - D : destructor called - - E N C D - y y - y n y - n y y - n n y y - - closeEvent is called iif the widget is NOT embedded. - - Destructor is called iif the widget is created on the stack - or if widget (resp. parent if embedded) is created with WDestructiveClose - flag. - - closeEvent always before destructor. - - Close using qApp->closeAllWindows or (x) is identical. - */ - - // #CONNECTION# Also done for EXIT_VIEWER in keyPressEvent(). - saveStateToFile(); - QOpenGLWidget::closeEvent(e); -} /*! Simple wrapper method: calls \c select(event->pos()). @@ -2343,7 +2301,6 @@ void CGAL::QGLViewer::handleKeyboardAction(qglviewer::KeyboardAction id) { toggleTextIsEnabled(); break; case qglviewer::EXIT_VIEWER: - saveStateToFileForAllViewers(); qApp->closeAllWindows(); break; case qglviewer::FULL_SCREEN: @@ -3552,15 +3509,6 @@ void CGAL::QGLViewer::drawGrid(qreal size, int nbSubdivisions) { // S t a t i c m e t h o d s : Q G L V i e w e r P o o l // //////////////////////////////////////////////////////////////////////////////// -/*! saveStateToFile() is called on all the CGAL::QGLViewers using the QGLViewerPool(). - */ -CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::saveStateToFileForAllViewers() { - Q_FOREACH (CGAL::QGLViewer *viewer, CGAL::QGLViewer::QGLViewerPool()) { - if (viewer) - viewer->saveStateToFile(); - } -} CGAL_INLINE_FUNCTION void CGAL::QGLViewer::copyBufferToTexture(GLint , GLenum ) { diff --git a/GraphicsView/include/CGAL/Qt/quaternion_impl.h b/GraphicsView/include/CGAL/Qt/quaternion_impl.h index cf520688276..bd719acfbfe 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion_impl.h +++ b/GraphicsView/include/CGAL/Qt/quaternion_impl.h @@ -20,7 +20,6 @@ #endif #include #include -#include #include // RAND_MAX // All the methods are declared inline in Quaternion.h diff --git a/GraphicsView/include/CGAL/Qt/vec_impl.h b/GraphicsView/include/CGAL/Qt/vec_impl.h index ed7911d0f19..4ab54771d68 100644 --- a/GraphicsView/include/CGAL/Qt/vec_impl.h +++ b/GraphicsView/include/CGAL/Qt/vec_impl.h @@ -20,7 +20,6 @@ #endif #include -#include // Most of the methods are declared inline in vec.h diff --git a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h index db5a49f847f..e7f6ca25d77 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h +++ b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h @@ -884,7 +884,6 @@ protected: virtual void init() { // Restore previous viewer state. - restoreStateFromFile(); initializeOpenGLFunctions(); // Define 'Control+Q' as the new exit shortcut (default was 'Escape') diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 7b501434fe7..fe0544063a2 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -3219,8 +3219,6 @@ void MainWindow::setDefaultSaveDir() void MainWindow::setupViewer(Viewer* viewer, SubViewer* subviewer) { - // do not save the state of the viewer (anoying) - viewer->setStateFileName(QString()); viewer->textRenderer()->setScene(scene); viewer->setScene(scene); connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )), From 602b8d6951f6529cfb4820ff14f0600f6ed862fd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 14:44:16 +0100 Subject: [PATCH 295/317] Restore missing deps info in installation if running testsuite --- Installation/CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index fc18bc69bbb..e47e1b0531c 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1298,3 +1298,22 @@ if(NOT CGAL_BRANCH_BUILD AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doc") # in a non-branch build this is the top-level CMakeLists.txt add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/doc") endif() + +#print some info about versions +if(RUNNING_CGAL_AUTO_TEST) + find_package(Qt5 QUIET COMPONENTS Core) + if(NOT CGAL_DISABLE_GMP) + find_package(GMP) + find_package(MPFR) + find_package(Boost) + get_dependency_version(GMP) + get_dependency_version(MPFR) + message( + STATUS + "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" + ) + if(Qt5_FOUND) + message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") + endif()#Qt5_FOUND + endif()#NOT CGAL_DISABLE_GMP +endif()#RUNNING_CGAL_AUTO_TEST From b5ead138030a00b2bebf93e30013fd867d44477f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 14:57:50 +0100 Subject: [PATCH 296/317] add leda --- Installation/CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index e47e1b0531c..a8a430ee3bc 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1302,18 +1302,20 @@ endif() #print some info about versions if(RUNNING_CGAL_AUTO_TEST) find_package(Qt5 QUIET COMPONENTS Core) + find_package(Boost) if(NOT CGAL_DISABLE_GMP) find_package(GMP) find_package(MPFR) - find_package(Boost) get_dependency_version(GMP) get_dependency_version(MPFR) - message( - STATUS - "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" - ) - if(Qt5_FOUND) - message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") - endif()#Qt5_FOUND + elseif(WITH_LEDA)#CGAL_DISABLE_GMP + find_package(LEDA) endif()#NOT CGAL_DISABLE_GMP + message( + STATUS + "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" + ) + if(Qt5_FOUND) + message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") + endif()#Qt5_FOUND endif()#RUNNING_CGAL_AUTO_TEST From 519870c4cbf6d04ee6931f0f8b8680940bd61e33 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Feb 2021 15:38:08 +0100 Subject: [PATCH 297/317] Add support for MSVC 2015 MSVC 2015 has a partial support for C++14, and in particular for C++14 `constexpr` functions. Since Boost-1.57 (that is the minimal requirement for CGAL since version 5.0), `` has a macro `BOOST_CXX14_CONSTEXPR` that can be either `constexpr` for fully-C++14 compilers, or empty for non-compliant compilers. --- STL_Extension/include/CGAL/array.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 5a80d1335fe..1693c6994e8 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -46,7 +46,8 @@ namespace CGAL { // It's also untrue that this is not documented... It is ! template< typename T, typename... Args > -constexpr std::array< T, 1 + sizeof...(Args) > +BOOST_CXX14_CONSTEXPR +std::array< T, 1 + sizeof...(Args) > make_array(const T & t, const Args & ... args) { std::array< T, 1 + sizeof...(Args) > a = { { t, static_cast(args)... } }; From 363b8400ddbf3ecccc020822abadff435cff34d2 Mon Sep 17 00:00:00 2001 From: Maxime GIMENO Date: Wed, 10 Feb 2021 08:35:07 +0100 Subject: [PATCH 298/317] Update Installation/CMakeLists.txt Co-authored-by: Laurent Rineau --- Installation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index a8a430ee3bc..6bc26431c22 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1300,7 +1300,7 @@ if(NOT CGAL_BRANCH_BUILD AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doc") endif() #print some info about versions -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) find_package(Qt5 QUIET COMPONENTS Core) find_package(Boost) if(NOT CGAL_DISABLE_GMP) From 0e4345741c7fb24373350c512feee798356749a1 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 10 Feb 2021 08:54:26 +0100 Subject: [PATCH 299/317] Do the cpp too --- AABB_tree/demo/AABB_tree/MainWindow.cpp | 2 -- Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp | 2 -- .../periodic_3_triangulation_3_demo.cpp | 2 -- .../demo/Principal_component_analysis/MainWindow.cpp | 3 --- Surface_mesher/demo/Surface_mesher/viewer.cpp | 4 +--- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/MainWindow.cpp b/AABB_tree/demo/AABB_tree/MainWindow.cpp index 78a8336f076..bde07b1b29f 100644 --- a/AABB_tree/demo/AABB_tree/MainWindow.cpp +++ b/AABB_tree/demo/AABB_tree/MainWindow.cpp @@ -22,8 +22,6 @@ MainWindow::MainWindow(QWidget* parent) // saves some pointers from ui, for latter use. m_pViewer = ui->viewer; - // does not save the state of the viewer - m_pViewer->setStateFileName(QString()); // accepts drop events setAcceptDrops(true); diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index aa5a06c1354..38e0a192414 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -679,8 +679,6 @@ void Viewer::compute_elements() { pos_points.resize(0); pos_lines.resize(0); - // Restore previous viewer state. - restoreStateFromFile(); //random generator of points within a sphere typedef CGAL::Creator_uniform_3 Creator; diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp index 2cf672fdb48..d58698f0883 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/periodic_3_triangulation_3_demo.cpp @@ -8,8 +8,6 @@ int main(int argc, char *argv[]) CGAL::Qt::init_ogl_context(2,1); QApplication a(argc, argv); MainWindow w; - //w.ui->setupUi(w); - w.ui->viewer->restoreStateFromFile(); w.show(); diff --git a/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp b/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp index 13dde23e2a2..540480e4926 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp +++ b/Principal_component_analysis/demo/Principal_component_analysis/MainWindow.cpp @@ -25,9 +25,6 @@ MainWindow::MainWindow(QWidget* parent) // saves some pointers from ui, for latter use. m_pViewer = ui->viewer; - // does not save the state of the viewer - m_pViewer->setStateFileName(QString()); - // accepts drop events setAcceptDrops(true); diff --git a/Surface_mesher/demo/Surface_mesher/viewer.cpp b/Surface_mesher/demo/Surface_mesher/viewer.cpp index 70d0ebe6cd4..0cde258c258 100644 --- a/Surface_mesher/demo/Surface_mesher/viewer.cpp +++ b/Surface_mesher/demo/Surface_mesher/viewer.cpp @@ -4,10 +4,8 @@ #include Viewer::Viewer(QWidget* parent) - : CGAL::QGLViewer(parent), surface(0) + : CGAL::QGLViewer(parent), surface(nullptr) { - // Do not store state in a file - setStateFileName(""); } void Viewer::init() From 6335c1068c69ba63cee0f97e8ee5e4222ba06dd4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 10 Feb 2021 10:53:37 +0000 Subject: [PATCH 300/317] Advance copies of the iterator --- Nef_3/include/CGAL/normal_vector_newell_3.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Nef_3/include/CGAL/normal_vector_newell_3.h b/Nef_3/include/CGAL/normal_vector_newell_3.h index 95810d73e7e..195144f0f4a 100644 --- a/Nef_3/include/CGAL/normal_vector_newell_3.h +++ b/Nef_3/include/CGAL/normal_vector_newell_3.h @@ -112,11 +112,13 @@ void normal_vector_newell_3( IC first, IC last, Vector& n ) // three. { CGAL_assertion( !CGAL::is_empty_range( first, last)); + if(internal_nef::is_triangle_3(first)) { - n = orthogonal_vector(*first,*(++first),*(++first)); + n = orthogonal_vector(*first,*(std::next(first)),*(std__next(first,2))); return; } + typedef typename Kernel_traits::Kernel R; // Compute facet normals via the Newell-method as described in // Filippo Tampieri: Newell's Method for Computing the Plane @@ -140,11 +142,14 @@ template void normal_vector_newell_3( IC first, IC last, VertexPointMap vpm, Vector& n ) { CGAL_assertion( !CGAL::is_empty_range( first, last)); + if(internal_nef::is_triangle_3(first)) { - n = orthogonal_vector(get(vpm,*first),get(vpm,*(++first)),get(vpm,*(++first))); + + n = orthogonal_vector(get(vpm,*first),get(vpm,*(std::next(first))),get(vpm,*(std::next(first,2)))); return; } + typedef typename Kernel_traits::Kernel R; // Compute facet normals via the Newell-method as described in // Filippo Tampieri: Newell's Method for Computing the Plane From 5345986827c6435ebeef06b556ed2113419187e2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 10 Feb 2021 11:13:14 +0000 Subject: [PATCH 301/317] Fix typo in Homogeneous case (which I hadn't tested) --- Nef_3/include/CGAL/normal_vector_newell_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nef_3/include/CGAL/normal_vector_newell_3.h b/Nef_3/include/CGAL/normal_vector_newell_3.h index 195144f0f4a..80874a1efa1 100644 --- a/Nef_3/include/CGAL/normal_vector_newell_3.h +++ b/Nef_3/include/CGAL/normal_vector_newell_3.h @@ -114,7 +114,7 @@ void normal_vector_newell_3( IC first, IC last, Vector& n ) CGAL_assertion( !CGAL::is_empty_range( first, last)); if(internal_nef::is_triangle_3(first)) { - n = orthogonal_vector(*first,*(std::next(first)),*(std__next(first,2))); + n = orthogonal_vector(*first,*(std::next(first)),*(std::next(first,2))); return; } From 08ea69f57c0ed1347e3e5609b422aa5add169dbd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 10 Feb 2021 13:43:25 +0100 Subject: [PATCH 302/317] More remaining xml --- .../cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake | 6 +++--- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 1bd28be9865..7ff7dde7a48 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -24,7 +24,7 @@ set(CGAL_SetupCGAL_Qt5Dependencies_included TRUE) # Used Modules # ^^^^^^^^^^^^ # - :module:`Qt5Config` -find_package(Qt5 QUIET COMPONENTS OpenGL Svg Xml) +find_package(Qt5 QUIET COMPONENTS OpenGL Svg) set(CGAL_Qt5_MISSING_DEPS "") if(NOT Qt5OpenGL_FOUND) @@ -75,7 +75,7 @@ if(NOT CGAL_Qt5_MISSING_DEPS) POSITION_INDEPENDENT_CODE TRUE EXCLUDE_FROM_ALL TRUE AUTOMOC TRUE) - target_link_libraries(CGAL_Qt5_moc_and_resources CGAL::CGAL Qt5::Widgets Qt5::OpenGL Qt5::Svg Qt5::Xml) + target_link_libraries(CGAL_Qt5_moc_and_resources CGAL::CGAL Qt5::Widgets Qt5::OpenGL Qt5::Svg ) add_library(CGAL::CGAL_Qt5_moc_and_resources ALIAS CGAL_Qt5_moc_and_resources) add_library(CGAL::Qt5_moc_and_resources ALIAS CGAL_Qt5_moc_and_resources) @@ -112,7 +112,7 @@ function(CGAL_setup_CGAL_Qt5_dependencies target) endif() target_link_libraries( ${target} INTERFACE CGAL::CGAL) target_link_libraries( ${target} INTERFACE CGAL::Qt5_moc_and_resources) - target_link_libraries( ${target} INTERFACE Qt5::OpenGL Qt5::Svg Qt5::Xml) + target_link_libraries( ${target} INTERFACE Qt5::OpenGL Qt5::Svg ) # Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of # version 5.12, has a lot of [-Wdeprecated-copy] warnings. diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index be375bd9d7b..70a23543a4e 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -216,7 +216,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) Primitive_container.cpp Polyhedron_demo_plugin_helper.cpp CGAL_double_edit.cpp) - target_link_libraries(demo_framework PUBLIC Qt5::OpenGL Qt5::Widgets Qt5::Gui Qt5::Xml + target_link_libraries(demo_framework PUBLIC Qt5::OpenGL Qt5::Widgets Qt5::Gui Qt5::Script CGAL::CGAL_Qt5) if(TARGET Qt5::WebSockets) target_link_libraries(demo_framework PUBLIC Qt5::WebSockets) From 5835698fe2ca396206d33da57be5a563921adcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 10 Feb 2021 15:42:29 +0100 Subject: [PATCH 303/317] no ref on temporary --- Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h b/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h index 19bb594e35e..bc66737a111 100644 --- a/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h +++ b/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h @@ -54,7 +54,7 @@ struct Facet_patch_id_map { typedef typename MeshDomain::AABB_primitive::Id Id; typedef typename MeshDomain::Patch_id value_type; - typedef const value_type& reference; + typedef value_type reference; typedef typename MeshDomain::AABB_primitive::Id key_type; typedef boost::readable_property_map_tag category; From 160118e7e9c3dd07b970b9014c563587199263b8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 11 Feb 2021 14:36:26 +0100 Subject: [PATCH 304/317] Fix a warning from MSVC 2015 include\CGAL/array.h(67): warning C4814: 'CGAL::Construct_array::operator ()': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' It cannot harm. --- STL_Extension/include/CGAL/array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 1693c6994e8..cfaca0a0550 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -61,7 +61,7 @@ struct Construct_array template constexpr std::array - operator()(const T& t, const Args& ... args) + operator()(const T& t, const Args& ... args) const { return make_array (t, args...); } From 487e6cad1013bae6fbf5ef7be04142b0852a9986 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 11 Feb 2021 14:55:23 +0100 Subject: [PATCH 305/317] use WITH_tests=ON in run_testsuite-with_ctest instead of OFF to get the USING XXX (in full header mode, configuring only cgal won't "fetch" the dependencies because of the lack of add_executbale or add_library) --- .../run_testsuite_with_ctest | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index 06ccd107d37..e22f8074a49 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -176,7 +176,7 @@ setup_dirs() if [ -n "${USE_REFERENCE_PLATFORMS}" ]; then collect_all_reference_platforms fi - + for PLATFORM in ${PLATFORMS}; do CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} @@ -226,9 +226,9 @@ publish_results() ${TAR} cf "test_results-${HOST}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.tar.gz" "results_${CGAL_TESTER}_${PLATFORM}.txt" ${COMPRESSOR} -9f "test_results-${HOST}_${PLATFORM}.tar" COMPILER=`printf "%s" "$1" | tr -c '[A-Za-z0-9]./[=-=]*_\'\''\":?() ' 'x'` - + FILENAME="${CGAL_RELEASE_ID}_${CGAL_TESTER}-test`datestr`-${COMPILER}-cmake.tar.gz" - + LOGFILENAME="${CGAL_RELEASE_ID}-log`datestr`-${HOST}.gz" ${COMPRESSOR} -9f "${ACTUAL_LOGFILE}.test.${PLATFORM}" mv "${ACTUAL_LOGFILE}.test.${PLATFORM}.gz" "${LOGS_DIR}/${LOGFILENAME}" @@ -262,7 +262,7 @@ run_test_on_platform() if [ ! -f "${INIT_FILE}" ]; then echo "error NEED A INIT FILE !" fi - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF $CGAL_DIR>installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=ON $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON" if [ -n "${SCRIPTS_DIR}" ]; then @@ -279,7 +279,7 @@ run_test_on_platform() fi INIT="" for pkg in $LIST_TEST_PACKAGES; do - if [ -z "$INIT" ]; then + if [ -z "$INIT" ]; then TO_TEST=$pkg INIT="y" else @@ -313,14 +313,14 @@ run_test_on_platform() echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" echo "CGAL_TEST_PLATFORM ${PLATFORM}" >> "$RESULT_FILE" - grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE + grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE echo "------------" >> "$RESULT_FILE" #if git branch, create empty scm file for python script if [ -n "${SCRIPTS_DIR}" ]; then touch ../../../../../.scm-branch fi python3 ${CGAL_DIR}/${TESTSUITE_DIR}test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM - + for file in $(ls|grep _Tests); do mv $file "$(echo "$file" | sed 's/_Tests//g')" done @@ -329,7 +329,7 @@ run_test_on_platform() mkdir -p Installation chmod 777 Installation cat "${CGAL_BINARY_DIR}/package_installation.log" >> "Installation/${TEST_REPORT}" - + #call the python script to complete the results report. python3 ${CGAL_DIR}/${TESTSUITE_DIR}test/post_process_ctest_results.py Installation/${TEST_REPORT} ${TEST_REPORT} results_${CGAL_TESTER}_${PLATFORM}.txt rm -f $OUTPUT_FILE $OUTPUT_FILE.gz @@ -351,7 +351,7 @@ run_test_on_host() collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" fi - for PLATFORM in ${PLATFORMS}; do + for PLATFORM in ${PLATFORMS}; do run_test_on_platform "${PLATFORM}" publish_results "${PLATFORM}" if [ -z "${KEEP_TESTS}" ]; then @@ -365,13 +365,13 @@ run_test_on_host() setup_dirs -# Setup cmake +# Setup cmake if uname | grep -q "CYGWIN"; then JOM="`which jom`" - if [ -e "$JOM" ]; then + if [ -e "$JOM" ]; then CMAKE_GENERATOR='-GNMake Makefiles JOM' MAKE_CMD='jom' - else + else CMAKE_GENERATOR='-GNMake Makefiles' MAKE_CMD='nmake' fi From 1a0dfe9703df8bc3264eae36a2c301dea2b3b1a9 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 12 Feb 2021 08:51:23 +0100 Subject: [PATCH 306/317] Fix installation logs --- Scripts/developer_scripts/run_testsuite_with_ctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index e22f8074a49..f7b740d5b94 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -262,7 +262,7 @@ run_test_on_platform() if [ ! -f "${INIT_FILE}" ]; then echo "error NEED A INIT FILE !" fi - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=ON $CGAL_DIR>installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON -DWITH_tests=ON -DCGAL_TEST_SUITE=ON $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON" if [ -n "${SCRIPTS_DIR}" ]; then From cd37d33a3073b6c2ff39f0f0d0df69734f127f98 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 12 Feb 2021 15:07:01 +0100 Subject: [PATCH 307/317] hilbert sort, added a visibility macro with the hidden option --- Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index 0ea51bb24bc..832c65ca155 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -83,8 +83,12 @@ struct Hilbert_cmp_3 } // namespace internal +#ifdef __clang__ +#define CGAL_VISIBILITY_MACRO __attribute__ ((visibility ("hidden"))) +#endif + template -class Hilbert_sort_median_3 +class CGAL_VISIBILITY_MACRO Hilbert_sort_median_3 { public: typedef Hilbert_sort_median_3 Self; From 0b23a661178df1bedc402f22d77bd4d40d2c1a3d Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 12 Feb 2021 15:23:52 +0100 Subject: [PATCH 308/317] missing default visibility --- Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index 832c65ca155..22edb791b2a 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -85,6 +85,8 @@ struct Hilbert_cmp_3 #ifdef __clang__ #define CGAL_VISIBILITY_MACRO __attribute__ ((visibility ("hidden"))) +#else +#define CGAL_VISIBILITY_MACRO __attribute__ ((visibility ("default"))) #endif template From 6b5e04a3c74fa037d12426ceaaa9d71c3bf5a396 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 12 Feb 2021 15:52:47 +0100 Subject: [PATCH 309/317] changed to empty macro for other platforms --- Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index 22edb791b2a..324a8bdb060 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -86,7 +86,7 @@ struct Hilbert_cmp_3 #ifdef __clang__ #define CGAL_VISIBILITY_MACRO __attribute__ ((visibility ("hidden"))) #else -#define CGAL_VISIBILITY_MACRO __attribute__ ((visibility ("default"))) +#define CGAL_VISIBILITY_MACRO #endif template From a74914ecbd0afdc9fccd9175269c3742e0b0cf2a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 15 Feb 2021 15:18:02 +0100 Subject: [PATCH 310/317] Fix warning null pointer --- GraphicsView/include/CGAL/Qt/camera_impl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 6629dd99994..709409f1609 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -883,10 +883,13 @@ void Camera::interpolateTo(const Frame &fr, qreal duration) { imprecision along the viewing direction. */ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { - float depth; + float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, - GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + if(parent()) + { + dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, + GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); point = unprojectedCoordinatesOf(point); From 4a6aa7e0247b9c595513562bf193b864c6717bb9 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 15 Feb 2021 15:21:23 +0100 Subject: [PATCH 311/317] use Qt::MiddleButton instead of MidButton(deprecated since 5.6 or earlier) --- GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 5e6ab9dae8a..9d77b64eb57 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -715,7 +715,7 @@ void CGAL::QGLViewer::setDefaultMouseBindings() { (mh == qglviewer::FRAME) ? frameKeyboardModifiers : cameraKeyboardModifiers; setMouseBinding(modifiers, ::Qt::LeftButton, mh, qglviewer::ROTATE); - setMouseBinding(modifiers, ::Qt::MidButton, mh, qglviewer::ZOOM); + setMouseBinding(modifiers, ::Qt::MiddleButton, mh, qglviewer::ZOOM); setMouseBinding(modifiers, ::Qt::RightButton, mh, qglviewer::TRANSLATE); setMouseBinding(::Qt::Key_R, modifiers, ::Qt::LeftButton, mh, qglviewer::SCREEN_ROTATE); @@ -724,7 +724,7 @@ void CGAL::QGLViewer::setDefaultMouseBindings() { } // Z o o m o n r e g i o n - setMouseBinding(::Qt::ShiftModifier, ::Qt::MidButton, qglviewer::CAMERA, qglviewer::ZOOM_ON_REGION); + setMouseBinding(::Qt::ShiftModifier, ::Qt::MiddleButton, qglviewer::CAMERA, qglviewer::ZOOM_ON_REGION); // S e l e c t setMouseBinding(::Qt::ShiftModifier, ::Qt::LeftButton, qglviewer::SELECT); @@ -732,7 +732,7 @@ void CGAL::QGLViewer::setDefaultMouseBindings() { setMouseBinding(::Qt::ShiftModifier, ::Qt::RightButton, qglviewer::RAP_FROM_PIXEL); // D o u b l e c l i c k setMouseBinding(::Qt::NoModifier, ::Qt::LeftButton, qglviewer::ALIGN_CAMERA, true); - setMouseBinding(::Qt::NoModifier, ::Qt::MidButton, qglviewer::SHOW_ENTIRE_SCENE, true); + setMouseBinding(::Qt::NoModifier, ::Qt::MiddleButton, qglviewer::SHOW_ENTIRE_SCENE, true); setMouseBinding(::Qt::NoModifier, ::Qt::RightButton, qglviewer::CENTER_SCENE, true); setMouseBinding(frameKeyboardModifiers, ::Qt::LeftButton, qglviewer::ALIGN_FRAME, true); @@ -1198,7 +1198,7 @@ static QString mouseButtonsString(::Qt::MouseButtons b) { result += CGAL::QGLViewer::tr("Left", "left mouse button"); addAmpersand = true; } - if (b & ::Qt::MidButton) { + if (b & ::Qt::MiddleButton) { if (addAmpersand) result += " & "; result += CGAL::QGLViewer::tr("Middle", "middle mouse button"); @@ -1733,7 +1733,7 @@ Mouse tab. \c ::Qt::AltModifier, \c ::Qt::ShiftModifier, \c ::Qt::MetaModifier). Possibly combined using the \c "|" operator. -\p button is one of the ::Qt::MouseButtons (\c ::Qt::LeftButton, \c ::Qt::MidButton, +\p button is one of the ::Qt::MouseButtons (\c ::Qt::LeftButton, \c ::Qt::MiddleButton, \c ::Qt::RightButton...). \p doubleClick indicates whether or not the user has to double click this button @@ -3008,27 +3008,27 @@ void CGAL::QGLViewer::toggleCameraMode() { camera()->frame()->stopSpinning(); setMouseBinding(modifiers, ::Qt::LeftButton, qglviewer::CAMERA, qglviewer::MOVE_FORWARD); - setMouseBinding(modifiers, ::Qt::MidButton, qglviewer::CAMERA, qglviewer::LOOK_AROUND); + setMouseBinding(modifiers, ::Qt::MiddleButton, qglviewer::CAMERA, qglviewer::LOOK_AROUND); setMouseBinding(modifiers, ::Qt::RightButton, qglviewer::CAMERA, qglviewer::MOVE_BACKWARD); setMouseBinding(::Qt::Key_R, modifiers, ::Qt::LeftButton, qglviewer::CAMERA, qglviewer::ROLL); setMouseBinding(::Qt::NoModifier, ::Qt::LeftButton, qglviewer::NO_CLICK_ACTION, true); - setMouseBinding(::Qt::NoModifier, ::Qt::MidButton, qglviewer::NO_CLICK_ACTION, true); + setMouseBinding(::Qt::NoModifier, ::Qt::MiddleButton, qglviewer::NO_CLICK_ACTION, true); setMouseBinding(::Qt::NoModifier, ::Qt::RightButton, qglviewer::NO_CLICK_ACTION, true); setWheelBinding(modifiers, qglviewer::CAMERA, qglviewer::MOVE_FORWARD); } else { // Should stop flyTimer. But unlikely and not easy. setMouseBinding(modifiers, ::Qt::LeftButton, qglviewer::CAMERA, qglviewer::ROTATE); - setMouseBinding(modifiers, ::Qt::MidButton, qglviewer::CAMERA, qglviewer::ZOOM); + setMouseBinding(modifiers, ::Qt::MiddleButton, qglviewer::CAMERA, qglviewer::ZOOM); setMouseBinding(modifiers, ::Qt::RightButton, qglviewer::CAMERA, qglviewer::TRANSLATE); setMouseBinding(::Qt::Key_R, modifiers, ::Qt::LeftButton, qglviewer::CAMERA, qglviewer::SCREEN_ROTATE); setMouseBinding(::Qt::NoModifier, ::Qt::LeftButton, qglviewer::ALIGN_CAMERA, true); - setMouseBinding(::Qt::NoModifier, ::Qt::MidButton, qglviewer::SHOW_ENTIRE_SCENE, true); + setMouseBinding(::Qt::NoModifier, ::Qt::MiddleButton, qglviewer::SHOW_ENTIRE_SCENE, true); setMouseBinding(::Qt::NoModifier, ::Qt::RightButton, qglviewer::CENTER_SCENE, true); setWheelBinding(modifiers, qglviewer::CAMERA, qglviewer::ZOOM); From 692f35a62d5ea2ffa75360d4702a88e1ff66bbcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 15 Feb 2021 17:17:20 +0100 Subject: [PATCH 312/317] fix warnings --- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 02692973e93..a50deb6ae03 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 @@ -472,7 +472,7 @@ public: { static const constexpr std::size_t NM_NID((std::numeric_limits::max)()); - for(const std::pair& tm_and_nm : + for(const std::pair& tm_and_nm : non_manifold_feature_maps) { TriangleMesh* tm_ptr = const_cast(tm_and_nm.first); @@ -485,7 +485,7 @@ public: if (eid!=NM_NID) edges_to_copy.push_back(std::make_pair(eid,&(ed_and_ids.second))); } - for(const std::pair& id_and_nodes : edges_to_copy) + for(const std::pair& id_and_nodes : edges_to_copy) { const std::vector& nm_edges = tm_and_nm.second->non_manifold_edges[id_and_nodes.first]; From 0010df67e64bb45e621cdffe85e14569e6d54bb8 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 16 Feb 2021 08:57:47 +0100 Subject: [PATCH 313/317] Remove useless if. --- GraphicsView/include/CGAL/Qt/camera_impl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 709409f1609..971ae6b1de9 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -885,11 +885,8 @@ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - if(parent()) - { dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); - } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); point = unprojectedCoordinatesOf(point); From 38f1b179c09693d71fa80f65198d27dcf878a32f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 16 Feb 2021 09:50:47 +0100 Subject: [PATCH 314/317] Test the dynamic_cast rsult --- GraphicsView/include/CGAL/Qt/camera_impl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 971ae6b1de9..2b815b6fd65 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -885,8 +885,11 @@ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, - GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + if(auto parent = dynamic_cast(parent())) + { + parent->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, + GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); point = unprojectedCoordinatesOf(point); From 90d725f3c0633a3b944cee007a68d0420733d907 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 16 Feb 2021 15:15:36 +0100 Subject: [PATCH 315/317] fix mesh_estimation --- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 3e5ffb5b93b..d446e62f911 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -13,8 +13,8 @@ if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - create_single_source_cgal_program("Mesh_estimation.cpp") if(Boost_PROGRAM_OPTIONS_FOUND) + create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) if(TARGET Boost::filesystem) target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) From 0a085569bf200e6f5f27f076a1fd48d2ab8a2159 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 17 Feb 2021 08:37:57 +0100 Subject: [PATCH 316/317] Fix parent error --- GraphicsView/include/CGAL/Qt/camera_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 2b815b6fd65..30a56a72988 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -885,10 +885,10 @@ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - if(auto parent = dynamic_cast(parent())) + if(auto p = dynamic_cast(parent())) { - parent->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, - GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + p->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, + GL_DEPTH_COMPONENT, GL_FLOAT, &depth); } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); From e011671735901c8605ceb894e6d33b94bee2d245 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 18 Feb 2021 17:18:05 +0100 Subject: [PATCH 317/317] 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 c023da89fcf..34829fff40e 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -67,7 +67,7 @@ LC_CTYPE=en_US.UTF-8 18 * * * * $HOME/bin/dump_crontab # Docker check every hour -0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 +#0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 # cgal->cgal2 with git-multimail */5 * * * * cd $HOME/Git/cgal-dev-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-dev cgal-dev-receiver