diff --git a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h index 5422c84b2ae..021cdc6270a 100644 --- a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace CGAL { @@ -57,9 +56,9 @@ template < class FaceGraph, class CacheDatum=Tag_false > class AABB_face_graph_triangle_primitive #ifndef DOXYGEN_RUNNING - : public AABB_primitive::face_descriptor, - std::pair::face_descriptor, const FaceGraph*> >::type, + : public AABB_primitive::face_descriptor, + std::pair::face_descriptor, const FaceGraph*> >, Triangle_from_face_descriptor_map< FaceGraph, typename Default::Get::const_type >::type VertexPointPMap_; typedef typename boost::graph_traits::face_descriptor FD; - typedef typename boost::mpl::if_ >::type Id_; + typedef std::conditional_t > Id_; typedef Triangle_from_face_descriptor_map Triangle_property_map; typedef One_point_from_face_descriptor_map Point_property_map; diff --git a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 13568227319..3f5481d0cfe 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -24,7 +24,6 @@ #include #include #include -#include #include @@ -70,9 +69,9 @@ template < class HalfedgeGraph, class CacheDatum = Tag_false > class AABB_halfedge_graph_segment_primitive #ifndef DOXYGEN_RUNNING - : public AABB_primitive< typename boost::mpl::if_::edge_descriptor, - std::pair::edge_descriptor, const HalfedgeGraph*> >::type, + : public AABB_primitive< std::conditional_t::edge_descriptor, + std::pair::edge_descriptor, const HalfedgeGraph*> >, Segment_from_edge_descriptor_map< HalfedgeGraph, typename Default::Get::const_type >::type VertexPointPMap_; typedef typename boost::graph_traits::edge_descriptor ED; - typedef typename boost::mpl::if_ >::type Id_; + typedef std::conditional_t > Id_; typedef Segment_from_edge_descriptor_map Segment_property_map; typedef Source_point_from_edge_descriptor_map Point_property_map; diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h b/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h index e662b13be90..3d02204b9d0 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h @@ -32,11 +32,11 @@ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_cartesian_const_iterator_3,Cartesian_const template struct Is_ray_intersection_geomtraits -: boost::mpl::and_< Has_ray_3, - Has_construct_source_3, - Has_vector_3, - Has_construct_cartesian_const_iterator_3, - Has_cartesian_const_iterator_3 >::type +: std::bool_constant< Has_ray_3::value && + Has_construct_source_3::value && + Has_vector_3::value && + Has_construct_cartesian_const_iterator_3::value && + Has_cartesian_const_iterator_3::value > {}; diff --git a/Algebraic_foundations/include/CGAL/number_utils.h b/Algebraic_foundations/include/CGAL/number_utils.h index c17823d72b9..5a5bc2d242d 100644 --- a/Algebraic_foundations/include/CGAL/number_utils.h +++ b/Algebraic_foundations/include/CGAL/number_utils.h @@ -194,21 +194,21 @@ root_of( int k, Input_iterator begin, Input_iterator end ) { template< class Number_type > inline // select a Is_zero functor -typename boost::mpl::if_c< - ::std::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero, - Null_functor >::value , +typename std::conditional_t< + std::is_same_v< typename Algebraic_structure_traits< Number_type >::Is_zero, + Null_functor >, typename Real_embeddable_traits< Number_type >::Is_zero, typename Algebraic_structure_traits< Number_type >::Is_zero ->::type::result_type +>::result_type is_zero( const Number_type& x ) { // We take the Algebraic_structure_traits<>::Is_zero functor by default. If it // is not available, we take the Real_embeddable_traits functor - typename ::boost::mpl::if_c< - ::std::is_same< + std::conditional_t< + std::is_same_v< typename Algebraic_structure_traits< Number_type >::Is_zero, - Null_functor >::value , + Null_functor > , typename Real_embeddable_traits< Number_type >::Is_zero, - typename Algebraic_structure_traits< Number_type >::Is_zero >::type + typename Algebraic_structure_traits< Number_type >::Is_zero > is_zero; return is_zero( x ); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h index 42715621e4b..85ba6ccc235 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h @@ -26,7 +26,6 @@ #include #include -#include #include namespace CGAL { @@ -120,7 +119,7 @@ locate(const Arrangement_on_surface_2& arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Bgt2&, Bgt2>::type + std::conditional_t, const Bgt2&, Bgt2> ex_traits(*geom_traits); // Define the sweep-line visitor and perform the sweep. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 2951b1983fe..dfa6fb89ffc 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -247,8 +246,8 @@ overlay(const Arrangement_on_surface_2& arr1 * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, - const Ovl_gt2&, Ovl_gt2>::type + std::conditional_t, + const Ovl_gt2&, Ovl_gt2> ex_traits(*traits_adaptor); Ovl_visitor visitor(&arr1, &arr2, &arr, &ovl_tr); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h index 91313be6c5d..8f3c78095f4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -246,14 +245,14 @@ struct Arr_all_sides_not_finite_tag : struct Arr_not_all_sides_not_finite_tag : public virtual Arr_not_all_sides_oblivious_tag {}; -typedef boost::mpl::bool_ Arr_true; -typedef boost::mpl::bool_ Arr_false; +typedef std::true_type Arr_true; +typedef std::false_type Arr_false; template struct Arr_is_side_oblivious { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -261,7 +260,7 @@ template struct Arr_is_side_open { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -269,15 +268,19 @@ template struct Arr_is_side_identified { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::bool_constant result; typedef typename result::type type; }; +template +inline constexpr bool Arr_is_side_identified_v = + Arr_is_side_identified::type::value; + template struct Arr_is_side_contracted { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -285,7 +288,7 @@ template struct Arr_is_side_closed { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -307,10 +310,10 @@ struct Arr_all_sides_oblivious_category { /*! Boolean tag that is Arr_all_sides_oblivious_tag if all sides are * oblivious, otherwise Arr_not_all_sides_oblivious_tag */ - typedef typename boost::mpl::if_, - Arr_all_sides_oblivious_tag, - Arr_not_all_sides_oblivious_tag>::type + typedef std::conditional_t result; }; @@ -331,19 +334,19 @@ private: typedef typename Arr_is_side_open::result Bot_ope; typedef typename Arr_is_side_open::result Top_ope; - typedef boost::mpl::not_ Lef_not_ope; - typedef boost::mpl::not_ Rig_not_ope; - typedef boost::mpl::not_ Bot_not_ope; - typedef boost::mpl::not_ Top_not_ope; + static inline constexpr bool lef_not_ope = !Lef_ope::value; + static inline constexpr bool rig_not_ope = !Rig_ope::value; + static inline constexpr bool bot_not_ope = !Bot_ope::value; + static inline constexpr bool top_not_ope = !Top_ope::value; public: /*! Boolean tag that is Arr_all_sides_not_open_tag if all sides are not-open, * otherwise Arr_not_all_sides_not_open_tag */ - typedef typename boost::mpl::if_, - Arr_all_sides_not_open_tag, - Arr_not_all_sides_not_open_tag>::type + typedef std::conditional_t result; }; @@ -374,23 +377,23 @@ private: typedef typename Arr_is_side_open::result Bot_ope; typedef typename Arr_is_side_open::result Top_ope; - typedef boost::mpl::or_ Lef_obl_or_ope; - typedef boost::mpl::or_ Rig_obl_or_ope; - typedef boost::mpl::or_ Bot_obl_or_ope; - typedef boost::mpl::or_ Top_obl_or_ope; + static inline constexpr bool lef_obl_or_ope = Lef_obl::value || Lef_ope::value; + static inline constexpr bool rig_obl_or_ope = Rig_obl::value || Rig_ope::value; + static inline constexpr bool bot_obl_or_ope = Bot_obl::value || Bot_ope::value; + static inline constexpr bool top_obl_or_ope = Top_obl::value || Top_ope::value; - typedef typename boost::mpl::if_, - Arr_all_sides_not_finite_tag, - Arr_not_all_sides_not_finite_tag>::type + typedef std::conditional_t tmp; public: - typedef typename boost::mpl::if_, - Arr_all_sides_oblivious_tag, tmp>::type + typedef std::conditional_t result; }; @@ -404,32 +407,27 @@ struct Arr_sane_identified_tagging { typedef ArrBottomSideCategory Bot_side_cat; typedef ArrTopSideCategory Top_side_cat; - typedef typename Arr_is_side_identified::result Lef_ide; - typedef typename Arr_is_side_identified::result Rig_ide; - typedef typename Arr_is_side_identified::result Bot_ide; - typedef typename Arr_is_side_identified::result Top_ide; + static inline constexpr bool lef_ide = Arr_is_side_identified_v; + static inline constexpr bool rig_ide = Arr_is_side_identified_v; + static inline constexpr bool bot_ide = Arr_is_side_identified_v; + static inline constexpr bool top_ide = Arr_is_side_identified_v; - typedef boost::mpl::and_ LR_ide; - typedef boost::mpl::and_ BT_ide; + static inline constexpr bool lr_ide = lef_ide && rig_ide; + static inline constexpr bool bt_ide = bot_ide && top_ide; - typedef boost::mpl::not_ Lef_not_ide; - typedef boost::mpl::not_ Rig_not_ide; - typedef boost::mpl::not_ Bot_not_ide; - typedef boost::mpl::not_ Top_not_ide; + static inline constexpr bool lr_not_ide = !lef_ide && !rig_ide; - typedef boost::mpl::and_ LR_not_ide; + static inline constexpr bool bt_not_ide = !bot_ide && !top_ide; - typedef boost::mpl::and_ BT_not_ide; + static inline constexpr bool lr_ok = lr_ide || lr_not_ide; + static inline constexpr bool bt_ok = bt_ide || bt_not_ide; - typedef boost::mpl::or_ LR_ok; - typedef boost::mpl::or_ BT_ok; - - /*! Boolean tag that is bool_ if opposite sides are either + /*! Boolean tag that is bool_constant if opposite sides are either * both identified or both not-identified, - * otherwise bool_ + * otherwise bool_constant */ - typedef boost::mpl::and_ result; - static constexpr bool value = result::value; + typedef std::bool_constant result; + static inline constexpr bool value = result::value; }; /*! Checks whether one of two boundary sides are identified @@ -448,10 +446,10 @@ struct Arr_has_identified_sides { typedef typename Arr_is_side_identified::result Side_one_ide; typedef typename Arr_is_side_identified::result Side_two_ide; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are contracted @@ -464,10 +462,11 @@ struct Arr_has_contracted_sides_two { typedef typename Arr_is_side_contracted::result Side_one_con; typedef typename Arr_is_side_contracted::result Side_two_con; - /*!\ Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*!\ Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are closed @@ -480,10 +479,11 @@ struct Arr_has_closed_sides_two { typedef typename Arr_is_side_closed::result Side_one_clo; typedef typename Arr_is_side_closed::result Side_two_clo; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are open @@ -496,10 +496,11 @@ struct Arr_has_open_sides_two { typedef typename Arr_is_side_open::result Side_one_ope; typedef typename Arr_is_side_open::result Side_two_ope; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Categorizes two boundary sides: @@ -532,11 +533,11 @@ struct Arr_two_sides_category { Is_open; public: - typedef typename boost::mpl::if_::type>::type>::type>::type + typedef std::conditional_t>>> result; }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h index 75c8f25e0c9..099f44192ee 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h @@ -24,7 +24,6 @@ #include #include -#include #include namespace CGAL { @@ -124,7 +123,7 @@ decompose(const Arrangement_on_surface_2& arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Vgt2&, Vgt2>::type + std::conditional_t, const Vgt2&, Vgt2> ex_traits(*geom_traits); // Define the sweep-line visitor and perform the sweep. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h index e4533596dd2..9bcabf985d6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h @@ -17,7 +17,6 @@ #include -#include #include #include #include @@ -59,25 +58,22 @@ public: private: - typedef boost::mpl::bool_< true > true_; - typedef boost::mpl::bool_< false > false_; + typedef std::conditional_t< + std::is_same_v< Arr_smaller_implementation_tag, Arr_use_traits_tag >, + std::true_type, std::false_type > Smaller_traits; - typedef boost::mpl::if_< - std::is_same< Arr_smaller_implementation_tag, Arr_use_traits_tag >, - true_, false_ > Smaller_traits; - - typedef boost::mpl::if_< - std::is_same< Arr_larger_implementation_tag, Arr_use_traits_tag >, - true_, false_ > Larger_traits; + typedef std::conditional_t< + std::is_same_v< Arr_larger_implementation_tag, Arr_use_traits_tag >, + std::true_type, std::false_type > Larger_traits; public: //! the result type (if one side asks for traits, then ask traits! //! Or vice versa: If both ask for dummy, then dummy!) - typedef typename boost::mpl::if_< - boost::mpl::or_< Smaller_traits, Larger_traits >, + typedef std::conditional_t< + Smaller_traits::value || Larger_traits::value, Arr_use_traits_tag, - Arr_use_dummy_tag >::type type; + Arr_use_dummy_tag > type; }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index 0f2957d4714..5bc8054c525 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include @@ -66,7 +64,7 @@ namespace Ss2 = Surface_sweep_2; // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -137,7 +135,7 @@ void insert(Arrangement_on_surface_2& arr, // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // // template & arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Cgt2&, Cgt2>::type + std::conditional_t, const Cgt2&, Cgt2> traits(*geom_traits); // Define a surface-sweep instance and perform the sweep: @@ -326,7 +324,7 @@ void insert_empty(Arrangement_on_surface_2& * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Cgt2&, Cgt2>::type + std::conditional_t, const Cgt2&, Cgt2> traits(*geom_traits); // Define a surface-sweep instance and perform the sweep. @@ -379,7 +377,7 @@ void insert_non_empty(Arrangement_on_surface_2, const Igt2&, Igt2>::type + std::conditional_t, const Igt2&, Igt2> traits(*geom_traits); // Create a set of existing as well as new curves and points. @@ -411,7 +409,7 @@ void insert_non_empty(Arrangement_on_surface_2&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -465,7 +463,7 @@ void insert(Arrangement_on_surface_2& arr, // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -979,7 +977,7 @@ non_intersecting_insert_non_empty(Arrangement_on_surface_2, const Igt2&, Igt2>::type + std::conditional_t, const Igt2&, Igt2> traits(*geom_traits); // Create a set of existing as well as new curves and points. @@ -1526,7 +1524,7 @@ zone(Arrangement_on_surface_2& arr, // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&, -// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' +// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)' // template @@ -1564,7 +1562,7 @@ do_intersect(Arrangement_on_surface_2& arr, // // error: no matching function for call to // `do_intersect(Arrangement_on_surface_2<>&, -// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' +// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)' // template diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h index 30c8b38b4a0..06052a8f19d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h @@ -295,7 +295,7 @@ protected: * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update the boundary vertices map. @@ -306,7 +306,7 @@ protected: * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. @@ -319,7 +319,7 @@ protected: * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. @@ -331,7 +331,7 @@ protected: * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created edge using the overlay traits. @@ -922,7 +922,7 @@ _map_halfedge_and_twin(Halfedge_handle he, // template void Arr_overlay_ss_visitor:: -_map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) +_map_boundary_vertices(Event* event, Vertex_handle v, std::bool_constant) { // Update the red and blue object if the last event on sc is on the boundary. if ((event->parameter_space_in_x() != ARR_INTERIOR) || @@ -960,7 +960,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) template void Arr_overlay_ss_visitor:: _map_boundary_vertices(Event* /* event */, Vertex_handle /* v */, - boost::mpl::bool_) + std::bool_constant) {} /* Notify the overlay traits about a newly created vertex. @@ -974,7 +974,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); @@ -1011,7 +1011,7 @@ _create_vertex(Event* event, return; } - _create_vertex(event, new_v, sc, boost::mpl::bool_()); + _create_vertex(event, new_v, sc, std::bool_constant()); } /* Notify the overlay traits about a newly created vertex. */ @@ -1020,7 +1020,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp index 81eae420496..a86325de2af 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp @@ -6,7 +6,6 @@ #include #include -#include struct Traits1 { typedef CGAL::Arr_open_side_tag Left_side_category; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp index 5c8e19fa12e..ce17f3b9105 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp @@ -4,7 +4,6 @@ #include #include -#include int dispatch(CGAL::Arr_use_dummy_tag) { return 0; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h index f49b92f4c01..f4975fb1428 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h @@ -55,13 +55,13 @@ private: // This function is invoked for traits classes where at least one // boundary is not oblivious and all boundaries are not identified. bool operator()(const Point_2& p1, const Point_2& p2, - boost::mpl::bool_) const + std::bool_constant) const { return (m_traits.compare_xy_2_object()(p1, p2) == CGAL::SMALLER); } // This function should be invoked for traits classes where at least one // boundary is identified. bool operator()(const Point_2& p1, const Point_2& p2, - boost::mpl::bool_) const + std::bool_constant) const { // Compare in y boundaries: CGAL::Arr_parameter_space ps_y1 = diff --git a/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h b/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h index e726e161a6b..01104c54680 100644 --- a/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h +++ b/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h @@ -20,8 +20,6 @@ #include #include -#include - namespace CGAL { // adapted from circulator.h, does not support @@ -45,23 +43,20 @@ public: typedef typename I__traits::iterator_category iterator_category; - typedef typename - boost::mpl::if_c< Prevent_deref - , C - , typename C::value_type - >::type value_type; + typedef std::conditional_t< Prevent_deref + , C + , typename C::value_type> + value_type; typedef typename C::difference_type difference_type; - typedef typename - boost::mpl::if_c< Prevent_deref - , C& - , typename C::reference - >::type reference; - typedef typename - boost::mpl::if_c< Prevent_deref - , C* - , typename C::reference - >::type pointer; + typedef std::conditional_t< Prevent_deref + , C& + , typename C::reference + > reference; + typedef std::conditional_t< Prevent_deref + , C* + , typename C::reference + > pointer; OM_iterator_from_circulator(){} diff --git a/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h b/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h index 2d85e38d35c..eddefcec7fb 100644 --- a/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h +++ b/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h @@ -276,8 +276,8 @@ class GetInitializedIndexMap { public: // Check if there is an internal property map; if not, we must a dynamic property map - typedef typename boost::mpl::if_c< - CGAL::graph_has_property::value, Tag, DynamicTag>::type Final_tag; + typedef std::conditional_t< + CGAL::graph_has_property::value, Tag, DynamicTag> Final_tag; typedef typename internal_np::Lookup_named_param_def< PropertyTag, diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 1e0efd6faa6..7dd7edd0887 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -43,14 +42,13 @@ class property_map_selector { public: typedef typename graph_has_property::type Has_internal_pmap; - typedef typename boost::mpl::if_c::type, - typename boost::cgal_no_property::type - >::type type; - typedef typename boost::mpl::if_c::const_type, - typename boost::cgal_no_property::const_type - >::type const_type; + typedef std::conditional_t::type, + typename boost::cgal_no_property::type> type; + typedef std::conditional_t::const_type, + typename boost::cgal_no_property::const_type + > const_type; type get_pmap(const PropertyTag& p, PolygonMesh& pmesh) { @@ -209,10 +207,10 @@ struct GetGeomTraits_impl::value, - typename GetK::Kernel, - Fake_GT>::type type; + typedef std::conditional_t::value, + typename GetK::Kernel, + Fake_GT> type; }; template typedef ValueType value_type; typedef Handle key_type; - typedef typename boost::mpl::if_< std::is_reference, - ValueType&, - ValueType >::type Reference; + typedef std::conditional_t< std::is_reference_v, + ValueType&, + ValueType > Reference; Point_accessor() {} Point_accessor(Point_accessor) {} @@ -172,9 +172,9 @@ struct Is_writable_property_map // property map must define. template struct Is_writable_property_map - : boost::mpl::if_c::reference>::type>::value, - CGAL::Tag_false, CGAL::Tag_true>::type + CGAL::Tag_false, CGAL::Tag_true> { }; } // namespace internal diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index 861f5aea98b..f6f56cea7ef 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -13,7 +13,6 @@ #include #include #include -#include #ifndef OPEN_MESH_CLASS #error OPEN_MESH_CLASS is not defined @@ -29,13 +28,13 @@ namespace CGAL { template class OM_pmap { public: - typedef typename boost::mpl::if_::vertex_descriptor>, - OpenMesh::VPropHandleT, - typename boost::mpl::if_::face_descriptor>, - OpenMesh::FPropHandleT, - typename boost::mpl::if_::halfedge_descriptor>, - OpenMesh::HPropHandleT, - OpenMesh::EPropHandleT >::type>::type>::type H; + typedef std::conditional_t::vertex_descriptor>, + OpenMesh::VPropHandleT, + std::conditional_t::face_descriptor>, + OpenMesh::FPropHandleT, + std::conditional_t::halfedge_descriptor>, + OpenMesh::HPropHandleT, + OpenMesh::EPropHandleT >>> H; typedef boost::lvalue_property_map_tag category; diff --git a/BGL/include/CGAL/boost/graph/property_maps.h b/BGL/include/CGAL/boost/graph/property_maps.h index aab29d9b881..b6973feb65c 100644 --- a/BGL/include/CGAL/boost/graph/property_maps.h +++ b/BGL/include/CGAL/boost/graph/property_maps.h @@ -15,7 +15,6 @@ #include #include -#include namespace CGAL{ diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h index 48572f24118..9876131f47b 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h @@ -636,12 +636,11 @@ public: template void draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false, - std::enable_if_t< boost::mpl::or_< std::is_same::value_type,Point_2> , - boost::mpl::or_< std::is_same::value_type,Segment_2> , - boost::mpl::or_< std::is_same::value_type,Circle_2> , - boost::mpl::or_< std::is_same::value_type,Circular_arc_2> , - std::is_same::value_type,Polygon_2> - > > > >::value + std::enable_if_t< std::is_same_v::value_type,Point_2> || + std::is_same_v::value_type,Segment_2> || + std::is_same_v::value_type,Circle_2> || + std::is_same_v::value_type,Circular_arc_2> || + std::is_same_v::value_type,Polygon_2> >* = nullptr) const { for (iterator it=begin;it!=end;++it) diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index 5373b0a3445..3dc51367d33 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -645,12 +645,11 @@ public: template void draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false, - std::enable_if_t< boost::mpl::or_< std::is_same::value_type,Point_2> , - boost::mpl::or_< std::is_same::value_type,Segment_2> , - boost::mpl::or_< std::is_same::value_type,Circle_2> , - boost::mpl::or_< std::is_same::value_type,Circular_arc_2> , - std::is_same::value_type,Polygon_2> - > > > >::value + std::enable_if_t< std::is_same_v::value_type,Point_2> || + std::is_same_v::value_type,Segment_2> || + std::is_same_v::value_type,Circle_2> || + std::is_same_v::value_type,Circular_arc_2> || + std::is_same_v::value_type,Polygon_2> >* = nullptr) const { for (iterator it=begin;it!=end;++it) diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index a50266f7659..555dc554c58 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -18,7 +18,6 @@ #include #include -#include #include @@ -68,24 +67,24 @@ namespace CGAL { class CMap_dart_iterator; template < typename Map_,bool Const> - class CMap_dart_iterator: public boost::mpl::if_c< Const, + class CMap_dart_iterator: public std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type + typename Map_::Dart_container::iterator> //public internal::CC_iterator { public: typedef CMap_dart_iterator Self; - typedef typename boost::mpl::if_c< Const, + typedef std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type Base; + typename Map_::Dart_container::iterator> Base; // typedef internal::CC_iterator Base; - typedef typename boost::mpl::if_c< Const, - typename Map_::Dart_const_descriptor, - typename Map_::Dart_descriptor>::type + typedef std::conditional_t< Const, + typename Map_::Dart_const_descriptor, + typename Map_::Dart_descriptor> Dart_descriptor; - typedef typename boost::mpl::if_c< Const, const Map_, Map_>::type Map; + typedef std::conditional_t< Const, const Map_, Map_> Map; typedef std::input_iterator_tag iterator_category; typedef typename Base::value_type value_type; @@ -180,25 +179,24 @@ namespace CGAL { template < typename Map_,bool Const > class CMap_dart_iterator: - /*public boost::mpl::if_c< Const, + /*public std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type*/ + typename Map_::Dart_container::iterator>*/ public internal::CC_iterator_with_index { public: typedef CMap_dart_iterator Self; - /*typedef typename boost::mpl::if_c< Const, + /*typedef std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type Base;*/ + typename Map_::Dart_container::iterator> Base;*/ typedef internal::CC_iterator_with_index Base; - typedef typename boost::mpl::if_c< Const, - typename Map_::Dart_const_descriptor, - typename Map_::Dart_descriptor>::type + typedef std::conditional_t< Const, + typename Map_::Dart_const_descriptor, + typename Map_::Dart_descriptor> Dart_descriptor; - typedef typename boost::mpl::if_c< Const, const Map_, - Map_>::type Map; + typedef std::conditional_t< Const, const Map_, Map_> Map; typedef std::input_iterator_tag iterator_category; typedef typename Base::value_type value_type; diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index d3d67c57a88..dbb9aa8bae6 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -861,14 +861,13 @@ namespace internal { typedef typename DSC::value_type value_type; typedef typename DSC::size_type size_type; typedef typename DSC::difference_type difference_type; - typedef typename boost::mpl::if_c< Const, const value_type*, - value_type*>::type pointer; - typedef typename boost::mpl::if_c< Const, const value_type&, - value_type&>::type reference; + typedef std::conditional_t< Const, const value_type*, + value_type*> pointer; + typedef std::conditional_t< Const, const value_type&, + value_type&> reference; typedef std::bidirectional_iterator_tag iterator_category; - typedef typename boost::mpl::if_c< Const, const DSC*, DSC*>::type - cc_pointer; + typedef std::conditional_t< Const, const DSC*, DSC*> cc_pointer; CC_iterator_with_index(): m_ptr_to_cc(nullptr), m_index(0) diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 19ee436cc52..112d91491cc 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -26,7 +26,9 @@ #include #include // For interior_polyhedron_3 +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER #include +#endif #include #include @@ -227,7 +229,11 @@ namespace CGAL template void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, Polyhedron &P, - std::optional::value_type>::Kernel::Point_3> origin = std::nullopt) { + std::optional::value_type>::Kernel::Point_3> origin +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER + = std::nullopt +#endif + ) { // Checks whether the intersection is a polyhedron CGAL_assertion_msg(Convex_hull_3::internal::is_intersection_dim_3(begin, end), "halfspace_intersection_3: intersection not a polyhedron"); @@ -238,8 +244,10 @@ namespace CGAL // if a point inside is not provided find one using linear programming if (!origin) { +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER // find a point inside the intersection origin = halfspace_intersection_interior_point_3(begin, end); +#endif CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_3: problem when determining a point inside the intersection"); if (origin==std::nullopt) diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index d8946af7353..df781ade4ee 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -23,7 +23,9 @@ #include // For interior_polyhedron_3 +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER #include +#endif #include #include @@ -99,7 +101,9 @@ namespace CGAL // if a point inside is not provided find one using linear programming if (!origin) { // find a point inside the intersection +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER origin = halfspace_intersection_interior_point_3(pbegin, pend); +#endif CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_with_constructions_3: problem when determining a point inside the intersection"); if (origin==std::nullopt) @@ -134,7 +138,11 @@ namespace CGAL void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - std::optional::value_type>::Kernel::Point_3> const& origin = std::nullopt) { + std::optional::value_type>::Kernel::Point_3> const& origin +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER + = std::nullopt +#endif + ) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point_3; typedef typename Convex_hull_3::internal::Default_traits_for_Chull_3::type Traits; diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 911a86debc3..8f43a8a1af1 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -199,9 +198,9 @@ private: boost::mpl::eval_if< std::is_same< typename internal::Lazy_result_type::type, CGAL::Object >, boost::mpl::int_, - boost::mpl::eval_if< boost::mpl::or_< - std::is_same< typename internal::Lazy_result_type::type, CGAL::Bbox_2 >, - std::is_same< typename internal::Lazy_result_type::type, CGAL::Bbox_3 > >, + boost::mpl::eval_if< std::bool_constant< + std::is_same_v< typename internal::Lazy_result_type::type, CGAL::Bbox_2 > || + std::is_same_v< typename internal::Lazy_result_type::type, CGAL::Bbox_3 > >, boost::mpl::int_, boost::mpl::int_ > > >, boost::mpl::int_ >::type {}; diff --git a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h index 034b1600f93..1747f89f354 100644 --- a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h +++ b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h @@ -19,7 +19,6 @@ #include #include #include -#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h index afb6bff830e..06ff55945fe 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h @@ -53,8 +53,8 @@ public: template < typename Tx, typename Ty > PointH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - std::is_convertible >::value >* = 0) + std::enable_if_t< std::is_convertible_v && + std::is_convertible_v >* = 0) : base(x, y) {} PointH2(const FT& x, const FT& y) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h index 87da02cabff..f64d5b64c9a 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h @@ -52,9 +52,9 @@ public: template < typename Tx, typename Ty, typename Tz > PointH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, - std::is_convertible >, - std::is_convertible >::value >* = 0) + std::enable_if_t && + std::is_convertible_v && + std::is_convertible_v>* = 0) : base(x, y, z) {} PointH3(const FT& x, const FT& y, const FT& z) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h index 81cd3107595..92afeec7941 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h @@ -57,8 +57,8 @@ public: template < typename Tx, typename Ty > VectorH2(const Tx & x, const Ty & y, - std::enable_if_t< boost::mpl::and_, - std::is_convertible >::value >* = 0) + std::enable_if_t && + std::is_convertible_v>* = 0) : base(CGAL::make_array(x, y, RT(1))) {} VectorH2(const FT& x, const FT& y) diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h index 5228d5251ad..aecd718d41a 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h @@ -67,9 +67,9 @@ public: template < typename Tx, typename Ty, typename Tz > VectorH3(const Tx & x, const Ty & y, const Tz & z, - std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible, - std::is_convertible >, - std::is_convertible >::value >* = 0) + std::enable_if_t< std::is_convertible_v && + std::is_convertible_v && + std::is_convertible_v>* = 0) : base(CGAL::make_array(x, y, z, RT(1))) {} VectorH3(const FT& x, const FT& y, const FT& z) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index d802f740b9b..09bde261d24 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -14,7 +14,7 @@ Release date: October 2023 - **Breaking change**: The usage of `boost::shared_ptr` has been replaced by `std::shared_ptr`. Packages affected are 2D Straight Line Skeleton and Shape Detection. - **Breaking change**: The usage of `boost::optional` has been replaced by `std::optional`. Packages affected are 2D Straight Line Skeleton, 3D Fast Intersection and Distance Computation (AABB Tree), and the Kernel intersection. - **Breaking change**: The usage of `boost::variant` has been replaced by `std::variant`. Packages affected are 2D Arrangements, and the Kernel intersection. -- **Breaking chahge**: The file CMake file `UseCGAL.cmake` has been removed from CGAL. Usages of the CMake variables `${CGAL_USE_FILE}` and `${CGAL_LIBRARIES}` must be replaced by a link to the imported target `CGAL::CGAL`, for example: `target_link_library(the_target PRIVATE CGAL::CGAL)`. +- **Breaking change**: The file CMake file `UseCGAL.cmake` has been removed from CGAL. Usages of the CMake variables `${CGAL_USE_FILE}` and `${CGAL_LIBRARIES}` must be replaced by a link to the imported target `CGAL::CGAL`, for example: `target_link_library(the_target PRIVATE CGAL::CGAL)`. #### 2D Arrangements @@ -45,6 +45,10 @@ Release date: October 2023 - Added the option to use a variable sizing field for `CGAL::Polygon_mesh_processing::isotropic_remeshing()`, and a sizing function based on a measure of local curvature for adaptive remeshing. - Added the function `CGAL::Polygon_mesh_processing::refine_mesh_at_isolevel()` that refines a polygon mesh along an isocurve. +- Added the function + `CGAL::Polygon_mesh_processing::autorefine_triangle_soup()` that refines a soup of triangles so that no pair of triangles intersects + in their interiors. Also added, the function `autorefine()` operating directly on a triangle mesh and updating it + using the aforementioned function on a triangle soup. ### [2D Arrangements](https://doc.cgal.org/6.0/Manual/packages.html#PkgArrangementOnSurface2) - Fixed a bug in the zone construction code applied to arrangements of geodesic arcs on a sphere, diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 744e4fed4ab..1e912131c12 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1253,6 +1253,6 @@ if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" ) if(Qt6_FOUND) - message(STATUS "USING Qt6_VERSION = '${Qt6Core_VERSION_STRING}'") + message(STATUS "USING Qt6_VERSION = '${Qt6Core_VERSION}'") endif()#Qt6_FOUND endif()#RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE diff --git a/Interpolation/include/CGAL/sibson_gradient_fitting.h b/Interpolation/include/CGAL/sibson_gradient_fitting.h index f08600a4603..f6d6d0559dd 100644 --- a/Interpolation/include/CGAL/sibson_gradient_fitting.h +++ b/Interpolation/include/CGAL/sibson_gradient_fitting.h @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index 42182e01636..269c86c3e60 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -14,6 +14,8 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_TRIANGLE_3_TRIANGLE_3_INTERSECTION_H #define CGAL_INTERNAL_INTERSECTIONS_TRIANGLE_3_TRIANGLE_3_INTERSECTION_H +//#define CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + #include #include #include @@ -21,6 +23,9 @@ #include +#include +#include + #include #include #include @@ -30,53 +35,338 @@ namespace Intersections { namespace internal{ template -void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, - const typename Kernel::Point_3& q, - const typename Kernel::Point_3& r, - const Kernel& k, - std::list& inter_pts) +struct Point_on_triangle { - typedef typename std::list::iterator Iterator; + // triangle points are not stored in this class but are expected + // to always be passed in the same order. For a triangle pqr, + // edge 0 is pq, edge 1 qr and edge 2 rp. Point 0 is p, 1 is q and 2 is r. + // + // (id, -1) point on t1 + // (-1, id) point on t2 + // (id1, id2) intersection of edges + std::pair t1_t2_ids; + boost::container::flat_set extra_t1; // store other ids of edges containing the point + typename Kernel::FT alpha; // + +////// + + static + inline + const typename Kernel::Point_3& + point_from_id(const typename Kernel::Point_3& p, + const typename Kernel::Point_3& q, + const typename Kernel::Point_3& r, + int id) + { + switch(id) + { + case 0: + return p; + case 1: + return q; + default: + return r; + } + } + + Point_on_triangle(int i1, int i2=-1, typename Kernel::FT alpha = 0.) // TODO add global zero()? + : t1_t2_ids(i1,i2) + , alpha(alpha) + {} + + // orientation of the current point wrt to edge id1 (p1q1) + Orientation + orientation (const typename Kernel::Point_3& p1, // source of edge edge_id1 + const typename Kernel::Point_3& q1, // target of edge edge_id1 + const typename Kernel::Point_3& r1, + int edge_id1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) const + { + if (t1_t2_ids.first!=-1) + { + if (t1_t2_ids.second==-1) + return (edge_id1==t1_t2_ids.first || (edge_id1+1)%3==t1_t2_ids.first) ? ZERO:POSITIVE; // it is a point on t1 + // this is an intersection point + + if (t1_t2_ids.first==edge_id1) + return ZERO; + if (t1_t2_ids.first==(edge_id1+1)%3) + { + if (alpha==0) return ZERO; + return alpha>=0 ? POSITIVE:NEGATIVE; + } + CGAL_assertion((t1_t2_ids.first+1)%3==edge_id1); + if (alpha==1) return ZERO; + return alpha<=1?POSITIVE:NEGATIVE; + } + else + { + //this is an input point of t2 + typename Kernel::Coplanar_orientation_3 orient = k.coplanar_orientation_3_object(); + const typename Kernel::Point_3& query = point_from_id(p2,q2,r2,t1_t2_ids.second); + return orient(p1,q1,r1,query); + } + } + + int id1() const { return t1_t2_ids.first; } + int id2() const { return t1_t2_ids.second; } + + // construct the intersection point from the info stored + typename Kernel::Point_3 + point(const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, + const typename Kernel::Point_3& r1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) const + { + if (t1_t2_ids.first==-1) + return point_from_id(p2,q2,r2,t1_t2_ids.second); + if (t1_t2_ids.second==-1) + return point_from_id(p1,q1,r1,t1_t2_ids.first); + + return k.construct_barycenter_3_object()(point_from_id(p1,q1,r1,(t1_t2_ids.first+1)%3), alpha, point_from_id(p1,q1,r1,t1_t2_ids.first)) ; + } +}; + +// the intersection of two triangles is computed by interatively intersection t2 +// with halfspaces defined by edges of t1. The following function is called +// for each each on t1 on edge of the current intersection. +// pq is such an edge and p1q1 from t1 defines the halfspace intersection +// we are currently interseted in. We return the intersection point of +// pq with p1q1 +template +Point_on_triangle +intersection(const Point_on_triangle& p, + const Point_on_triangle& q, + int edge_id_t1, + const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, +// const typename Kernel::Point_3& r1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) +{ +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " calling intersection: "; + std::cout << " (" << p.id1() << "," << p.id2() << ",[" << p.alpha << "]) -"; + std::cout << " (" << q.id1() << "," << q.id2() << ",[" << q.alpha << "]) || e" << edge_id_t1; +#endif + typename Kernel::Compute_alpha_for_coplanar_triangle_intersection_3 compute_alpha + = k.compute_alpha_for_coplanar_triangle_intersection_3_object(); + typedef Point_on_triangle Pot; + switch(p.id1()) + { + case -1: + { + switch(q.id1()) + { + case -1: // A: (-1, ip2) - (-1, iq2) + { + CGAL_assertion((p.id2()+1)%3 == q.id2() || (q.id2()+1)%3 == p.id2()); +// CGAL_assertion(p.extra_t1.empty() && q.extra_t1.empty()); // TMP to see if it's worth implementing special case +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 1\n"; +#endif + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, p.id2()), + Pot::point_from_id(p2, q2, r2, q.id2())); + int id2 = (p.id2()+1)%3 == q.id2() ? p.id2() : q.id2(); + return Point_on_triangle(edge_id_t1, id2, alpha); // intersection with an original edge of t2 + } + default: + if (q.id2()!=-1) // B: (-1, ip2) - (iq1, iq2) + { + if (p.id2() == q.id2() || p.id2() == (q.id2()+1)%3) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 2\n"; +#endif + // points are on the same edge of t2 --> we shorten an already cut edge + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, q.id2()), + Pot::point_from_id(p2, q2, r2, (q.id2()+1)%3)); + + return Point_on_triangle(edge_id_t1, q.id2(), alpha); + } +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 3\n"; +#endif + // point of t1: look for an edge of t1 containing both points + CGAL_assertion( p.extra_t1.count(q.id1())!=0 || p.extra_t1.count(3-q.id1()-edge_id_t1)!=0 ); + int eid1 = p.extra_t1.count(q.id1())!=0 ? q.id1() : 3-q.id1()-edge_id_t1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + // C: (-1, ip2) - (iq1, -1) + //vertex of t1, special case t1 edge passed thru a vertex of t2 + CGAL_assertion(edge_id_t1 == 2); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 4\n"; +#endif + CGAL_assertion(q.id1()==1); + CGAL_assertion(!p.extra_t1.empty()); + return Point_on_triangle(p.extra_t1.count(0)==1?0:2,-1); + } + } + default: + { + switch(p.id2()) + { + case -1: + { + switch(q.id1()) + { + case -1: // G: (ip1, -1) - (-1, iq2) + //vertex of t1, special case t1 edge passed thru a vertex of t2 +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 5\n"; +#endif + CGAL_assertion(edge_id_t1 == 2); + CGAL_assertion(p.id1()==1); + CGAL_assertion(!q.extra_t1.empty()); + return Point_on_triangle(q.extra_t1.count(0)==1?0:2,-1); + default: + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 6\n"; +#endif + CGAL_assertion(q.id2()!=-1); // I: (ip1, -1) - (iq2, -1) + //H: (ip1,-1), (iq1, iq2) + CGAL_assertion(edge_id_t1==2); + // p and q are on the same edge of t1 + CGAL_assertion(p.id1()==q.id1() || p.id1()==(q.id1()+1)%3); + return Point_on_triangle((q.id1()+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3 , -1); + } + } + } + default: + { + switch(q.id1()) + { + case -1: // D: (ip1, ip2) - (-1, iq2) + { + if (q.id2() == p.id2() || q.id2() == (p.id2()+1)%3) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 7\n"; +#endif + // points are on the same edge of t2 --> we shorten an already cut edge + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, p.id2()), + Pot::point_from_id(p2, q2, r2, (p.id2()+1)%3)); + + return Point_on_triangle(edge_id_t1, p.id2(), alpha); + } +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 8\n"; +#endif + // point of t1 + //std::cout << "q.extra_t1: "; for(int qet1 : q.extra_t1) std::cout << " " << qet1; std::cout << "\n"; + CGAL_assertion( q.extra_t1.count(p.id1())!=0 || q.extra_t1.count(3-p.id1()-edge_id_t1)!=0 ); + int eid1 = q.extra_t1.count(p.id1())!=0 ? p.id1() : 3-p.id1()-edge_id_t1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + default: + { + switch(q.id2()) + { + case -1: // F: (ip1, ip2) - (iq1, -1) + { + // p and q are on the same edge of t1 + CGAL_assertion(q.id1()==p.id1() || q.id1()==(p.id1()+1)%3); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 9\n"; +#endif + return Point_on_triangle((p.id1()+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3 , -1); + } + default: // E: (ip1, ip2) - (iq1, iq2) + { + if (p.id2()==q.id2()) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 10\n"; +#endif + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, q.id2()), + Pot::point_from_id(p2, q2, r2, (q.id2()+1)%3)); + return Point_on_triangle(edge_id_t1, q.id2(), alpha); + } + // we are intersecting an edge of t1 + CGAL_assertion(p.id1()==q.id1() || edge_id_t1==2); + int eid1 = p.id1()==q.id1() ? p.id1() : 1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + } + } + } + } + } + } + } +} + +template +void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, + const typename Kernel::Point_3& r1, + int edge_id, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k, + std::list>& inter_pts) +{ +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " cutoff using e" << edge_id << ": " + << to_double(p1.x()) << " " << to_double(p1.y()) << " " << to_double(p1.z()) << " " + << to_double(q1.x()) << " " << to_double(q1.y()) << " " << to_double(q1.z()) << "\n"; +#endif + typedef typename std::list>::iterator Iterator; if(inter_pts.empty()) return; - typename Kernel::Coplanar_orientation_3 orient = k.coplanar_orientation_3_object(); - typename Kernel::Construct_line_3 line = k.construct_line_3_object(); + //orient(p1,q1,r1,r1) is POSITIVE + std::map*,Orientation> orientations; // TODO skip map + for (Point_on_triangle& pot : inter_pts) + { + orientations[ &pot ]=pot.orientation(p1,q1,r1,edge_id,p2,q2,r2,k); + if (pot.id1()==-1 && orientations[ &pot ]==COLLINEAR) + pot.extra_t1.insert(edge_id); + } - //orient(p,q,r,r) is POSITIVE - std::map orientations; - for (Iterator it=inter_pts.begin();it!=inter_pts.end();++it) - orientations[ &(*it) ]=orient(p,q,r,*it); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " Orientations:"; + for (const Point_on_triangle& pot : inter_pts) + std::cout << " " << orientations[ &pot ]; + std::cout << "\n"; +#endif + CGAL_kernel_assertion_code(int pt_added = 0); - CGAL_kernel_assertion_code(int pt_added = 0;) + Iterator prev = std::prev(inter_pts.end()); - const typename Kernel::Point_3* prev = &(*std::prev(inter_pts.end())); Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : std::prev(inter_pts.end()); for(Iterator it=inter_pts.begin(); it!=stop; ++it) { - const typename Kernel::Point_3& curr = *it; - Orientation or_prev = orientations[prev], - or_curr = orientations[&curr]; + Orientation or_prev = orientations[&(*prev)], + or_curr = orientations[&(*it)]; if((or_prev == POSITIVE && or_curr == NEGATIVE) || (or_prev == NEGATIVE && or_curr == POSITIVE)) { - typename Intersection_traits::result_type - obj = intersection(line(p,q), line(*prev,curr), k); + Point_on_triangle new_pt = intersection(*prev, *it, edge_id, p1, q1, p2, q2, r2, k); - // assert "not empty" - CGAL_kernel_assertion(bool(obj)); - - const typename Kernel::Point_3* inter = intersect_get(obj); - CGAL_kernel_assertion(inter != nullptr); - - prev = &(*inter_pts.insert(it,*inter)); - orientations[prev] = COLLINEAR; - CGAL_kernel_assertion_code(++pt_added;) + prev = inter_pts.insert(it,new_pt); + orientations[&(*prev)] = COLLINEAR; + CGAL_kernel_assertion_code(++pt_added); } - prev = &(*it); + prev = it; } CGAL_kernel_assertion(pt_added<3); @@ -96,35 +386,77 @@ intersection_coplanar_triangles(const typename K::Triangle_3& t1, const typename K::Triangle_3& t2, const K& k) { - const typename K::Point_3& p = t1.vertex(0), - q = t1.vertex(1), - r = t1.vertex(2); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + auto to_string = [](const typename K::Triangle_3& t) + { + std::stringstream sstr; + sstr << "4 " + << to_double(t[0].x()) << " " << to_double(t[0].y()) << " " << to_double(t[0].z()) << " " + << to_double(t[1].x()) << " " << to_double(t[1].y()) << " " << to_double(t[1].z()) << " " + << to_double(t[2].x()) << " " << to_double(t[2].y()) << " " << to_double(t[2].z()) << " " + << to_double(t[0].x()) << " " << to_double(t[0].y()) << " " << to_double(t[0].z()) << "\n"; + return sstr.str(); + }; - std::list inter_pts; - inter_pts.push_back(t2.vertex(0)); - inter_pts.push_back(t2.vertex(1)); - inter_pts.push_back(t2.vertex(2)); + std::cout << "intersection_coplanar_triangles\n"; + std::ofstream("/tmp/t1.polylines.txt") << std::setprecision(17) << to_string(t1) << "\n"; + std::ofstream("/tmp/t2.polylines.txt") << std::setprecision(17) << to_string(t2) << "\n"; +#endif + const typename K::Point_3& p1 = t1.vertex(0), + q1 = t1.vertex(1), + r1 = t1.vertex(2); + const typename K::Point_3& p2 = t2.vertex(0), + q2 = t2.vertex(1), + r2 = t2.vertex(2); + + std::list> inter_pts; + inter_pts.push_back(Point_on_triangle(-1,0)); + inter_pts.push_back(Point_on_triangle(-1,1)); + inter_pts.push_back(Point_on_triangle(-1,2)); + +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + auto print_points = [&]() + { + for(auto p : inter_pts) std::cout << " (" << p.id1() << "," << p.id2() << ",[" << p.alpha << "]) "; std::cout <<"\n"; + }; + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif //intersect t2 with the three half planes which intersection defines t1 - intersection_coplanar_triangles_cutoff(p,q,r,k,inter_pts); //line pq - intersection_coplanar_triangles_cutoff(q,r,p,k,inter_pts); //line qr - intersection_coplanar_triangles_cutoff(r,p,q,k,inter_pts); //line rp + intersection_coplanar_triangles_cutoff(p1,q1,r1,0,p2,q2,r2,k,inter_pts); //line pq +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + intersection_coplanar_triangles_cutoff(q1,r1,p1,1,p2,q2,r2,k,inter_pts); //line qr +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + intersection_coplanar_triangles_cutoff(r1,p1,q1,2,p2,q2,r2,k,inter_pts); //line rp +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + auto point = [&](const Point_on_triangle& pot){ return pot.point(p1,q1,r1,p2,q2,r2,k); }; switch(inter_pts.size()) { case 0: return intersection_return(); case 1: - return intersection_return(*inter_pts.begin()); + return intersection_return(point(*inter_pts.begin())); case 2: return intersection_return( - k.construct_segment_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin())) ); + k.construct_segment_3_object()(point(*inter_pts.begin()), point(*std::next(inter_pts.begin()))) ); case 3: return intersection_return( - k.construct_triangle_3_object()(*inter_pts.begin(), *std::next(inter_pts.begin()), *std::prev(inter_pts.end())) ); + k.construct_triangle_3_object()(point(*inter_pts.begin()), point(*std::next(inter_pts.begin())), point(*std::prev(inter_pts.end()))) ); default: return intersection_return( - std::vector(inter_pts.begin(),inter_pts.end())); + std::vector(boost::make_transform_iterator(inter_pts.begin(), point), + boost::make_transform_iterator(inter_pts.end(), point))); } } diff --git a/Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp b/Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp index 0098bcd0142..f0875a55ee8 100644 --- a/Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp +++ b/Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp @@ -96,6 +96,13 @@ void test_coplanar_triangles(){ assert(CGAL::object_cast(&obj)!=nullptr); obj=CGAL::intersection(t2,t1); assert(CGAL::object_cast(&obj)!=nullptr); + // TK10 case C' + t1=Triangle(Point(88.7921, 89.0007, 1.25), Point(88.1912, 88.3997, 1.25), Point(89.8224, 90.031, 1.25)); + t2=Triangle(Point(88.0497, 88.2583, 1.25), Point(82.9292, 81.8747, 1.25), Point(91.1726, 91.3812, 1.25)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); //Intersection is a point //edges are collinear, one vertex in common t1=Triangle( Point(0,0,0),Point(0,1,0),Point(1,0,0) ); @@ -153,6 +160,13 @@ void test_coplanar_triangles(){ assert(CGAL::object_cast(&obj)!=nullptr); obj=CGAL::intersection(t2,t1); assert(CGAL::object_cast(&obj)!=nullptr); + // TK10 case D + t1=Triangle(Point(-34.893700000000003, -16.0351, 3.1334899999999998e-12), Point(-34.893700000000003, -18.5351, 3.1334899999999998e-12), Point(-42.393700000000003, -16.0351, 3.1334899999999998e-12)); + t2=Triangle(Point(-34.893700000000003, -32.0351, 3.1334899999999998e-12), Point(-34.893700000000003, -9.7851400000000002, 3.1334899999999998e-12), Point(-31.643699999999999, -17.201799999999999, 3.1334899999999998e-12)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); //Intersection is a polygon //David's star t1=Triangle( Point(0,0,0),Point(1,0,0),Point(0.5,1.5,0) ); @@ -181,6 +195,51 @@ void test_coplanar_triangles(){ obj=CGAL::intersection(t2,t1); assert(CGAL::object_cast(&obj)!=nullptr); assert(CGAL::object_cast(&obj)->size()==4); + // TK10 case A + t1=Triangle(Point(3.74861, 12.4822, 14.0112), Point(5.40582, 12.4822, 15.6895), Point(5.37748, 12.4822, 15.7206)); + t2=Triangle(Point(5.49972, 12.4822, 13.491), Point(5.27627, 12.4822, 15.8106), Point(5.32119, 12.4822, 15.8126)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + // TK10 case C + t1=Triangle(Point(5, -94.6659, 3.85175), Point(5, -94.5682, 3.08638), Point(5, -94.8182, 3.08638)); + t2=Triangle(Point(5, -94.4317, 3.76399), Point(5, -97.6182, 3.08638), Point(5, -94.5659, 2.99682)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + // TK10 case E + t1=Triangle(Point(-955.858, -45.032, -0.016), Point(-955.856, -45.032, -0.004), Point(-955.856, -45.032, -0.002)); + t2=Triangle(Point(-955.856, -45.032, 0.006), Point(-955.854, -45.032, -0.002), Point(-955.876, -45.032, -0.034)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + // TK10 case F + t1=Triangle(Point(141.172, 20.576, 155.764), Point(141.172, 20.588, 155.766), Point(141.172, 20.59, 155.766)); + t2=Triangle(Point(141.172, 20.602, 155.768), Point(141.172, 20.594, 155.766), Point(141.172, 20.574, 155.764)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + // TK10 case D + t1=Triangle(Point(152.864, 126.324, 0.950001), Point(152.77, 126.483, 0.950001), Point(153.072, 125.973, 0.950001)); + t2=Triangle(Point(153.322, 125.551, 0.950001), Point(152.218, 127.415, 0.950001), Point(153.66, 124.768, 0.950001)); + obj=CGAL::intersection(t1,t2); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); + obj=CGAL::intersection(t2,t1); + assert(CGAL::object_cast(&obj)!=nullptr); + assert(CGAL::object_cast(&obj)->size()==4); //Intersection is empty t1=Triangle( Point(0,0,0),Point(0,1,0),Point(1,0,0) ); t2=Triangle( Point(-0.1,-0.1,0),Point(-0.1,-0.9,0),Point(-1,-0.1,0) ); diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 29a72d9c985..084a6578913 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -2224,6 +2224,107 @@ namespace CommonKernelFunctors { } }; + template + class Construct_planes_intersection_point_3 + { + typedef typename K::Plane_3 Plane; + typedef typename K::Point_3 Point; + typename K::Construct_plane_3 construct_plane; + public: + typedef Point result_type; + + Point + operator()(const Point& p1, const Point& q1, const Point& r1, + const Point& p2, const Point& q2, const Point& r2, + const Point& p3, const Point& q3, const Point& r3) const + { + Plane plane1 = construct_plane(p1, q1, r1); + Plane plane2 = construct_plane(p2, q2, r2); + Plane plane3 = construct_plane(p3, q3, r3); + + const auto res = typename K::Intersect_3()(plane1, plane2, plane3); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + + Point + operator()(const Plane& plane1, const Plane& plane2, const Plane& plane3) const + { + const auto res = typename K::Intersect_3()(plane1, plane2, plane3); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + }; + + template + class Construct_coplanar_segments_intersection_point_3 + { + typedef typename K::Segment_3 Segment; + typedef typename K::Point_3 Point; + typename K::Construct_segment_3 construct_segment; + public: + typedef Point result_type; + + Point + operator()(const Point& p1, const Point& q1, + const Point& p2, const Point& q2) const + { + Segment s1 = construct_segment(p1, q1); + Segment s2 = construct_segment(p2, q2); + + const auto res = typename K::Intersect_3()(s1, s2); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + + Point + operator()(const Segment& s1, const Segment& s2) const + { + const auto res = typename K::Intersect_3()(s1, s2); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + }; + + template + class Compute_alpha_for_coplanar_triangle_intersection_3 + { + typedef typename K::Point_3 Point_3; + typedef typename K::Vector_3 Vector_3; + public: + typedef typename K::FT result_type; + result_type + operator()(const Point_3& p1, const Point_3& p2, // segment 1 + const Point_3& p3, const Point_3& p4) const // segment 2 + { + typename K::Construct_vector_3 vector = K().construct_vector_3_object(); + typename K::Construct_cross_product_vector_3 cross_product = + K().construct_cross_product_vector_3_object(); + + const Vector_3 v1 = vector(p1, p2); + const Vector_3 v2 = vector(p3, p4); + + CGAL_assertion(K().coplanar_3_object()(p1,p2,p3,p4)); + + const Vector_3 v3 = vector(p1, p3); + const Vector_3 v3v2 = cross_product(v3,v2); + const Vector_3 v1v2 = cross_product(v1,v2); + const typename K::FT sl = K().compute_squared_length_3_object()(v1v2); + CGAL_assertion(!certainly(is_zero(sl))); + + const typename K::FT t = ((v3v2.x()*v1v2.x()) + (v3v2.y()*v1v2.y()) + (v3v2.z()*v1v2.z())) / sl; + return t; // p1 + (p2-p1) * t + } + }; + template class Construct_point_on_2 { diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 713e3773e56..a2314aef1b7 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -398,6 +398,12 @@ CGAL_Kernel_cons(Construct_plane_3, construct_plane_3_object) CGAL_Kernel_cons(Construct_plane_line_intersection_point_3, construct_plane_line_intersection_point_3_object) +CGAL_Kernel_cons(Construct_planes_intersection_point_3, + construct_planes_intersection_point_3_object) +CGAL_Kernel_cons(Construct_coplanar_segments_intersection_point_3, + construct_coplanar_segments_intersection_point_3_object) +CGAL_Kernel_cons(Compute_alpha_for_coplanar_triangle_intersection_3, + compute_alpha_for_coplanar_triangle_intersection_3_object) CGAL_Kernel_cons(Construct_point_on_2, construct_point_on_2_object) CGAL_Kernel_cons(Construct_point_on_3, diff --git a/Kernel_23/include/CGAL/Kernel_traits.h b/Kernel_23/include/CGAL/Kernel_traits.h index 4839184ff30..e12d38503bc 100644 --- a/Kernel_23/include/CGAL/Kernel_traits.h +++ b/Kernel_23/include/CGAL/Kernel_traits.h @@ -19,7 +19,6 @@ #include #include -#include namespace CGAL { diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 3747a4a8313..edde28fff96 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -474,7 +474,7 @@ sub print_platform_descriptions() BOOST MPFR GMP -QT5 +QT LEDA CXXFLAGS LDFLAGS @@ -544,6 +544,7 @@ EOF print OUTPUT ">$pf_short"; my $index = 12; while ($index) { + $index--; print OUTPUT "?\n"; } } diff --git a/Maintenance/test_handling/to_zipped_format b/Maintenance/test_handling/to_zipped_format index d8c7c1cd433..fdf62712b02 100755 --- a/Maintenance/test_handling/to_zipped_format +++ b/Maintenance/test_handling/to_zipped_format @@ -51,7 +51,7 @@ sub reformat_results($) $_ = $line; open (PLATFORM_INFO,">${platform}.info") or return; open (PLATFORM_NEW_RESULTS,">${platform}.new_results") or return; - my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$QT4,$QT5,$CMAKE) = ("-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","no"); + my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE) = ("-","-","-","-","-","-","-","-","-","-","-","-","-","no"); my ($LDFLAGS,$CXXFLAGS) = ("", ""); while (! /^------/) { if(/^\s*$/) { @@ -97,10 +97,13 @@ sub reformat_results($) $QT="$1"; } if (/QT4_VERSION = '([^']+)'/) { - $QT4="$1"; + $QT="$1"; } if (/Qt5_VERSION = '([^']+)'/) { - $QT5="$1"; + $QT="$1"; + } + if (/Qt6_VERSION = '([^']+)'/) { + $QT="$1"; } if (/BOOST_VERSION = '([^']+)'/) { $BOOST="$1"; @@ -147,7 +150,7 @@ $CMAKE $BOOST $MPFR $GMP -$QT5 +$QT $LEDA_VERSION $CXXFLAGS $LDFLAGS diff --git a/Mesh_3/benchmark/Mesh_3/StdAfx.h b/Mesh_3/benchmark/Mesh_3/StdAfx.h index 57890430a5b..9648697498a 100644 --- a/Mesh_3/benchmark/Mesh_3/StdAfx.h +++ b/Mesh_3/benchmark/Mesh_3/StdAfx.h @@ -42,11 +42,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 7e3af3de705..3ab3f0d3ba5 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -67,9 +66,9 @@ public: } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; diff --git a/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h b/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h index 45246e4463d..3d1c030ff08 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h +++ b/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h @@ -26,7 +26,6 @@ #include #include #include -#include namespace CGAL { 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 9062dc1894f..bc9be8b3e5f 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 @@ -139,8 +139,8 @@ public: Protect_edges_sizing_field(C3T3& c3t3, const MeshDomain& domain, SizingFunction size=SizingFunction(), - const FT minimal_size = FT(), - std::size_t maximal_number_of_vertices = 0, + const FT minimal_size = FT(-1), + const std::size_t maximal_number_of_vertices = 0, Mesh_error_code* error_code = 0 #ifndef CGAL_NO_ATOMIC , std::atomic* stop_ptr = 0 @@ -455,17 +455,29 @@ private: return s; } + bool use_minimal_size() const + { + return minimal_size_ != FT(-1); + } + Weight minimal_weight() const + { + if (use_minimal_size()) + return minimal_weight_; + else + return Weight(0); + } + private: C3T3& c3t3_; const MeshDomain& domain_; SizingFunction size_; - FT minimal_size_; - Weight minimal_weight_; + const FT minimal_size_; + const Weight minimal_weight_; std::set treated_edges_; Vertex_set unchecked_vertices_; int refine_balls_iteration_nb; bool nonlinear_growth_of_balls; - std::size_t maximal_number_of_vertices_; + const std::size_t maximal_number_of_vertices_; Mesh_error_code* const error_code_; #ifndef CGAL_NO_ATOMIC /// Pointer to the atomic Boolean that can stop the process @@ -478,7 +490,7 @@ template Protect_edges_sizing_field:: Protect_edges_sizing_field(C3T3& c3t3, const MD& domain, Sf size, const FT minimal_size, - std::size_t maximal_number_of_vertices, + const std::size_t maximal_number_of_vertices, Mesh_error_code* error_code #ifndef CGAL_NO_ATOMIC , std::atomic* stop_ptr @@ -540,7 +552,7 @@ operator()(const bool refine) std::cerr << "refine_balls() done. Nb of points in triangulation: " << c3t3_.triangulation().number_of_vertices() << std::endl; #endif - CGAL_assertion(minimal_size_ > 0 || c3t3_.is_valid()); + CGAL_assertion(use_minimal_size() || c3t3_.is_valid()); } // debug_dump_c3t3("dump-mesh-after-protect_edges.binary.cgal", c3t3_); @@ -760,10 +772,10 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, while ( ! is_special(nearest_vh) && cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER ) { - CGAL_assertion( minimal_size_ > 0 || sq_d > 0 ); + CGAL_assertion( use_minimal_size() || sq_d > 0); bool special_ball = false; - if(minimal_weight_ != Weight() && sq_d < minimal_weight_) + if(use_minimal_size() && sq_d < minimal_weight_) { sq_d = minimal_weight_; w = minimal_weight_; @@ -817,16 +829,16 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, const FT sq_d = tr.min_squared_distance(p, cp(c3t3_.triangulation().point(v))); - if(minimal_weight_ != Weight() && sq_d < minimal_weight_) { + if(use_minimal_size() && sq_d < minimal_weight()) { insert_a_special_ball = true; #if CGAL_MESH_3_PROTECTION_DEBUG & 1 nearest_point = c3t3_.triangulation().point(v); #endif - min_sq_d = minimal_weight_; + min_sq_d = minimal_weight(); if(! is_special(v)) { *out++ = v; - ch = change_ball_size(v, minimal_weight_, true)->cell(); // special ball + ch = change_ball_size(v, minimal_weight(), true)->cell(); // special ball } } else @@ -876,10 +888,10 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, if ( cwsr(it_wp, - sq_d) == CGAL::SMALLER ) { bool special_ball = false; - if(minimal_weight_ != Weight() && sq_d < minimal_weight_) + if(use_minimal_size() && sq_d < minimal_weight()) { - sq_d = minimal_weight_; - w = minimal_weight_; + sq_d = minimal_weight(); + w = minimal_weight(); special_ball = true; insert_a_special_ball = true; } @@ -933,13 +945,13 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, add_handle_to_unchecked = true; } - if( w < minimal_weight_) { + if( w < minimal_weight()) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "smart_insert_point: weight " << w - << " was smaller than minimal weight (" << minimal_weight_ << ")\n"; + << " was smaller than minimal weight (" << minimal_weight() << ")\n"; #endif - w = minimal_weight_; + w = minimal_weight(); insert_a_special_ball = true; } Vertex_handle v = insert_point(p,w,dim,index, insert_a_special_ball); @@ -1174,7 +1186,7 @@ insert_balls(const Vertex_handle& vp, const FT d_signF = static_cast(d_sign); int n = static_cast(std::floor(FT(2)*(d-sq) / (sp+sq))+.5); - // if( minimal_weight_ != 0 && n == 0 ) return; + // if( minimal_weight() != 0 && n == 0 ) return; if(nonlinear_growth_of_balls && refine_balls_iteration_nb < 3) { @@ -1183,7 +1195,7 @@ insert_balls(const Vertex_handle& vp, // balls at corner. When the curve segment is long enough, pick a point // at the middle and choose a new size. if(n >= internal::max_nb_vertices_to_reevaluate_size && - d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight_)) { + d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight())) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 const Weighted_point& vq_wp = c3t3_.triangulation().point(vq); std::cerr << "Number of to-be-inserted balls is: " @@ -1436,9 +1448,9 @@ refine_balls() const Vertex_handle v = it->first; const FT new_size = it->second; // Set size of the ball to new value - if(minimal_size_ != FT() && new_size < minimal_size_) { + if(use_minimal_size() && new_size < minimal_size_) { if(!is_special(v)) { - change_ball_size(v, minimal_weight_, true); // special ball + change_ball_size(v, minimal_weight(), true); // special ball // Loop will have to be run again restart = true; @@ -1751,18 +1763,33 @@ is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2, FT size_v1 = get_radius(v1); FT size_v2 = get_radius(v2); - CGAL_assertion(get_dimension(v1) != 1 || - curve_index == domain_.curve_index(v1->index())); - CGAL_assertion(get_dimension(v2) != 1 || - curve_index == domain_.curve_index(v2->index())); + bool v1_valid_curve_index = true; + bool v2_valid_curve_index = true; + + if(use_minimal_size()) + { + v1_valid_curve_index = (get_dimension(v1) != 1 + || curve_index == domain_.curve_index(v1->index())); + v2_valid_curve_index = (get_dimension(v2) != 1 + || curve_index == domain_.curve_index(v2->index())); + } + else + { + CGAL_assertion(get_dimension(v1) != 1 || + curve_index == domain_.curve_index(v1->index())); + CGAL_assertion(get_dimension(v2) != 1 || + curve_index == domain_.curve_index(v2->index())); + } const Weighted_point& v1_wp = c3t3_.triangulation().point(v1); const Weighted_point& v2_wp = c3t3_.triangulation().point(v2); - FT arc_length = domain_.curve_segment_length(cp(v1_wp), + FT arc_length = (v1_valid_curve_index && v2_valid_curve_index) + ? domain_.curve_segment_length(cp(v1_wp), cp(v2_wp), curve_index, - orientation); + orientation) + : compute_distance(v1, v2); //curve polyline may not be consistent // Sufficient condition so that the curve portion between v1 and v2 is // inside the union of the two balls. 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 44e4f82b82d..ad023df618e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h @@ -37,7 +37,6 @@ #include #include -#include #include #include @@ -172,9 +171,9 @@ template::value, + std::is_convertible_v, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE @@ -209,7 +208,7 @@ template # endif - >::type // boost::if (parallel/sequential) + > // std::conditional (parallel/sequential) #else // !CGAL_LINKED_WITH_TBB diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h index 88a6e8ef555..5d32379ab0a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -640,9 +639,9 @@ template class Base_ = Refine_facets_3_base, #ifdef CGAL_LINKED_WITH_TBB - class Container_ = typename boost::mpl::if_c // (parallel/sequential?) + class Container_ = std::conditional_t // (parallel/sequential?) < - std::is_convertible::value, + std::is_convertible_v, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE Meshes::Filtered_deque_container @@ -679,7 +678,7 @@ template # endif - >::type // boost::if (parallel/sequential) + > // std::conditional (parallel/sequential) #else // !CGAL_LINKED_WITH_TBB diff --git a/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h b/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h index db2dde5b6d3..e8517c94945 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h index c02efa6dcc6..ef44403f9f5 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h @@ -15,7 +15,6 @@ #include #include #include -#include #include namespace CGAL { @@ -65,10 +64,10 @@ struct Cartesian_filter_K : public Base_ EK_rt exact_kernel()const{return sek.kernel();} // MSVC is too dumb to perform the empty base optimization. - typedef boost::mpl::and_< - internal::Do_not_store_kernel, - internal::Do_not_store_kernel, - internal::Do_not_store_kernel > Do_not_store_kernel; + typedef std::bool_constant< + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value > Do_not_store_kernel; //TODO: C2A/C2E could be able to convert *this into this->kernel() or this->kernel2(). typedef KernelD_converter C2A; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h index 5c3a64287d2..122cfe90885 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h @@ -16,7 +16,6 @@ #include // bug, should be included by the next one #include #include -#include namespace CGAL { namespace SFA { // static filter adapter @@ -98,9 +97,9 @@ struct Cartesian_static_filters, R_, Derived_> : public R_ { template struct Functor : Inherit_functor {}; template struct Functor { typedef - //typename boost::mpl::if_ < - //std::is_same, - //typename Get_functor::type, + //std::conditional_t < + //std::is_same_v, + //typename Get_functor, SFA::Orientation_of_points_2 // >::type type; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h b/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h index d62b8215cc5..edfb15ae9e9 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -80,12 +79,12 @@ class KernelD_converter_ // Explicit calls to boost::mpl functions to avoid parenthesis // warning on some versions of GCC - typedef typename boost::mpl::if_ < + typedef std::conditional_t < // If Point==Vector, keep only one conversion - boost::mpl::or_, + duplicate::value || // For iterator objects, the default is make_transforming_iterator - boost::mpl::bool_<(iterator_tag_traits::is_iterator && no_converter::value)> >, - Do_not_use,K1_Obj>::type argument_type; + (iterator_tag_traits::is_iterator && no_converter::value), + Do_not_use,K1_Obj> argument_type; //typedef typename KOC::argument_type K1_Obj; //typedef typename KOC::result_type K2_Obj; public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h index 6e6b496840e..67ea76e11fb 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h @@ -260,9 +260,9 @@ struct Lazy_cartesian : void set_dimension(int dim){ak.set_dimension(dim);ek.set_dimension(dim);} // For compilers that do not handle [[no_unique_address]] - typedef boost::mpl::and_< - internal::Do_not_store_kernel, - internal::Do_not_store_kernel > Do_not_store_kernel; + typedef std::bool_constant< + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value > Do_not_store_kernel; typedef typename EK_::Dimension Dimension; // ? typedef Lazy_cartesian Self; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h index 9ddd7953e24..50d9a8c8b00 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h @@ -83,8 +83,8 @@ template struct result_{typedef transforming_iterator struct result; template struct result : result_ {}; -template std::enable_if_t,Is_wrapper_iterator >::value,T> const& operator()(T const& t) const {return t;} -template std::enable_if_t,Is_wrapper_iterator >::value,T>& operator()(T& t) const {return t;} +template std::enable_if_t::value || Is_wrapper_iterator::value,T> const& operator()(T const& t) const {return t;} +template std::enable_if_t::value || Is_wrapper_iterator::value,T>& operator()(T& t) const {return t;} template typename T::Rep const& operator()(T const& t, std::enable_if_t::value >* = 0) const {return t.rep();} diff --git a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h index a3255d25eb0..b3230858573 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -65,16 +64,16 @@ namespace CGAL { : Has_type_different_from, Null_functor> {}; template::type::value> - struct Provides_functors : boost::mpl::and_ < - Provides_functor::type>, - Provides_functors::type> > {}; + struct Provides_functors : std::bool_constant< + Provides_functor::type>::value && + Provides_functors::type>::value > {}; template struct Provides_functors : std::true_type {}; template::type::value> - struct Provides_types : boost::mpl::and_ < - Provides_type::type>, - Provides_types::type> > {}; + struct Provides_types : std::bool_constant< + Provides_type::type>::value && + Provides_types::type>::value > {}; template struct Provides_types : std::true_type {}; @@ -233,7 +232,7 @@ namespace CGAL { #undef CGAL_DECL_ITER_OBJ templatestruct Get_functor_category,B,C> : - boost::mpl::if_c::is_iterator, + std::conditional::is_iterator, Construct_iterator_tag, Construct_tag> {}; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/utils.h b/NewKernel_d/include/CGAL/NewKernel_d/utils.h index a1ac6faeddd..4296f179462 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/utils.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/utils.h @@ -38,7 +38,7 @@ template ::value /*false*/> struct Has_type_different_from : std::false_type {}; template struct Has_type_different_from -: boost::mpl::not_ > {}; +: std::bool_constant> {}; template struct Wrap_type { typedef T type; }; @@ -145,11 +145,11 @@ struct Has_type_different_from #define CGAL_KD_DEFAULT_FUNCTOR(Tg,Name,ReqTyp,ReqFun) \ template \ struct Get_functor::value \ || !Provides_types >::value \ || !Provides_functors >::value \ - , int, void>::type> \ + , int, void>> \ { \ typedef CGAL_STRIP_PAREN_ Name type; \ typedef K Bound_kernel; \ @@ -159,11 +159,11 @@ struct Has_type_different_from #define CGAL_KD_DEFAULT_TYPE(Tg,Name,ReqTyp,ReqFun) \ template \ struct Get_type::value \ || !Provides_types >::value \ || !Provides_functors >::value \ - , int, void>::type> \ + , int, void>> \ { \ typedef CGAL_STRIP_PAREN_ Name type; \ typedef K Bound_kernel; \ diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index 18ac1657ee6..5693977869a 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -509,8 +509,8 @@ void test3(){ ; CP_ cp_ Kinit(construct_point_d_object); CV_ cv_ Kinit(construct_vector_d_object); - typename boost::mpl::if_,Construct_point3_helper,CP_>::type cp(cp_); - typename boost::mpl::if_,Construct_point3_helper,CV_>::type cv(cv_); + std::conditional_t,Construct_point3_helper,CP_> cp(cp_); + std::conditional_t,Construct_point3_helper,CV_> cv(cv_); CCI ci Kinit(construct_cartesian_const_iterator_d_object); CC cc Kinit(compute_coordinate_d_object); CL cl Kinit(compare_lexicographically_d_object); diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index 3f06ef3fb32..d15c11a73bd 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -19,7 +19,6 @@ #include // for Root_of functor #include -#include #include #include @@ -383,9 +382,9 @@ public : // Also check that ET and AT are constructible from T? template - Lazy_exact_nt (T i, std::enable_if_t, std::is_enum >, - boost::mpl::not_ > >::value,void*> = 0) + Lazy_exact_nt (T i, std::enable_if_t< + (std::is_arithmetic_v || std::is_enum_v) && + !std::is_same_v,void*> = 0) : Base(new Lazy_exact_Cst(i)) {} Lazy_exact_nt (const ET & e) @@ -1179,12 +1178,11 @@ struct Coercion_traits< Lazy_exact_nt, Lazy_exact_nt > Are_implicit_interoperable; \ private: \ static const bool interoperable \ - =std::is_same< Are_implicit_interoperable, Tag_false>::value; \ + =std::is_same< Are_implicit_interoperable, Tag_false>::value; \ public: \ - typedef typename boost::mpl::if_c \ - ::type Type; \ - typedef typename boost::mpl::if_c >::type Cast; \ + typedef std::conditional_t Type; \ + typedef std::conditional_t > Cast; \ }; \ \ template \ diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index e91e22208a5..8c117c2fb6d 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -627,13 +627,13 @@ public: }; - typedef typename boost::mpl::if_c< - !std::is_same< typename Algebraic_structure_traits::Sqrt, - Null_functor >::value, + typedef std::conditional_t< + !std::is_same_v< typename Algebraic_structure_traits::Sqrt, + Null_functor >, typename INTERN_QUOTIENT::Sqrt_selector< Type, Is_exact >::Sqrt, Null_functor - >::type Sqrt; + > Sqrt; class Simplify : public CGAL::cpp98::unary_function< Type&, void > { diff --git a/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h b/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h index b0913afb1b6..c2175bc9439 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h @@ -204,10 +204,10 @@ public: typedef Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG > Type; // Tag_true if COEFF and ROOT are exact - typedef typename ::boost::mpl::if_c< - bool( ::std::is_same::Is_exact,::CGAL::Tag_true>::value )&& - bool( ::std::is_same::Is_exact,::CGAL::Tag_true>::value ) - ,::CGAL::Tag_true,::CGAL::Tag_false>::type Is_exact; + typedef std::conditional_t< + std::is_same_v::Is_exact,::CGAL::Tag_true> && + std::is_same_v::Is_exact,::CGAL::Tag_true> + ,::CGAL::Tag_true,::CGAL::Tag_false> Is_exact; typedef typename Algebraic_structure_traits::Is_numerical_sensitive Is_numerical_sensitive; diff --git a/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h b/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h index 6b4344348d4..5b5ddfa45c6 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h @@ -178,7 +178,7 @@ template struct CT_ext_not_to_fwsqrt; // template struct Coercion_traits_for_level, B , CTL_SQRT_EXT> -:public ::boost::mpl::if_c< +:public std::conditional_t< // if B is fwsqrt ::boost::is_base_and_derived< Field_with_sqrt_tag, @@ -192,7 +192,7 @@ typename Algebraic_structure_traits::Algebraic_category >::value , //else take Intern::Coercion_traits not for fwsqrt INTERN_CT::CT_ext_not_to_fwsqrt< Sqrt_extension ,B> - >::type + > {}; // diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index 4a562530c75..6b87205b501 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -178,10 +178,10 @@ public: */ template explicit Sqrt_extension(const NTX& a, const NTX& b, const NTX& c, const bool is_smaller, - std::enable_if_t< boost::mpl::and_< - std::is_same< typename Fraction_traits::Numerator_type,NTX >, - std::is_same< typename Fraction_traits::Numerator_type,NTX > - >::value >* = 0 ) + std::enable_if_t< + std::is_same_v< typename Fraction_traits::Numerator_type,NTX > && + std::is_same_v< typename Fraction_traits::Numerator_type,NTX > + >* = 0 ) { typename Fraction_traits::Compose compose_nt; typename Fraction_traits::Compose compose_root; diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index 1232e426aed..c83be87df90 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -435,10 +435,9 @@ public: boost::zip_iterator< boost::tuple > last, bool is_large_point_set = true, std::enable_if_t < - boost::mpl::and_ < - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value >* = nullptr) + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* = nullptr) { return insert_with_info< boost::tuple::type> >(first, last, is_large_point_set); } diff --git a/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h b/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h index a96c2eafa36..d821ab2fe3f 100644 --- a/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h +++ b/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h @@ -15,7 +15,6 @@ #include #include -#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -47,9 +46,9 @@ public: } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h index 2780d618393..bfb4b4e8716 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h @@ -18,7 +18,6 @@ #include #include -#include namespace CGAL { @@ -46,9 +45,9 @@ public: } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 7eed15886cd..63fb9404469 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPAutorefinementVisitor.h b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPAutorefinementVisitor.h new file mode 100644 index 00000000000..ef2f124329b --- /dev/null +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPAutorefinementVisitor.h @@ -0,0 +1,27 @@ +/// \ingroup PkgPolygonMeshProcessingConcepts +/// \cgalConcept +/// +/// The concept `PMPAutorefinementVisitor` defines the requirements for the visitor +/// used in `CGAL::Polygon_mesh_processing::autorefine_triangle_soup()` to track +/// the creation of new triangles. +/// +/// \cgalRefines{CopyConstructible} +/// \cgalHasModelsBegin +/// \cgalHasModels{CGAL::Polygon_mesh_processing::Autorefinement::Default_visitor} +/// \cgalHasModelsEnd + +class PMPAutorefinementVisitor{ +public: + +/// @name Functions called only if at least one intersection has been found +/// @{ + /// called when the final number of output triangles is known, `nbt` being the total number of triangles in the output. + void number_of_output_triangles(std::size_t nbt); + /// called for triangle with no intersection, `tgt_id` is the position in the triangle container after calling + /// `autorefine_triangle_soup()`, while `src_id` was its position before calling the function. + void verbatim_triangle_copy(std::size_t tgt_id, std::size_t src_id); + /// called for each subtriangle created from a triangle with intersection, `tgt_id` is the position in the triangle container after calling + /// `autorefine_triangle_soup()` of the subtriangle, while `src_id` was the position of the original support triangle before calling the function. + void new_subtriangle(std::size_t tgt_id, std::size_t src_id); +/// @} +}; diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index dc1da2b21fa..ad143bf835d 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -113,6 +113,8 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - `CGAL::Polygon_mesh_processing::surface_intersection()` - `CGAL::Polygon_mesh_processing::clip()` - `CGAL::Polygon_mesh_processing::split()` +- `CGAL::Polygon_mesh_processing::autorefine_triangle_soup()` +- `CGAL::Polygon_mesh_processing::autorefine()` \cgalCRPSection{Meshing Functions} - `CGAL::Polygon_mesh_processing::remesh_planar_patches()` diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 26d5d9c6450..ac3e94db114 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -229,7 +229,7 @@ it can try to equalize the angles between incident edges, or (and) move vertices Border vertices are considered constrained and do not move at any step of the procedure. No vertices are inserted at any time. Angle and area smoothing algorithms are based on Surazhsky and Gotsman \cgalCite{cgal:sg-hqct-04}. Since area smoothing considers only areas as a smoothing criterion, it may result in long and skinny -triangles. To paliate this phenomenon, area smoothing is followed by an (optional) step of Delaunay-based edge flips. +triangles. To palliate this phenomenon, area smoothing is followed by an (optional) step of Delaunay-based edge flips. In any case, area smoothing is guaranteed to improve the spatial distribution of the vertices over the area that is being smoothed. A simple example can be found in \ref Polygon_mesh_processing/mesh_smoothing_example.cpp. @@ -449,7 +449,7 @@ depicted in red); (iii) `clip_volume=true`: clipping of the volume bounded by th \cgalFigureEnd \cgalFigureBegin{coref_clip_compact, clip_compact.png} -Clipping a cube with a halfspace: compacity of the clipper (`clip_volume=false` in both cases). +Clipping a cube with a halfspace: compactivity of the clipper (`clip_volume=false` in both cases). From left to right: (i) initial cube and the plane defining the clipping halfspace, note that a whole face of the cube (2 triangles) is exactly contained in the plane; (ii) `use_compact_clipper=true`: clipping of the surface mesh with a compact halfspace: coplanar faces are part of the output; @@ -879,6 +879,19 @@ vertices at identical positions, can be used to repair this configuration. \section PMPGeometricRepair Geometric Repair **************************************** +\subsection PMPAutoref Self-intersection Resolution (Autorefinement) in Triangle Soups +Given a soup of triangles, a self-intersection is defined as the intersection of two triangles from the soup +such that the intersection is not defined by the convex hull of one, two or three shared vertices. +In other words, it is an intersection that happens in the interior of one of the two triangles, or in the interior +of one their edges, except if identical points are associated to different vertices of the triangle soup which +would then also includes overlaps of duplicated points. + +The function `CGAL::Polygon_mesh_processing::autorefine_triangle_soup()` provides a way to refine a triangle soup +using the intersections of the triangles from the soup. In particular, if some points are duplicated they will be +merged. Note that if a kernel with exact predicates but inexact constructions is used, some new self-intersections +might be introduced due to rounding issues of points coordinates. +To guarantee that the triangle soup is free from self-intersections, a kernel with exact constructions must be used. + \subsection PMPRemoveCapsNeedles Removal of Almost Degenerate Triangle Faces Triangle faces of a mesh made up of almost collinear points are badly shaped elements that might not be desirable to have in a mesh. The function diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt index ba917e03836..3aca69fb004 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt @@ -47,5 +47,6 @@ \example Polygon_mesh_processing/remesh_planar_patches.cpp \example Polygon_mesh_processing/remesh_almost_planar_patches.cpp \example Polygon_mesh_processing/sample_example.cpp +\example Polygon_mesh_processing/soup_autorefinement.cpp */ */ diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 90d9387d8ea..455e1ce2be7 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -53,6 +53,8 @@ create_single_source_cgal_program("cc_compatible_orientations.cpp") create_single_source_cgal_program("hausdorff_distance_remeshing_example.cpp") create_single_source_cgal_program("hausdorff_bounded_error_distance_example.cpp") create_single_source_cgal_program("isotropic_remeshing_with_custom_sizing_example.cpp") +create_single_source_cgal_program("triangle_mesh_autorefinement.cpp") +create_single_source_cgal_program("soup_autorefinement.cpp") find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) @@ -133,6 +135,7 @@ 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) target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::TBB_support) + target_link_libraries(soup_autorefinement 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) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/soup_autorefinement.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/soup_autorefinement.cpp new file mode 100644 index 00000000000..a76e1254f6e --- /dev/null +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/soup_autorefinement.cpp @@ -0,0 +1,38 @@ +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point; + +namespace PMP = CGAL::Polygon_mesh_processing; + +int main(int argc, char** argv) +{ + const std::string filename = argc == 1 ? CGAL::data_file_path("meshes/elephant.off") + : std::string(argv[1]); + + std::vector input_points; + std::vector> input_triangles; + CGAL::IO::read_polygon_soup(filename, input_points, input_triangles); + PMP::repair_polygon_soup(input_points, input_triangles); + PMP::triangulate_polygons(input_points, input_triangles); + + CGAL::Real_timer t; + t.start(); + PMP::autorefine_triangle_soup(input_points, input_triangles, + CGAL::parameters::concurrency_tag(CGAL::Parallel_if_available_tag())); + t.stop(); + std::cout << "#points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " in " << t.time() << " sec." << std::endl; + CGAL::IO::write_polygon_soup("autorefined.off", input_points, input_triangles, CGAL::parameters::stream_precision(17)); + + return 0; +} diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/triangle_mesh_autorefinement.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/triangle_mesh_autorefinement.cpp new file mode 100644 index 00000000000..65db52fef2c --- /dev/null +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/triangle_mesh_autorefinement.cpp @@ -0,0 +1,29 @@ +#include +#include + +#include +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point; + +typedef CGAL::Surface_mesh Mesh; + +namespace PMP = CGAL::Polygon_mesh_processing; + +int main(int argc, char** argv) +{ + Mesh mesh; + + const std::string filename = argc == 1 ? CGAL::data_file_path("meshes/elephant.off") + : std::string(argv[1]); + CGAL::IO::read_polygon_mesh(filename, mesh); + + PMP::autorefine(mesh); + + CGAL::IO::write_polygon_mesh("autorefined.off", mesh, CGAL::parameters::stream_precision(17)); + + return 0; +} 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 8177a02d178..e8901ebd727 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 @@ -28,8 +28,8 @@ struct Non_manifold_feature_map 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; + typedef typename boost::property_map::const_type Edge_to_nm_id; + typedef typename boost::property_map::const_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; @@ -39,7 +39,7 @@ struct Non_manifold_feature_map {} template - Non_manifold_feature_map(PolygonMesh& pm, Vpm vpm) + Non_manifold_feature_map(const PolygonMesh& pm, Vpm vpm) : e_nm_id(get(Edge_to_id_tag(), pm)) , v_nm_id(get(Vertex_to_id_tag(), pm)) { @@ -99,6 +99,14 @@ struct Non_manifold_feature_map } } } + + void clear() + { + non_manifold_edges.clear(); + non_manifold_vertices.clear(); + e_nm_id = Edge_to_nm_id(); + v_nm_id = Vertex_to_nm_id(); + } }; } } // end of CGAL::Polygon_mesh_processing diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h new file mode 100644 index 00000000000..8a61b92f717 --- /dev/null +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h @@ -0,0 +1,1414 @@ +// Copyright (c) 2023 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// + +#ifndef CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H +#define CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H + +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY +#include +#endif + +// output +#include +#include +#include + + +#ifdef CGAL_PMP_AUTOREFINE_USE_DEFAULT_VERBOSE +#define CGAL_PMP_AUTOREFINE_VERBOSE(X) std::cout << X << "\n"; +#endif + +#ifndef CGAL_PMP_AUTOREFINE_VERBOSE +#define CGAL_PMP_AUTOREFINE_VERBOSE(MSG) +#endif + +#ifdef CGAL_LINKED_WITH_TBB +#include +#if TBB_INTERFACE_VERSION < 12010 && !defined(TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS) +#define CGAL_HAS_DEFINED_TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#define TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS 1 +#endif +#include +#include +#ifdef CGAL_AUTOREF_SET_POINT_IDS_USING_MUTEX +#include +#endif +#endif + +#include + +//#define CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS +//#define CGAL_AUTOREFINE_DEBUG_COUNTERS +//#define CGAL_AUTOREF_DEBUG_DEPTH + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS +#include +#endif + +#if defined(CGAL_AUTOREFINE_DEBUG_COUNTERS) || defined(CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS) +#include +#endif + +namespace CGAL { +namespace Polygon_mesh_processing { + +namespace Autorefinement { + +/** \ingroup PMP_corefinement_grp + * %Default visitor model of `PMPAutorefinementVisitor`. + * All of its functions have an empty body. This class can be used as a + * base class if only some of the functions of the concept require to be + * overridden. + */ +struct Default_visitor +{ + inline void number_of_output_triangles(std::size_t /*nbt*/) {} + inline void verbatim_triangle_copy(std::size_t /*tgt_id*/, std::size_t /*src_id*/) {} + inline void new_subtriangle(std::size_t /*tgt_id*/, std::size_t /*src_id*/) {} +}; + +} // end of Autorefinement visitor + + +#ifndef DOXYGEN_RUNNING +namespace autorefine_impl { + +enum Segment_inter_type { NO_INTERSECTION=0, + POINT_INTERSECTION, + POINT_P, + POINT_Q, + POINT_R, + POINT_S, + COPLANAR_SEGMENT_PQ, + COPLANAR_SEGMENT_RS, + COPLANAR_SEGMENT_PS, + COPLANAR_SEGMENT_QS, + COPLANAR_SEGMENT_PR, + COPLANAR_SEGMENT_QR, + }; + +// test intersection in the interior of segment pq and rs with pq and rs being coplanar segments +// note that for coplanar cases, we might report identical endpoints +template +Segment_inter_type +do_coplanar_segments_intersect(std::size_t pi, std::size_t qi, + std::size_t ri, std::size_t si, + const std::vector& points, + const typename K::Vector_3& /* plane_normal */, + const K& k = K()) +{ + typename K::Collinear_are_ordered_along_line_3 cln_order = k.collinear_are_ordered_along_line_3_object(); + typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object(); + + const typename K::Point_3& p=points[pi]; + const typename K::Point_3& q=points[qi]; + const typename K::Point_3& r=points[ri]; + const typename K::Point_3& s=points[si]; + + // first handle case of shared endpoints + if (pi==ri) + { + if (si==qi || cpl_orient(p, q, s)!=COLLINEAR) return NO_INTERSECTION; + // can be s, q or nothing + if (cln_order(p,s,q)) + return POINT_S; + if (cln_order(p,q,s)) + return POINT_Q; + return NO_INTERSECTION; + } + else + { + if(pi==si) + { + if (qi==ri || cpl_orient(p, q, r)!=COLLINEAR) return NO_INTERSECTION; + // can be r, q or nothing + if (cln_order(p,r,q)) + return POINT_R; + if (cln_order(p,q,r)) + return POINT_Q; + return NO_INTERSECTION; + } + else + { + if (qi==ri) + { + if (pi==si || cpl_orient(p, q, s)!=COLLINEAR) return NO_INTERSECTION; + // can be p, s or nothing + if (cln_order(p,s,q)) + return POINT_S; + if (cln_order(q,p,s)) + return POINT_P; + return NO_INTERSECTION; + } + else + { + if (qi==si) + { + if (pi==ri || cpl_orient(p, q, r)!=COLLINEAR) return NO_INTERSECTION; + // can be p, r or nothing + if (cln_order(p,r,q)) + return POINT_R; + if (cln_order(q,p,r)) + return POINT_P; + return NO_INTERSECTION; + } + } + } + } + + // supporting_line intersects: points are coplanar + ::CGAL::Orientation pqr = cpl_orient(p, q, r); + ::CGAL::Orientation pqs = cpl_orient(p, q, s); + + if(pqr == COLLINEAR && pqs == COLLINEAR) + { + // segments are collinear + bool r_in_pq = cln_order(p, r, q), + s_in_pq = cln_order(p, s, q), + p_in_rs = cln_order(r, p, s); + + if (r_in_pq) + { + // intersection could be rs, pr or qr + if (s_in_pq) + return COPLANAR_SEGMENT_RS; + if (p_in_rs) + return COPLANAR_SEGMENT_PR; + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_QR; + } + else + { + if (s_in_pq) + { + // intersection could be ps or qs + if (p_in_rs) + return COPLANAR_SEGMENT_PS; + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_QS; + } + else + if (p_in_rs) + { + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_PQ; + } + } + return NO_INTERSECTION; + } + + if(pqr != pqs) + { + ::CGAL::Orientation rsp = cpl_orient(r, s, p); + + if (rsp==COLLINEAR) + { + if (pqr==COLLINEAR || pqs==COLLINEAR) + { + throw std::runtime_error("no expected #1"); + } + return POINT_P; + } + ::CGAL::Orientation rsq = cpl_orient(r, s, q); + if (rsq==COLLINEAR) + { + if (pqr==COLLINEAR || pqs==COLLINEAR) + { + throw std::runtime_error("no expected #2"); + } + return POINT_Q; + } + if (rsp!=rsq) + { + if (pqr==COLLINEAR) return POINT_R; + if (pqs==COLLINEAR) return POINT_S; + return POINT_INTERSECTION; + } + } + + return NO_INTERSECTION; +} + +// imported from Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +template +void coplanar_intersections(const std::array& t1, + const std::array& t2, + std::vector& inter_pts) +{ + const typename K::Point_3& p1 = t1[0], q1 = t1[1], r1 = t1[2]; + const typename K::Point_3& p2 = t2[0], q2 = t2[1], r2 = t2[2]; + + std::list> l_inter_pts; + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,0)); + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,1)); + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,2)); + + //intersect t2 with the three half planes which intersection defines t1 + K k; + Intersections::internal::intersection_coplanar_triangles_cutoff(p1,q1,r1,0,p2,q2,r2,k,l_inter_pts); //line p1q1 + Intersections::internal::intersection_coplanar_triangles_cutoff(q1,r1,p1,1,p2,q2,r2,k,l_inter_pts); //line q1r1 + Intersections::internal::intersection_coplanar_triangles_cutoff(r1,p1,q1,2,p2,q2,r2,k,l_inter_pts); //line r1p1 + + for (const Intersections::internal::Point_on_triangle& pot : l_inter_pts) + inter_pts.push_back( pot.point(p1,q1,r1,p2,q2,r2,k) ); +} + +// imported from Polygon_mesh_processing/internal/Corefinement/intersect_triangle_segment_3.h +template +void +find_intersection(const typename K::Point_3& p, const typename K::Point_3& q, //segment + const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, //triangle + std::vector& inter_pts, + bool is_p_coplanar=false, bool is_q_coplanar=false) // note that in coref this was wrt a halfedge not p/q +{ + Orientation ab=orientation(p,q,a,b); + Orientation bc=orientation(p,q,b,c); + Orientation ca=orientation(p,q,c,a); + + if ( ab==POSITIVE || bc==POSITIVE || ca==POSITIVE ) + return; + + int nb_coplanar=(ab==COPLANAR?1:0) + (bc==COPLANAR?1:0) + (ca==COPLANAR?1:0); + + if (is_p_coplanar) + { + inter_pts.push_back(p); + return; + } + if (is_q_coplanar) + { + inter_pts.push_back(q); + return; + } + + if (nb_coplanar!=2) + { + inter_pts.push_back( + typename K::Construct_plane_line_intersection_point_3()(a, b, c, p, q) + ); + } + else + { + if (ab!=COPLANAR) + { + // intersection is c + inter_pts.push_back(c); + return; + } + + if (bc!=COPLANAR) + { + // intersection is a + inter_pts.push_back(a); + return; + } + CGAL_assertion(ca!=COPLANAR); + // intersection is b + inter_pts.push_back(b); + } +} + +template +void test_edge(const typename K::Point_3& p, const typename K::Point_3& q, + const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, + const Orientation abcp, + const Orientation abcq, + std::vector& inter_pts) +{ + switch ( abcp ) { + case POSITIVE: + switch ( abcq ) { + case POSITIVE: + // the segment lies in the positive open halfspaces defined by the + // triangle's supporting plane + break; + case NEGATIVE: + // p sees the triangle in counterclockwise order + find_intersection(p,q,a,b,c,inter_pts); + break; + //case COPLANAR: + default: + // q belongs to the triangle's supporting plane + // p sees the triangle in counterclockwise order + find_intersection(p,q,a,b,c,inter_pts,false,true); + } + break; + case NEGATIVE: + switch ( abcq ) { + case POSITIVE: + // q sees the triangle in counterclockwise order + find_intersection(q,p,a,b,c,inter_pts); + break; + case NEGATIVE: + // the segment lies in the negative open halfspaces defined by the + // triangle's supporting plane + break; + // case COPLANAR: + default: + // q belongs to the triangle's supporting plane + // p sees the triangle in clockwise order + find_intersection(q,p,a,b,c,inter_pts,true,false); + } + break; + default: + //case COPLANAR: // p belongs to the triangle's supporting plane + switch ( abcq ) { + case POSITIVE: + // q sees the triangle in counterclockwise order + find_intersection(q,p,a,b,c,inter_pts,false, true); + break; + case NEGATIVE: + // q sees the triangle in clockwise order + find_intersection(p,q,a,b,c,inter_pts,true); + break; + //case COPLANAR: + default: + // the segment is coplanar with the triangle's supporting plane + // we test whether the segment intersects the triangle in the common + // supporting plane + //if ( ::CGAL::Intersections::internal::do_intersect_coplanar(a,b,c,p,q,K()) ) + //{ + //handle coplanar intersection + // nothing done as coplanar case handle in collect_intersections + // and other intersection points will be collected with non-coplanar edges + //} + break; + } + } +} + +template +bool collect_intersections(const std::array& t1, + const std::array& t2, + std::vector& inter_pts) +{ + // test edges of t1 vs t2 + std::array ori; + for (int i=0; i<3; ++i) + ori[i] = orientation(t2[0],t2[1],t2[2],t1[i]); + + if (ori[0]== COPLANAR && ori[1]==COPLANAR && ori[2]==COPLANAR) + { + coplanar_intersections(t1, t2, inter_pts); +#ifdef CGAL_AUTOREF_DEBUG_DEPTH + for (auto p : inter_pts) + if (depth(p)>2) throw std::runtime_error("Depth is not 4: "+std::to_string(depth(p))); +#endif + + return true; + } + + for (int i=0; i<3; ++i) + { + int j=(i+1)%3; + test_edge(t1[i], t1[j], t2[0], t2[1], t2[2], ori[i], ori[j], inter_pts); + } + + // test edges of t2 vs t1 + for (int i=0; i<3; ++i) + ori[i] = orientation(t1[0],t1[1],t1[2],t2[i]); + for (int i=0; i<3; ++i) + { + int j=(i+1)%3; + test_edge(t2[i], t2[j], t1[0], t1[1], t1[2], ori[i], ori[j], inter_pts); + } + + // because we don't handle intersection type and can have edge-edge edge-vertex duplicates + std::sort(inter_pts.begin(), inter_pts.end()); + auto last = std::unique(inter_pts.begin(), inter_pts.end()); + inter_pts.erase(last, inter_pts.end()); + +#ifdef CGAL_AUTOREF_DEBUG_DEPTH + for (auto p : inter_pts) + if (depth(p)>2) throw std::runtime_error("Depth is not 2: "+std::to_string(depth(p))); +#endif + + return false; +} + +template +void generate_subtriangles(std::size_t ti, + std::vector>& segments, + std::vector& points, + const std::vector& in_triangle_ids, + const std::set >& intersecting_triangles, + const std::set >& coplanar_triangles, + const std::vector>& triangles, + PointVector& new_triangles + ) +{ + typedef CGAL::Projection_traits_3 P_traits; + typedef CGAL::No_constraint_intersection_tag Itag; + + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT_2; + //typedef CGAL::Constrained_triangulation_plus_2 CDT; + typedef CDT_2 CDT; + + const std::array& t = triangles[ti]; + + // positive triangle normal + typename EK::Vector_3 n = normal(t[0], t[1], t[2]); + typename EK::Point_3 o(CGAL::ORIGIN); + + bool orientation_flipped = false; + if ( typename EK::Less_xyz_3()(o+n,o) ) + { + n=-n; + orientation_flipped = true; + } + + P_traits cdt_traits(n); + CDT cdt(cdt_traits); + cdt.insert_outside_affine_hull(t[0]); + cdt.insert_outside_affine_hull(t[1]); + typename CDT::Vertex_handle v = cdt.tds().insert_dim_up(cdt.infinite_vertex(), orientation_flipped); + v->set_point(t[2]); + +#ifdef CGAL_AUTOREFINE_DEBUG_COUNTERS + struct Counter + { + int c1=0; + int c2=0; + int c3=0; + int c4=0; + int c5=0; + int total=0; + ~Counter() + { + std::cout << "intersection of 3 planes: " << c1 << "\n"; + std::cout << "coplanar segment intersection : " << c2 << "\n"; + std::cout << "coplanar segment overlap: " << c3 << "\n"; + std::cout << "no intersection: " << c4 << "\n"; + std::cout << "intersection filtered with bboxes: " << c5 << "\n"; + std::cout << "# pairs of segments : " << total << "\n"; + std::cout << "time computing segment intersections: " << timer1.time() << "\n"; + std::cout << "time sorting intersection points: " << timer2.time() << "\n"; + std::cout << "time for cdt of constraints: " << timer3.time() << "\n"; + std::cout << "time coplanar segment intersections: " << timer4.time() << "\n"; + std::cout << "time of do_coplanar_segments_intersect: " << timer5.time() << "\n"; + std::cout << "time of triplane intersection: " << timer6.time() << "\n"; + } + CGAL::Real_timer timer1, timer2, timer3, timer4, timer5, timer6; + }; + + static Counter counter; +#define CGAL_AUTOREF_COUNTER_INSTRUCTION(X) X +#else +#define CGAL_AUTOREF_COUNTER_INSTRUCTION(X) +#endif + + // pre-compute segment intersections + if (!segments.empty()) + { + std::size_t nbs = segments.size(); + + std::vector< std::vector > points_on_segments(nbs); + + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer1.start();) + + std::map point_id_map; + + for (std::size_t pid=0; pidsecond; + }; + + std::vector point_boxes(points.size()); + for (std::size_t i = 0; i segment_boxes(nbs); + for (std::size_t i = 0; i(segments[i].first, segments[i].second, + segments[j].first, segments[j].second, + points, n); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer5.stop();) + + switch(seg_inter_type) + { + case POINT_P: + { + points_on_segments[j].push_back(segments[i].first); + break; + } + case POINT_Q: + { + points_on_segments[j].push_back(segments[i].second); + break; + } + case POINT_R: + { + points_on_segments[i].push_back(segments[j].first); + break; + } + case POINT_S: + { + points_on_segments[i].push_back(segments[j].second); + break; + } + case POINT_INTERSECTION: + { + if ( coplanar_triangles.count(CGAL::make_sorted_pair(in_triangle_ids[i], in_triangle_ids[j])) == 0 + && coplanar_triangles.count(CGAL::make_sorted_pair(ti, in_triangle_ids[j])) == 0 + && coplanar_triangles.count(CGAL::make_sorted_pair(in_triangle_ids[i], ti)) == 0) + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer6.start();) + typename EK::Point_3 pt = typename EK::Construct_planes_intersection_point_3()( + triangles[in_triangle_ids[i]][0], triangles[in_triangle_ids[i]][1],triangles[in_triangle_ids[i]][2], + triangles[in_triangle_ids[j]][0], triangles[in_triangle_ids[j]][1],triangles[in_triangle_ids[j]][2], + triangles[ti][0], triangles[ti][1],triangles[ti][2]); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer6.stop();) + + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c1;) + std::size_t pid = get_point_id(pt); + points_on_segments[i].push_back(pid); + points_on_segments[j].push_back(pid); + } + else + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c2;) + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer4.start();) + typename EK::Point_3 pt = typename EK::Construct_coplanar_segments_intersection_point_3()( + points[segments[i].first], points[segments[i].second], + points[segments[j].first], points[segments[j].second]); + + std::size_t pid = get_point_id(pt); + points_on_segments[i].push_back(pid); + points_on_segments[j].push_back(pid); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer4.stop();) + } + break; + } + case COPLANAR_SEGMENT_PQ: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[j].push_back(segments[i].first); + points_on_segments[j].push_back(segments[i].second); + break; + } + case COPLANAR_SEGMENT_RS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[i].push_back(segments[j].second); + break; + } + case COPLANAR_SEGMENT_PR: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[j].push_back(segments[i].first); + break; + } + case COPLANAR_SEGMENT_QS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].second); + points_on_segments[j].push_back(segments[i].second); + break; + } + case COPLANAR_SEGMENT_PS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].second); + points_on_segments[j].push_back(segments[i].first); + break; + } + case COPLANAR_SEGMENT_QR: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[j].push_back(segments[i].second); + break; + } + case NO_INTERSECTION: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c4;) + } + } + } + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.total;) + } + } + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer1.stop();) + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer2.start();) + std::size_t nb_new_segments=0; + for (std::size_t i = 0; itgt[coord]) + { + std::swap(src_id, tgt_id); + std::swap(src, tgt); + } + + points_on_segments[i].push_back(src_id); + std::swap(points_on_segments[i].front(), points_on_segments[i].back()); + std::sort(std::next(points_on_segments[i].begin()), points_on_segments[i].end(), + [&](std::size_t id1, std::size_t id2) + { + if (id1==id2) return false; + return points[id1][coord](points.begin(), points.end()).size()); + CGAL_assertion(points.size()==point_id_map.size()); + } + + for (std::pair& s : segments) + if (s.second < s.first) + std::swap(s.first,s.second); + std::sort(segments.begin(), segments.end()); + auto last = std::unique(segments.begin(), segments.end()); + segments.erase(last, segments.end()); + + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer3.start();) + if (segments.empty()) + cdt.insert(points.begin(), points.end()); + else + cdt.insert_constraints(points.begin(), points.end(), segments.begin(), segments.end()); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer3.stop();) + + for (typename CDT::Face_handle fh : cdt.finite_face_handles()) + { + if (orientation_flipped) + new_triangles.push_back( { CGAL::make_array(fh->vertex(0)->point(), + fh->vertex(cdt.cw(0))->point(), + fh->vertex(cdt.ccw(0))->point()), ti } ); + else + new_triangles.push_back( { CGAL::make_array(fh->vertex(0)->point(), + fh->vertex(cdt.ccw(0))->point(), + fh->vertex(cdt.cw(0))->point()), ti } ); + } +} + +} // end of autorefine_impl +#endif + +/** +* \ingroup PMP_corefinement_grp +* +* refines a soup of triangles so that no pair of triangles intersects. +* Output triangles may share a common edge or a common vertex (but with the same indexed position in `points`). +* Note that points in `soup_points` can only be added (intersection points) at the end of the container, with the initial order preserved. +* Note that if `soup_points` contains two or more identical points then only the first copy (following the order in the `soup_points`) +* will be used in `soup_triangles`. +* `soup_triangles` will be updated to contain both the input triangles and the new subdivided triangles. Degenerate triangles will be removed. +* Also triangles in `soup_triangles` will be triangles without intersection first, followed by triangles coming from a subdivision induced +* by an intersection. The named parameter `visitor()` can be used to track +* +* @tparam PointRange a model of the concept `RandomAccessContainer` +* whose value type is the point type +* @tparam TriangleRange a model of the concepts `RandomAccessContainer`, `BackInsertionSequence` and `Swappable`, whose +* value type is a model of the concept `RandomAccessContainer` whose value type is convertible to `std::size_t` and that +* is constructible from an `std::initializer_list` of size 3. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +* +* @param soup_points points of the soup of polygons +* @param soup_triangles each element in the range describes a triangle using the indexed position of the points in `soup_points` +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below +* +* \cgalNamedParamsBegin +* \cgalParamNBegin{concurrency_tag} +* \cgalParamDescription{a tag indicating if the task should be done using one or several threads.} +* \cgalParamType{Either `CGAL::Sequential_tag`, or `CGAL::Parallel_tag`, or `CGAL::Parallel_if_available_tag`} +* \cgalParamDefault{`CGAL::Sequential_tag`} +* \cgalParamNEnd +* \cgalParamNBegin{point_map} +* \cgalParamDescription{a property map associating points to the elements of the range `soup_points`} +* \cgalParamType{a model of `ReadWritePropertyMap` whose value type is a point type} +* \cgalParamDefault{`CGAL::Identity_property_map`} +* \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 point type.} +* \cgalParamNEnd +* \cgalParamNBegin{visitor} +* \cgalParamDescription{a visitor used to track the creation of new faces} +* \cgalParamType{a class model of `PMPAutorefinementVisitor`} +* \cgalParamDefault{`Autorefinement::Default_visitor`} +* \cgalParamExtra{The visitor will be copied.} +* \cgalParamNEnd +* \cgalNamedParamsEnd +* +*/ +template +void autorefine_triangle_soup(PointRange& soup_points, + TriangleRange& soup_triangles, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetPolygonSoupGeomTraits::type GT; + typedef typename GetPointMap::const_type Point_map; + Point_map pm = choose_parameter(get_parameter(np, internal_np::point_map)); + + typedef typename internal_np::Lookup_named_param_def < + internal_np::concurrency_tag_t, + NamedParameters, + Sequential_tag + > ::type Concurrency_tag; + + // visitor + typedef typename internal_np::Lookup_named_param_def < + internal_np::visitor_t, + NamedParameters, + Autorefinement::Default_visitor//default + > ::type Visitor; + Visitor visitor(choose_parameter(get_parameter(np, internal_np::visitor))); + + + constexpr bool parallel_execution = std::is_same_v; + +#ifndef CGAL_LINKED_WITH_TBB + static_assert (!parallel_execution, + "Parallel_tag is enabled but TBB is unavailable."); +#endif + + typedef std::size_t Input_TID; + typedef std::pair Pair_of_triangle_ids; + + // no need for a concurrent vector as the called function itself + // takes care of sequentially writing into the output iterator + std::vector si_pairs; + + // collect intersecting pairs of triangles + CGAL_PMP_AUTOREFINE_VERBOSE("collect intersecting pairs"); + triangle_soup_self_intersections(soup_points, soup_triangles, std::back_inserter(si_pairs), np); + + if (si_pairs.empty()) + { + if constexpr (!std::is_same_v) + { + visitor.number_of_output_triangles(soup_triangles.size()); + for(std::size_t i=0; i is_degen(soup_triangles.size(), false); + + for (const Pair_of_triangle_ids& p : si_pairs) + if (p.first==p.second) // bbox inter reports (f,f) for degenerate faces + is_degen[p.first] = true; + + // assign an id per triangle involved in an intersection + // + the faces involved in the intersection + std::vector tri_inter_ids(soup_triangles.size(), -1); + std::vector intersected_faces; + int tiid=-1; + for (const Pair_of_triangle_ids& p : si_pairs) + { + if (tri_inter_ids[p.first]==-1 && !is_degen[p.first]) + { + tri_inter_ids[p.first]=++tiid; + intersected_faces.push_back(p.first); + } + if (tri_inter_ids[p.second]==-1 && !is_degen[p.second]) + { + tri_inter_ids[p.second]=++tiid; + intersected_faces.push_back(p.second); + } + } + + // init the vector of triangles used for the autorefinement of triangles + typedef CGAL::Exact_predicates_exact_constructions_kernel EK; + std::vector< std::array > triangles(tiid+1); + Cartesian_converter to_exact; + + for(Input_TID f : intersected_faces) + { + triangles[tri_inter_ids[f]]= CGAL::make_array( + to_exact( get(pm, soup_points[soup_triangles[f][0]]) ), + to_exact( get(pm, soup_points[soup_triangles[f][1]]) ), + to_exact( get(pm, soup_points[soup_triangles[f][2]]) ) ); + } + + std::vector< std::vector > > all_segments(triangles.size()); + std::vector< std::vector > all_points(triangles.size()); + std::vector< std::vector > all_in_triangle_ids(triangles.size()); + + CGAL_PMP_AUTOREFINE_VERBOSE("compute intersections"); +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + Real_timer t; + t.start(); +#endif + std::set > intersecting_triangles; + std::set > coplanar_triangles; + //TODO: PARALLEL_FOR #2 + for (const Pair_of_triangle_ids& p : si_pairs) + { + int i1 = tri_inter_ids[p.first], + i2 = tri_inter_ids[p.second]; + + if (i1==-1 || i2==-1) continue; //skip degenerate faces + + const std::array& t1 = triangles[i1]; + const std::array& t2 = triangles[i2]; + + std::vector inter_pts; + bool triangles_are_coplanar = autorefine_impl::collect_intersections(t1, t2, inter_pts); + + CGAL_assertion( + CGAL::do_intersect(EK::Triangle_3(t1[0], t1[1], t1[2]), EK::Triangle_3(t2[0], t2[1], t2[2])) + != inter_pts.empty()); + + if (!inter_pts.empty()) + { + std::size_t nbi = inter_pts.size(); + switch(nbi) + { + case 1: + all_points[i1].push_back(inter_pts[0]); + all_points[i2].push_back(inter_pts[0]); + break; + case 2: + all_segments[i1].push_back(CGAL::make_array(inter_pts[0], inter_pts[1])); + all_segments[i2].push_back(CGAL::make_array(inter_pts[0], inter_pts[1])); + all_in_triangle_ids[i1].push_back(i2); + all_in_triangle_ids[i2].push_back(i1); + break; + default: + for (std::size_t i=0;i>> all_segments_ids(all_segments.size()); + + auto deduplicate_inserted_segments = [&](std::size_t ti) + { + if (!all_segments[ti].empty()) + { + std::map point_id_map; + + + auto get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, all_points[ti].size())); + if (insert_res.second) + all_points[ti].push_back(pt); + return insert_res.first->second; + }; + + + if (!all_points[ti].empty()) + { + using EPoint_3 = EK::Point_3; // workaround for MSVC 2022 bug + std::vector tmp; + tmp.swap(all_points[ti]); + for (const EPoint_3& pt : tmp) + get_point_id(pt); + } + + std::size_t nbs = all_segments[ti].size(); + std::vector> filtered_segments; + std::vector filtered_in_triangle_ids; + filtered_segments.reserve(nbs); + std::set> segset; + for (std::size_t si=0; si(0, triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + deduplicate_inserted_segments(ti); + } + ); + } + else +#endif + for (std::size_t ti = 0; ti < triangles.size(); ++ti) { + deduplicate_inserted_segments(ti); + } + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #3" << std::endl; + t.reset(); +#endif + + CGAL_PMP_AUTOREFINE_VERBOSE("triangulate faces"); + // now refine triangles +#ifdef CGAL_LINKED_WITH_TBB + std::conditional_t, std::size_t>>, + std::vector, std::size_t>>> new_triangles; +#else + std::vector, std::size_t>> new_triangles; +#endif + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY + boost::timer::progress_display pd(triangles.size()); +#endif + + auto refine_triangles = [&](std::size_t ti) + { + if (all_segments[ti].empty() && all_points[ti].empty()) + new_triangles.push_back({triangles[ti], ti}); + else + { + autorefine_impl::generate_subtriangles(ti, all_segments_ids[ti], all_points[ti], all_in_triangle_ids[ti], intersecting_triangles, coplanar_triangles, triangles, new_triangles); + } + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY + ++pd; +#endif + }; + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.start(); +#endif +#ifdef CGAL_LINKED_WITH_TBB + if (parallel_execution) + { + tbb::parallel_for(tbb::blocked_range(0, triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + refine_triangles(ti); + } + ); + } + else +#endif + for (std::size_t ti = 0; ti < triangles.size(); ++ti) { + refine_triangles(ti); + } + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #1" << std::endl; + t.reset(); +#endif + + // brute force output: create a soup, orient and to-mesh + CGAL_PMP_AUTOREFINE_VERBOSE("create output soup"); + + Cartesian_converter to_input; + +#ifdef CGAL_LINKED_WITH_TBB + typedef std::conditional_t, + std::map> Point_id_map; +#else + typedef std::map Point_id_map; +#endif + Point_id_map point_id_map; + +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + std::vector exact_soup_points; +#endif + + // TODO: parallel_for? + // for input points, we on purpose keep duplicated points and isolated points + for (std::size_t pid = 0; pidfirst); +#endif + } + + TriangleRange soup_triangles_out; + soup_triangles_out.reserve(soup_triangles.size()); + + if constexpr (!std::is_same_v) + { + std::size_t nbt=0; + for (Input_TID f=0; f tri_inter_ids_inverse(triangles.size()); + for (Input_TID f=0; fsecond; + }; + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.start(); +#endif + + std::size_t offset = soup_triangles_out.size(); +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + std::string mode = "parallel"; +#endif + +// It might be possible to optimise the hardcoded value below +// but the less triangles the faster will anyway be the operation. +// So it's probably not critical. +#ifdef CGAL_LINKED_WITH_TBB + if(parallel_execution && new_triangles.size() > 50) + { +#ifdef CGAL_AUTOREF_SET_POINT_IDS_USING_MUTEX + //option 1 (using a mutex) + CGAL_MUTEX point_container_mutex; + /// Lambda concurrent_get_point_id() + auto concurrent_get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, -1)); + + if (insert_res.second) + { + CGAL_SCOPED_LOCK(point_container_mutex); + insert_res.first->second=soup_points.size(); + soup_points.push_back(to_input(pt)); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points.push_back(pt); +#endif + } + return insert_res.first; + }; + + soup_triangles_out.resize(offset + new_triangles.size()); + //use map iterator triple for triangles to create them concurrently and safely + std::vector> triangle_buffer(new_triangles.size()); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) { + const std::array& t = new_triangles[ti].first; + visitor.new_subtriangle(offset+ti, tri_inter_ids_inverse[new_triangles[ti].second]); + triangle_buffer[ti] = CGAL::make_array(concurrent_get_point_id(t[0]), concurrent_get_point_id(t[1]), concurrent_get_point_id(t[2])); + } + } + ); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_triangles_out[offset + ti] = + { triangle_buffer[ti][0]->second, + triangle_buffer[ti][1]->second, + triangle_buffer[ti][2]->second }; + } + } + ); +#else + //option 2 (without mutex) + /// Lambda concurrent_get_point_id() + tbb::concurrent_vector iterators; + auto concurrent_get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, -1)); + if (insert_res.second) + iterators.push_back(insert_res.first); + return insert_res.first; + }; + + //use map iterator triple for triangles to create them concurrently and safely + soup_triangles_out.resize(offset + new_triangles.size()); + std::vector> triangle_buffer(new_triangles.size()); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + const std::array& t = new_triangles[ti].first; + visitor.new_subtriangle(offset+ti, tri_inter_ids_inverse[new_triangles[ti].second]); + triangle_buffer[ti] = CGAL::make_array(concurrent_get_point_id(t[0]), concurrent_get_point_id(t[1]), concurrent_get_point_id(t[2])); + } + } + ); + + // the map is now filled we can safely set the point ids + std::size_t pid_offset=soup_points.size(); + soup_points.resize(pid_offset+iterators.size()); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points.resize(soup_points.size()); +#endif + + tbb::parallel_for(tbb::blocked_range(0, iterators.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_points[pid_offset+ti] = to_input(iterators[ti]->first); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points[pid_offset+ti] = iterators[ti]->first; +#endif + iterators[ti]->second=pid_offset+ti; + } + } + ); + + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_triangles_out[offset + ti] = + { triangle_buffer[ti][0]->second, + triangle_buffer[ti][1]->second, + triangle_buffer[ti][2]->second }; + } + } + ); +#endif + } + else +#endif + { +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + mode = "sequential"; +#endif + soup_triangles_out.reserve(offset + new_triangles.size()); + for (const std::pair, std::size_t>& t_and_id : new_triangles) + { + visitor.new_subtriangle(soup_triangles_out.size(), tri_inter_ids_inverse[t_and_id.second]); + soup_triangles_out.push_back({ get_point_id(t_and_id.first[0]), + get_point_id(t_and_id.first[1]), + get_point_id(t_and_id.first[2]) }); + } + } + + + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #4 (" << mode << ")" << std::endl; + t.reset(); +#endif + +#ifndef CGAL_NDEBUG + CGAL_PMP_AUTOREFINE_VERBOSE("check soup"); + CGAL_assertion( !does_triangle_soup_self_intersect(exact_soup_points, soup_triangles_out) ); +#else +#ifdef CGAL_DEBUG_PMP_AUTOREFINE + CGAL_PMP_AUTOREFINE_VERBOSE("check soup"); + if (does_triangle_soup_self_intersect(exact_soup_points, soup_triangles_out)) + throw std::runtime_error("ERROR: invalid output, there is most probably a bug"); +#endif +#endif + using std::swap; + swap(soup_triangles, soup_triangles_out); + + CGAL_PMP_AUTOREFINE_VERBOSE("done"); +} + +/** + * \ingroup PMP_corefinement_grp + * refines a triangle mesh so that no triangles intersects in their interior. + * + * Note that this function is only provided as a shortcut for calling `autorefine_triangle_soup()` + * with a mesh. For any advance usage the aforementioned function should be called directly. + * + * @tparam TriangleMesh a model of `HalfedgeListGraph`, `FaceListGraph`, and `MutableFaceGraph` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param tm input triangulated surface mesh + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * @warning `clear(tm)` will be called before filling `tm` with the refined mesh. + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{concurrency_tag} + * \cgalParamDescription{a tag indicating if the task should be done using one or several threads.} + * \cgalParamType{Either `CGAL::Sequential_tag`, or `CGAL::Parallel_tag`, or `CGAL::Parallel_if_available_tag`} + * \cgalParamDefault{`CGAL::Sequential_tag`} + * \cgalParamNEnd + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `PMPSelfIntersectionTraits`} + * \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{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `tm`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, tm)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `TriangleMesh`.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + */ +template +void +autorefine( TriangleMesh& tm, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetGeomTraits::type GT; + // GT traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + std::vector soup_points; + std::vector > soup_triangles; + + polygon_mesh_to_polygon_soup(tm, soup_points, soup_triangles, np); + + autorefine_triangle_soup(soup_points, soup_triangles, np); + + clear(tm); + repair_polygon_soup(soup_points, soup_triangles); + + duplicate_non_manifold_edges_in_polygon_soup(soup_points, soup_triangles); + polygon_soup_to_polygon_mesh(soup_points, soup_triangles, tm); +} + + +} } // end of CGAL::Polygon_mesh_processing + +#ifdef CGAL_LINKED_WITH_TBB +#ifdef CGAL_HAS_DEFINED_TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#undef TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#endif +#endif + +#endif // CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h index 83884277136..7dad2004ecd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h @@ -27,7 +27,6 @@ #include #include -#include namespace CGAL { 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 4a15d9e59c7..68f0c9e5e6c 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 @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -388,12 +387,12 @@ struct TweakedGetVertexPointMap typedef typename std::is_same::value_type>::type Use_default_tag; - typedef typename boost::mpl::if_< - Use_default_tag, + typedef std::conditional_t< + Use_default_tag::value, Default_map, Dummy_default_vertex_point_map::vertex_descriptor > - >::type type; + > type; }; template 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 26e205ea43d..a996edae648 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -29,7 +29,6 @@ #include #include -#include #include #include @@ -1427,18 +1426,16 @@ bool do_intersect(const TriangleMesh& tm, const Polyline& polyline, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , const std::enable_if_t< - ! boost::mpl::or_< - typename std::is_same::type, // Added to please MSVC 2015 - typename boost::mpl::not_::type>::type, // not a range - typename boost::has_range_iterator< + , const std::enable_if_t || // Added to please MSVC 2015 + !boost::has_range_iterator::value || // not a range + boost::has_range_iterator< typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - std::false_type - >::type - >::type // not a range of a range - >::value + std::false_type>::type + >::value + ) >* = 0 #endif ) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index ef361b17529..b99ed460a6f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h index f1b88540a60..a608179f49a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h @@ -30,7 +30,6 @@ #include #include -#include #include #include @@ -79,12 +78,12 @@ template::type >::type, + typename boost::property_map< TriangleMesh, vertex_point_t>::type >, Default, - VertexPointMap>::type> > >, + VertexPointMap>>>>, bool UseParallelPlaneOptimization=true> class Polygon_mesh_slicer { diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 222f04417c9..44e32386664 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -106,6 +106,7 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) target_link_libraries(orient_polygon_soup_test PUBLIC CGAL::TBB_support) target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) + target_link_libraries(test_autorefinement PUBLIC CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cmd b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cmd index a2ffe2c2539..8c848a2f106 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cmd +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cmd @@ -1,28 +1,28 @@ -data-autoref/test_01.off 0 0 4 1 4 0 -data-autoref/test_02.off 1 5 13 1 5 0 -data-autoref/test_03.off 4 8 18 0 18 0 -data-autoref/test_04.off 1 5 17 0 17 0 -data-autoref/test_05.off 1 5 17 0 17 0 -data-autoref/test_06.off 3 55 141 1 76 0 -data-autoref/test_07.off 1 4 10 1 4 0 -data-autoref/test_08.off 1 31 87 1 52 0 -data-autoref/test_09.off 1 4 5 1 4 0 -data-autoref/test_10.off 1 3 13 0 13 0 -data-autoref/test_11.off 1 3 12 0 12 0 -data-autoref/test_12.off 2 2 11 1 11 0 -data-autoref/test_13.off 1 5 16 1 8 0 -data-autoref/test_14.off 1 5 16 1 12 0 -data-autoref/test_15.off 3 8 16 1 12 0 -data-autoref/test_16.off 1 2 6 1 4 0 -data-autoref/test_17.off 1 2 6 1 4 0 -data-autoref/triple_inter_exception/triple.off 0 0 0 0 0 1 -data-autoref/triple_inter_exception/cubes_cpln_1.off 0 0 0 0 0 1 -data-autoref/triple_inter_exception/cubes_cpln_2.off 0 0 0 0 0 1 -data-autoref/triple_inter_exception/cubes_cpln_3.off 0 0 0 0 0 1 -data-autoref/open_01.off 1 65 1377 1 1313 0 -data-autoref/open_02.off 1 33 595 1 562 0 -data-autoref/cpln_01.off 18 42 48 1 30 0 -data-autoref/cpln_02.off 28 56 40 1 24 0 -data-autoref/cpln_03.off 15 35 42 1 27 0 -data-autoref/four_cubes.off 12 94 184 1 78 0 -data-autoref/spiral.off 7 14 26 0 26 0 +data-autoref/test_01.off 0 0 4 1 4 0 4 2 +data-autoref/test_02.off 1 5 13 1 5 0 10 17 +data-autoref/test_03.off 4 8 18 0 18 0 14 20 +data-autoref/test_04.off 1 5 17 0 17 0 13 20 +data-autoref/test_05.off 1 5 17 0 17 0 13 20 +data-autoref/test_06.off 3 55 141 1 76 0 92 248 +data-autoref/test_07.off 1 4 10 1 4 0 8 12 +data-autoref/test_08.off 1 31 87 1 52 0 57 148 +data-autoref/test_09.off 1 4 5 1 4 0 4 4 +data-autoref/test_10.off 1 3 13 0 13 0 10 13 +data-autoref/test_11.off 1 3 12 0 12 0 9 12 +data-autoref/test_12.off 2 2 11 1 11 0 9 6 +data-autoref/test_13.off 1 5 16 1 8 0 16 22 +data-autoref/test_14.off 1 5 16 1 12 0 16 22 +data-autoref/test_15.off 3 8 16 1 12 0 16 24 +data-autoref/test_16.off 1 2 6 1 4 0 6 2 +data-autoref/test_17.off 1 2 6 1 4 0 6 2 +data-autoref/triple_inter_exception/triple.off 0 0 0 0 0 1 15 18 +data-autoref/triple_inter_exception/cubes_cpln_1.off 0 0 0 0 0 1 66 224 +data-autoref/triple_inter_exception/cubes_cpln_2.off 0 0 0 0 0 1 54 196 +data-autoref/triple_inter_exception/cubes_cpln_3.off 0 0 0 0 0 1 61 204 +data-autoref/open_01.off 1 65 1377 1 1313 0 1317 2622 +data-autoref/open_02.off 1 33 595 1 562 0 565 1056 +data-autoref/cpln_01.off 18 42 48 1 30 0 30 88 +data-autoref/cpln_02.off 28 56 40 1 24 0 24 72 +data-autoref/cpln_03.off 15 35 42 1 27 0 27 76 +data-autoref/four_cubes.off 12 94 184 1 78 0 106 352 +data-autoref/spiral.off 7 14 26 0 26 0 19 31 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp index 9c908d7ec24..3af3402a5f2 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp @@ -3,6 +3,10 @@ #include #include +#include +#include + +#include #include #include @@ -13,23 +17,64 @@ typedef CGAL::Surface_mesh Mesh; namespace PMP = CGAL::Polygon_mesh_processing; template -struct My_visitor : +struct My_exp_visitor : public CGAL::Polygon_mesh_processing::Corefinement::Default_visitor { void after_subface_creations(TriangleMesh&){++(*i);} - My_visitor() + My_exp_visitor() : i (new int(0) ) {} std::shared_ptr i; }; -void test(const char* fname, std::size_t nb_polylines, std::size_t total_nb_points, - std::size_t nb_vertices_after_autorefine, bool all_fixed, std::size_t nb_vertices_after_fix, - bool triple_intersection) +struct My_visitor { - std::cout << "Running tests on " << fname << "\n"; + My_visitor(std::size_t nb_input, std::size_t expected_nb_output) + : nb_input(nb_input) + , expected_nb_output(expected_nb_output) + {} + + ~My_visitor() + { + for(std::size_t i=0; i tgt_check; +}; + +void test_coref_based(const char* fname, std::size_t nb_polylines, std::size_t total_nb_points, + std::size_t nb_vertices_after_autorefine, bool all_fixed, std::size_t nb_vertices_after_fix, + bool triple_intersection) +{ + std::cout << "Running tests (coref based) on " << fname << "\n"; std::ifstream input(fname); Mesh mesh; @@ -41,7 +86,7 @@ void test(const char* fname, std::size_t nb_polylines, std::size_t total_nb_poin input.close(); std::size_t nb_vertices_before_autorefine = num_vertices(mesh); -// Testing surface_self_intersection() +// Testing PMP::experimental::surface_self_intersection() try{ std::vector< std::vector >polylines; PMP::experimental::surface_self_intersection(mesh, std::back_inserter(polylines)); @@ -57,9 +102,9 @@ void test(const char* fname, std::size_t nb_polylines, std::size_t total_nb_poin assert( triple_intersection ); } -// Testing autorefine() +// Testing PMP::experimental::autorefine() try{ - My_visitor visitor; + My_exp_visitor visitor; PMP::experimental::autorefine(mesh, CGAL::parameters::visitor(visitor)); mesh.collect_garbage(); @@ -72,7 +117,7 @@ void test(const char* fname, std::size_t nb_polylines, std::size_t total_nb_poin assert( triple_intersection ); } -// Testing autorefine_and_remove_self_intersections() +// Testing PMP::experimental::autorefine_and_remove_self_intersections() try{ input.open(fname); mesh.clear(); @@ -89,10 +134,42 @@ void test(const char* fname, std::size_t nb_polylines, std::size_t total_nb_poin } } +template +void test(const char* fname, std::size_t nb_vertices_after_autorefine, std::size_t expected_nb_output, Tag tag) +{ + std::cout << "Running tests on " << fname; + if (std::is_same_v) + std::cout << " (Sequential)\n"; + else + std::cout << " (Parallel)\n"; + + std::vector points; + std::vector< std::vector > triangles; + if (!CGAL::IO::read_polygon_soup(fname, points, triangles)) + { + std::cerr << " Input mesh is not a valid file." << std::endl; + exit(EXIT_FAILURE); + } + +// Testing autorefine() + My_visitor visitor(triangles.size(), expected_nb_output); + PMP::autorefine_triangle_soup(points, triangles, CGAL::parameters::visitor(visitor).concurrency_tag(tag)); + assert( nb_vertices_after_autorefine==points.size()); + assert( expected_nb_output==triangles.size()); + assert( !PMP::does_triangle_soup_self_intersect(points, triangles) ); +// CGAL::IO::write_polygon_soup("/tmp/debug.off", points, triangles); +} + int main(int argc, const char** argv) { // file nb_polylines total_nb_points nb_vertices_after_autorefine all_fixed nb_vertices_after_fix triple_intersection - for (int i=0;i<(argc-1)/7; ++i) - test(argv[1+7*i], atoi(argv[1+7*i+1]), atoi(argv[1+7*i+2]), - atoi(argv[1+7*i+3]), atoi(argv[1+7*i+4])==0?false:true, atoi(argv[1+7*i+5]), atoi(argv[1+7*i+6])==0?false:true); + for (int i=0;i<(argc-1)/9; ++i) + { + test_coref_based(argv[1+9*i], atoi(argv[1+9*i+1]), atoi(argv[1+9*i+2]), + atoi(argv[1+9*i+3]), atoi(argv[1+9*i+4])==0?false:true, atoi(argv[1+9*i+5]), atoi(argv[1+9*i+6])==0?false:true); + test(argv[1+9*i], atoi(argv[1+9*i+7]), atoi(argv[1+9*i+8]), CGAL::Sequential_tag()); +#ifdef CGAL_LINKED_WITH_TBB + test(argv[1+9*i], atoi(argv[1+9*i+7]), atoi(argv[1+9*i+8]), CGAL::Parallel_tag()); +#endif + } } diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp index 1a0a9e34f35..d651bdcd61b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp @@ -614,12 +614,20 @@ endPointSet(const QMatrix4x4& transform_matrix) Point_set* new_ps = new_item->point_set(); CGAL::qglviewer::Vec c = aff_transformed_item->center(); + QMatrix3x3 normal_matrix = transform_matrix.normalMatrix(); + for(Point_set::Index idx : *new_ps) { QVector3D vec = transform_matrix.map(QVector3D(new_ps->point(idx).x() - c.x, new_ps->point(idx).y() - c.y, new_ps->point(idx).z() - c.z)); new_ps->point(idx) = Kernel::Point_3(vec.x(), vec.y(), vec.z()); + if (new_ps->has_normal_map()) { + QVector3D n(new_ps->normal(idx).x(), new_ps->normal(idx).y(), new_ps->normal(idx).z()); + new_ps->normal(idx) = Kernel::Vector_3(normal_matrix(0, 0) * n[0] + normal_matrix(0, 1) * n[1] + normal_matrix(0, 2) * n[2], + normal_matrix(1, 0) * n[0] + normal_matrix(1, 1) * n[1] + normal_matrix(1, 2) * n[2], + normal_matrix(2, 0) * n[0] + normal_matrix(2, 1) * n[1] + normal_matrix(2, 2) * n[2]); + } } new_item->setName(aff_transformed_item->name()); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt index 2651b3601e7..232e6f364d6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt @@ -133,7 +133,11 @@ target_link_libraries( qt6_wrap_ui( repairUI_FILES RemoveNeedlesDialog.ui SelfSnapDialog.ui) polyhedron_demo_plugin(repair_polyhedron_plugin Repair_polyhedron_plugin ${repairUI_FILES} KEYWORDS PMP) -target_link_libraries(repair_polyhedron_plugin PUBLIC scene_points_with_normal_item scene_surface_mesh_item) +target_link_libraries(repair_polyhedron_plugin PUBLIC scene_points_with_normal_item scene_surface_mesh_item scene_polygon_soup_item) +if(TARGET CGAL::TBB_support) + target_link_libraries(repair_polyhedron_plugin PUBLIC CGAL::TBB_support) +endif() + if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(isotropicRemeshingUI_FILES Isotropic_remeshing_dialog.ui) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp index c4c68388d8c..b0ac1f85996 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp @@ -1,6 +1,7 @@ #include #include "Scene_surface_mesh_item.h" +#include "Scene_polygon_soup_item.h" #include "Scene_points_with_normal_item.h" #include #include @@ -19,6 +20,8 @@ #include #include #include +#include +#include #include "ui_RemoveNeedlesDialog.h" #include "ui_SelfSnapDialog.h" @@ -52,8 +55,9 @@ public: actionDuplicateNMVertices = new QAction(tr("Duplicate Non-Manifold Vertices"), mw); actionExtractNMVertices = new QAction(tr("Extract Non-Manifold Vertices"), mw); actionMergeDuplicatedVerticesOnBoundaryCycles = new QAction(tr("Merge Duplicated Vertices on Boundary Cycles"), mw); - actionAutorefine = new QAction(tr("Autorefine Mesh"), mw); - actionAutorefineAndRMSelfIntersections = new QAction(tr("Autorefine and Remove Self-Intersections"), mw); + actionAutorefine = new QAction(tr("Autorefine Mesh (Deprecated)"), mw); + actionNewAutorefine = new QAction(tr("Autorefine"), mw); + actionAutorefineAndRMSelfIntersections = new QAction(tr("Autorefine and Remove Self-Intersections (Deprecated)"), mw); actionRemoveNeedlesAndCaps = new QAction(tr("Remove Needles And Caps")); actionSnapBorders = new QAction(tr("Snap Boundaries")); @@ -65,6 +69,7 @@ public: actionExtractNMVertices->setObjectName("actionExtractNMVertices"); actionMergeDuplicatedVerticesOnBoundaryCycles->setObjectName("actionMergeDuplicatedVerticesOnBoundaryCycles"); actionAutorefine->setObjectName("actionAutorefine"); + actionNewAutorefine->setObjectName("actionNewAutorefine"); actionAutorefineAndRMSelfIntersections->setObjectName("actionAutorefineAndRMSelfIntersections"); actionRemoveNeedlesAndCaps->setObjectName("actionRemoveNeedlesAndCaps"); actionSnapBorders->setObjectName("actionSnapBorders"); @@ -77,6 +82,7 @@ public: actionExtractNMVertices->setProperty("subMenuName", "Polygon Mesh Processing/Repair"); actionMergeDuplicatedVerticesOnBoundaryCycles->setProperty("subMenuName", "Polygon Mesh Processing/Repair"); actionAutorefine->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); + actionNewAutorefine->setProperty("subMenuName", "Polygon Mesh Processing/Repair"); actionAutorefineAndRMSelfIntersections->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); actionSnapBorders->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); @@ -93,16 +99,29 @@ public: << actionExtractNMVertices << actionMergeDuplicatedVerticesOnBoundaryCycles << actionAutorefine + << actionNewAutorefine << actionAutorefineAndRMSelfIntersections << actionRemoveNeedlesAndCaps << actionSnapBorders; } - bool applicable(QAction*) const + bool applicable(QAction* action) const { - int item_id = scene->mainSelectionIndex(); - return qobject_cast(scene->item(item_id)); + if (action!=actionNewAutorefine) + { + int item_id = scene->mainSelectionIndex(); + return qobject_cast(scene->item(item_id)); + } + for (Scene_interface::Item_id index : scene->selectionIndices()) + { + if (qobject_cast(scene->item(index))) + return true; + if (qobject_cast(scene->item(index))) + return true; + } + return false; } + template void on_actionRemoveIsolatedVertices_triggered(Scene_interface::Item_id index); template @@ -120,6 +139,8 @@ public: template void on_actionAutorefine_triggered(Scene_interface::Item_id index); template + void on_actionNewAutorefine_triggered(const std::vector& indices); + template void on_actionAutorefineAndRMSelfIntersections_triggered(Scene_interface::Item_id index); public Q_SLOTS: @@ -131,6 +152,7 @@ public Q_SLOTS: void on_actionExtractNMVertices_triggered(); void on_actionMergeDuplicatedVerticesOnBoundaryCycles_triggered(); void on_actionAutorefine_triggered(); + void on_actionNewAutorefine_triggered(); void on_actionAutorefineAndRMSelfIntersections_triggered(); void on_actionRemoveNeedlesAndCaps_triggered(); void on_actionSnapBorders_triggered(); @@ -144,6 +166,7 @@ private: QAction* actionExtractNMVertices; QAction* actionMergeDuplicatedVerticesOnBoundaryCycles; QAction* actionAutorefine; + QAction* actionNewAutorefine; QAction* actionAutorefineAndRMSelfIntersections; QAction* actionRemoveNeedlesAndCaps; QAction* actionSnapBorders; @@ -421,6 +444,78 @@ void Polyhedron_demo_repair_polyhedron_plugin::on_actionAutorefine_triggered() QApplication::restoreOverrideCursor(); } +template +void Polyhedron_demo_repair_polyhedron_plugin::on_actionNewAutorefine_triggered(const std::vector& indices) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + Polygon_soup::Points points; + Polygon_soup::Polygons polygons; + + if (indices.size()==1) + { + if (Scene_surface_mesh_item* smi_ptr = qobject_cast(scene->item(indices[0]))) + PMP::polygon_mesh_to_polygon_soup(*smi_ptr->polyhedron(), points, polygons); + else if (Scene_polygon_soup_item* spi_ptr = qobject_cast(scene->item(indices[0]))) + { + points = spi_ptr->points(); + polygons = spi_ptr->polygons(); + } + } + else + { + for (Scene_interface::Item_id id : indices) + { + Polygon_soup::Points l_points; + Polygon_soup::Polygons l_polygons; + + if (Scene_surface_mesh_item* smi_ptr = qobject_cast(scene->item(id))) + PMP::polygon_mesh_to_polygon_soup(*smi_ptr->polyhedron(), l_points, l_polygons); + else if (Scene_polygon_soup_item* spi_ptr = qobject_cast(scene->item(id))) + { + l_points = spi_ptr->points(); + l_polygons = spi_ptr->polygons(); + } + std::size_t offset=points.size(); + points.insert(points.end(), l_points.begin(), l_points.end()); + std::size_t psize=polygons.size(); + polygons.insert(polygons.end(), l_polygons.begin(), l_polygons.end()); + for (std::size_t i=psize; iload(points, polygons); + QString name = scene->item(indices[0])->name(); + for (std::size_t k=1; kitem(indices[k])->name(); + new_item->setName(name+" autorefined"); + + scene->addItem(new_item); + new_item->invalidateOpenGLBuffers(); + Q_EMIT new_item->itemChanged(); +} + +void Polyhedron_demo_repair_polyhedron_plugin::on_actionNewAutorefine_triggered() +{ + std::vector indices; + for (Scene_interface::Item_id index : scene->selectionIndices()) + { + if (qobject_cast(scene->item(index))) + indices.push_back(index); + else if (qobject_cast(scene->item(index))) + indices.push_back(index); + } + QApplication::setOverrideCursor(Qt::WaitCursor); + on_actionNewAutorefine_triggered(indices); + QApplication::restoreOverrideCursor(); +} + template void Polyhedron_demo_repair_polyhedron_plugin::on_actionAutorefineAndRMSelfIntersections_triggered(Scene_interface::Item_id index) { diff --git a/Polynomial/include/CGAL/Polynomial.h b/Polynomial/include/CGAL/Polynomial.h index b3681eb43b5..ad61432cd40 100644 --- a/Polynomial/include/CGAL/Polynomial.h +++ b/Polynomial/include/CGAL/Polynomial.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index e2529d2e349..de6bcdc447b 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -486,9 +486,9 @@ public: // and NT would be changed by NTX typedef typename Fraction_traits::Is_fraction Is_fraction; typedef typename Coercion_traits::Type Type; - typedef typename ::boost::mpl::if_c< - ::std::is_same::value, Is_fraction, CGAL::Tag_false - >::type If_decomposable_AND_Type_equals_NT; + typedef std::conditional_t< + std::is_same_v, Is_fraction, CGAL::Tag_false + > If_decomposable_AND_Type_equals_NT; return sign_at_(x,If_decomposable_AND_Type_equals_NT()); } diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 6eb4f0d6e3f..dfbf7cf3135 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -999,7 +999,7 @@ public: // Sign_at, Sign_at_homogeneous, Compare // define XXX_ even though ICoeff may not be Real_embeddable - // select propoer XXX among XXX_ or Null_functor using ::boost::mpl::if_ + // select propoer XXX among XXX_ or Null_functor using ::std::conditional_t private: struct Sign_at_ { private: @@ -1036,8 +1036,8 @@ private: typedef Real_embeddable_traits RET_IC; typedef typename RET_IC::Is_real_embeddable IC_is_real_embeddable; public: - typedef typename ::boost::mpl::if_::type Sign_at; - typedef typename ::boost::mpl::if_::type Sign_at_homogeneous; + typedef std::conditional_t Sign_at; + typedef std::conditional_t Sign_at_homogeneous; typedef typename Real_embeddable_traits::Compare Compare; diff --git a/Property_map/include/CGAL/Dynamic_property_map.h b/Property_map/include/CGAL/Dynamic_property_map.h index a7dc48b5354..bca414e19b0 100644 --- a/Property_map/include/CGAL/Dynamic_property_map.h +++ b/Property_map/include/CGAL/Dynamic_property_map.h @@ -19,7 +19,6 @@ #include #include -#include #include @@ -127,9 +126,9 @@ struct Dynamic_with_index { typedef Key key_type; typedef Value value_type; - typedef typename boost::mpl::if_< std::is_same, - value_type, - value_type&>::type reference; + typedef std::conditional_t< std::is_same_v, + value_type, + value_type&> reference; typedef boost::read_write_property_map_tag category; Dynamic_with_index() diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index 735c1f5da49..1154ab87b42 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -661,7 +661,7 @@ struct Boolean_property_map return pm.set_ptr->count(k) != 0; } - friend void put(Boolean_property_map& pm, const key_type& k, bool v) + friend void put(Boolean_property_map pm, const key_type& k, bool v) { CGAL_assertion(pm.set_ptr!=nullptr); if (v) diff --git a/QP_solver/test/QP_solver/test_solver.cpp b/QP_solver/test/QP_solver/test_solver.cpp index ad298449b55..4fc641cc286 100644 --- a/QP_solver/test/QP_solver/test_solver.cpp +++ b/QP_solver/test/QP_solver/test_solver.cpp @@ -282,6 +282,7 @@ bool process(const std::string& filename, { using std::cout; using std::endl; + using CGAL::check_tag; // extract verbosity: const int verbosity = options.find("Verbosity")->second; diff --git a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index f77f1d9c07f..ef7c6164f2d 100644 --- a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 24f7ef91c72..81ff5cf1bce 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -35,8 +35,6 @@ #include #include -#include - // An STL like container with the following properties : // - to achieve compactness, it requires access to a pointer stored in T, // specified by a traits. This pointer is supposed to be 4 bytes aligned @@ -866,10 +864,10 @@ namespace internal { typedef typename DSC::value_type value_type; typedef typename DSC::size_type size_type; typedef typename DSC::difference_type difference_type; - typedef typename boost::mpl::if_c< Const, const value_type*, - value_type*>::type pointer; - typedef typename boost::mpl::if_c< Const, const value_type&, - value_type&>::type reference; + typedef std::conditional_t< Const, const value_type*, + value_type*> pointer; + typedef std::conditional_t< Const, const value_type&, + value_type&> reference; typedef std::bidirectional_iterator_tag iterator_category; // the initialization with nullptr is required by our Handle concept. diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 7f18ab80f57..7f5533f92b7 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -36,8 +36,6 @@ #include #include -#include - namespace CGAL { #define CGAL_GENERATE_MEMBER_DETECTOR(X) \ diff --git a/STL_Extension/include/CGAL/Container_helper.h b/STL_Extension/include/CGAL/Container_helper.h index aeb66ea052b..18a98dfa456 100644 --- a/STL_Extension/include/CGAL/Container_helper.h +++ b/STL_Extension/include/CGAL/Container_helper.h @@ -38,10 +38,8 @@ void resize(Container& c, std::size_t size, // Container without a resize() function, but with a size() function (e.g. an array) template void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_code(size), - std::enable_if_t< - boost::mpl::and_< - boost::mpl::not_ >, - has_size >::value >* = nullptr) + std::enable_if_t::value && + has_size::value >* = nullptr) { CGAL_assertion(array.size() == size); } @@ -50,8 +48,8 @@ void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_co template void resize(Container&, std::size_t, std::enable_if_t< - !boost::mpl::or_, - has_size >::value >* = nullptr) + !(has_resize::value || + has_size::value)>* = nullptr) { } diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index 5f952a66e15..528bf8061d1 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -21,8 +21,6 @@ #include #include -#include - #include #ifdef CGAL_USE_LEDA @@ -728,10 +726,10 @@ public: static Bind bind; // Define type that is used for function matching - typedef typename ::boost::mpl::if_c< + typedef std::conditional_t< is_class_hierarchy, ::CGAL::Tag_true, - ::CGAL::Tag_false >::type + ::CGAL::Tag_false > Class_hierarchy; //! the internal representation, i.e., \c T plus a reference count diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index d0f1648f816..7558aae88f2 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -143,14 +142,14 @@ struct Lookup_named_param_def typedef typename internal_np::Get_param::type NP_type; typedef typename internal_np::Get_param::reference NP_reference; - typedef typename boost::mpl::if_< - std::is_same, - D, NP_type>::type + typedef std::conditional_t< + std::is_same_v, + D, NP_type> type; - typedef typename boost::mpl::if_< - std::is_same, - D&, NP_reference>::type + typedef std::conditional_t< + std::is_same_v, + D&, NP_reference> reference; }; diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index e8dacea19a3..6b6c9c2b096 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -47,6 +47,7 @@ CGAL_add_named_parameter(implementation_tag_t, implementation_tag, implementatio CGAL_add_named_parameter(prevent_unselection_t, prevent_unselection, prevent_unselection) CGAL_add_named_parameter(verbose_t, verbose, verbose) +CGAL_add_named_parameter(concurrency_tag_t, concurrency_tag, concurrency_tag) // List of named parameters used for IO CGAL_add_named_parameter(vertex_normal_output_iterator_t, vertex_normal_output_iterator, vertex_normal_output_iterator) diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index 6aa1988e1cc..eba9ffdc721 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -19,26 +19,13 @@ #define CGAL_TAGS_H #include -#include namespace CGAL { struct Void {}; -// Boolean_tag is a model of the Boost Integral Constant concept. -// https://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html template -struct Boolean_tag { - typedef boost::mpl::integral_c_tag tag; - typedef bool value_type; - static const bool value = b; - typedef Boolean_tag type; - operator bool() const { return this->value; } -}; -/* In C++11, try: -template -using Boolean_tag = std::integral_constant; -*/ +using Boolean_tag = std::bool_constant; typedef Boolean_tag Tag_true; typedef Boolean_tag Tag_false; diff --git a/STL_Extension/include/CGAL/transforming_iterator.h b/STL_Extension/include/CGAL/transforming_iterator.h index bd94ad33c4f..21d88e8f69c 100644 --- a/STL_Extension/include/CGAL/transforming_iterator.h +++ b/STL_Extension/include/CGAL/transforming_iterator.h @@ -12,7 +12,6 @@ #ifndef CGAL_TRANSFORMING_ITERATOR_H #define CGAL_TRANSFORMING_ITERATOR_H #include -#include #include #include #include @@ -55,10 +54,8 @@ class transforming_iterator_helper typedef typename Default::Get>>::type value_type; // Crappy heuristic. If we have *it that returns a Weighted_point and F that returns a reference to the Point contained in the Weighted_point it takes as argument, we do NOT want the transformed iterator to return a reference to the temporary *it. On the other hand, if *it returns an int n, and F returns a reference to array[n] it is not so good to lose the reference. This probably should be done elsewhere and should at least be made optional... - typedef typename boost::mpl::if_< - boost::mpl::or_, - std::is_integral >, - reference_, value_type>::type reference; + typedef std::conditional_t || std::is_integral_v, + reference_, value_type> reference; public: typedef boost::iterator_adaptor< diff --git a/STL_Extension/include/CGAL/type_traits.h b/STL_Extension/include/CGAL/type_traits.h index 59aae8a0307..c68386c7f76 100644 --- a/STL_Extension/include/CGAL/type_traits.h +++ b/STL_Extension/include/CGAL/type_traits.h @@ -21,10 +21,10 @@ namespace CGAL { template< class Base, class Derived > struct is_same_or_derived : - public ::boost::mpl::or_< - ::std::is_same< Base, Derived >, - ::boost::is_base_and_derived< Base, Derived > - >::type + public std::bool_constant< + ::std::is_same_v< Base, Derived > || + ::boost::is_base_and_derived< Base, Derived >::value + > {}; namespace cpp20 { diff --git a/STL_Extension/include/CGAL/type_traits/is_iterator.h b/STL_Extension/include/CGAL/type_traits/is_iterator.h index 6630dd8ceb1..8d476da2036 100644 --- a/STL_Extension/include/CGAL/type_traits/is_iterator.h +++ b/STL_Extension/include/CGAL/type_traits/is_iterator.h @@ -35,14 +35,13 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) //provide all 5 nested types provided by iterator_traits template struct is_iterator_ - : public boost::mpl::or_< - boost::mpl::and_< - has_iterator_category, - has_value_type, - has_difference_type, - has_pointer, - has_reference >, - std::is_pointer > + : public std::bool_constant< + ( has_iterator_category::value && + has_value_type::value && + has_difference_type::value && + has_pointer::value && + has_reference::value) || + std::is_pointer_v > { }; template ::value> diff --git a/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh b/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh index 2af501d48c0..6699629f7c2 100644 --- a/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh +++ b/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh @@ -1,7 +1,7 @@ #!/bin/bash #use this script from inside the build directory of the Polyhedron demo -#Needs the Qt5_DIR env variable set to /lib/cmake/Qt5 +#Needs the Qt6_DIR env variable set to /lib/cmake/Qt6 #No config : in autotest_cgal we use NMake as generator #If using MSVC Generator, declare config="Release" @@ -43,4 +43,4 @@ for file in "${files[@]}"; do done; #check dependencies done #loop over directories mkdir -p "$target_directory/platforms" -cp "$Qt5_INSTALLATION_DIR/plugins/platforms/qwindows.dll" "$target_directory/platforms" +cp "$Qt6_INSTALLATION_DIR/plugins/platforms/qwindows.dll" "$target_directory/platforms" diff --git a/Skin_surface_3/include/CGAL/Skin_surface_base_3.h b/Skin_surface_3/include/CGAL/Skin_surface_base_3.h index 6962b1ec8f2..528ea1e0e83 100644 --- a/Skin_surface_3/include/CGAL/Skin_surface_base_3.h +++ b/Skin_surface_3/include/CGAL/Skin_surface_base_3.h @@ -42,7 +42,6 @@ #include -#include #include namespace CGAL { diff --git a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h index 0b34898eff9..08cc1da0063 100644 --- a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h +++ b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h @@ -22,8 +22,6 @@ #include #include -#include - #include diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index ff640dc639a..7a518cf68ee 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -224,16 +224,16 @@ public: // Select type of iterator + construct class depending on whether // point map is lvalue or not - typedef typename boost::mpl::if_< - std::is_reference::reference>, + typedef std::conditional_t< + std::is_reference_v::reference>, typename Base::Cartesian_const_iterator_d, - No_lvalue_iterator>::type + No_lvalue_iterator> Cartesian_const_iterator_d; - typedef typename boost::mpl::if_< - std::is_reference::reference>, + typedef std::conditional_t< + std::is_reference_v::reference>, Construct_cartesian_const_iterator_d_lvalue, - Construct_cartesian_const_iterator_d_no_lvalue>::type + Construct_cartesian_const_iterator_d_no_lvalue> Construct_cartesian_const_iterator_d; struct Construct_iso_box_d: public Base::Construct_iso_box_d{ diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index a799eccda60..30b1e25de59 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -36,12 +35,10 @@ struct Has_inexact_constructions { typedef typename K::FT FT ; - typedef typename boost::mpl::if_< boost::mpl::or_< std::is_same - , std::is_same - > - , Tag_true - , Tag_false - >::type type ; + typedef std::conditional_t< std::is_same_v || std::is_same_v + , Tag_true + , Tag_false + > type ; } ; template diff --git a/Stream_support/include/CGAL/IO/helpers.h b/Stream_support/include/CGAL/IO/helpers.h index bba12aa85a7..7382ebabd66 100644 --- a/Stream_support/include/CGAL/IO/helpers.h +++ b/Stream_support/include/CGAL/IO/helpers.h @@ -77,10 +77,10 @@ struct is_Point_set_3 : has_Point_set { }; // Point_set_3 and strings also functions as ranges, but we want to match polygon soups here template struct is_Range - : public boost::mpl::and_< - boost::has_range_const_iterator, // should be a range - boost::mpl::not_ >, // but not a Point_set_3 - boost::mpl::not_ > > // or a std::string / char [x] + : public std::bool_constant< + boost::has_range_const_iterator::value && // should be a range + !is_Point_set_3::value && // but not a Point_set_3 + !std::is_convertible_v > // or a std::string / char [x] { }; template @@ -89,7 +89,7 @@ inline constexpr bool is_Range_v = is_Range::value; // For polygon meshes template struct is_Point_set_or_Range_or_Iterator - : public boost::mpl::or_, is_Range, is_iterator > + : public std::bool_constant::value || is_Range::value || is_iterator::value > { }; template diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h index 2e15d64e7b7..da52494018e 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h @@ -104,6 +104,17 @@ protected: public: + + void reset_left_event() + { + this->set_left_event(static_cast(nullptr)); + if (m_orig_subcurve1) + { + m_orig_subcurve1->reset_left_event(); + m_orig_subcurve2->reset_left_event(); + } + } + /*! Get the subcurves that originate an overlap. */ Subcurve* originating_subcurve1() { return m_orig_subcurve1; } diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index acc94c13abc..eafd4d73b89 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -298,6 +298,14 @@ void Surface_sweep_2::_handle_overlaps_in_right_curves() template void Surface_sweep_2::_handle_right_curves() { + + for(Event_subcurve_iterator sc_it = this->m_currentEvent->right_curves_begin(), + sc_it_end = this->m_currentEvent->right_curves_end(); + sc_it!=sc_it_end; ++sc_it) + { + (*sc_it)->reset_left_event(); + } + CGAL_SS_PRINT_START("handling right curves at ("); CGAL_SS_DEBUG(this->PrintEvent(this->m_currentEvent)); CGAL_SS_PRINT_TEXT(")"); @@ -565,10 +573,12 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, Event* left_event = first_parent->left_event(); Event* right_event = first_parent->right_event(); - if (! second_parent->is_start_point(left_event)) - left_event->add_curve_to_left(second_parent); - else - left_event->remove_curve_from_right(second_parent); + if (left_event != nullptr) { + if (! second_parent->is_start_point(left_event)) + left_event->add_curve_to_left(second_parent); + else + left_event->remove_curve_from_right(second_parent); + } CGAL_SS_PRINT_CURVE(c1); CGAL_SS_PRINT_TEXT(" + "); @@ -588,7 +598,8 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // add the overlapping curve kept of the right of the left end right_event->add_curve_to_left(first_parent); - _add_curve_to_right(left_event, first_parent); + if (left_event != nullptr) + _add_curve_to_right(left_event, first_parent); this->m_visitor->found_overlap(c1, c2, first_parent); diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h index 62d6d31aaec..c684948f8e3 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace CGAL { @@ -54,11 +55,13 @@ struct Default_arr_traits > typedef CGAL::Arr_segment_traits_2 Traits; }; -template -struct Default_arr_traits > +template +struct Default_arr_traits, + typename Kernel::Point_2>> { - typedef CGAL::Arr_polyline_traits_2 Traits; + using Subtraits = CGAL::Arr_segment_traits_2; + typedef CGAL::Arr_polyline_traits_2 Traits; }; template diff --git a/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt b/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt index 2c9363b2d68..977e7abec55 100644 --- a/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt +++ b/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt @@ -7,9 +7,9 @@ project(Surface_sweep_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) set(CGAL_SEGMENT_TRAITS 1) -set(CGAL_SEGMENT_LEDA_TRAITS 2) set(CGAL_POLYLINE_TRAITS 11) set(CGAL_CONIC_TRAITS 21) +set(CGAL_POLYCONIC_TRAITS 22) set(TRAP 1) # Trapezoidal decomposition set(NAIVE 2) @@ -38,16 +38,18 @@ function(compile_and_run_sweep name source_file point_location traits data_set) file( GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - "${CMAKE_CURRENT_SOURCE_DIR}/${data_set}/*") + "${CMAKE_CURRENT_SOURCE_DIR}/${data_set}/*.txt") foreach(file ${files}) - # message("test ${source_file} ${file}") + # message("test ${source_file} ${file}") string(MAKE_C_IDENTIFIER "${name} ${file}" test_name) - # message(" --> ${test_name}") + # message(" --> ${test_name}") cgal_add_test(${name} TEST_NAME ${test_name} ARGUMENTS ${file}) endforeach() endfunction() -compile_and_run_sweep(test_sweep test_sweep.cpp ${NAIVE} ${CGAL_SEGMENT_TRAITS} - "DATA/segments_tight") +compile_and_run_sweep(test_sweep test_sweep.cpp ${NAIVE} + ${CGAL_SEGMENT_TRAITS} "data/segments_tight") compile_and_run_sweep(test_sweep_conic test_sweep_conic.cpp ${NAIVE} - ${CGAL_CONIC_TRAITS} "DATA/conics") + ${CGAL_CONIC_TRAITS} "data/conics") +compile_and_run_sweep(test_sweep_polyline test_sweep.cpp ${NAIVE} + ${CGAL_POLYLINE_TRAITS} "data/polylines") diff --git a/Surface_sweep_2/test/Surface_sweep_2/CompareCurveList.h b/Surface_sweep_2/test/Surface_sweep_2/CompareCurveList.h deleted file mode 100644 index ff43d9b73a4..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/CompareCurveList.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _COMPARE_CURVE_LIST_H -#define _COMPARE_CURVE_LIST_H - -#include -#include - - -template -class Equal_pred -{ -public: - typedef typename Traits::Point_2 Point_2; - typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; - - bool operator()(const Point_2& p1, const Point_2& p2) - { - return(Traits().equal_2_object()(p1, p2)); - } - - bool operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2) - { - return(Traits().equal_2_object()(c1, c2)); - } -}; - - -template - bool compare_lists(const List& list1, const List& list2, Traits& /*tr*/) -{ - typedef typename List::const_iterator Iter; - Iter begin1 = list1.begin(); - Iter end1 = list1.end(); - - Iter begin2 = list2.begin(); - - if(! (list1.size() == list2.size())) - { - std::cout << "The lists are not of the same lengths (" - << list1.size() << "," << list2.size() << ")\n"; - return false; - } - - Equal_pred eq; - return std::equal(begin1, end1, begin2, eq); -} - - -#endif diff --git a/Surface_sweep_2/test/Surface_sweep_2/Compare_curves.h b/Surface_sweep_2/test/Surface_sweep_2/Compare_curves.h new file mode 100644 index 00000000000..2727e737570 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/Compare_curves.h @@ -0,0 +1,45 @@ +#ifndef _COMPARE_CURVES_H +#define _COMPARE_CURVES_H + +#include +#include + +template +class Equal_pred { +public: + using Point_2 = typename Traits::Point_2; + using X_monotone_curve_2 = typename Traits::X_monotone_curve_2; + + Equal_pred(const Traits& traits) : m_traits(traits) {} + + bool operator()(const Point_2& p1, const Point_2& p2) + { return(m_traits.equal_2_object()(p1, p2)); } + + bool operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2) + { return(m_traits.equal_2_object()(c1, c2)); } + +private: + const Traits& m_traits; +}; + + +template +bool compare_lists(const List& list1, const List& list2, Traits& traits) { + if(! (list1.size() == list2.size())) { + std::cerr << "Error: The lists are not of the same lengths (" + << list1.size() << "," << list2.size() << ")\n"; + return false; + } + + Equal_pred eq(traits); + auto rc = std::equal(list1.begin(), list1.end(), list2.begin(), eq); + if (! rc) { + std::cerr << "Error: The lists do not match\n"; + return false; + } + + return true; +} + + +#endif diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test00.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test00.txt deleted file mode 100644 index 420b718d1e7..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test00.txt +++ /dev/null @@ -1,23 +0,0 @@ -2 --1 1 1 -1 -1 1 -1 -1 -4 -0/8 0/8 -1/1 -1/1 --1/1 1/1 0/8 0/8 -0/8 0/8 1/1 -1/1 -1/1 1/1 0/8 0/8 -5 --1/1 -1/1 --1/1 1/1 -0/8 0/8 -1/1 -1/1 -1/1 1/1 -1 -0/8 0/8 -1 -4 -0/8 0/8 -1/1 -1/1 --1/1 1/1 0/8 0/8 -0/8 0/8 1/1 -1/1 -1/1 1/1 0/8 0/8 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test01.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test01.txt deleted file mode 100644 index b8f61bf90c6..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test01.txt +++ /dev/null @@ -1,50 +0,0 @@ -4 -4 6 3 0 -1 3 5 1 -5 0 1 2 -1 0 3 4 -12 -1/1 0/1 36/20 32/20 -36/20 32/20 1/1 2/1 -36/20 32/20 44/20 48/20 -1/1 3/1 44/20 48/20 -44/20 48/20 3/1 4/1 -82/26 24/26 3/1 0/1 -82/26 24/26 36/20 32/20 -86/26 48/26 82/26 24/26 -44/20 48/20 86/26 48/26 -4/1 6/1 86/26 48/26 -5/1 0/1 82/26 24/26 -86/26 48/26 5/1 1/1 -12 -1/1 0/1 -1/1 2/1 -1/1 3/1 -36/20 32/20 -44/20 48/20 -3/1 0/1 -3/1 4/1 -82/26 24/26 -86/26 48/26 -4/1 6/1 -5/1 0/1 -5/1 1/1 -4 -36/20 32/20 -44/20 48/20 -82/26 24/26 -86/26 48/26 -2 -12 -1/1 0/1 36/20 32/20 -36/20 32/20 1/1 2/1 -36/20 32/20 44/20 48/20 -1/1 3/1 44/20 48/20 -44/20 48/20 3/1 4/1 -82/26 24/26 3/1 0/1 -82/26 24/26 36/20 32/20 -86/26 48/26 82/26 24/26 -44/20 48/20 86/26 48/26 -4/1 6/1 86/26 48/26 -5/1 0/1 82/26 24/26 -86/26 48/26 5/1 1/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test02.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test02.txt deleted file mode 100644 index 9f96ea0d395..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test02.txt +++ /dev/null @@ -1,34 +0,0 @@ -3 -0 6 9 5 -7 4 1 3 -5 2 3 7 -7 -0/1 6/1 153/43 241/43 -153/43 241/43 3/1 7/1 -140/32 114/32 1/1 3/1 -140/32 114/32 153/43 241/43 -5/1 2/1 140/32 114/32 -7/1 4/1 140/32 114/32 -153/43 241/43 9/1 5/1 -8 -0/1 6/1 -1/1 3/1 -3/1 7/1 -153/43 241/43 -140/32 114/32 -5/1 2/1 -7/1 4/1 -9/1 5/1 -2 -153/43 241/43 -140/32 114/32 -1 -7 -0/1 6/1 153/43 241/43 -153/43 241/43 3/1 7/1 -140/32 114/32 1/1 3/1 -140/32 114/32 153/43 241/43 -5/1 2/1 140/32 114/32 -7/1 4/1 140/32 114/32 -153/43 241/43 9/1 5/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test03.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test03.txt deleted file mode 100644 index 9fc24d51667..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test03.txt +++ /dev/null @@ -1,22 +0,0 @@ -3 -1 1 5 1 -1 2 5 2 -1 3 5 3 -3 -1/1 1/1 5/1 1/1 -1/1 2/1 5/1 2/1 -1/1 3/1 5/1 3/1 -6 -1/1 1/1 -1/1 2/1 -1/1 3/1 -5/1 1/1 -5/1 2/1 -5/1 3/1 -0 -1 -3 -1/1 1/1 5/1 1/1 -1/1 2/1 5/1 2/1 -1/1 3/1 5/1 3/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test04.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test04.txt deleted file mode 100644 index 953c0bdeaaf..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test04.txt +++ /dev/null @@ -1,34 +0,0 @@ -3 -1 4 4 1 -2 2 9 2 -3 7 8 1 -7 -2/1 2/1 63/21 42/21 -1/1 4/1 63/21 42/21 -63/21 42/21 4/1 1/1 -63/21 42/21 301/42 84/42 -3/1 7/1 301/42 84/42 -301/42 84/42 8/1 1/1 -301/42 84/42 9/1 2/1 -8 -1/1 4/1 -2/1 2/1 -63/21 42/21 -3/1 7/1 -4/1 1/1 -301/42 84/42 -8/1 1/1 -9/1 2/1 -2 -63/21 42/21 -301/42 84/42 -1 -7 -2/1 2/1 63/21 42/21 -1/1 4/1 63/21 42/21 -63/21 42/21 4/1 1/1 -63/21 42/21 301/42 84/42 -3/1 7/1 301/42 84/42 -301/42 84/42 8/1 1/1 -301/42 84/42 9/1 2/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test05.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test05.txt deleted file mode 100644 index 46d7e73e4d6..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test05.txt +++ /dev/null @@ -1,40 +0,0 @@ -3 -2 7 15 2 -3 2 10 6 -1 3 14 3 -9 -3/1 2/1 247/52 156/52 -1/1 3/1 247/52 156/52 -247/52 156/52 681/87 414/87 -2/1 7/1 681/87 414/87 -681/87 414/87 10/1 6/1 -247/52 156/52 806/65 195/65 -681/87 414/87 806/65 195/65 -806/65 195/65 14/1 3/1 -806/65 195/65 15/1 2/1 -9 -1/1 3/1 -2/1 7/1 -3/1 2/1 -247/52 156/52 -681/87 414/87 -10/1 6/1 -806/65 195/65 -14/1 3/1 -15/1 2/1 -3 -247/52 156/52 -681/87 414/87 -806/65 195/65 -2 -9 -3/1 2/1 247/52 156/52 -1/1 3/1 247/52 156/52 -247/52 156/52 681/87 414/87 -2/1 7/1 681/87 414/87 -681/87 414/87 10/1 6/1 -247/52 156/52 806/65 195/65 -681/87 414/87 806/65 195/65 -806/65 195/65 14/1 3/1 -806/65 195/65 15/1 2/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test06.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test06.txt deleted file mode 100644 index cd0e00f2585..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test06.txt +++ /dev/null @@ -1,61 +0,0 @@ -6 -12 4 9 4 -12 3 11 3 -14 1 8 6 -7 6 1 1 -6 2 3 7 -5 7 3 5 -14 -60/16 92/16 3/1 5/1 -60/16 92/16 3/1 7/1 -213/45 185/45 1/1 1/1 -213/45 185/45 60/16 92/16 -5/1 7/1 60/16 92/16 -6/1 2/1 213/45 185/45 -7/1 6/1 213/45 185/45 -156/15 60/15 9/1 4/1 -156/15 60/15 8/1 6/1 -58/5 15/5 11/1 3/1 -58/5 15/5 156/15 60/15 -12/1 3/1 58/5 15/5 -12/1 4/1 156/15 60/15 -14/1 1/1 58/5 15/5 -16 -1/1 1/1 -3/1 5/1 -3/1 7/1 -60/16 92/16 -213/45 185/45 -5/1 7/1 -6/1 2/1 -7/1 6/1 -8/1 6/1 -9/1 4/1 -156/15 60/15 -11/1 3/1 -58/5 15/5 -12/1 3/1 -12/1 4/1 -14/1 1/1 -4 -60/16 92/16 -213/45 185/45 -156/15 60/15 -58/5 15/5 -1 -14 -60/16 92/16 3/1 5/1 -60/16 92/16 3/1 7/1 -213/45 185/45 1/1 1/1 -213/45 185/45 60/16 92/16 -5/1 7/1 60/16 92/16 -6/1 2/1 213/45 185/45 -7/1 6/1 213/45 185/45 -156/15 60/15 9/1 4/1 -156/15 60/15 8/1 6/1 -58/5 15/5 11/1 3/1 -58/5 15/5 156/15 60/15 -12/1 3/1 58/5 15/5 -12/1 4/1 156/15 60/15 -14/1 1/1 58/5 15/5 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test07.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test07.txt deleted file mode 100644 index c94c53eece6..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test07.txt +++ /dev/null @@ -1,22 +0,0 @@ -4 -5 5 2 3 -7 1 2 3 -7 1 9 4 -5 5 9 4 -4 -5/1 5/1 2/1 3/1 -7/1 1/1 2/1 3/1 -7/1 1/1 9/1 4/1 -5/1 5/1 9/1 4/1 -4 -2/1 3/1 -5/1 5/1 -7/1 1/1 -9/1 4/1 -0 -2 -4 -5/1 5/1 2/1 3/1 -7/1 1/1 2/1 3/1 -7/1 1/1 9/1 4/1 -5/1 5/1 9/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test08.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test08.txt deleted file mode 100644 index 2aa0735bf04..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test08.txt +++ /dev/null @@ -1,19 +0,0 @@ -2 -1 2 4 2 -3 0 5 4 -3 -3/1 0/1 4/1 2/1 -1/1 2/1 4/1 2/1 -4/1 2/1 5/1 4/1 -4 -1/1 2/1 -3/1 0/1 -4/1 2/1 -5/1 4/1 -1 -4/1 2/1 -1 -3 -3/1 0/1 4/1 2/1 -1/1 2/1 4/1 2/1 -4/1 2/1 5/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test09.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test09.txt deleted file mode 100644 index e9f6371753e..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test09.txt +++ /dev/null @@ -1,20 +0,0 @@ -2 -1 1 7 1 -3 1 5 4 -3 -1/1 1/1 3/1 1/1 -3/1 1/1 5/1 4/1 -3/1 1/1 7/1 1/1 -4 -1/1 1/1 -3/1 1/1 -5/1 4/1 -7/1 1/1 -1 -3/1 1/1 -1 -3 -1/1 1/1 3/1 1/1 -3/1 1/1 5/1 4/1 -3/1 1/1 7/1 1/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test10.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test10.txt deleted file mode 100644 index f0113460554..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test10.txt +++ /dev/null @@ -1,21 +0,0 @@ -2 -6 1 1 1 -4 -2 3 1 -3 -3/1 1/1 1/1 1/1 -4/1 -2/1 3/1 1/1 -6/1 1/1 3/1 1/1 -4 -1/1 1/1 -3/1 1/1 -4/1 -2/1 -6/1 1/1 -1 -3/1 1/1 -1 -3 -3/1 1/1 1/1 1/1 -4/1 -2/1 3/1 1/1 -6/1 1/1 3/1 1/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test11.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test11.txt deleted file mode 100644 index 78140996955..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test11.txt +++ /dev/null @@ -1,21 +0,0 @@ -2 -1 1 3 5 -5 3 2 3 -3 -1/1 1/1 2/1 3/1 -2/1 3/1 3/1 5/1 -5/1 3/1 2/1 3/1 -4 -1/1 1/1 -2/1 3/1 -3/1 5/1 -5/1 3/1 -1 -2/1 3/1 -1 -3 -1/1 1/1 2/1 3/1 -2/1 3/1 3/1 5/1 -5/1 3/1 2/1 3/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test12.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test12.txt deleted file mode 100644 index 39d22990f45..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test12.txt +++ /dev/null @@ -1,29 +0,0 @@ -3 -2 4 4 1 -7 1 1 1 -1 4 5 4 -5 -1/1 4/1 2/1 4/1 -4/1 1/1 1/1 1/1 -2/1 4/1 4/1 1/1 -2/1 4/1 5/1 4/1 -7/1 1/1 4/1 1/1 -6 -1/1 1/1 -1/1 4/1 -2/1 4/1 -4/1 1/1 -5/1 4/1 -7/1 1/1 -2 -2/1 4/1 -4/1 1/1 -1 -5 -1/1 4/1 2/1 4/1 -4/1 1/1 1/1 1/1 -2/1 4/1 4/1 1/1 -2/1 4/1 5/1 4/1 -7/1 1/1 4/1 1/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test13.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test13.txt deleted file mode 100644 index 69f7c821d95..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test13.txt +++ /dev/null @@ -1,28 +0,0 @@ -3 -0 2 4 2 -1 5 9 -1 -7 4 3 0 -5 -0/1 2/1 4/1 2/1 -280/56 112/56 3/1 0/1 -1/1 5/1 280/56 112/56 -7/1 4/1 280/56 112/56 -280/56 112/56 9/1 -1/1 -7 -0/1 2/1 -1/1 5/1 -3/1 0/1 -4/1 2/1 -280/56 112/56 -7/1 4/1 -9/1 -1/1 -1 -280/56 112/56 -1 -5 -0/1 2/1 4/1 2/1 -280/56 112/56 3/1 0/1 -1/1 5/1 280/56 112/56 -7/1 4/1 280/56 112/56 -280/56 112/56 9/1 -1/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test14.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test14.txt deleted file mode 100644 index 6252c3b96dc..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test14.txt +++ /dev/null @@ -1,47 +0,0 @@ -7 -0 2 4 2 -1 5 9 -1 -7 4 3 0 -3 5 5 5 -3 4 5 4 -3 -1 5 -1 -3 -2 5 -2 -9 -0/1 2/1 4/1 2/1 -3/1 -2/1 5/1 -2/1 -3/1 -1/1 5/1 -1/1 -280/56 112/56 3/1 0/1 -1/1 5/1 280/56 112/56 -3/1 4/1 5/1 4/1 -3/1 5/1 5/1 5/1 -7/1 4/1 280/56 112/56 -280/56 112/56 9/1 -1/1 -15 -0/1 2/1 -1/1 5/1 -3/1 -2/1 -3/1 -1/1 -3/1 0/1 -3/1 4/1 -3/1 5/1 -4/1 2/1 -5/1 -2/1 -5/1 -1/1 -280/56 112/56 -5/1 4/1 -5/1 5/1 -7/1 4/1 -9/1 -1/1 -1 -280/56 112/56 -1 -9 -0/1 2/1 4/1 2/1 -3/1 -2/1 5/1 -2/1 -3/1 -1/1 5/1 -1/1 -280/56 112/56 3/1 0/1 -1/1 5/1 280/56 112/56 -3/1 4/1 5/1 4/1 -3/1 5/1 5/1 5/1 -7/1 4/1 280/56 112/56 -280/56 112/56 9/1 -1/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test15.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test15.txt deleted file mode 100644 index bc9ee161137..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test15.txt +++ /dev/null @@ -1,41 +0,0 @@ -9 -0 0 4 3 -3 -3 5 -1 -3 -3 0 0 -4 -4 5 -1 -4 -4 3 -3 -5 -1 9 -1 -8 2 9 -1 -8 2 5 -1 -4 3 5 -1 -9 -3/1 -3/1 0/1 0/1 -4/1 -4/1 3/1 -3/1 -0/1 0/1 4/1 3/1 -4/1 -4/1 5/1 -1/1 -3/1 -3/1 5/1 -1/1 -4/1 3/1 5/1 -1/1 -8/1 2/1 5/1 -1/1 -5/1 -1/1 9/1 -1/1 -8/1 2/1 9/1 -1/1 -7 -0/1 0/1 -3/1 -3/1 -4/1 -4/1 -4/1 3/1 -5/1 -1/1 -8/1 2/1 -9/1 -1/1 -0 -4 -9 -3/1 -3/1 0/1 0/1 -4/1 -4/1 3/1 -3/1 -0/1 0/1 4/1 3/1 -4/1 -4/1 5/1 -1/1 -3/1 -3/1 5/1 -1/1 -4/1 3/1 5/1 -1/1 -8/1 2/1 5/1 -1/1 -5/1 -1/1 9/1 -1/1 -8/1 2/1 9/1 -1/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test16.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test16.txt deleted file mode 100644 index d174c920fc2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test16.txt +++ /dev/null @@ -1,57 +0,0 @@ -7 -6 3 0 3 -2 0 4 6 -4 0 2 6 -5 1 1 5 -5 5 1 1 -0 2 6 4 -1 4 5 2 -14 -2/1 0/1 36/12 36/12 -36/12 36/12 1/1 1/1 -0/1 2/1 36/12 36/12 -36/12 36/12 0/1 3/1 -1/1 4/1 36/12 36/12 -36/12 36/12 1/1 5/1 -36/12 36/12 2/1 6/1 -4/1 0/1 36/12 36/12 -36/12 36/12 4/1 6/1 -5/1 1/1 36/12 36/12 -36/12 36/12 5/1 2/1 -5/1 5/1 36/12 36/12 -6/1 3/1 36/12 36/12 -36/12 36/12 6/1 4/1 -15 -0/1 2/1 -0/1 3/1 -1/1 1/1 -1/1 4/1 -1/1 5/1 -2/1 0/1 -2/1 6/1 -36/12 36/12 -4/1 0/1 -4/1 6/1 -5/1 1/1 -5/1 2/1 -5/1 5/1 -6/1 3/1 -6/1 4/1 -1 -36/12 36/12 -1 -14 -2/1 0/1 36/12 36/12 -36/12 36/12 1/1 1/1 -0/1 2/1 36/12 36/12 -36/12 36/12 0/1 3/1 -1/1 4/1 36/12 36/12 -36/12 36/12 1/1 5/1 -36/12 36/12 2/1 6/1 -4/1 0/1 36/12 36/12 -36/12 36/12 4/1 6/1 -5/1 1/1 36/12 36/12 -36/12 36/12 5/1 2/1 -5/1 5/1 36/12 36/12 -6/1 3/1 36/12 36/12 -36/12 36/12 6/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test17.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test17.txt deleted file mode 100644 index 32cf9a98c6c..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test17.txt +++ /dev/null @@ -1,23 +0,0 @@ -4 -1 5 0 4 -1 5 2 4 -1 3 0 4 -1 3 2 4 -4 -1/1 3/1 0/1 4/1 -1/1 5/1 0/1 4/1 -1/1 3/1 2/1 4/1 -1/1 5/1 2/1 4/1 -4 -0/1 4/1 -1/1 3/1 -1/1 5/1 -2/1 4/1 -0 -2 -4 -1/1 3/1 0/1 4/1 -1/1 5/1 0/1 4/1 -1/1 3/1 2/1 4/1 -1/1 5/1 2/1 4/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test18.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test18.txt deleted file mode 100644 index 049c8e10a28..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test18.txt +++ /dev/null @@ -1,27 +0,0 @@ -3 -0 0 6 0 -0 2 3 2 -2 -1 4 1 -5 -2/1 -1/1 36/12 0/12 -0/1 0/1 36/12 0/12 -0/1 2/1 3/1 2/1 -36/12 0/12 4/1 1/1 -36/12 0/12 6/1 0/1 -7 -0/1 0/1 -0/1 2/1 -2/1 -1/1 -36/12 0/12 -3/1 2/1 -4/1 1/1 -6/1 0/1 -1 -36/12 0/12 -1 -5 -2/1 -1/1 36/12 0/12 -0/1 0/1 36/12 0/12 -0/1 2/1 3/1 2/1 -36/12 0/12 4/1 1/1 -36/12 0/12 6/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test19.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test19.txt deleted file mode 100644 index b21e9b2a107..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test19.txt +++ /dev/null @@ -1,21 +0,0 @@ -3 -0 0 3 0 -3 0 5 0 -5 0 8 0 -3 -0/1 0/1 3/1 0/1 -3/1 0/1 5/1 0/1 -5/1 0/1 8/1 0/1 -4 -0/1 0/1 -3/1 0/1 -5/1 0/1 -8/1 0/1 -0 -1 -3 -0/1 0/1 3/1 0/1 -3/1 0/1 5/1 0/1 -5/1 0/1 8/1 0/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test20.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test20.txt deleted file mode 100644 index 9075a5d1fb5..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test20.txt +++ /dev/null @@ -1,30 +0,0 @@ -3 -1 2 4 2 -3 0 5 4 -3 4 5 0 -5 -3/1 0/1 4/1 2/1 -1/1 2/1 4/1 2/1 -3/1 4/1 4/1 2/1 -4/1 2/1 5/1 0/1 -4/1 2/1 5/1 4/1 -6 -1/1 2/1 -3/1 0/1 -3/1 4/1 -4/1 2/1 -5/1 0/1 -5/1 4/1 -1 -4/1 2/1 -1 -5 -3/1 0/1 4/1 2/1 -1/1 2/1 4/1 2/1 -3/1 4/1 4/1 2/1 -4/1 2/1 5/1 0/1 -4/1 2/1 5/1 4/1 - - - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test21.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test21.txt deleted file mode 100644 index 445b25d3b6e..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test21.txt +++ /dev/null @@ -1,29 +0,0 @@ -3 -6 1 1 6 -9 3 0 3 -2 1 6 5 -6 -2/1 1/1 180/45 135/45 -180/45 135/45 0/1 3/1 -180/45 135/45 1/1 6/1 -6/1 1/1 180/45 135/45 -180/45 135/45 6/1 5/1 -9/1 3/1 180/45 135/45 -7 -0/1 3/1 -1/1 6/1 -2/1 1/1 -180/45 135/45 -6/1 1/1 -6/1 5/1 -9/1 3/1 -1 -180/45 135/45 -1 -6 -2/1 1/1 180/45 135/45 -180/45 135/45 0/1 3/1 -180/45 135/45 1/1 6/1 -6/1 1/1 180/45 135/45 -180/45 135/45 6/1 5/1 -9/1 3/1 180/45 135/45 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test22.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test22.txt deleted file mode 100644 index 738953c643b..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test22.txt +++ /dev/null @@ -1,29 +0,0 @@ -5 -0 0 1 1 -0 0 2 3 -0 0 9 8 -0 0 -1 -3 -0 0 -3 4 -5 -0/1 0/1 -1/1 -3/1 -0/1 0/1 -3/1 4/1 -0/1 0/1 1/1 1/1 -0/1 0/1 2/1 3/1 -0/1 0/1 9/1 8/1 -6 --3/1 4/1 --1/1 -3/1 -0/1 0/1 -1/1 1/1 -2/1 3/1 -9/1 8/1 -0 -1 -5 -0/1 0/1 -1/1 -3/1 -0/1 0/1 -3/1 4/1 -0/1 0/1 1/1 1/1 -0/1 0/1 2/1 3/1 -0/1 0/1 9/1 8/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test23.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test23.txt deleted file mode 100644 index 8c692cc93a4..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test23.txt +++ /dev/null @@ -1,24 +0,0 @@ -4 -1 2 0 0 -3 2 0 0 -0 0 4 0 -0 0 2 -2 -4 -1/1 2/1 0/1 0/1 -0/1 0/1 2/1 -2/1 -3/1 2/1 0/1 0/1 -0/1 0/1 4/1 0/1 -5 -0/1 0/1 -1/1 2/1 -2/1 -2/1 -3/1 2/1 -4/1 0/1 -0 -1 -4 -1/1 2/1 0/1 0/1 -0/1 0/1 2/1 -2/1 -3/1 2/1 0/1 0/1 -0/1 0/1 4/1 0/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test24.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test24.txt deleted file mode 100644 index 601e8cfbf8a..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test24.txt +++ /dev/null @@ -1,23 +0,0 @@ -4 --3 2 0 0 --3 0 0 0 --2 -2 0 0 -0 0 -2 -4 -4 -0/1 0/1 -2/1 -4/1 --2/1 -2/1 0/1 0/1 --3/1 0/1 0/1 0/1 --3/1 2/1 0/1 0/1 -5 --3/1 0/1 --3/1 2/1 --2/1 -4/1 --2/1 -2/1 -0/1 0/1 -0 -1 -4 -0/1 0/1 -2/1 -4/1 --2/1 -2/1 0/1 0/1 --3/1 0/1 0/1 0/1 --3/1 2/1 0/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test25.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test25.txt deleted file mode 100644 index 3b52e2164d7..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test25.txt +++ /dev/null @@ -1,24 +0,0 @@ -4 -0 0 3 3 -3 3 6 6 -6 0 3 3 -0 6 3 3 -4 -0/1 0/1 3/1 3/1 -0/1 6/1 3/1 3/1 -6/1 0/1 3/1 3/1 -3/1 3/1 6/1 6/1 -5 -0/1 0/1 -0/1 6/1 -3/1 3/1 -6/1 0/1 -6/1 6/1 -0 -1 -4 -0/1 0/1 3/1 3/1 -0/1 6/1 3/1 3/1 -6/1 0/1 3/1 3/1 -3/1 3/1 6/1 6/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test26.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test26.txt deleted file mode 100644 index fc3cfb4fc30..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test26.txt +++ /dev/null @@ -1,42 +0,0 @@ -7 -0 7 2 5 -0 5 2 5 -2 4 4 4 -2 4 4 2 -2 7 4 9 -0 1 4 1 -1 4 3 6 -8 -1/1 4/1 2/1 5/1 -0/1 5/1 2/1 5/1 -0/1 7/1 2/1 5/1 -2/1 5/1 3/1 6/1 -0/1 1/1 4/1 1/1 -2/1 4/1 4/1 2/1 -2/1 4/1 4/1 4/1 -2/1 7/1 4/1 9/1 -12 -0/1 1/1 -0/1 5/1 -0/1 7/1 -1/1 4/1 -2/1 4/1 -2/1 5/1 -2/1 7/1 -3/1 6/1 -4/1 1/1 -4/1 2/1 -4/1 4/1 -4/1 9/1 -1 -2/1 5/1 -1 -8 -1/1 4/1 2/1 5/1 -0/1 5/1 2/1 5/1 -0/1 7/1 2/1 5/1 -2/1 5/1 3/1 6/1 -0/1 1/1 4/1 1/1 -2/1 4/1 4/1 2/1 -2/1 4/1 4/1 4/1 -2/1 7/1 4/1 9/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test27.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test27.txt deleted file mode 100644 index 1d25c06c8c4..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test27.txt +++ /dev/null @@ -1,37 +0,0 @@ -8 -1 5 0 4 -1 5 2 4 -1 3 0 4 -1 3 2 4 -0 2 1 3 -0 2 1 1 -1 3 2 2 -1 1 2 2 -8 -0/1 2/1 1/1 1/1 -0/1 2/1 1/1 3/1 -1/1 3/1 0/1 4/1 -1/1 5/1 0/1 4/1 -1/1 1/1 2/1 2/1 -1/1 3/1 2/1 2/1 -1/1 3/1 2/1 4/1 -1/1 5/1 2/1 4/1 -7 -0/1 2/1 -0/1 4/1 -1/1 1/1 -1/1 3/1 -1/1 5/1 -2/1 2/1 -2/1 4/1 -0 -3 -8 -0/1 2/1 1/1 1/1 -0/1 2/1 1/1 3/1 -1/1 3/1 0/1 4/1 -1/1 5/1 0/1 4/1 -1/1 1/1 2/1 2/1 -1/1 3/1 2/1 2/1 -1/1 3/1 2/1 4/1 -1/1 5/1 2/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test28.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test28.txt deleted file mode 100644 index ed905e724c2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test28.txt +++ /dev/null @@ -1,44 +0,0 @@ -10 --1 0 0 1 -0 1 1 2 -0 -1 -1 0 -1 0 0 1 -2 1 1 2 -0 -1 1 0 -1 0 2 1 -1 0 2 -1 -2 1 3 0 -2 -1 3 0 -10 -0/1 -1/1 -1/1 0/1 --1/1 0/1 0/1 1/1 -0/1 -1/1 1/1 0/1 -1/1 0/1 0/1 1/1 -0/1 1/1 1/1 2/1 -1/1 0/1 2/1 -1/1 -1/1 0/1 2/1 1/1 -2/1 1/1 1/1 2/1 -2/1 -1/1 3/1 0/1 -2/1 1/1 3/1 0/1 -8 --1/1 0/1 -0/1 -1/1 -0/1 1/1 -1/1 0/1 -1/1 2/1 -2/1 -1/1 -2/1 1/1 -3/1 0/1 -0 -4 -10 -0/1 -1/1 -1/1 0/1 --1/1 0/1 0/1 1/1 -0/1 -1/1 1/1 0/1 -1/1 0/1 0/1 1/1 -0/1 1/1 1/1 2/1 -1/1 0/1 2/1 -1/1 -1/1 0/1 2/1 1/1 -2/1 1/1 1/1 2/1 -2/1 -1/1 3/1 0/1 -2/1 1/1 3/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test29.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test29.txt deleted file mode 100644 index 37aca71a59c..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test29.txt +++ /dev/null @@ -1,26 +0,0 @@ -3 -0 4 4 0 -0 0 4 4 -2 2 5 2 -5 -0/1 0/1 2/1 2/1 -0/1 4/1 2/1 2/1 -2/1 2/1 4/1 0/1 -2/1 2/1 4/1 4/1 -2/1 2/1 5/1 2/1 -6 -0/1 0/1 -0/1 4/1 -2/1 2/1 -4/1 0/1 -4/1 4/1 -5/1 2/1 -1 -2/1 2/1 -1 -5 -0/1 0/1 2/1 2/1 -0/1 4/1 2/1 2/1 -2/1 2/1 4/1 0/1 -2/1 2/1 4/1 4/1 -2/1 2/1 5/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test30.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test30.txt deleted file mode 100644 index e6a784c9d3d..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test30.txt +++ /dev/null @@ -1,22 +0,0 @@ -2 -0 0 5 0 -2 -2 2 3 -4 -2/1 -2/1 50/25 0/25 -0/1 0/1 50/25 0/25 -50/25 0/25 2/1 3/1 -50/25 0/25 5/1 0/1 -5 -0/1 0/1 -2/1 -2/1 -50/25 0/25 -2/1 3/1 -5/1 0/1 -1 -50/25 0/25 -1 -4 -2/1 -2/1 50/25 0/25 -0/1 0/1 50/25 0/25 -50/25 0/25 2/1 3/1 -50/25 0/25 5/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test31.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test31.txt deleted file mode 100644 index 3185f80ec7b..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test31.txt +++ /dev/null @@ -1,33 +0,0 @@ -3 -1 2 3 2 -0 0 5 0 -2 4 2 -2 -7 -60/30 0/30 2/1 -2/1 -0/1 0/1 60/30 0/30 -24/12 24/12 60/30 0/30 -1/1 2/1 24/12 24/12 -2/1 4/1 24/12 24/12 -24/12 24/12 3/1 2/1 -60/30 0/30 5/1 0/1 -8 -0/1 0/1 -1/1 2/1 -2/1 -2/1 -60/30 0/30 -24/12 24/12 -2/1 4/1 -3/1 2/1 -5/1 0/1 -2 -60/30 0/30 -24/12 24/12 -1 -7 -60/30 0/30 2/1 -2/1 -0/1 0/1 60/30 0/30 -24/12 24/12 60/30 0/30 -1/1 2/1 24/12 24/12 -2/1 4/1 24/12 24/12 -24/12 24/12 3/1 2/1 -60/30 0/30 5/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test32.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test32.txt deleted file mode 100644 index 830d83f2e59..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test32.txt +++ /dev/null @@ -1,33 +0,0 @@ -3 -1 2 3 2 -0 0 5 0 -2 -2 2 4 -7 -2/1 -2/1 2/1 0/1 -0/1 0/1 2/1 0/1 -2/1 0/1 2/1 2/1 -1/1 2/1 2/1 2/1 -2/1 2/1 2/1 4/1 -2/1 2/1 3/1 2/1 -2/1 0/1 5/1 0/1 -8 -0/1 0/1 -1/1 2/1 -2/1 -2/1 -60/30 0/30 -24/12 24/12 -2/1 4/1 -3/1 2/1 -5/1 0/1 -2 -60/30 0/30 -24/12 24/12 -1 -7 -2/1 -2/1 2/1 0/1 -0/1 0/1 2/1 0/1 -2/1 0/1 2/1 2/1 -1/1 2/1 2/1 2/1 -2/1 2/1 2/1 4/1 -2/1 2/1 3/1 2/1 -2/1 0/1 5/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test33.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test33.txt deleted file mode 100644 index 52b22ae49a6..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test33.txt +++ /dev/null @@ -1,16 +0,0 @@ -2 -1 5 1 2 -0 0 3 2 -2 -1/1 5/1 1/1 2/1 -0/1 0/1 3/1 2/1 -4 -0/1 0/1 -1/1 2/1 -1/1 5/1 -3/1 2/1 -0 -1 -2 -1/1 5/1 1/1 2/1 -0/1 0/1 3/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test34.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test34.txt deleted file mode 100644 index 9587d1b15dc..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test34.txt +++ /dev/null @@ -1,16 +0,0 @@ -2 --1 2 1 4 -0 0 0 2 -2 -0/1 0/1 0/1 2/1 --1/1 2/1 1/1 4/1 -4 --1/1 2/1 -0/1 0/1 -0/1 2/1 -1/1 4/1 -0 -1 -2 -0/1 0/1 0/1 2/1 --1/1 2/1 1/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test35.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test35.txt deleted file mode 100644 index 58b53d15991..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test35.txt +++ /dev/null @@ -1,43 +0,0 @@ -5 -1 7 3 7 -2 6 2 2 -0 4 4 4 -1 3 3 3 -1 0 3 0 -9 -2/1 3/1 2/1 2/1 -1/1 3/1 2/1 3/1 -2/1 4/1 2/1 3/1 -0/1 4/1 2/1 4/1 -2/1 6/1 2/1 4/1 -1/1 0/1 3/1 0/1 -2/1 3/1 3/1 3/1 -1/1 7/1 3/1 7/1 -2/1 4/1 4/1 4/1 -12 -0/1 4/1 -1/1 0/1 -1/1 3/1 -1/1 7/1 -2/1 2/1 -16/8 24/8 -32/16 64/16 -2/1 6/1 -3/1 0/1 -3/1 3/1 -3/1 7/1 -4/1 4/1 -2 -16/8 24/8 -32/16 64/16 -1 -9 -2/1 3/1 2/1 2/1 -1/1 3/1 2/1 3/1 -2/1 4/1 2/1 3/1 -0/1 4/1 2/1 4/1 -2/1 6/1 2/1 4/1 -1/1 0/1 3/1 0/1 -2/1 3/1 3/1 3/1 -1/1 7/1 3/1 7/1 -2/1 4/1 4/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test36.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test36.txt deleted file mode 100644 index 2c4c5a96f29..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test36.txt +++ /dev/null @@ -1,46 +0,0 @@ -4 -2 0 2 9 -1 7 5 3 -0 4 4 2 -1 2 4 5 -11 -2/1 0/1 2/1 3/1 -1/1 2/1 2/1 3/1 -0/1 4/1 2/1 3/1 -2/1 3/1 2/1 6/1 -1/1 7/1 2/1 6/1 -2/1 6/1 2/1 9/1 -2/1 3/1 7/2 9/2 -2/1 6/1 7/2 9/2 -2/1 3/1 4/1 2/1 -7/2 9/2 4/1 5/1 -7/2 9/2 5/1 3/1 -11 -0/1 4/1 -1/1 2/1 -1/1 7/1 -2/1 0/1 -36/18 54/18 -72/36 216/36 -2/1 9/1 -84/24 108/24 -4/1 2/1 -4/1 5/1 -5/1 3/1 -3 -36/18 54/18 -72/36 216/36 -84/24 108/24 -2 -11 -2/1 0/1 2/1 3/1 -1/1 2/1 2/1 3/1 -0/1 4/1 2/1 3/1 -2/1 3/1 2/1 6/1 -1/1 7/1 2/1 6/1 -2/1 6/1 2/1 9/1 -2/1 3/1 7/2 9/2 -2/1 6/1 7/2 9/2 -2/1 3/1 4/1 2/1 -7/2 9/2 4/1 5/1 -7/2 9/2 5/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test37.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test37.txt deleted file mode 100644 index bf946526e36..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test37.txt +++ /dev/null @@ -1,55 +0,0 @@ -5 -0 0 0 3 -0 4 0 6 --3 2 2 0 --2 4 1 6 --1 6 -1 1 -13 --1/1 6/5 -1/1 1/1 --3/1 2/1 -1/1 6/5 --1/1 14/3 -1/1 6/5 --2/1 4/1 -1/1 14/3 --1/1 6/1 -1/1 14/3 -0/1 0/1 0/1 4/5 --1/1 6/5 0/1 4/5 -0/1 4/5 0/1 3/1 -0/1 4/1 0/1 16/3 --1/1 14/3 0/1 16/3 -0/1 16/3 0/1 6/1 -0/1 16/3 1/1 6/1 -0/1 4/5 2/1 0/1 -14 --3/1 2/1 --2/1 4/1 --1/1 1/1 --25/25 30/25 --15/15 70/15 --1/1 6/1 -0/1 0/1 -0/15 12/15 -0/1 3/1 -0/1 4/1 -0/6 32/6 -0/1 6/1 -1/1 6/1 -2/1 0/1 -4 --25/25 30/25 --15/15 70/15 -0/15 12/15 -0/6 32/6 -1 -13 --1/1 6/5 -1/1 1/1 --3/1 2/1 -1/1 6/5 --1/1 14/3 -1/1 6/5 --2/1 4/1 -1/1 14/3 --1/1 6/1 -1/1 14/3 -0/1 0/1 0/1 4/5 --1/1 6/5 0/1 4/5 -0/1 4/5 0/1 3/1 -0/1 4/1 0/1 16/3 --1/1 14/3 0/1 16/3 -0/1 16/3 0/1 6/1 -0/1 16/3 1/1 6/1 -0/1 4/5 2/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test40.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test40.txt deleted file mode 100644 index beea62f7afb..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test40.txt +++ /dev/null @@ -1,19 +0,0 @@ -2 -0 0 0 6 -0 3 3 3 -3 -0/1 0/1 0/1 3/1 -0/1 3/1 0/1 6/1 -0/1 3/1 3/1 3/1 -4 -0/1 0/1 -0/1 3/1 -0/1 6/1 -3/1 3/1 -1 -0/1 3/1 -1 -3 -0/1 0/1 0/1 3/1 -0/1 3/1 0/1 6/1 -0/1 3/1 3/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test41.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test41.txt deleted file mode 100644 index 3651988bd29..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test41.txt +++ /dev/null @@ -1,19 +0,0 @@ -2 --3 3 0 3 -0 0 0 6 -3 -0/1 0/1 0/1 3/1 --3/1 3/1 0/1 3/1 -0/1 3/1 0/1 6/1 -4 --3/1 3/1 -0/1 0/1 -0/1 3/1 -0/1 6/1 -1 -0/1 3/1 -1 -3 -0/1 0/1 0/1 3/1 --3/1 3/1 0/1 3/1 -0/1 3/1 0/1 6/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test42.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test42.txt deleted file mode 100644 index b83c0b96d1c..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test42.txt +++ /dev/null @@ -1,23 +0,0 @@ -3 -0 0 0 4 --2 2 0 2 -0 2 2 2 -4 -0/1 0/1 0/1 2/1 --2/1 2/1 0/1 2/1 -0/1 2/1 0/1 4/1 -0/1 2/1 2/1 2/1 -5 --2/1 2/1 -0/1 0/1 -0/1 2/1 -0/1 4/1 -2/1 2/1 -1 -0/1 2/1 -1 -4 -0/1 0/1 0/1 2/1 --2/1 2/1 0/1 2/1 -0/1 2/1 0/1 4/1 -0/1 2/1 2/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test43.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test43.txt deleted file mode 100644 index a78d9c4bdea..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test43.txt +++ /dev/null @@ -1,15 +0,0 @@ -2 -0 5 4 5 -4 5 4 1 -2 -4/1 5/1 4/1 1/1 -0/1 5/1 4/1 5/1 -3 -0/1 5/1 -4/1 1/1 -4/1 5/1 -0 -1 -2 -4/1 5/1 4/1 1/1 -0/1 5/1 4/1 5/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test44.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test44.txt deleted file mode 100644 index 0aff3e7b181..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test44.txt +++ /dev/null @@ -1,23 +0,0 @@ -4 -0 4 4 4 -4 4 4 0 -0 0 4 0 -0 4 0 0 -4 -0/1 4/1 0/1 0/1 -0/1 0/1 4/1 0/1 -4/1 4/1 4/1 0/1 -0/1 4/1 4/1 4/1 -4 -0/1 0/1 -0/1 4/1 -4/1 0/1 -4/1 4/1 -0 -2 -4 -0/1 4/1 0/1 0/1 -0/1 0/1 4/1 0/1 -4/1 4/1 4/1 0/1 -0/1 4/1 4/1 4/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test45.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test45.txt deleted file mode 100644 index 431f41756eb..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test45.txt +++ /dev/null @@ -1,15 +0,0 @@ -2 -0 0 4 0 -0 4 0 0 -2 -0/1 4/1 0/1 0/1 -0/1 0/1 4/1 0/1 -3 -0/1 0/1 -0/1 4/1 -4/1 0/1 -0 -1 -2 -0/1 4/1 0/1 0/1 -0/1 0/1 4/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test46.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test46.txt deleted file mode 100644 index ed0e785f55b..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test46.txt +++ /dev/null @@ -1,21 +0,0 @@ -3 -0 6 2 6 -2 5 2 2 -2 1 4 1 -3 -2/1 5/1 2/1 2/1 -0/1 6/1 2/1 6/1 -2/1 1/1 4/1 1/1 -6 -0/1 6/1 -2/1 1/1 -2/1 2/1 -2/1 5/1 -2/1 6/1 -4/1 1/1 -0 -1 -3 -2/1 5/1 2/1 2/1 -0/1 6/1 2/1 6/1 -2/1 1/1 4/1 1/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test47.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test47.txt deleted file mode 100644 index 5861e7d3583..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test47.txt +++ /dev/null @@ -1,19 +0,0 @@ -2 -2 0 2 3 -4 0 0 0 -3 -2/1 0/1 0/1 0/1 -2/1 0/1 2/1 3/1 -4/1 0/1 2/1 0/1 -4 -0/1 0/1 -2/1 0/1 -2/1 3/1 -4/1 0/1 -1 -2/1 0/1 -1 -3 -2/1 0/1 0/1 0/1 -2/1 0/1 2/1 3/1 -4/1 0/1 2/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test48.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test48.txt deleted file mode 100644 index 8546ccf6f28..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test48.txt +++ /dev/null @@ -1,32 +0,0 @@ -4 -0 0 5 0 -2 3 2 0 -7 3 12 3 -9 3 9 0 -6 -0/1 0/1 2/1 0/1 -2/1 3/1 2/1 0/1 -2/1 0/1 5/1 0/1 -9/1 3/1 9/1 0/1 -7/1 3/1 9/1 3/1 -9/1 3/1 12/1 3/1 -8 -0/1 0/1 -2/1 0/1 -2/1 3/1 -5/1 0/1 -7/1 3/1 -9/1 0/1 -9/1 3/1 -12/1 3/1 -2 -2/1 0/1 -9/1 3/1 -1 -6 -0/1 0/1 2/1 0/1 -2/1 3/1 2/1 0/1 -2/1 0/1 5/1 0/1 -9/1 3/1 9/1 0/1 -7/1 3/1 9/1 3/1 -9/1 3/1 12/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test49.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test49.txt deleted file mode 100644 index 38fdef6d37b..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test49.txt +++ /dev/null @@ -1,15 +0,0 @@ -2 -0 0 4 0 -4 0 4 4 -2 -0/1 0/1 4/1 0/1 -4/1 0/1 4/1 4/1 -3 -0/1 0/1 -4/1 0/1 -4/1 4/1 -0 -1 -2 -0/1 0/1 4/1 0/1 -4/1 0/1 4/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test50.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test50.txt deleted file mode 100644 index 47db121f373..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test50.txt +++ /dev/null @@ -1,31 +0,0 @@ -5 -4 7 8 7 -8 7 8 5 -5 5 8 5 -8 6 9 7 -8 6 9 5 -6 -5/1 5/1 8/1 5/1 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -4/1 7/1 8/1 7/1 -8/1 6/1 9/1 5/1 -8/1 6/1 9/1 7/1 -7 -4/1 7/1 -5/1 5/1 -8/1 5/1 -8/1 6/1 -8/1 7/1 -9/1 5/1 -9/1 7/1 -1 -8/1 6/1 -1 -6 -5/1 5/1 8/1 5/1 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -4/1 7/1 8/1 7/1 -8/1 6/1 9/1 5/1 -8/1 6/1 9/1 7/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test51.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test51.txt deleted file mode 100644 index cf9cd7243ce..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test51.txt +++ /dev/null @@ -1,118 +0,0 @@ -16 -2 4 2 0 -2 6 2 10 -6 8 6 4 -8 7 8 5 -0 8 2 8 -4 7 8 7 -0 6 6 6 -8 5 5 5 -2 3 4 3 -1 7 4 10 -6 6 0 3 -0 1 3 4 -9 7 8 6 -9 5 8 6 -2 0 6 4 -2 10 6 8 -30 -2/1 3/1 2/1 0/1 -0/1 1/1 2/1 3/1 -2/1 4/1 2/1 3/1 -2/1 4/1 0/1 3/1 -0/1 6/1 2/1 6/1 -2/1 6/1 2/1 8/1 -1/1 7/1 2/1 8/1 -0/1 8/1 2/1 8/1 -2/1 8/1 2/1 10/1 -2/1 3/1 3/1 4/1 -2/1 8/1 10/3 28/3 -2/1 10/1 10/3 28/3 -2/1 3/1 4/1 3/1 -10/3 28/3 4/1 10/1 -2/1 0/1 6/1 4/1 -6/1 5/1 6/1 4/1 -6/1 5/1 5/1 5/1 -6/1 6/1 6/1 5/1 -6/1 6/1 2/1 4/1 -2/1 6/1 6/1 6/1 -6/1 7/1 6/1 6/1 -4/1 7/1 6/1 7/1 -6/1 8/1 6/1 7/1 -10/3 28/3 6/1 8/1 -8/1 5/1 6/1 5/1 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -6/1 7/1 8/1 7/1 -9/1 5/1 8/1 6/1 -9/1 7/1 8/1 6/1 -27 -0/1 1/1 -0/1 3/1 -0/1 6/1 -0/1 8/1 -1/1 7/1 -2/1 0/1 -2/1 3/1 -2/1 4/1 -2/1 6/1 -2/1 8/1 -2/1 10/1 -3/1 4/1 -60/18 168/18 -4/1 3/1 -4/1 7/1 -4/1 10/1 -5/1 5/1 -6/1 4/1 -72/12 60/12 -6/1 6/1 -96/16 112/16 -6/1 8/1 -8/1 5/1 -8/1 6/1 -8/1 7/1 -9/1 5/1 -9/1 7/1 -9 -2/1 3/1 -2/1 4/1 -2/1 6/1 -2/1 8/1 -60/18 168/18 -72/12 60/12 -6/1 6/1 -96/16 112/16 -8/1 6/1 -5 -30 -2/1 3/1 2/1 0/1 -0/1 1/1 2/1 3/1 -2/1 4/1 2/1 3/1 -2/1 4/1 0/1 3/1 -0/1 6/1 2/1 6/1 -2/1 6/1 2/1 8/1 -1/1 7/1 2/1 8/1 -0/1 8/1 2/1 8/1 -2/1 8/1 2/1 10/1 -2/1 3/1 3/1 4/1 -2/1 8/1 10/3 28/3 -2/1 10/1 10/3 28/3 -2/1 3/1 4/1 3/1 -10/3 28/3 4/1 10/1 -2/1 0/1 6/1 4/1 -6/1 5/1 6/1 4/1 -6/1 5/1 5/1 5/1 -6/1 6/1 6/1 5/1 -6/1 6/1 2/1 4/1 -2/1 6/1 6/1 6/1 -6/1 7/1 6/1 6/1 -4/1 7/1 6/1 7/1 -6/1 8/1 6/1 7/1 -10/3 28/3 6/1 8/1 -8/1 5/1 6/1 5/1 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -6/1 7/1 8/1 7/1 -9/1 5/1 8/1 6/1 -9/1 7/1 8/1 6/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test52.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test52.txt deleted file mode 100644 index 519eff3c8c9..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test52.txt +++ /dev/null @@ -1,29 +0,0 @@ -3 -0 4 4 0 -0 0 4 4 -2 5 2 -1 -6 -2/1 2/1 2/1 -1/1 -0/1 0/1 2/1 2/1 -0/1 4/1 2/1 2/1 -2/1 5/1 2/1 2/1 -2/1 2/1 4/1 0/1 -2/1 2/1 4/1 4/1 -7 -0/1 0/1 -0/1 4/1 -2/1 -1/1 -64/32 64/32 -2/1 5/1 -4/1 0/1 -4/1 4/1 -1 -64/32 64/32 -1 -6 -2/1 2/1 2/1 -1/1 -0/1 0/1 2/1 2/1 -0/1 4/1 2/1 2/1 -2/1 5/1 2/1 2/1 -2/1 2/1 4/1 0/1 -2/1 2/1 4/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test53.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test53.txt deleted file mode 100644 index 79d17493558..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test53.txt +++ /dev/null @@ -1,20 +0,0 @@ -3 -0 5 0 3 -0 3 0 2 -0 2 0 0 -3 -0/1 2/1 0/1 0/1 -0/1 3/1 0/1 2/1 -0/1 5/1 0/1 3/1 -4 -0/1 0/1 -0/1 2/1 -0/1 3/1 -0/1 5/1 -0 -1 -3 -0/1 2/1 0/1 0/1 -0/1 3/1 0/1 2/1 -0/1 5/1 0/1 3/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test54.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test54.txt deleted file mode 100644 index ce10a30cb75..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test54.txt +++ /dev/null @@ -1,23 +0,0 @@ -3 -8 7 8 5 -8 6 9 7 -8 6 9 5 -4 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -8/1 6/1 9/1 5/1 -8/1 6/1 9/1 7/1 -5 -8/1 5/1 -8/1 6/1 -8/1 7/1 -9/1 5/1 -9/1 7/1 -1 -8/1 6/1 -1 -4 -8/1 6/1 8/1 5/1 -8/1 7/1 8/1 6/1 -8/1 6/1 9/1 5/1 -8/1 6/1 9/1 7/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test55.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test55.txt deleted file mode 100644 index 1065362fc19..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test55.txt +++ /dev/null @@ -1,28 +0,0 @@ -3 -0 0 0 2 -0 1 2 1 -2 0 2 2 -5 -0/1 0/1 0/1 1/1 -0/1 1/1 0/1 2/1 -2/1 0/1 2/1 1/1 -0/1 1/1 2/1 1/1 -2/1 1/1 2/1 2/1 -6 -0/1 0/1 -0/1 1/1 -0/1 2/1 -2/1 0/1 -2/1 1/1 -2/1 2/1 -2 -0/1 1/1 -2/1 1/1 -1 -5 -0/1 0/1 0/1 1/1 -0/1 1/1 0/1 2/1 -2/1 0/1 2/1 1/1 -0/1 1/1 2/1 1/1 -2/1 1/1 2/1 2/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test56.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test56.txt deleted file mode 100644 index adc296648a4..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test56.txt +++ /dev/null @@ -1,27 +0,0 @@ -3 -3 0 3 6 -0 1 6 5 -3 3 7 3 -5 -3/1 0/1 3/1 3/1 -0/1 1/1 3/1 3/1 -3/1 3/1 3/1 6/1 -3/1 3/1 6/1 5/1 -3/1 3/1 7/1 3/1 -6 -0/1 1/1 -3/1 0/1 -3/1 3/1 -3/1 6/1 -6/1 5/1 -7/1 3/1 -1 -3/1 3/1 -1 -5 -3/1 0/1 3/1 3/1 -0/1 1/1 3/1 3/1 -3/1 3/1 3/1 6/1 -3/1 3/1 6/1 5/1 -3/1 3/1 7/1 3/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test60.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test60.txt deleted file mode 100644 index 92beb4090a2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test60.txt +++ /dev/null @@ -1,22 +0,0 @@ -2 -0 0 4 0 -3 0 7 0 -3 -0/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 7/1 0/1 -4 -0/1 0/1 -3/1 0/1 -4/1 0/1 -7/1 0/1 -2 -3/1 0/1 -4/1 0/1 -1 -4 -0/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 7/1 0/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test61.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test61.txt deleted file mode 100644 index 6db6035cbc7..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test61.txt +++ /dev/null @@ -1,33 +0,0 @@ -3 -3 0 6 0 -0 0 4 0 -2 0 8 0 -5 -0/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 6/1 0/1 -6/1 0/1 8/1 0/1 -6 -0/1 0/1 -2/1 0/1 -3/1 0/1 -4/1 0/1 -6/1 0/1 -8/1 0/1 -4 -2/1 0/1 -3/1 0/1 -4/1 0/1 -6/1 0/1 -1 -9 -0/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -3/1 0/1 4/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 6/1 0/1 -4/1 0/1 6/1 0/1 -6/1 0/1 8/1 0/1 \ No newline at end of file diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test62.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test62.txt deleted file mode 100644 index ee6c49c399e..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test62.txt +++ /dev/null @@ -1,15 +0,0 @@ -2 -0 0 3 0 -0 0 3 0 -1 -0/1 0/1 3/1 0/1 -2 -0/1 0/1 -3/1 0/1 -0 -1 -2 -0/1 0/1 3/1 0/1 -0/1 0/1 3/1 0/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test63.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test63.txt deleted file mode 100644 index 8923f049d15..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test63.txt +++ /dev/null @@ -1,25 +0,0 @@ -4 -0 0 2 0 -3 0 5 0 -0 0 5 0 -2 0 3 0 -3 -0/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 5/1 0/1 -4 -0/1 0/1 -2/1 0/1 -3/1 0/1 -5/1 0/1 -2 -2/1 0/1 -3/1 0/1 -1 -6 -0/1 0/1 2/1 0/1 -0/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 5/1 0/1 -3/1 0/1 5/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test64.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test64.txt deleted file mode 100644 index f2825be57f2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test64.txt +++ /dev/null @@ -1,15 +0,0 @@ -3 -0 0 6 6 -0 0 6 6 -6 6 0 0 -1 -0/1 0/1 6/1 6/1 -2 -0/1 0/1 -6/1 6/1 -0 -1 -3 -0/1 0/1 6/1 6/1 -0/1 0/1 6/1 6/1 -6/1 6/1 0/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test65.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test65.txt deleted file mode 100644 index e83cce072ae..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test65.txt +++ /dev/null @@ -1,25 +0,0 @@ -3 -0 0 4 4 -0 0 4 4 -0 4 4 0 -4 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -5 -0/1 0/1 -0/1 4/1 -64/32 64/32 -4/1 0/1 -4/1 4/1 -1 -64/32 64/32 -1 -6 -0/1 0/1 64/32 64/32 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -64/32 64/32 4/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test66.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test66.txt deleted file mode 100644 index 7725cef46c2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test66.txt +++ /dev/null @@ -1,28 +0,0 @@ -4 -0 0 4 4 -0 0 4 4 -0 4 4 0 -0 4 4 0 -4 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -5 -0/1 0/1 -0/1 4/1 -64/32 64/32 -4/1 0/1 -4/1 4/1 -1 -64/32 64/32 -1 -8 -0/1 0/1 64/32 64/32 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -64/32 64/32 4/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test67.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test67.txt deleted file mode 100644 index b380b5e7cbd..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test67.txt +++ /dev/null @@ -1,36 +0,0 @@ -5 -0 0 4 4 -0 0 4 4 -0 4 4 0 -0 4 4 0 --1 2 5 2 -6 -0/1 0/1 48/24 48/24 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 4/1 0/1 -48/24 48/24 4/1 4/1 -48/24 48/24 5/1 2/1 -7 --1/1 2/1 -0/1 0/1 -0/1 4/1 -48/24 48/24 -4/1 0/1 -4/1 4/1 -5/1 2/1 -1 -48/24 48/24 -1 -10 -0/1 0/1 48/24 48/24 -0/1 0/1 48/24 48/24 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 4/1 0/1 -48/24 48/24 4/1 0/1 -48/24 48/24 4/1 4/1 -48/24 48/24 4/1 4/1 -48/24 48/24 5/1 2/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test68.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test68.txt deleted file mode 100644 index 54feabc43ba..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test68.txt +++ /dev/null @@ -1,48 +0,0 @@ -6 -0 0 4 4 -0 0 4 4 -0 4 4 0 -0 4 4 0 --1 2 5 2 -1 1 3 3 -8 -0/1 0/1 1/1 1/1 -1/1 1/1 48/24 48/24 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 3/1 3/1 -48/24 48/24 4/1 0/1 -3/1 3/1 4/1 4/1 -48/24 48/24 5/1 2/1 -9 --1/1 2/1 -0/1 0/1 -0/1 4/1 -1/1 1/1 -48/24 48/24 -3/1 3/1 -4/1 0/1 -4/1 4/1 -5/1 2/1 -3 -1/1 1/1 -48/24 48/24 -3/1 3/1 -1 -16 -0/1 0/1 1/1 1/1 -0/1 0/1 1/1 1/1 -1/1 1/1 48/24 48/24 -1/1 1/1 48/24 48/24 -1/1 1/1 48/24 48/24 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 3/1 3/1 -48/24 48/24 3/1 3/1 -48/24 48/24 3/1 3/1 -48/24 48/24 4/1 0/1 -48/24 48/24 4/1 0/1 -3/1 3/1 4/1 4/1 -3/1 3/1 4/1 4/1 -48/24 48/24 5/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test69.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test69.txt deleted file mode 100644 index cc0683ad7ad..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test69.txt +++ /dev/null @@ -1,38 +0,0 @@ -8 -1 1 0 2 -1 1 0 1 -0 0 1 1 -3 2 2 1 -2 1 3 1 -3 0 2 1 -1 1 2 1 -2 1 1 1 -7 -0/1 0/1 1/1 1/1 -1/1 1/1 0/1 1/1 -1/1 1/1 0/1 2/1 -1/1 1/1 2/1 1/1 -3/1 0/1 2/1 1/1 -2/1 1/1 3/1 1/1 -3/1 2/1 2/1 1/1 -8 -0/1 0/1 -0/1 1/1 -0/1 2/1 -1/1 1/1 -2/1 1/1 -3/1 0/1 -3/1 1/1 -3/1 2/1 -0 -1 -8 -0/1 0/1 1/1 1/1 -1/1 1/1 0/1 1/1 -1/1 1/1 0/1 2/1 -1/1 1/1 2/1 1/1 -2/1 1/1 1/1 1/1 -3/1 0/1 2/1 1/1 -2/1 1/1 3/1 1/1 -3/1 2/1 2/1 1/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test70.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test70.txt deleted file mode 100644 index c6b68c4163b..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test70.txt +++ /dev/null @@ -1,41 +0,0 @@ -5 -3 0 4 0 -4 0 7 0 -2 0 5 0 -1 0 4 0 -0 0 3 0 -6 -0/1 0/1 1/1 0/1 -1/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 5/1 0/1 -5/1 0/1 7/1 0/1 -7 -0/1 0/1 -1/1 0/1 -2/1 0/1 -3/1 0/1 -4/1 0/1 -5/1 0/1 -7/1 0/1 -5 -1/1 0/1 -2/1 0/1 -3/1 0/1 -4/1 0/1 -5/1 0/1 -1 -12 -0/1 0/1 1/1 0/1 -1/1 0/1 2/1 0/1 -1/1 0/1 2/1 0/1 -2/1 0/1 3/1 0/1 -2/1 0/1 3/1 0/1 -2/1 0/1 3/1 0/1 -3/1 0/1 4/1 0/1 -3/1 0/1 4/1 0/1 -3/1 0/1 4/1 0/1 -4/1 0/1 5/1 0/1 -4/1 0/1 5/1 0/1 -5/1 0/1 7/1 0/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test71.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test71.txt deleted file mode 100644 index 7ac58ab7917..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test71.txt +++ /dev/null @@ -1,29 +0,0 @@ -3 -2 4 2 0 -0 2 4 2 -0 2 4 2 -4 -2/1 2/1 2/1 0/1 -0/1 2/1 2/1 2/1 -2/1 4/1 2/1 2/1 -2/1 2/1 4/1 2/1 -5 -0/1 2/1 -2/1 0/1 -32/16 32/16 -2/1 4/1 -4/1 2/1 -1 -32/16 32/16 -1 -6 -2/1 2/1 2/1 0/1 -0/1 2/1 2/1 2/1 -0/1 2/1 2/1 2/1 -2/1 4/1 2/1 2/1 -2/1 2/1 4/1 2/1 -2/1 2/1 4/1 2/1 - - - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test72.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test72.txt deleted file mode 100644 index c231c7b4f77..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test72.txt +++ /dev/null @@ -1,81 +0,0 @@ -13 -0 0 4 4 -0 0 4 4 -0 4 4 0 -0 4 4 0 --1 2 1 2 -5 4 9 0 -5 4 9 0 -5 0 9 4 -4 2 6 2 -9 2 11 2 -10 4 14 0 -10 0 14 4 -10 0 14 4 -15 --1/1 2/1 1/1 2/1 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -4/1 2/1 6/1 2/1 -5/1 0/1 224/32 64/32 -5/1 4/1 224/32 64/32 -224/32 64/32 9/1 0/1 -224/32 64/32 9/1 4/1 -9/1 2/1 11/1 2/1 -10/1 0/1 384/32 64/32 -10/1 4/1 384/32 64/32 -384/32 64/32 14/1 0/1 -384/32 64/32 14/1 4/1 -21 --1/1 2/1 -0/1 0/1 -0/1 4/1 -1/1 2/1 -64/32 64/32 -4/1 0/1 -4/1 2/1 -4/1 4/1 -5/1 0/1 -5/1 4/1 -6/1 2/1 -224/32 64/32 -9/1 0/1 -9/1 2/1 -9/1 4/1 -10/1 0/1 -10/1 4/1 -11/1 2/1 -384/32 64/32 -14/1 0/1 -14/1 4/1 -3 -64/32 64/32 -224/32 64/32 -384/32 64/32 -1 -23 --1/1 2/1 1/1 2/1 -0/1 0/1 64/32 64/32 -0/1 0/1 64/32 64/32 -0/1 4/1 64/32 64/32 -0/1 4/1 64/32 64/32 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 0/1 -64/32 64/32 4/1 4/1 -64/32 64/32 4/1 4/1 -4/1 2/1 6/1 2/1 -5/1 0/1 224/32 64/32 -5/1 4/1 224/32 64/32 -5/1 4/1 224/32 64/32 -224/32 64/32 9/1 0/1 -224/32 64/32 9/1 0/1 -224/32 64/32 9/1 4/1 -9/1 2/1 11/1 2/1 -10/1 0/1 384/32 64/32 -10/1 0/1 384/32 64/32 -10/1 4/1 384/32 64/32 -384/32 64/32 14/1 0/1 -384/32 64/32 14/1 4/1 -384/32 64/32 14/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test73.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test73.txt deleted file mode 100644 index 0a95db80fac..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test73.txt +++ /dev/null @@ -1,21 +0,0 @@ -2 -3 0 3 4 -3 2 3 7 -3 -3/1 0/1 3/1 2/1 -3/1 2/1 3/1 4/1 -3/1 4/1 3/1 7/1 -4 -3/1 0/1 -3/1 2/1 -3/1 4/1 -3/1 7/1 -2 -3/1 2/1 -3/1 4/1 -1 -4 -3/1 0/1 3/1 2/1 -3/1 2/1 3/1 4/1 -3/1 2/1 3/1 4/1 -3/1 4/1 3/1 7/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test74.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test74.txt deleted file mode 100644 index 4cc18dcb021..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test74.txt +++ /dev/null @@ -1,33 +0,0 @@ -3 -2 7 2 2 -2 4 2 0 -0 3 4 3 -6 -2/1 2/1 2/1 0/1 -2/1 2/1 2/1 3/1 -0/1 3/1 2/1 3/1 -2/1 3/1 2/1 4/1 -2/1 7/1 2/1 4/1 -2/1 3/1 4/1 3/1 -7 -0/1 3/1 -2/1 0/1 -2/1 2/1 -32/16 48/16 -2/1 4/1 -2/1 7/1 -4/1 3/1 -3 -2/1 2/1 -32/16 48/16 -2/1 4/1 -1 -8 -2/1 2/1 2/1 0/1 -2/1 2/1 2/1 3/1 -2/1 2/1 2/1 3/1 -0/1 3/1 2/1 3/1 -2/1 3/1 2/1 4/1 -2/1 3/1 2/1 4/1 -2/1 7/1 2/1 4/1 -2/1 3/1 4/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test75.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test75.txt deleted file mode 100644 index 50fe97fa383..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test75.txt +++ /dev/null @@ -1,25 +0,0 @@ -3 -2 4 2 0 -2 4 2 0 -0 2 4 2 -4 -2/1 0/1 2/1 2/1 -0/1 2/1 2/1 2/1 -2/1 2/1 2/1 4/1 -2/1 2/1 4/1 2/1 -5 -0/1 2/1 -2/1 0/1 -32/16 32/16 -2/1 4/1 -4/1 2/1 -1 -32/16 32/16 -1 -6 -2/1 0/1 2/1 2/1 -2/1 0/1 2/1 2/1 -0/1 2/1 2/1 2/1 -2/1 2/1 2/1 4/1 -2/1 2/1 2/1 4/1 -2/1 2/1 4/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test76.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test76.txt deleted file mode 100644 index e33576bb815..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test76.txt +++ /dev/null @@ -1,33 +0,0 @@ -3 -2 4 2 0 -4 4 4 0 -0 2 6 2 -7 -2/1 2/1 2/1 0/1 -0/1 2/1 2/1 2/1 -2/1 4/1 2/1 2/1 -4/1 2/1 4/1 0/1 -2/1 2/1 4/1 2/1 -4/1 4/1 4/1 2/1 -4/1 2/1 6/1 2/1 -8 -0/1 2/1 -2/1 0/1 -48/24 48/24 -2/1 4/1 -4/1 0/1 -96/24 48/24 -4/1 4/1 -6/1 2/1 -2 -48/24 48/24 -96/24 48/24 -1 -7 -2/1 2/1 2/1 0/1 -0/1 2/1 2/1 2/1 -2/1 4/1 2/1 2/1 -4/1 2/1 4/1 0/1 -2/1 2/1 4/1 2/1 -4/1 4/1 4/1 2/1 -4/1 2/1 6/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test77.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test77.txt deleted file mode 100644 index 52ed98b070e..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test77.txt +++ /dev/null @@ -1,18 +0,0 @@ -2 -0 3 0 0 -0 2 0 0 -2 -0/1 2/1 0/1 0/1 -0/1 3/1 0/1 2/1 -3 -0/1 0/1 -0/1 2/1 -0/1 3/1 -1 -0/1 2/1 -1 -3 -0/1 2/1 0/1 0/1 -0/1 2/1 0/1 0/1 -0/1 3/1 0/1 2/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test78.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test78.txt deleted file mode 100644 index 194577128a5..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test78.txt +++ /dev/null @@ -1,64 +0,0 @@ -6 -1 5 1 0 -1 5 1 2 -4 0 4 4 -4 2 4 4 -0 3 5 3 -0 1 5 1 -14 -1/1 1/1 1/1 0/1 -0/1 1/1 1/1 1/1 -1/1 2/1 1/1 1/1 -1/1 2/1 1/1 3/1 -0/1 3/1 1/1 3/1 -1/1 3/1 1/1 5/1 -4/1 0/1 4/1 1/1 -1/1 1/1 4/1 1/1 -4/1 1/1 4/1 2/1 -4/1 2/1 4/1 3/1 -1/1 3/1 4/1 3/1 -4/1 3/1 4/1 4/1 -4/1 1/1 5/1 1/1 -4/1 3/1 5/1 3/1 -14 -0/1 1/1 -0/1 3/1 -1/1 0/1 -25/25 25/25 -1/1 2/1 -25/25 75/25 -1/1 5/1 -4/1 0/1 -80/20 20/20 -4/1 2/1 -80/20 60/20 -4/1 4/1 -5/1 1/1 -5/1 3/1 -6 -25/25 25/25 -1/1 2/1 -25/25 75/25 -80/20 20/20 -4/1 2/1 -80/20 60/20 -2 -18 -1/1 1/1 1/1 0/1 -0/1 1/1 1/1 1/1 -1/1 2/1 1/1 1/1 -1/1 2/1 1/1 3/1 -1/1 2/1 1/1 3/1 -0/1 3/1 1/1 3/1 -1/1 3/1 1/1 5/1 -1/1 3/1 1/1 5/1 -4/1 0/1 4/1 1/1 -1/1 1/1 4/1 1/1 -4/1 1/1 4/1 2/1 -4/1 2/1 4/1 3/1 -4/1 2/1 4/1 3/1 -1/1 3/1 4/1 3/1 -4/1 3/1 4/1 4/1 -4/1 3/1 4/1 4/1 -4/1 1/1 5/1 1/1 -4/1 3/1 5/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test79.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test79.txt deleted file mode 100644 index dc9b76b1284..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test79.txt +++ /dev/null @@ -1,34 +0,0 @@ -4 -0 5 0 0 -0 5 0 2 -0 3 3 3 -0 1 3 1 -6 -0/1 1/1 0/1 0/1 -0/1 2/1 0/1 1/1 -0/1 2/1 0/1 3/1 -0/1 3/1 0/1 5/1 -0/1 1/1 3/1 1/1 -0/1 3/1 3/1 3/1 -7 -0/1 0/1 -0/1 1/1 -0/1 2/1 -0/1 3/1 -0/1 5/1 -3/1 1/1 -3/1 3/1 -3 -0/1 1/1 -0/1 2/1 -0/1 3/1 -1 -8 -0/1 1/1 0/1 0/1 -0/1 2/1 0/1 1/1 -0/1 2/1 0/1 3/1 -0/1 2/1 0/1 3/1 -0/1 3/1 0/1 5/1 -0/1 3/1 0/1 5/1 -0/1 1/1 3/1 1/1 -0/1 3/1 3/1 3/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test80.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test80.txt deleted file mode 100644 index 57300a903c3..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test80.txt +++ /dev/null @@ -1,32 +0,0 @@ -8 -0 4 4 4 -0 4 4 4 -4 4 4 0 -4 4 4 0 -0 0 4 0 -0 0 4 0 -0 4 0 0 -0 4 0 0 -4 -0/1 0/1 0/1 4/1 -0/1 0/1 4/1 0/1 -4/1 0/1 4/1 4/1 -0/1 4/1 4/1 4/1 -4 -0/1 0/1 -0/1 4/1 -4/1 0/1 -4/1 4/1 -0 -2 -8 -0/1 0/1 0/1 4/1 -0/1 0/1 0/1 4/1 -0/1 0/1 4/1 0/1 -0/1 0/1 4/1 0/1 -4/1 0/1 4/1 4/1 -4/1 0/1 4/1 4/1 -0/1 4/1 4/1 4/1 -0/1 4/1 4/1 4/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test81.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test81.txt deleted file mode 100644 index 4c27222b415..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test81.txt +++ /dev/null @@ -1,50 +0,0 @@ -6 -0 6 6 0 -0 2 6 8 -1 1 6 1 -1 1 6 1 -1 7 6 7 -1 7 6 7 -10 -0/1 2/1 144/72 288/72 -0/1 6/1 144/72 288/72 -1/1 1/1 150/30 30/30 -144/72 288/72 150/30 30/30 -144/72 288/72 150/30 210/30 -1/1 7/1 150/30 210/30 -150/30 30/30 6/1 0/1 -150/30 30/30 6/1 1/1 -150/30 210/30 6/1 7/1 -150/30 210/30 6/1 8/1 -11 -0/1 2/1 -0/1 6/1 -1/1 1/1 -1/1 7/1 -144/72 288/72 -150/30 30/30 -150/30 210/30 -6/1 0/1 -6/1 1/1 -6/1 7/1 -6/1 8/1 -3 -144/72 288/72 -150/30 30/30 -150/30 210/30 -1 -14 -0/1 2/1 144/72 288/72 -0/1 6/1 144/72 288/72 -1/1 1/1 150/30 30/30 -1/1 1/1 150/30 30/30 -144/72 288/72 150/30 30/30 -144/72 288/72 150/30 210/30 -1/1 7/1 150/30 210/30 -1/1 7/1 150/30 210/30 -150/30 30/30 6/1 0/1 -150/30 30/30 6/1 1/1 -150/30 30/30 6/1 1/1 -150/30 210/30 6/1 7/1 -150/30 210/30 6/1 7/1 -150/30 210/30 6/1 8/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test82.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test82.txt deleted file mode 100644 index e4dbeb073c2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test82.txt +++ /dev/null @@ -1,25 +0,0 @@ -3 -0 4 4 0 -0 4 4 0 --1 2 5 2 -4 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 4/1 0/1 -48/24 48/24 5/1 2/1 -5 --1/1 2/1 -0/1 4/1 -48/24 48/24 -4/1 0/1 -5/1 2/1 -1 -48/24 48/24 -1 -6 --1/1 2/1 48/24 48/24 -0/1 4/1 48/24 48/24 -0/1 4/1 48/24 48/24 -48/24 48/24 4/1 0/1 -48/24 48/24 4/1 0/1 -48/24 48/24 5/1 2/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test83.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test83.txt deleted file mode 100644 index 67a74747e52..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test83.txt +++ /dev/null @@ -1,30 +0,0 @@ -5 -0 3 5 5 -0 1 7 0 -0 3 5 1 -0 2 5 1 -0 4 5 5 -5 -0/1 2/1 5/1 1/1 -0/1 3/1 5/1 1/1 -0/1 3/1 5/1 5/1 -0/1 4/1 5/1 5/1 -0/1 1/1 7/1 0/1 -7 -0/1 1/1 -0/1 2/1 -0/1 3/1 -0/1 4/1 -5/1 1/1 -5/1 5/1 -7/1 0/1 -0 -1 -5 -0/1 2/1 5/1 1/1 -0/1 3/1 5/1 1/1 -0/1 3/1 5/1 5/1 -0/1 4/1 5/1 5/1 -0/1 1/1 7/1 0/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test84.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test84.txt deleted file mode 100644 index 419bf09b9eb..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test84.txt +++ /dev/null @@ -1,30 +0,0 @@ -4 -0 4 6 0 -0 0 6 4 -3 2 5 4 -3 2 5 0 -6 -0/1 0/1 3/1 2/1 -0/1 4/1 3/1 2/1 -3/1 2/1 5/1 0/1 -3/1 2/1 5/1 4/1 -3/1 2/1 6/1 0/1 -3/1 2/1 6/1 4/1 -7 -0/1 0/1 -0/1 4/1 -3/1 2/1 -5/1 0/1 -5/1 4/1 -6/1 0/1 -6/1 4/1 -1 -3/1 2/1 -1 -6 -0/1 0/1 3/1 2/1 -0/1 4/1 3/1 2/1 -3/1 2/1 5/1 0/1 -3/1 2/1 5/1 4/1 -3/1 2/1 6/1 0/1 -3/1 2/1 6/1 4/1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test85.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test85.txt deleted file mode 100644 index 79d9d1bd8be..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test85.txt +++ /dev/null @@ -1,26 +0,0 @@ -3 -0 0 6 0 -2 0 4 3 -2 0 5 2 -4 -0/1 0/1 2/1 0/1 -2/1 0/1 4/1 3/1 -2/1 0/1 5/1 2/1 -2/1 0/1 6/1 0/1 -5 -0/1 0/1 -2/1 0/1 -4/1 3/1 -5/1 2/1 -6/1 0/1 -1 -2/1 0/1 -1 -4 -0/1 0/1 2/1 0/1 -2/1 0/1 4/1 3/1 -2/1 0/1 5/1 2/1 -2/1 0/1 6/1 0/1 - - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test86.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test86.txt deleted file mode 100644 index bb28d85698c..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test86.txt +++ /dev/null @@ -1,25 +0,0 @@ -3 -0 3 6 3 -3 3 6 1 -3 3 6 0 -4 -0/1 3/1 3/1 3/1 -3/1 3/1 6/1 0/1 -3/1 3/1 6/1 1/1 -3/1 3/1 6/1 3/1 -5 -0/1 3/1 -3/1 3/1 -6/1 0/1 -6/1 1/1 -6/1 3/1 -1 -3/1 3/1 -1 -4 -0/1 3/1 3/1 3/1 -3/1 3/1 6/1 0/1 -3/1 3/1 6/1 1/1 -3/1 3/1 6/1 3/1 - - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test87.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test87.txt deleted file mode 100644 index 2d84b028ae6..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test87.txt +++ /dev/null @@ -1,24 +0,0 @@ -3 -7 3 0 3 -3 3 5 0 -3 3 6 6 -4 -3/1 3/1 0/1 3/1 -3/1 3/1 5/1 0/1 -3/1 3/1 6/1 6/1 -7/1 3/1 3/1 3/1 -5 -0/1 3/1 -3/1 3/1 -5/1 0/1 -6/1 6/1 -7/1 3/1 -1 -3/1 3/1 -1 -4 -3/1 3/1 0/1 3/1 -3/1 3/1 5/1 0/1 -3/1 3/1 6/1 6/1 -7/1 3/1 3/1 3/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test88.txt b/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test88.txt deleted file mode 100644 index 911adaeaab2..00000000000 --- a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments_tight/test88.txt +++ /dev/null @@ -1,27 +0,0 @@ -3 -0 4 7 4 -1 0 5 8 -3 4 6 6 -5 -1/1 0/1 3/1 4/1 -0/1 4/1 3/1 4/1 -3/1 4/1 5/1 8/1 -3/1 4/1 6/1 6/1 -3/1 4/1 7/1 4/1 -6 -0/1 4/1 -1/1 0/1 -3/1 4/1 -5/1 8/1 -6/1 6/1 -7/1 4/1 -1 -3/1 4/1 -1 -5 -1/1 0/1 3/1 4/1 -0/1 4/1 3/1 4/1 -3/1 4/1 5/1 8/1 -3/1 4/1 6/1 6/1 -3/1 4/1 7/1 4/1 - diff --git a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base index c6c8af71e9a..2612c02c50f 100755 --- a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base +++ b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_base @@ -78,12 +78,11 @@ compile() compile_and_run() { - echo "---$1---" # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE SUBCURVES="" run $1 $2 $3 $4 SUBCURVES="subcurves" @@ -93,14 +92,13 @@ compile_and_run() fi eval "2>&1 ${MAKE_CMD} CGAL_MAKEFILE=$CGAL_MAKEFILE clean > /dev/null " - } clean_tests() { if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then # - # The clean target generated by CMake under cygwin + # The clean target generated by CMake under cygwin # always fails for some reason # if ! ( uname | grep -q "CYGWIN" ) ; then @@ -117,7 +115,7 @@ compile_and_run_sweep() # running general test if compile $1 $2 $3 ; then - echo " compilation of $1 succeeded" >> $ERRORFILE + echo " compilation of $1 succeeded" >> $ERRORFILE run $1 $2 $3 $4 else echo " ERROR: compilation of $1 failed" >> $ERRORFILE @@ -134,7 +132,7 @@ run() for DATAFILE in ${datafiles} do if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi @@ -158,7 +156,6 @@ run() echo " ERROR: could not execute $1 $DATAFILE $SUBCURVES" >> $ERRORFILE fi done - } run_io() @@ -178,20 +175,20 @@ run_io() for DATAFILE in ${datafiles} do - + if [ -d $DATAFILE ]; then - echo "$DATEFILE is a directory" + echo "$DATEFILE is a directory" continue fi - + IOFILE="${iofiles}`basename ${DATAFILE}`_${SUFFIO}" echo $IOFILE - + if [ -f $1 ] ; then rm -f arr.txt - + DATANAME=`basename $DATAFILE` - IONAME=`basename $IOFILE` + IONAME=`basename $IOFILE` OUTPUTFILE=ProgramOutput.$3.$1.$DATANAME.$PLATFORM.$2 rm -f $OUTPUTFILE @@ -246,6 +243,7 @@ TRAP=1 # Trapezoidal decomposition NAIVE=2 WALK=3 - #run the test for new sweep +#run the test for new sweep (compile_and_run_sweep test_sweep $NAIVE $CGAL_SEGMENT_TRAITS "DATA/segments_tight") (compile_and_run_sweep test_sweep_conic $NAIVE $CGAL_CONIC_TRAITS "DATA/conics") +(compile_and_run_sweep test_sweep $NAIVE $CGAL_POLYLINE_TRAITS "DATA/polylines diff --git a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_with_cmake b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_with_cmake index 8c72a52e332..60483af61d6 100755 --- a/Surface_sweep_2/test/Surface_sweep_2/cgal_test_with_cmake +++ b/Surface_sweep_2/test/Surface_sweep_2/cgal_test_with_cmake @@ -1,4 +1,3 @@ #! /bin/bash ./cgal_test_base -cmake - diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con01.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con01.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con01.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con01.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con02.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con02.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con02.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con02.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con03.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con03.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con03.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con03.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con04.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con04.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con04.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con04.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con05.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con05.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con05.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con05.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con06.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con06.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con06.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con06.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con07.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con07.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con07.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con07.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con08.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con08.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con08.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con08.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con09.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con09.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con09.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con09.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con10.txt b/Surface_sweep_2/test/Surface_sweep_2/data/conics/con10.txt similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/conics/con10.txt rename to Surface_sweep_2/test/Surface_sweep_2/data/conics/con10.txt diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/big_overlap b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/big_overlap rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap.txt b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap.txt new file mode 100644 index 00000000000..93d9d322792 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap.txt @@ -0,0 +1,30 @@ +# No. of input polylines followed by polylines +2 +5 0 0 20 0 30 20 40 0 60 0 +6 10 10 25 10 30 20 40 0 50 0 50 -10 +# No. of output polylines followed by polylines +5 +3 0 0 20 0 25 10 +2 10 10 25 10 +2 50 0 50 -10 +4 25 10 30 20 40 0 50 0 +2 50 0 60 0 +# No. of output points followed by points +6 +0 0 +10 10 +25 10 +50 -10 +50 0 +60 0 +# No. of intersection points followed by points +1 +50 0 +# No. of output polylines with overlaps followed by polylines +6 +3 0 0 20 0 25 10 +2 10 10 25 10 +2 50 0 50 -10 +4 25 10 30 20 40 0 50 0 +4 25 10 30 20 40 0 50 0 +2 50 0 60 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/big_overlap2 b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap2 similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/big_overlap2 rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/big_overlap2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/closed_polyline b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/closed_polyline similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/closed_polyline rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/closed_polyline diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/collinears b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/collinears similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/collinears rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/collinears diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/edge_vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/edge_vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/edge_vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/edge_vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/endpoint_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/endpoint_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/endpoint_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/endpoint_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/partial_overlap b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/partial_overlap similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/partial_overlap rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/partial_overlap diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/partial_overlap2 b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/partial_overlap2 similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/partial_overlap2 rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/partial_overlap2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/segment_overlap b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/segment_overlap similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/segment_overlap rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/segment_overlap diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/self_cut b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/self_cut similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/self_cut rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/self_cut diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/simple_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/simple_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/simple_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/simple_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/polylines/test00.txt b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/test00.txt new file mode 100644 index 00000000000..d2ae0552ae7 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/test00.txt @@ -0,0 +1,55 @@ +# No. of input polylines followed by polylines +4 +3 0 1 1 0 4 0 +3 1 1 2 0 8 0 +3 1 2 3 0 6 0 +3 4 1 5 0 7 0 +# No. of output polylines followed by polylines +10 +3 0 1 1 0 2 0 +2 1 1 2 0 +2 2 0 3 0 +2 1 2 3 0 +2 3 0 4 0 +2 4 0 5 0 +2 4 1 5 0 +2 5 0 6 0 +2 6 0 7 0 +2 7 0 8 0 +# No. of output points followed by points +11 +0 1 +1 1 +1 2 +2 0 +3 0 +4 0 +4 1 +5 0 +6 0 +7 0 +8 0 +# No. of intersection points followed by points +3 +4 0 +6 0 +7 0 +# No. of output polylines with overlaps followed by polylines +17 +3 0 1 1 0 2 0 +2 1 1 2 0 +2 2 0 3 0 +2 2 0 3 0 +2 1 2 3 0 +2 3 0 4 0 +2 3 0 4 0 +2 3 0 4 0 +2 4 0 5 0 +2 4 0 5 0 +2 4 1 5 0 +2 5 0 6 0 +2 5 0 6 0 +2 5 0 6 0 +2 6 0 7 0 +2 6 0 7 0 +2 7 0 8 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/total_overlap b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/total_overlap similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/total_overlap rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/total_overlap diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/triangle b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/triangle similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/triangle rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/triangle diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/two_segments b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/two_segments similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/two_segments rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/two_segments diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/vertical_segment b/Surface_sweep_2/test/Surface_sweep_2/data/polylines/vertical_segment similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/polylines/vertical_segment rename to Surface_sweep_2/test/Surface_sweep_2/data/polylines/vertical_segment diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/edge_vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/edge_vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/edge_vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/edge_vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/segs_and_circles b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/segs_and_circles similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/segs_and_circles rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/segs_and_circles diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/simple_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/simple_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/simple_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/simple_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/triangle b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/triangle similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/triangle rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/triangle diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/two_segments b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/two_segments similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/two_segments rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/two_segments diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/vertical_segment b/Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/vertical_segment similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segment_circles/vertical_segment rename to Surface_sweep_2/test/Surface_sweep_2/data/segment_circles/vertical_segment diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/H_degeneracy b/Surface_sweep_2/test/Surface_sweep_2/data/segments/H_degeneracy similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/H_degeneracy rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/H_degeneracy diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/edge_vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segments/edge_vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/edge_vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/edge_vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/simple_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segments/simple_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/simple_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/simple_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/star_4 b/Surface_sweep_2/test/Surface_sweep_2/data/segments/star_4 similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/star_4 rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/star_4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/triangle b/Surface_sweep_2/test/Surface_sweep_2/data/segments/triangle similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/triangle rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/triangle diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/two_segments b/Surface_sweep_2/test/Surface_sweep_2/data/segments/two_segments similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/two_segments rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/two_segments diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/vertex_intersection b/Surface_sweep_2/test/Surface_sweep_2/data/segments/vertex_intersection similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/vertex_intersection rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/vertex_intersection diff --git a/Surface_sweep_2/test/Surface_sweep_2/DATA/segments/vertical_segment b/Surface_sweep_2/test/Surface_sweep_2/data/segments/vertical_segment similarity index 100% rename from Surface_sweep_2/test/Surface_sweep_2/DATA/segments/vertical_segment rename to Surface_sweep_2/test/Surface_sweep_2/data/segments/vertical_segment diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test00.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test00.txt new file mode 100644 index 00000000000..7d48df57242 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test00.txt @@ -0,0 +1,27 @@ +# No. of input segments followed by segments +2 +-1 1 1 -1 +1 1 -1 -1 +# No. of output segments followed by segments +4 +0 0 -1 -1 +-1 1 0 0 +0 0 1 -1 +1 1 0 0 +# No. of output points followed by points +5 +-1 -1 +-1 1 +0 0 +1 -1 +1 1 +# No. of intersection points followed by points +1 +0 0 +# No of faces: 1 +# No. of output segments with overlaps followed by segments +4 +0 0 -1 -1 +-1 1 0 0 +0 0 1 -1 +1 1 0 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test01.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test01.txt new file mode 100644 index 00000000000..b5e69de0242 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test01.txt @@ -0,0 +1,50 @@ +4 +4 6 3 0 +1 3 5 1 +5 0 1 2 +1 0 3 4 +12 +1 0 36/20 32/20 +36/20 32/20 1 2 +36/20 32/20 44/20 48/20 +1 3 44/20 48/20 +44/20 48/20 3 4 +82/26 24/26 3 0 +82/26 24/26 36/20 32/20 +86/26 48/26 82/26 24/26 +44/20 48/20 86/26 48/26 +4 6 86/26 48/26 +5 0 82/26 24/26 +86/26 48/26 5 1 +12 +1 0 +1 2 +1 3 +36/20 32/20 +44/20 48/20 +3 0 +3 4 +82/26 24/26 +86/26 48/26 +4 6 +5 0 +5 1 +4 +36/20 32/20 +44/20 48/20 +82/26 24/26 +86/26 48/26 +# No. of faces: 2 +12 +1 0 36/20 32/20 +36/20 32/20 1 2 +36/20 32/20 44/20 48/20 +1 3 44/20 48/20 +44/20 48/20 3 4 +82/26 24/26 3 0 +82/26 24/26 36/20 32/20 +86/26 48/26 82/26 24/26 +44/20 48/20 86/26 48/26 +4 6 86/26 48/26 +5 0 82/26 24/26 +86/26 48/26 5 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test02.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test02.txt new file mode 100644 index 00000000000..5c505dbd01f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test02.txt @@ -0,0 +1,33 @@ +3 +0 6 9 5 +7 4 1 3 +5 2 3 7 +7 +0 6 153/43 241/43 +153/43 241/43 3 7 +140/32 114/32 1 3 +140/32 114/32 153/43 241/43 +5 2 140/32 114/32 +7 4 140/32 114/32 +153/43 241/43 9 5 +8 +0 6 +1 3 +3 7 +153/43 241/43 +140/32 114/32 +5 2 +7 4 +9 5 +2 +153/43 241/43 +140/32 114/32 +# No. of faces: 1 +7 +0 6 153/43 241/43 +153/43 241/43 3 7 +140/32 114/32 1 3 +140/32 114/32 153/43 241/43 +5 2 140/32 114/32 +7 4 140/32 114/32 +153/43 241/43 9 5 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test03.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test03.txt new file mode 100644 index 00000000000..15cc231bb28 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test03.txt @@ -0,0 +1,21 @@ +3 +1 1 5 1 +1 2 5 2 +1 3 5 3 +3 +1 1 5 1 +1 2 5 2 +1 3 5 3 +6 +1 1 +1 2 +1 3 +5 1 +5 2 +5 3 +0 +# No. of faces: 1 +3 +1 1 5 1 +1 2 5 2 +1 3 5 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test04.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test04.txt new file mode 100644 index 00000000000..8ea66e0df9f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test04.txt @@ -0,0 +1,33 @@ +3 +1 4 4 1 +2 2 9 2 +3 7 8 1 +7 +2 2 63/21 42/21 +1 4 63/21 42/21 +63/21 42/21 4 1 +63/21 42/21 301/42 84/42 +3 7 301/42 84/42 +301/42 84/42 8 1 +301/42 84/42 9 2 +8 +1 4 +2 2 +63/21 42/21 +3 7 +4 1 +301/42 84/42 +8 1 +9 2 +2 +63/21 42/21 +301/42 84/42 +# No. of faces: 1 +7 +2 2 63/21 42/21 +1 4 63/21 42/21 +63/21 42/21 4 1 +63/21 42/21 301/42 84/42 +3 7 301/42 84/42 +301/42 84/42 8 1 +301/42 84/42 9 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test05.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test05.txt new file mode 100644 index 00000000000..187550ca704 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test05.txt @@ -0,0 +1,39 @@ +3 +2 7 15 2 +3 2 10 6 +1 3 14 3 +9 +3 2 247/52 156/52 +1 3 247/52 156/52 +247/52 156/52 681/87 414/87 +2 7 681/87 414/87 +681/87 414/87 10 6 +247/52 156/52 806/65 195/65 +681/87 414/87 806/65 195/65 +806/65 195/65 14 3 +806/65 195/65 15 2 +9 +1 3 +2 7 +3 2 +247/52 156/52 +681/87 414/87 +10 6 +806/65 195/65 +14 3 +15 2 +3 +247/52 156/52 +681/87 414/87 +806/65 195/65 +# No. of faces: 2 +9 +3 2 247/52 156/52 +1 3 247/52 156/52 +247/52 156/52 681/87 414/87 +2 7 681/87 414/87 +681/87 414/87 10 6 +247/52 156/52 806/65 195/65 +681/87 414/87 806/65 195/65 +806/65 195/65 14 3 +806/65 195/65 15 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test06.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test06.txt new file mode 100644 index 00000000000..2f9455a5a35 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test06.txt @@ -0,0 +1,60 @@ +6 +12 4 9 4 +12 3 11 3 +14 1 8 6 +7 6 1 1 +6 2 3 7 +5 7 3 5 +14 +60/16 92/16 3 5 +60/16 92/16 3 7 +213/45 185/45 1 1 +213/45 185/45 60/16 92/16 +5 7 60/16 92/16 +6 2 213/45 185/45 +7 6 213/45 185/45 +156/15 4 9 4 +156/15 4 8 6 +58/5 3 11 3 +58/5 3 156/15 4 +12 3 58/5 3 +12 4 156/15 4 +14 1 58/5 3 +16 +1 1 +3 5 +3 7 +60/16 92/16 +213/45 185/45 +5 7 +6 2 +7 6 +8 6 +9 4 +156/15 4 +11 3 +58/5 3 +12 3 +12 4 +14 1 +4 +60/16 92/16 +213/45 185/45 +156/15 4 +58/5 3 +# No. of faces: 1 +14 +60/16 92/16 3 5 +60/16 92/16 3 7 +213/45 185/45 1 1 +213/45 185/45 60/16 92/16 +5 7 60/16 92/16 +6 2 213/45 185/45 +7 6 213/45 185/45 +156/15 4 9 4 +156/15 4 8 6 +58/5 3 11 3 +58/5 3 156/15 4 +12 3 58/5 3 +12 4 156/15 4 +14 1 58/5 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test07.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test07.txt new file mode 100644 index 00000000000..b95f6e3998c --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test07.txt @@ -0,0 +1,22 @@ +4 +5 5 2 3 +7 1 2 3 +7 1 9 4 +5 5 9 4 +4 +5 5 2 3 +7 1 2 3 +7 1 9 4 +5 5 9 4 +4 +2 3 +5 5 +7 1 +9 4 +0 +# No. of faces: 2 +4 +5 5 2 3 +7 1 2 3 +7 1 9 4 +5 5 9 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test08.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test08.txt new file mode 100644 index 00000000000..10db8ae63ea --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test08.txt @@ -0,0 +1,19 @@ +2 +1 2 4 2 +3 0 5 4 +3 +3 0 4 2 +1 2 4 2 +4 2 5 4 +4 +1 2 +3 0 +4 2 +5 4 +1 +4 2 +# No. of faces: 1 +3 +3 0 4 2 +1 2 4 2 +4 2 5 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test09.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test09.txt new file mode 100644 index 00000000000..8e0635e3ca6 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test09.txt @@ -0,0 +1,19 @@ +2 +1 1 7 1 +3 1 5 4 +3 +1 1 3 1 +3 1 5 4 +3 1 7 1 +4 +1 1 +3 1 +5 4 +7 1 +1 +3 1 +# No. of faces: 1 +3 +1 1 3 1 +3 1 5 4 +3 1 7 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test10.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test10.txt new file mode 100644 index 00000000000..47e21732fd6 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test10.txt @@ -0,0 +1,19 @@ +2 +6 1 1 1 +4 -2 3 1 +3 +3 1 1 1 +4 -2 3 1 +6 1 3 1 +4 +1 1 +3 1 +4 -2 +6 1 +1 +3 1 +# No. of faces: 1 +3 +3 1 1 1 +4 -2 3 1 +6 1 3 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test11.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test11.txt new file mode 100644 index 00000000000..e389d4a7db7 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test11.txt @@ -0,0 +1,19 @@ +2 +1 1 3 5 +5 3 2 3 +3 +1 1 2 3 +2 3 3 5 +5 3 2 3 +4 +1 1 +2 3 +3 5 +5 3 +1 +2 3 +# No. of faces: 1 +3 +1 1 2 3 +2 3 3 5 +5 3 2 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test12.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test12.txt new file mode 100644 index 00000000000..4710b27995d --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test12.txt @@ -0,0 +1,27 @@ +3 +2 4 4 1 +7 1 1 1 +1 4 5 4 +5 +1 4 2 4 +4 1 1 1 +2 4 4 1 +2 4 5 4 +7 1 4 1 +6 +1 1 +1 4 +2 4 +4 1 +5 4 +7 1 +2 +2 4 +4 1 +# No. of faces: 1 +5 +1 4 2 4 +4 1 1 1 +2 4 4 1 +2 4 5 4 +7 1 4 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test13.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test13.txt new file mode 100644 index 00000000000..3fad0655447 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test13.txt @@ -0,0 +1,27 @@ +3 +0 2 4 2 +1 5 9 -1 +7 4 3 0 +5 +0 2 4 2 +5 2 3 0 +1 5 5 2 +7 4 5 2 +5 2 9 -1 +7 +0 2 +1 5 +3 0 +4 2 +5 2 +7 4 +9 -1 +1 +5 2 +# No. of faces: 1 +5 +0 2 4 2 +5 2 3 0 +1 5 5 2 +7 4 5 2 +5 2 9 -1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test14.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test14.txt new file mode 100644 index 00000000000..01535344d7c --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test14.txt @@ -0,0 +1,47 @@ +7 +0 2 4 2 +1 5 9 -1 +7 4 3 0 +3 5 5 5 +3 4 5 4 +3 -1 5 -1 +3 -2 5 -2 +9 +0 2 4 2 +3 -2 5 -2 +3 -1 5 -1 +5 2 3 0 +1 5 5 2 +3 4 5 4 +3 5 5 5 +7 4 5 2 +5 2 9 -1 +15 +0 2 +1 5 +3 -2 +3 -1 +3 0 +3 4 +3 5 +4 2 +5 -2 +5 -1 +5 2 +5 4 +5 5 +7 4 +9 -1 +1 +5 2 +# No. of faces: 1 +9 +0 2 4 2 +3 -2 5 -2 +3 -1 5 -1 +5 2 3 0 +1 5 5 2 +3 4 5 4 +3 5 5 5 +7 4 5 2 +5 2 9 -1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test15.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test15.txt new file mode 100644 index 00000000000..f7b36b05432 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test15.txt @@ -0,0 +1,40 @@ +9 +0 0 4 3 +3 -3 5 -1 +3 -3 0 0 +4 -4 5 -1 +4 -4 3 -3 +5 -1 9 -1 +8 2 9 -1 +8 2 5 -1 +4 3 5 -1 +9 +3 -3 0 0 +4 -4 3 -3 +0 0 4 3 +4 -4 5 -1 +3 -3 5 -1 +4 3 5 -1 +8 2 5 -1 +5 -1 9 -1 +8 2 9 -1 +7 +0 0 +3 -3 +4 -4 +4 3 +5 -1 +8 2 +9 -1 +0 +# No. of faces: 4 +9 +3 -3 0 0 +4 -4 3 -3 +0 0 4 3 +4 -4 5 -1 +3 -3 5 -1 +4 3 5 -1 +8 2 5 -1 +5 -1 9 -1 +8 2 9 -1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test16.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test16.txt new file mode 100644 index 00000000000..3bc6a8ce547 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test16.txt @@ -0,0 +1,57 @@ +7 +6 3 0 3 +2 0 4 6 +4 0 2 6 +5 1 1 5 +5 5 1 1 +0 2 6 4 +1 4 5 2 +14 +2 0 3 3 +3 3 1 1 +0 2 3 3 +3 3 0 3 +1 4 3 3 +3 3 1 5 +3 3 2 6 +4 0 3 3 +3 3 4 6 +5 1 3 3 +3 3 5 2 +5 5 3 3 +6 3 3 3 +3 3 6 4 +15 +0 2 +0 3 +1 1 +1 4 +1 5 +2 0 +2 6 +3 3 +4 0 +4 6 +5 1 +5 2 +5 5 +6 3 +6 4 +1 +3 3 +# No. of faces: 1 +14 +2 0 3 3 +3 3 1 1 +0 2 3 3 +3 3 0 3 +1 4 3 3 +3 3 1 5 +3 3 2 6 +4 0 3 3 +3 3 4 6 +5 1 3 3 +3 3 5 2 +5 5 3 3 +6 3 3 3 +3 3 6 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test17.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test17.txt new file mode 100644 index 00000000000..34351b917ac --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test17.txt @@ -0,0 +1,22 @@ +4 +1 5 0 4 +1 5 2 4 +1 3 0 4 +1 3 2 4 +4 +1 3 0 4 +1 5 0 4 +1 3 2 4 +1 5 2 4 +4 +0 4 +1 3 +1 5 +2 4 +0 +# No. of faces: 2 +4 +1 3 0 4 +1 5 0 4 +1 3 2 4 +1 5 2 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test18.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test18.txt new file mode 100644 index 00000000000..23c2db7d18f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test18.txt @@ -0,0 +1,27 @@ +3 +0 0 6 0 +0 2 3 2 +2 -1 4 1 +5 +2 -1 3 0 +0 0 3 0 +0 2 3 2 +3 0 4 1 +3 0 6 0 +7 +0 0 +0 2 +2 -1 +3 0 +3 2 +4 1 +6 0 +1 +3 0 +# No. of faces: 1 +5 +2 -1 3 0 +0 0 3 0 +0 2 3 2 +3 0 4 1 +3 0 6 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test19.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test19.txt new file mode 100644 index 00000000000..a6cf55f8025 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test19.txt @@ -0,0 +1,19 @@ +3 +0 0 3 0 +3 0 5 0 +5 0 8 0 +3 +0 0 3 0 +3 0 5 0 +5 0 8 0 +4 +0 0 +3 0 +5 0 +8 0 +0 +# No. of faces: 1 +3 +0 0 3 0 +3 0 5 0 +5 0 8 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test20.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test20.txt new file mode 100644 index 00000000000..2c261cad7d1 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test20.txt @@ -0,0 +1,26 @@ +3 +1 2 4 2 +3 0 5 4 +3 4 5 0 +5 +3 0 4 2 +1 2 4 2 +3 4 4 2 +4 2 5 0 +4 2 5 4 +6 +1 2 +3 0 +3 4 +4 2 +5 0 +5 4 +1 +4 2 +# No. of faces: 1 +5 +3 0 4 2 +1 2 4 2 +3 4 4 2 +4 2 5 0 +4 2 5 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test21.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test21.txt new file mode 100644 index 00000000000..ad795ac780e --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test21.txt @@ -0,0 +1,29 @@ +3 +6 1 1 6 +9 3 0 3 +2 1 6 5 +6 +2 1 4 3 +4 3 0 3 +4 3 1 6 +6 1 4 3 +4 3 6 5 +9 3 4 3 +7 +0 3 +1 6 +2 1 +4 3 +6 1 +6 5 +9 3 +1 +4 3 +# No. of faces: 1 +6 +2 1 4 3 +4 3 0 3 +4 3 1 6 +6 1 4 3 +4 3 6 5 +9 3 4 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test22.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test22.txt new file mode 100644 index 00000000000..e6ac95bc017 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test22.txt @@ -0,0 +1,27 @@ +5 +0 0 1 1 +0 0 2 3 +0 0 9 8 +0 0 -1 -3 +0 0 -3 4 +5 +0 0 -1 -3 +0 0 -3 4 +0 0 1 1 +0 0 2 3 +0 0 9 8 +6 +-3 4 +-1 -3 +0 0 +1 1 +2 3 +9 8 +0 +# No. of faces: 1 +5 +0 0 -1 -3 +0 0 -3 4 +0 0 1 1 +0 0 2 3 +0 0 9 8 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test23.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test23.txt new file mode 100644 index 00000000000..633acf5e467 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test23.txt @@ -0,0 +1,23 @@ +4 +1 2 0 0 +3 2 0 0 +0 0 4 0 +0 0 2 -2 +4 +1 2 0 0 +0 0 2 -2 +3 2 0 0 +0 0 4 0 +5 +0 0 +1 2 +2 -2 +3 2 +4 0 +0 +# No. of faces: 1 +4 +1 2 0 0 +0 0 2 -2 +3 2 0 0 +0 0 4 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test24.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test24.txt new file mode 100644 index 00000000000..c1b674a8f00 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test24.txt @@ -0,0 +1,23 @@ +4 +-3 2 0 0 +-3 0 0 0 +-2 -2 0 0 +0 0 -2 -4 +4 +0 0 -2 -4 +-2 -2 0 0 +-3 0 0 0 +-3 2 0 0 +5 +-3 0 +-3 2 +-2 -4 +-2 -2 +0 0 +0 +# No. of faces: 1 +4 +0 0 -2 -4 +-2 -2 0 0 +-3 0 0 0 +-3 2 0 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test25.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test25.txt new file mode 100644 index 00000000000..c679dad3f34 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test25.txt @@ -0,0 +1,23 @@ +4 +0 0 3 3 +3 3 6 6 +6 0 3 3 +0 6 3 3 +4 +0 0 3 3 +0 6 3 3 +6 0 3 3 +3 3 6 6 +5 +0 0 +0 6 +3 3 +6 0 +6 6 +0 +# No. of faces: 1 +4 +0 0 3 3 +0 6 3 3 +6 0 3 3 +3 3 6 6 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test26.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test26.txt new file mode 100644 index 00000000000..2cfe803179b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test26.txt @@ -0,0 +1,42 @@ +7 +0 7 2 5 +0 5 2 5 +2 4 4 4 +2 4 4 2 +2 7 4 9 +0 1 4 1 +1 4 3 6 +8 +1 4 2 5 +0 5 2 5 +0 7 2 5 +2 5 3 6 +0 1 4 1 +2 4 4 2 +2 4 4 4 +2 7 4 9 +12 +0 1 +0 5 +0 7 +1 4 +2 4 +2 5 +2 7 +3 6 +4 1 +4 2 +4 4 +4 9 +1 +2 5 +# No. of faces: 1 +8 +1 4 2 5 +0 5 2 5 +0 7 2 5 +2 5 3 6 +0 1 4 1 +2 4 4 2 +2 4 4 4 +2 7 4 9 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test27.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test27.txt new file mode 100644 index 00000000000..09d93ba7d9b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test27.txt @@ -0,0 +1,37 @@ +8 +1 5 0 4 +1 5 2 4 +1 3 0 4 +1 3 2 4 +0 2 1 3 +0 2 1 1 +1 3 2 2 +1 1 2 2 +8 +0 2 1 1 +0 2 1 3 +1 3 0 4 +1 5 0 4 +1 1 2 2 +1 3 2 2 +1 3 2 4 +1 5 2 4 +7 +0 2 +0 4 +1 1 +1 3 +1 5 +2 2 +2 4 +0 +# No. of faces: 3 +8 +0 2 1 1 +0 2 1 3 +1 3 0 4 +1 5 0 4 +1 1 2 2 +1 3 2 2 +1 3 2 4 +1 5 2 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test28.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test28.txt new file mode 100644 index 00000000000..d945734fca4 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test28.txt @@ -0,0 +1,44 @@ +10 +-1 0 0 1 +0 1 1 2 +0 -1 -1 0 +1 0 0 1 +2 1 1 2 +0 -1 1 0 +1 0 2 1 +1 0 2 -1 +2 1 3 0 +2 -1 3 0 +10 +0 -1 -1 0 +-1 0 0 1 +0 -1 1 0 +1 0 0 1 +0 1 1 2 +1 0 2 -1 +1 0 2 1 +2 1 1 2 +2 -1 3 0 +2 1 3 0 +8 +-1 0 +0 -1 +0 1 +1 0 +1 2 +2 -1 +2 1 +3 0 +0 +# No. of faces: 4 +10 +0 -1 -1 0 +-1 0 0 1 +0 -1 1 0 +1 0 0 1 +0 1 1 2 +1 0 2 -1 +1 0 2 1 +2 1 1 2 +2 -1 3 0 +2 1 3 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test29.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test29.txt new file mode 100644 index 00000000000..44a64a0247f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test29.txt @@ -0,0 +1,26 @@ +3 +0 4 4 0 +0 0 4 4 +2 2 5 2 +5 +0 0 2 2 +0 4 2 2 +2 2 4 0 +2 2 4 4 +2 2 5 2 +6 +0 0 +0 4 +2 2 +4 0 +4 4 +5 2 +1 +2 2 +# No. of faces: 1 +5 +0 0 2 2 +0 4 2 2 +2 2 4 0 +2 2 4 4 +2 2 5 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test30.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test30.txt new file mode 100644 index 00000000000..93f5204f262 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test30.txt @@ -0,0 +1,22 @@ +2 +0 0 5 0 +2 -2 2 3 +4 +2 -2 2 0 +0 0 2 0 +2 0 2 3 +2 0 5 0 +5 +0 0 +2 -2 +2 0 +2 3 +5 0 +1 +2 0 +# No. of faces: 1 +4 +2 -2 2 0 +0 0 2 0 +2 0 2 3 +2 0 5 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test31.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test31.txt new file mode 100644 index 00000000000..42f4208cf9a --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test31.txt @@ -0,0 +1,33 @@ +3 +1 2 3 2 +0 0 5 0 +2 4 2 -2 +7 +2 0 2 -2 +0 0 2 0 +2 2 2 0 +1 2 2 2 +2 4 2 2 +2 2 3 2 +2 0 5 0 +8 +0 0 +1 2 +2 -2 +2 0 +2 2 +2 4 +3 2 +5 0 +2 +2 0 +2 2 +# No. of faces: 1 +7 +2 0 2 -2 +0 0 2 0 +2 2 2 0 +1 2 2 2 +2 4 2 2 +2 2 3 2 +2 0 5 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test32.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test32.txt new file mode 100644 index 00000000000..822e3789c28 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test32.txt @@ -0,0 +1,33 @@ +3 +1 2 3 2 +0 0 5 0 +2 -2 2 4 +7 +2 -2 2 0 +0 0 2 0 +2 0 2 2 +1 2 2 2 +2 2 2 4 +2 2 3 2 +2 0 5 0 +8 +0 0 +1 2 +2 -2 +2 0 +2 2 +2 4 +3 2 +5 0 +2 +2 0 +2 2 +# No. of faces: 1 +7 +2 -2 2 0 +0 0 2 0 +2 0 2 2 +1 2 2 2 +2 2 2 4 +2 2 3 2 +2 0 5 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test33.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test33.txt new file mode 100644 index 00000000000..6db47eaf9ed --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test33.txt @@ -0,0 +1,16 @@ +2 +1 5 1 2 +0 0 3 2 +2 +1 5 1 2 +0 0 3 2 +4 +0 0 +1 2 +1 5 +3 2 +0 +# No. of faces: 1 +2 +1 5 1 2 +0 0 3 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test34.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test34.txt new file mode 100644 index 00000000000..47ced43d85b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test34.txt @@ -0,0 +1,16 @@ +2 +-1 2 1 4 +0 0 0 2 +2 +0 0 0 2 +-1 2 1 4 +4 +-1 2 +0 0 +0 2 +1 4 +0 +# No. of faces: 1 +2 +0 0 0 2 +-1 2 1 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test35.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test35.txt new file mode 100644 index 00000000000..c8a3dd025bc --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test35.txt @@ -0,0 +1,43 @@ +5 +1 7 3 7 +2 6 2 2 +0 4 4 4 +1 3 3 3 +1 0 3 0 +9 +2 3 2 2 +1 3 2 3 +2 4 2 3 +0 4 2 4 +2 6 2 4 +1 0 3 0 +2 3 3 3 +1 7 3 7 +2 4 4 4 +12 +0 4 +1 0 +1 3 +1 7 +2 2 +2 3 +2 4 +2 6 +3 0 +3 3 +3 7 +4 4 +2 +2 3 +2 4 +# No. of faces: 1 +9 +2 3 2 2 +1 3 2 3 +2 4 2 3 +0 4 2 4 +2 6 2 4 +1 0 3 0 +2 3 3 3 +1 7 3 7 +2 4 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test36.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test36.txt new file mode 100644 index 00000000000..03fbb7e16ea --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test36.txt @@ -0,0 +1,46 @@ +4 +2 0 2 9 +1 7 5 3 +0 4 4 2 +1 2 4 5 +11 +2 0 2 3 +1 2 2 3 +0 4 2 3 +2 3 2 6 +1 7 2 6 +2 6 2 9 +2 3 7/2 9/2 +2 6 7/2 9/2 +2 3 4 2 +7/2 9/2 4 5 +7/2 9/2 5 3 +11 +0 4 +1 2 +1 7 +2 0 +2 3 +72/36 216/36 +2 9 +84/24 108/24 +4 2 +4 5 +5 3 +3 +2 3 +72/36 216/36 +84/24 108/24 +# No. of faces: 2 +11 +2 0 2 3 +1 2 2 3 +0 4 2 3 +2 3 2 6 +1 7 2 6 +2 6 2 9 +2 3 7/2 9/2 +2 6 7/2 9/2 +2 3 4 2 +7/2 9/2 4 5 +7/2 9/2 5 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test37.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test37.txt new file mode 100644 index 00000000000..2c10412d83b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test37.txt @@ -0,0 +1,55 @@ +5 +0 0 0 3 +0 4 0 6 +-3 2 2 0 +-2 4 1 6 +-1 6 -1 1 +13 +-1 6/5 -1 1 +-3 2 -1 6/5 +-1 14/3 -1 6/5 +-2 4 -1 14/3 +-1 6 -1 14/3 +0 0 0 4/5 +-1 6/5 0 4/5 +0 4/5 0 3 +0 4 0 16/3 +-1 14/3 0 16/3 +0 16/3 0 6 +0 16/3 1 6 +0 4/5 2 0 +14 +-3 2 +-2 4 +-1 1 +-25/25 30/25 +-1 70/15 +-1 6 +0 0 +0 12/15 +0 3 +0 4 +0 32/6 +0 6 +1 6 +2 0 +4 +-25/25 30/25 +-1 70/15 +0 12/15 +0 32/6 +# No. of faces: 1 +13 +-1 6/5 -1 1 +-3 2 -1 6/5 +-1 14/3 -1 6/5 +-2 4 -1 14/3 +-1 6 -1 14/3 +0 0 0 4/5 +-1 6/5 0 4/5 +0 4/5 0 3 +0 4 0 16/3 +-1 14/3 0 16/3 +0 16/3 0 6 +0 16/3 1 6 +0 4/5 2 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test40.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test40.txt new file mode 100644 index 00000000000..2cb778d38b7 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test40.txt @@ -0,0 +1,19 @@ +2 +0 0 0 6 +0 3 3 3 +3 +0 0 0 3 +0 3 0 6 +0 3 3 3 +4 +0 0 +0 3 +0 6 +3 3 +1 +0 3 +# No. of faces: 1 +3 +0 0 0 3 +0 3 0 6 +0 3 3 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test41.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test41.txt new file mode 100644 index 00000000000..f9cefcc2116 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test41.txt @@ -0,0 +1,19 @@ +2 +-3 3 0 3 +0 0 0 6 +3 +0 0 0 3 +-3 3 0 3 +0 3 0 6 +4 +-3 3 +0 0 +0 3 +0 6 +1 +0 3 +# No. of faces: 1 +3 +0 0 0 3 +-3 3 0 3 +0 3 0 6 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test42.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test42.txt new file mode 100644 index 00000000000..4cfeb604b7f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test42.txt @@ -0,0 +1,23 @@ +3 +0 0 0 4 +-2 2 0 2 +0 2 2 2 +4 +0 0 0 2 +-2 2 0 2 +0 2 0 4 +0 2 2 2 +5 +-2 2 +0 0 +0 2 +0 4 +2 2 +1 +0 2 +# No. of faces: 1 +4 +0 0 0 2 +-2 2 0 2 +0 2 0 4 +0 2 2 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test43.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test43.txt new file mode 100644 index 00000000000..90afe463752 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test43.txt @@ -0,0 +1,15 @@ +2 +0 5 4 5 +4 5 4 1 +2 +4 5 4 1 +0 5 4 5 +3 +0 5 +4 1 +4 5 +0 +# No. of faces: 1 +2 +4 5 4 1 +0 5 4 5 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test44.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test44.txt new file mode 100644 index 00000000000..19a28bae19d --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test44.txt @@ -0,0 +1,22 @@ +4 +0 4 4 4 +4 4 4 0 +0 0 4 0 +0 4 0 0 +4 +0 4 0 0 +0 0 4 0 +4 4 4 0 +0 4 4 4 +4 +0 0 +0 4 +4 0 +4 4 +0 +# No. of faces: 2 +4 +0 4 0 0 +0 0 4 0 +4 4 4 0 +0 4 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test45.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test45.txt new file mode 100644 index 00000000000..24188d25fa0 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test45.txt @@ -0,0 +1,15 @@ +2 +0 0 4 0 +0 4 0 0 +2 +0 4 0 0 +0 0 4 0 +3 +0 0 +0 4 +4 0 +0 +# No. of faces: 1 +2 +0 4 0 0 +0 0 4 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test46.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test46.txt new file mode 100644 index 00000000000..512151f3428 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test46.txt @@ -0,0 +1,21 @@ +3 +0 6 2 6 +2 5 2 2 +2 1 4 1 +3 +2 5 2 2 +0 6 2 6 +2 1 4 1 +6 +0 6 +2 1 +2 2 +2 5 +2 6 +4 1 +0 +# No. of faces: 1 +3 +2 5 2 2 +0 6 2 6 +2 1 4 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test47.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test47.txt new file mode 100644 index 00000000000..1624ab36537 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test47.txt @@ -0,0 +1,19 @@ +2 +2 0 2 3 +4 0 0 0 +3 +2 0 0 0 +2 0 2 3 +4 0 2 0 +4 +0 0 +2 0 +2 3 +4 0 +1 +2 0 +# No. of faces: 1 +3 +2 0 0 0 +2 0 2 3 +4 0 2 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test48.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test48.txt new file mode 100644 index 00000000000..9884d9b633f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test48.txt @@ -0,0 +1,32 @@ +4 +0 0 5 0 +2 3 2 0 +7 3 12 3 +9 3 9 0 +6 +0 0 2 0 +2 3 2 0 +2 0 5 0 +9 3 9 0 +7 3 9 3 +9 3 12 3 +8 +0 0 +2 0 +2 3 +5 0 +7 3 +9 0 +9 3 +12 3 +2 +2 0 +9 3 +# No. of faces: 1 +6 +0 0 2 0 +2 3 2 0 +2 0 5 0 +9 3 9 0 +7 3 9 3 +9 3 12 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test49.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test49.txt new file mode 100644 index 00000000000..937d78e447e --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test49.txt @@ -0,0 +1,15 @@ +2 +0 0 4 0 +4 0 4 4 +2 +0 0 4 0 +4 0 4 4 +3 +0 0 +4 0 +4 4 +0 +# No. of faces: 1 +2 +0 0 4 0 +4 0 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test50.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test50.txt new file mode 100644 index 00000000000..11d3fd8a787 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test50.txt @@ -0,0 +1,31 @@ +5 +4 7 8 7 +8 7 8 5 +5 5 8 5 +8 6 9 7 +8 6 9 5 +6 +5 5 8 5 +8 6 8 5 +8 7 8 6 +4 7 8 7 +8 6 9 5 +8 6 9 7 +7 +4 7 +5 5 +8 5 +8 6 +8 7 +9 5 +9 7 +1 +8 6 +# No. of faces: 1 +6 +5 5 8 5 +8 6 8 5 +8 7 8 6 +4 7 8 7 +8 6 9 5 +8 6 9 7 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test51.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test51.txt new file mode 100644 index 00000000000..0acf5053818 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test51.txt @@ -0,0 +1,118 @@ +16 +2 4 2 0 +2 6 2 10 +6 8 6 4 +8 7 8 5 +0 8 2 8 +4 7 8 7 +0 6 6 6 +8 5 5 5 +2 3 4 3 +1 7 4 10 +6 6 0 3 +0 1 3 4 +9 7 8 6 +9 5 8 6 +2 0 6 4 +2 10 6 8 +30 +2 3 2 0 +0 1 2 3 +2 4 2 3 +2 4 0 3 +0 6 2 6 +2 6 2 8 +1 7 2 8 +0 8 2 8 +2 8 2 10 +2 3 3 4 +2 8 10/3 28/3 +2 10 10/3 28/3 +2 3 4 3 +10/3 28/3 4 10 +2 0 6 4 +6 5 6 4 +6 5 5 5 +6 6 6 5 +6 6 2 4 +2 6 6 6 +6 7 6 6 +4 7 6 7 +6 8 6 7 +10/3 28/3 6 8 +8 5 6 5 +8 6 8 5 +8 7 8 6 +6 7 8 7 +9 5 8 6 +9 7 8 6 +27 +0 1 +0 3 +0 6 +0 8 +1 7 +2 0 +2 3 +2 4 +2 6 +2 8 +2 10 +3 4 +60/18 168/18 +4 3 +4 7 +4 10 +5 5 +6 4 +6 5 +6 6 +6 7 +6 8 +8 5 +8 6 +8 7 +9 5 +9 7 +9 +2 3 +2 4 +2 6 +2 8 +60/18 168/18 +6 5 +6 6 +6 7 +8 6 +# No. of faces: 5 +30 +2 3 2 0 +0 1 2 3 +2 4 2 3 +2 4 0 3 +0 6 2 6 +2 6 2 8 +1 7 2 8 +0 8 2 8 +2 8 2 10 +2 3 3 4 +2 8 10/3 28/3 +2 10 10/3 28/3 +2 3 4 3 +10/3 28/3 4 10 +2 0 6 4 +6 5 6 4 +6 5 5 5 +6 6 6 5 +6 6 2 4 +2 6 6 6 +6 7 6 6 +4 7 6 7 +6 8 6 7 +10/3 28/3 6 8 +8 5 6 5 +8 6 8 5 +8 7 8 6 +6 7 8 7 +9 5 8 6 +9 7 8 6 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test52.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test52.txt new file mode 100644 index 00000000000..e54693b507c --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test52.txt @@ -0,0 +1,29 @@ +3 +0 4 4 0 +0 0 4 4 +2 5 2 -1 +6 +2 2 2 -1 +0 0 2 2 +0 4 2 2 +2 5 2 2 +2 2 4 0 +2 2 4 4 +7 +0 0 +0 4 +2 -1 +64/32 64/32 +2 5 +4 0 +4 4 +1 +64/32 64/32 +# No. of faces: 1 +6 +2 2 2 -1 +0 0 2 2 +0 4 2 2 +2 5 2 2 +2 2 4 0 +2 2 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test53.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test53.txt new file mode 100644 index 00000000000..03bc28fe6ca --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test53.txt @@ -0,0 +1,19 @@ +3 +0 5 0 3 +0 3 0 2 +0 2 0 0 +3 +0 2 0 0 +0 3 0 2 +0 5 0 3 +4 +0 0 +0 2 +0 3 +0 5 +0 +# No. of faces: 1 +3 +0 2 0 0 +0 3 0 2 +0 5 0 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test54.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test54.txt new file mode 100644 index 00000000000..75d46976285 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test54.txt @@ -0,0 +1,23 @@ +3 +8 7 8 5 +8 6 9 7 +8 6 9 5 +4 +8 6 8 5 +8 7 8 6 +8 6 9 5 +8 6 9 7 +5 +8 5 +8 6 +8 7 +9 5 +9 7 +1 +8 6 +# No. of faces: 1 +4 +8 6 8 5 +8 7 8 6 +8 6 9 5 +8 6 9 7 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test55.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test55.txt new file mode 100644 index 00000000000..f2f078a9329 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test55.txt @@ -0,0 +1,27 @@ +3 +0 0 0 2 +0 1 2 1 +2 0 2 2 +5 +0 0 0 1 +0 1 0 2 +2 0 2 1 +0 1 2 1 +2 1 2 2 +6 +0 0 +0 1 +0 2 +2 0 +2 1 +2 2 +2 +0 1 +2 1 +# No. of faces: 1 +5 +0 0 0 1 +0 1 0 2 +2 0 2 1 +0 1 2 1 +2 1 2 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test56.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test56.txt new file mode 100644 index 00000000000..bac5d28e69c --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test56.txt @@ -0,0 +1,26 @@ +3 +3 0 3 6 +0 1 6 5 +3 3 7 3 +5 +3 0 3 3 +0 1 3 3 +3 3 3 6 +3 3 6 5 +3 3 7 3 +6 +0 1 +3 0 +3 3 +3 6 +6 5 +7 3 +1 +3 3 +# No. of faces: 1 +5 +3 0 3 3 +0 1 3 3 +3 3 3 6 +3 3 6 5 +3 3 7 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test60.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test60.txt new file mode 100644 index 00000000000..580ad875127 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test60.txt @@ -0,0 +1,21 @@ +2 +0 0 4 0 +3 0 7 0 +3 +0 0 3 0 +3 0 4 0 +4 0 7 0 +4 +0 0 +3 0 +4 0 +7 0 +2 +3 0 +4 0 +# No. of faces: 1 +4 +0 0 3 0 +3 0 4 0 +3 0 4 0 +4 0 7 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test61.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test61.txt new file mode 100644 index 00000000000..56f8052dbd5 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test61.txt @@ -0,0 +1,33 @@ +3 +3 0 6 0 +0 0 4 0 +2 0 8 0 +5 +0 0 2 0 +2 0 3 0 +3 0 4 0 +4 0 6 0 +6 0 8 0 +6 +0 0 +2 0 +3 0 +4 0 +6 0 +8 0 +4 +2 0 +3 0 +4 0 +6 0 +# No. of faces: 1 +9 +0 0 2 0 +2 0 3 0 +2 0 3 0 +3 0 4 0 +3 0 4 0 +3 0 4 0 +4 0 6 0 +4 0 6 0 +6 0 8 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test62.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test62.txt new file mode 100644 index 00000000000..a975379f310 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test62.txt @@ -0,0 +1,13 @@ +2 +0 0 3 0 +0 0 3 0 +1 +0 0 3 0 +2 +0 0 +3 0 +0 +# No. of faces: 1 +2 +0 0 3 0 +0 0 3 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test63.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test63.txt new file mode 100644 index 00000000000..0bf64d49d7f --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test63.txt @@ -0,0 +1,25 @@ +4 +0 0 2 0 +3 0 5 0 +0 0 5 0 +2 0 3 0 +3 +0 0 2 0 +2 0 3 0 +3 0 5 0 +4 +0 0 +2 0 +3 0 +5 0 +2 +2 0 +3 0 +# No. of faces: 1 +6 +0 0 2 0 +0 0 2 0 +2 0 3 0 +2 0 3 0 +3 0 5 0 +3 0 5 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test64.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test64.txt new file mode 100644 index 00000000000..b27adefbb3b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test64.txt @@ -0,0 +1,15 @@ +3 +0 0 6 6 +0 0 6 6 +6 6 0 0 +1 +0 0 6 6 +2 +0 0 +6 6 +0 +# No. of faces: 1 +3 +0 0 6 6 +0 0 6 6 +6 6 0 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test65.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test65.txt new file mode 100644 index 00000000000..d1ebcea2dc1 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test65.txt @@ -0,0 +1,25 @@ +3 +0 0 4 4 +0 0 4 4 +0 4 4 0 +4 +0 0 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 4 +5 +0 0 +0 4 +64/32 64/32 +4 0 +4 4 +1 +64/32 64/32 +# No. of faces: 1 +6 +0 0 64/32 64/32 +0 0 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 4 +64/32 64/32 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test66.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test66.txt new file mode 100644 index 00000000000..420a030dada --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test66.txt @@ -0,0 +1,28 @@ +4 +0 0 4 4 +0 0 4 4 +0 4 4 0 +0 4 4 0 +4 +0 0 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 4 +5 +0 0 +0 4 +64/32 64/32 +4 0 +4 4 +1 +64/32 64/32 +# No. of faces: 1 +8 +0 0 64/32 64/32 +0 0 64/32 64/32 +0 4 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 0 +64/32 64/32 4 4 +64/32 64/32 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test67.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test67.txt new file mode 100644 index 00000000000..cdd01dcd119 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test67.txt @@ -0,0 +1,35 @@ +5 +0 0 4 4 +0 0 4 4 +0 4 4 0 +0 4 4 0 +-1 2 5 2 +6 +0 0 48/24 48/24 +-1 2 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 4 0 +48/24 48/24 4 4 +48/24 48/24 5 2 +7 +-1 2 +0 0 +0 4 +48/24 48/24 +4 0 +4 4 +5 2 +1 +48/24 48/24 +# No. of faces: 1 +10 +0 0 48/24 48/24 +0 0 48/24 48/24 +-1 2 48/24 48/24 +0 4 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 4 0 +48/24 48/24 4 0 +48/24 48/24 4 4 +48/24 48/24 4 4 +48/24 48/24 5 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test68.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test68.txt new file mode 100644 index 00000000000..4d739e20e78 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test68.txt @@ -0,0 +1,48 @@ +6 +0 0 4 4 +0 0 4 4 +0 4 4 0 +0 4 4 0 +-1 2 5 2 +1 1 3 3 +8 +0 0 1 1 +1 1 48/24 48/24 +-1 2 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 3 3 +48/24 48/24 4 0 +3 3 4 4 +48/24 48/24 5 2 +9 +-1 2 +0 0 +0 4 +1 1 +48/24 48/24 +3 3 +4 0 +4 4 +5 2 +3 +1 1 +48/24 48/24 +3 3 +# No. of faces: 1 +16 +0 0 1 1 +0 0 1 1 +1 1 48/24 48/24 +1 1 48/24 48/24 +1 1 48/24 48/24 +-1 2 48/24 48/24 +0 4 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 3 3 +48/24 48/24 3 3 +48/24 48/24 3 3 +48/24 48/24 4 0 +48/24 48/24 4 0 +3 3 4 4 +3 3 4 4 +48/24 48/24 5 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test69.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test69.txt new file mode 100644 index 00000000000..c353837bfed --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test69.txt @@ -0,0 +1,37 @@ +8 +1 1 0 2 +1 1 0 1 +0 0 1 1 +3 2 2 1 +2 1 3 1 +3 0 2 1 +1 1 2 1 +2 1 1 1 +7 +0 0 1 1 +1 1 0 1 +1 1 0 2 +1 1 2 1 +3 0 2 1 +2 1 3 1 +3 2 2 1 +8 +0 0 +0 1 +0 2 +1 1 +2 1 +3 0 +3 1 +3 2 +0 +# No. of faces: 1 +8 +0 0 1 1 +1 1 0 1 +1 1 0 2 +1 1 2 1 +2 1 1 1 +3 0 2 1 +2 1 3 1 +3 2 2 1 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test70.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test70.txt new file mode 100644 index 00000000000..cfc1576cd41 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test70.txt @@ -0,0 +1,41 @@ +5 +3 0 4 0 +4 0 7 0 +2 0 5 0 +1 0 4 0 +0 0 3 0 +6 +0 0 1 0 +1 0 2 0 +2 0 3 0 +3 0 4 0 +4 0 5 0 +5 0 7 0 +7 +0 0 +1 0 +2 0 +3 0 +4 0 +5 0 +7 0 +5 +1 0 +2 0 +3 0 +4 0 +5 0 +# No. of faces: 1 +12 +0 0 1 0 +1 0 2 0 +1 0 2 0 +2 0 3 0 +2 0 3 0 +2 0 3 0 +3 0 4 0 +3 0 4 0 +3 0 4 0 +4 0 5 0 +4 0 5 0 +5 0 7 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test71.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test71.txt new file mode 100644 index 00000000000..726cdc2d9d4 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test71.txt @@ -0,0 +1,25 @@ +3 +2 4 2 0 +0 2 4 2 +0 2 4 2 +4 +2 2 2 0 +0 2 2 2 +2 4 2 2 +2 2 4 2 +5 +0 2 +2 0 +2 2 +2 4 +4 2 +1 +2 2 +# No. of faces: 1 +6 +2 2 2 0 +0 2 2 2 +0 2 2 2 +2 4 2 2 +2 2 4 2 +2 2 4 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test72.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test72.txt new file mode 100644 index 00000000000..212a77a0f3c --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test72.txt @@ -0,0 +1,81 @@ +13 +0 0 4 4 +0 0 4 4 +0 4 4 0 +0 4 4 0 +-1 2 1 2 +5 4 9 0 +5 4 9 0 +5 0 9 4 +4 2 6 2 +9 2 11 2 +10 4 14 0 +10 0 14 4 +10 0 14 4 +15 +-1 2 1 2 +0 0 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 4 +4 2 6 2 +5 0 224/32 64/32 +5 4 224/32 64/32 +224/32 64/32 9 0 +224/32 64/32 9 4 +9 2 11 2 +10 0 384/32 64/32 +10 4 384/32 64/32 +384/32 64/32 14 0 +384/32 64/32 14 4 +21 +-1 2 +0 0 +0 4 +1 2 +64/32 64/32 +4 0 +4 2 +4 4 +5 0 +5 4 +6 2 +224/32 64/32 +9 0 +9 2 +9 4 +10 0 +10 4 +11 2 +384/32 64/32 +14 0 +14 4 +3 +64/32 64/32 +224/32 64/32 +384/32 64/32 +# No. of faces: 1 +23 +-1 2 1 2 +0 0 64/32 64/32 +0 0 64/32 64/32 +0 4 64/32 64/32 +0 4 64/32 64/32 +64/32 64/32 4 0 +64/32 64/32 4 0 +64/32 64/32 4 4 +64/32 64/32 4 4 +4 2 6 2 +5 0 224/32 64/32 +5 4 224/32 64/32 +5 4 224/32 64/32 +224/32 64/32 9 0 +224/32 64/32 9 0 +224/32 64/32 9 4 +9 2 11 2 +10 0 384/32 64/32 +10 0 384/32 64/32 +10 4 384/32 64/32 +384/32 64/32 14 0 +384/32 64/32 14 4 +384/32 64/32 14 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test73.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test73.txt new file mode 100644 index 00000000000..5e2b5aafab2 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test73.txt @@ -0,0 +1,21 @@ +2 +3 0 3 4 +3 2 3 7 +3 +3 0 3 2 +3 2 3 4 +3 4 3 7 +4 +3 0 +3 2 +3 4 +3 7 +2 +3 2 +3 4 +# No. of faces: 1 +4 +3 0 3 2 +3 2 3 4 +3 2 3 4 +3 4 3 7 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test74.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test74.txt new file mode 100644 index 00000000000..c48b428b791 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test74.txt @@ -0,0 +1,33 @@ +3 +2 7 2 2 +2 4 2 0 +0 3 4 3 +6 +2 2 2 0 +2 2 2 3 +0 3 2 3 +2 3 2 4 +2 7 2 4 +2 3 4 3 +7 +0 3 +2 0 +2 2 +2 3 +2 4 +2 7 +4 3 +3 +2 2 +2 3 +2 4 +# No. of faces: 1 +8 +2 2 2 0 +2 2 2 3 +2 2 2 3 +0 3 2 3 +2 3 2 4 +2 3 2 4 +2 7 2 4 +2 3 4 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test75.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test75.txt new file mode 100644 index 00000000000..2b7af6f80e7 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test75.txt @@ -0,0 +1,25 @@ +3 +2 4 2 0 +2 4 2 0 +0 2 4 2 +4 +2 0 2 2 +0 2 2 2 +2 2 2 4 +2 2 4 2 +5 +0 2 +2 0 +2 2 +2 4 +4 2 +1 +2 2 +# No. of faces: 1 +6 +2 0 2 2 +2 0 2 2 +0 2 2 2 +2 2 2 4 +2 2 2 4 +2 2 4 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test76.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test76.txt new file mode 100644 index 00000000000..97bfc5d24fd --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test76.txt @@ -0,0 +1,33 @@ +3 +2 4 2 0 +4 4 4 0 +0 2 6 2 +7 +2 2 2 0 +0 2 2 2 +2 4 2 2 +4 2 4 0 +2 2 4 2 +4 4 4 2 +4 2 6 2 +8 +0 2 +2 0 +48/24 48/24 +2 4 +4 0 +96/24 48/24 +4 4 +6 2 +2 +48/24 48/24 +96/24 48/24 +# No. of faces: 1 +7 +2 2 2 0 +0 2 2 2 +2 4 2 2 +4 2 4 0 +2 2 4 2 +4 4 4 2 +4 2 6 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test77.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test77.txt new file mode 100644 index 00000000000..b3ec36e6744 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test77.txt @@ -0,0 +1,17 @@ +2 +0 3 0 0 +0 2 0 0 +2 +0 2 0 0 +0 3 0 2 +3 +0 0 +0 2 +0 3 +1 +0 2 +# No. of faces: 1 +3 +0 2 0 0 +0 2 0 0 +0 3 0 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test78.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test78.txt new file mode 100644 index 00000000000..a91fe60a739 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test78.txt @@ -0,0 +1,64 @@ +6 +1 5 1 0 +1 5 1 2 +4 0 4 4 +4 2 4 4 +0 3 5 3 +0 1 5 1 +14 +1 1 1 0 +0 1 1 1 +1 2 1 1 +1 2 1 3 +0 3 1 3 +1 3 1 5 +4 0 4 1 +1 1 4 1 +4 1 4 2 +4 2 4 3 +1 3 4 3 +4 3 4 4 +4 1 5 1 +4 3 5 3 +14 +0 1 +0 3 +1 0 +1 1 +1 2 +1 3 +1 5 +4 0 +4 1 +4 2 +4 3 +4 4 +5 1 +5 3 +6 +1 1 +1 2 +1 3 +4 1 +4 2 +4 3 +# No. of faces: 2 +18 +1 1 1 0 +0 1 1 1 +1 2 1 1 +1 2 1 3 +1 2 1 3 +0 3 1 3 +1 3 1 5 +1 3 1 5 +4 0 4 1 +1 1 4 1 +4 1 4 2 +4 2 4 3 +4 2 4 3 +1 3 4 3 +4 3 4 4 +4 3 4 4 +4 1 5 1 +4 3 5 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test79.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test79.txt new file mode 100644 index 00000000000..9390c7cc608 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test79.txt @@ -0,0 +1,34 @@ +4 +0 5 0 0 +0 5 0 2 +0 3 3 3 +0 1 3 1 +6 +0 1 0 0 +0 2 0 1 +0 2 0 3 +0 3 0 5 +0 1 3 1 +0 3 3 3 +7 +0 0 +0 1 +0 2 +0 3 +0 5 +3 1 +3 3 +3 +0 1 +0 2 +0 3 +# No. of faces: 1 +8 +0 1 0 0 +0 2 0 1 +0 2 0 3 +0 2 0 3 +0 3 0 5 +0 3 0 5 +0 1 3 1 +0 3 3 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test80.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test80.txt new file mode 100644 index 00000000000..3181a33c498 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test80.txt @@ -0,0 +1,30 @@ +8 +0 4 4 4 +0 4 4 4 +4 4 4 0 +4 4 4 0 +0 0 4 0 +0 0 4 0 +0 4 0 0 +0 4 0 0 +4 +0 0 0 4 +0 0 4 0 +4 0 4 4 +0 4 4 4 +4 +0 0 +0 4 +4 0 +4 4 +0 +# No. of faces: 2 +8 +0 0 0 4 +0 0 0 4 +0 0 4 0 +0 0 4 0 +4 0 4 4 +4 0 4 4 +0 4 4 4 +0 4 4 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test81.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test81.txt new file mode 100644 index 00000000000..4f7bc3a18d5 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test81.txt @@ -0,0 +1,50 @@ +6 +0 6 6 0 +0 2 6 8 +1 1 6 1 +1 1 6 1 +1 7 6 7 +1 7 6 7 +10 +0 2 2 4 +0 6 2 4 +1 1 5 1 +2 4 5 1 +2 4 5 7 +1 7 5 7 +5 1 6 0 +5 1 6 1 +5 7 6 7 +5 7 6 8 +11 +0 2 +0 6 +1 1 +1 7 +2 4 +5 1 +5 7 +6 0 +6 1 +6 7 +6 8 +3 +2 4 +5 1 +5 7 +# No. of faces: 1 +14 +0 2 2 4 +0 6 2 4 +1 1 5 1 +1 1 5 1 +2 4 5 1 +2 4 5 7 +1 7 5 7 +1 7 5 7 +5 1 6 0 +5 1 6 1 +5 1 6 1 +5 7 6 7 +5 7 6 7 +5 7 6 8 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test82.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test82.txt new file mode 100644 index 00000000000..723bf69b8ff --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test82.txt @@ -0,0 +1,25 @@ +3 +0 4 4 0 +0 4 4 0 +-1 2 5 2 +4 +-1 2 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 4 0 +48/24 48/24 5 2 +5 +-1 2 +0 4 +48/24 48/24 +4 0 +5 2 +1 +48/24 48/24 +# No. of faces: 1 +6 +-1 2 48/24 48/24 +0 4 48/24 48/24 +0 4 48/24 48/24 +48/24 48/24 4 0 +48/24 48/24 4 0 +48/24 48/24 5 2 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test83.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test83.txt new file mode 100644 index 00000000000..5ef7d44396b --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test83.txt @@ -0,0 +1,28 @@ +5 +0 3 5 5 +0 1 7 0 +0 3 5 1 +0 2 5 1 +0 4 5 5 +5 +0 2 5 1 +0 3 5 1 +0 3 5 5 +0 4 5 5 +0 1 7 0 +7 +0 1 +0 2 +0 3 +0 4 +5 1 +5 5 +7 0 +0 +# No. of faces: 1 +5 +0 2 5 1 +0 3 5 1 +0 3 5 5 +0 4 5 5 +0 1 7 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test84.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test84.txt new file mode 100644 index 00000000000..b7d779ff1b1 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test84.txt @@ -0,0 +1,30 @@ +4 +0 4 6 0 +0 0 6 4 +3 2 5 4 +3 2 5 0 +6 +0 0 3 2 +0 4 3 2 +3 2 5 0 +3 2 5 4 +3 2 6 0 +3 2 6 4 +7 +0 0 +0 4 +3 2 +5 0 +5 4 +6 0 +6 4 +1 +3 2 +# No. of faces: 1 +6 +0 0 3 2 +0 4 3 2 +3 2 5 0 +3 2 5 4 +3 2 6 0 +3 2 6 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test85.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test85.txt new file mode 100644 index 00000000000..53e394fb9dc --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test85.txt @@ -0,0 +1,23 @@ +3 +0 0 6 0 +2 0 4 3 +2 0 5 2 +4 +0 0 2 0 +2 0 4 3 +2 0 5 2 +2 0 6 0 +5 +0 0 +2 0 +4 3 +5 2 +6 0 +1 +2 0 +# No. of faces: 1 +4 +0 0 2 0 +2 0 4 3 +2 0 5 2 +2 0 6 0 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test86.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test86.txt new file mode 100644 index 00000000000..85ef8c50bc4 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test86.txt @@ -0,0 +1,23 @@ +3 +0 3 6 3 +3 3 6 1 +3 3 6 0 +4 +0 3 3 3 +3 3 6 0 +3 3 6 1 +3 3 6 3 +5 +0 3 +3 3 +6 0 +6 1 +6 3 +1 +3 3 +# No. of faces: 1 +4 +0 3 3 3 +3 3 6 0 +3 3 6 1 +3 3 6 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test87.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test87.txt new file mode 100644 index 00000000000..029e8e04e93 --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test87.txt @@ -0,0 +1,23 @@ +3 +7 3 0 3 +3 3 5 0 +3 3 6 6 +4 +3 3 0 3 +3 3 5 0 +3 3 6 6 +7 3 3 3 +5 +0 3 +3 3 +5 0 +6 6 +7 3 +1 +3 3 +# No. of faces: 1 +4 +3 3 0 3 +3 3 5 0 +3 3 6 6 +7 3 3 3 diff --git a/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test88.txt b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test88.txt new file mode 100644 index 00000000000..036b8c8b6bd --- /dev/null +++ b/Surface_sweep_2/test/Surface_sweep_2/data/segments_tight/test88.txt @@ -0,0 +1,26 @@ +3 +0 4 7 4 +1 0 5 8 +3 4 6 6 +5 +1 0 3 4 +0 4 3 4 +3 4 5 8 +3 4 6 6 +3 4 7 4 +6 +0 4 +1 0 +3 4 +5 8 +6 6 +7 4 +1 +3 4 +# No. of faces: 1 +5 +1 0 3 4 +0 4 3 4 +3 4 5 8 +3 4 6 6 +3 4 7 4 diff --git a/Surface_sweep_2/test/Surface_sweep_2/test_sweep.cpp b/Surface_sweep_2/test/Surface_sweep_2/test_sweep.cpp index 23ceebf559d..326307f8461 100644 --- a/Surface_sweep_2/test/Surface_sweep_2/test_sweep.cpp +++ b/Surface_sweep_2/test/Surface_sweep_2/test_sweep.cpp @@ -1,6 +1,5 @@ // examples/Pm_with_intersections/example4 // --------------------------------------- -#include #include #include #include @@ -8,10 +7,12 @@ #include #include +#include + #define CGAL_SEGMENT_TRAITS 1 -#define CGAL_SEGMENT_LEDA_TRAITS 2 #define CGAL_POLYLINE_TRAITS 11 #define CGAL_CONIC_TRAITS 21 +#define CGAL_POLYCONIC_TRAITS 22 // Picking a default Traits class (this, with the // PL flag enables the running of the test independently of cgal_make.) @@ -19,13 +20,12 @@ #define CGAL_ARR_TEST_TRAITS CGAL_SEGMENT_TRAITS #endif -// Making sure test doesn't fail if LEDA is not installed -#if ! defined(CGAL_USE_LEDA) && \ - (CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_LEDA_TRAITS || \ - CGAL_ARR_TEST_TRAITS == CGAL_CONIC_TRAITS ) +// Making sure test doesn't fail if CORE is not installed +#if ! defined(CGAL_USE_CORE) && \ + ((CGAL_ARR_TEST_TRAITS == CGAL_CONIC_TRAITS) || \ + (CGAL_ARR_TEST_TRAITS == CGAL_POLYCONIC_TRAITS)) -int main() -{ +int main() { std::cout << "A try to run test with LEDA traits but LEDA is not installed."; std::cout << std::endl; std::cout << "Test is not performed."; @@ -33,11 +33,12 @@ int main() return 0; } -#elif ! defined(CGAL_USE_GMP) && \ - (CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_TRAITS) -int main() -{ +#elif ! defined(CGAL_USE_GMP) && \ + ((CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_TRAITS) || \ + (CGAL_ARR_TEST_TRAITS == CGAL_POLYLINE_TRAITS)) + +int main() { std::cout << "A try to run test with GMP number type but GMP is not installed."; std::cout << std::endl; std::cout << "Test is not performed."; @@ -48,252 +49,276 @@ int main() #else - - // Choose traits #if CGAL_ARR_TEST_TRAITS==CGAL_SEGMENT_TRAITS #include -#include -#include +#include #include -#include -#elif CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_LEDA_TRAITS -#include -#include -#include #elif CGAL_ARR_TEST_TRAITS == CGAL_POLYLINE_TRAITS +#include #include -#include -#include #include #include #elif CGAL_ARR_TEST_TRAITS == CGAL_CONIC_TRAITS #include -#include #include +#include +#elif CGAL_ARR_TEST_TRAITS == CGAL_POLYCONIC_TRAITS +#include +#include +#include +#include #else #error No traits defined for test #endif #include #include + #include -#include "CompareCurveList.h" -#if CGAL_ARR_TEST_TRAITS==CGAL_SEGMENT_TRAITS - typedef CGAL::Gmpq NT; - typedef CGAL::Cartesian Kernel; - typedef CGAL::Arr_segment_traits_2 Traits; +#include "Compare_curves.h" -#elif CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_LEDA_TRAITS - typedef leda_rational NT; - typedef CGAL::Pm_segment_traits_leda_kernel_2 Kernel; - typedef CGAL::Arr_leda_segment_traits_2 Traits; +#if CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_TRAITS +typedef CGAL::Gmpq NT; +typedef CGAL::Cartesian Kernel; +typedef CGAL::Arr_segment_traits_2 Traits; #elif CGAL_ARR_TEST_TRAITS == CGAL_POLYLINE_TRAITS - typedef CGAL::Quotient NT; - typedef CGAL::Cartesian Kernel; - typedef CGAL::Arr_segment_cached_traits_2 Seg_traits; - typedef CGAL::Arr_polyline_traits_2 Traits; +typedef CGAL::Gmpq NT; +typedef CGAL::Cartesian Kernel; +typedef CGAL::Arr_segment_traits_2 Seg_traits; +typedef CGAL::Arr_polyline_traits_2 Traits; #elif CGAL_ARR_TEST_TRAITS == CGAL_CONIC_TRAITS -typedef leda_real NT; -typedef CGAL::Cartesian Kernel; -typedef CGAL::Arr_conic_traits_2 Traits; +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Cartesian Rat_kernel; +typedef Rat_kernel::Point_2 Rat_point_2; +typedef Rat_kernel::Segment_2 Rat_segment_2; +typedef Rat_kernel::Circle_2 Rat_circle_2; +typedef CGAL::Cartesian Alg_kernel; +typedef CGAL::Arr_conic_traits_2 + Traits_2; +#elif CGAL_ARR_TEST_TRAITS == CGAL_POLYCURVE_TRAITS +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Cartesian Rat_kernel; +typedef Rat_kernel::Point_2 Rat_point_2; +typedef Rat_kernel::Segment_2 Rat_segment_2; +typedef Rat_kernel::Circle_2 Rat_circle_2; +typedef CGAL::Cartesian Alg_kernel; +typedef CGAL::Arr_conic_traits_2 + Conic_traits; +typedef CGAL::Arr_polycurve_traits_2 Traits; + #endif -typedef Traits::Point_2 Point_2; -typedef Traits::X_monotone_curve_2 X_monotone_curve_2; +typedef Traits::Point_2 Point_2; +typedef Traits::Curve_2 Curve_2; +typedef Traits::X_monotone_curve_2 X_monotone_curve_2; -typedef std::list PointList; -typedef PointList::iterator PointListIter; +typedef std::list Points; +typedef std::list Curves; +typedef std::list X_monotone_curves; -typedef std::list CurveList; -typedef CurveList::iterator CurveListIter; +bool read_curves(std::ifstream& inp, Curves& curves, const Traits& traits); +bool read_xcurves(std::ifstream& inp, X_monotone_curves& xcurves, + const Traits& traits); +bool read_points(std::ifstream& inp, Points& points, const Traits& traits); +bool curves_identical(X_monotone_curves& list1, X_monotone_curves& list2); +bool points_identical(Points& list1, Points& list2); -void ReadCurveList(std::ifstream &inp, CurveList &clist); -void ReadCurveListRational(std::ifstream &inp, CurveList &clist); -void ReadPointList(std::ifstream &inp, PointList &plist); -bool IsCurveListIdentical(CurveList &list1, CurveList &list2); -bool IsPointListIdentical(PointList &list1, PointList &list2); +// istream modifier skips chars until end of line. +std::istream& skip_until_eol(std::istream& in) { + if (in.eof()) return in; + char c; + while (in.get(c) && (c != '\n')); + return in; +} -int main(int argc, char * argv[]) -{ +// istream modifier that checks for OFF comments and removes them. +std::istream& skip_comment(std::istream& in) { + char c; + while ((in >> c) && (c == '#')) in >> skip_until_eol; + in.putback(c); + return in; +} - if ( argc != 2 ) - { +int main(int argc, char* argv[]) { + if (argc != 2) { std::cout << "Specify a file name " << std::endl; return -1; } std::ifstream inp(argv[1]); - if (!inp.is_open()) { - std::cerr << "Cannot open file " << argv[1] << "!" << std::endl; + if (! inp.is_open()) { + std::cerr << "Error: Cannot open file " << argv[1] << "!" << std::endl; return -1; } - CurveList curves; - ReadCurveList(inp, curves); - Traits tr; - // get subcurves w/o overlapping - CurveList curves_no_overlap_list_out; - CGAL::compute_subcurves(curves.begin(), - curves.end(), - std::back_inserter(curves_no_overlap_list_out)); + Curves curves; + if (! read_curves(inp, curves, tr)) return -1; + + // Test subcurves w/o overlapping + X_monotone_curves curves_no_overlap_out; + CGAL::compute_subcurves(curves.begin(), curves.end(), + std::back_inserter(curves_no_overlap_out), + false, tr); - // get subcurves w/ overlapping - CurveList curves_with_overlap_list_out; - CGAL::compute_subcurves(curves.begin(), - curves.end(), - std::back_inserter(curves_with_overlap_list_out), - true); + X_monotone_curves curves_no_overlap; + if (! read_xcurves(inp, curves_no_overlap, tr)) return -1; - /*std::copy(curves_no_overlap_list_out.begin(), - curves_no_overlap_list_out.end(), - std::ostream_iterator(std::cout, "\n")); - std::cout<<"\n\n*******************\n\n"; + if (! compare_lists(curves_no_overlap_out, curves_no_overlap, tr)) { + std::cerr << "Curves w/o overlapping do not match!\n"; + for (const auto& xcv : curves_no_overlap_out) std::cerr << xcv << std::endl; + return -1; + } - std::copy(curves_with_overlap_list_out.begin(), - curves_with_overlap_list_out.end(), - std::ostream_iterator(std::cout, "\n")); - return 0;*/ + // Test intersection points (with endpoints) + Points points_with_ends_out; + CGAL::compute_intersection_points(curves.begin(), curves.end(), + std::back_inserter(points_with_ends_out), + true, tr); - //std::cout << mylist1.size() << " curves\n"; + Points points_with_ends; + if (! read_points(inp, points_with_ends, tr)) return -1; + if (! compare_lists(points_with_ends_out, points_with_ends, tr)) { + std::cerr << "Endpoints do not match!\n"; + for (const auto& p : points_with_ends_out) std::cerr << p << std::endl; + return -1; + } - // get intersection points (with endpoints) - PointList points_with_ends_list_out; - CGAL::compute_intersection_points(curves.begin(), - curves.end(), - std::back_inserter(points_with_ends_list_out), - true); + // Test intersection points w/o end points + Points points_without_ends_out; + CGAL::compute_intersection_points(curves.begin(), curves.end(), + std::back_inserter(points_without_ends_out), + false, tr); + Points points_without_ends; + if (! read_points(inp, points_without_ends, tr)) return -1; - // get intersection points w/o end points - PointList points_without_ends_list_out; - CGAL::compute_intersection_points(curves.begin(), - curves.end(), - std::back_inserter(points_without_ends_list_out), - false); - std::cout << points_without_ends_list_out.size() - << " points_without_ends_list_out(size)\n"; + if (! compare_lists(points_without_ends_out, points_without_ends, tr)) { + std::cerr << "Intersection points do not match!\n"; + for (const auto& p : points_without_ends_out) std::cerr << p << std::endl; + return -1; + } - // check the do_curves_intersecting method + // Test subcurves w/ overlapping + X_monotone_curves curves_with_overlap_out; + CGAL::compute_subcurves(curves.begin(), curves.end(), + std::back_inserter(curves_with_overlap_out), + true, tr); + + X_monotone_curves curves_with_overlap; + if (! read_xcurves(inp, curves_with_overlap, tr)) return -1; + + if (! compare_lists(curves_with_overlap_out, curves_with_overlap, tr)) { + std::cerr << "Curves w/ overlapping do not match!\n"; + for (const auto& xcv : curves_with_overlap_out) + std::cerr << xcv << std::endl; + return -1; + } + + // Test the do_curves_intersecting method bool do_intersect_out = CGAL::do_curves_intersect(curves.begin(), curves.end()); - - // read curves and points from file - CurveList curves_no_overlap_list; - ReadCurveListRational(inp, curves_no_overlap_list); - - PointList points_with_ends_list; - ReadPointList(inp, points_with_ends_list); - - PointList points_without_ends_list; - ReadPointList(inp, points_without_ends_list); - - int num_faces; - inp >> num_faces; - - CurveList curves_with_overlap_list; - ReadCurveListRational(inp, curves_with_overlap_list); - - if ( !compare_lists(curves_no_overlap_list_out, - curves_no_overlap_list, tr) ) - return -1; - - if ( !compare_lists(curves_with_overlap_list_out, - curves_with_overlap_list, tr) ) - return -1; - - if ( !compare_lists(points_with_ends_list_out, - points_with_ends_list, tr)) - return -1; - - if ( !compare_lists(points_without_ends_list_out, - points_without_ends_list, tr)) - return -1; - bool do_intersect = false; - if((points_without_ends_list.size() != 0) || - (curves_no_overlap_list_out.size() != - curves_with_overlap_list_out.size())) + if ((points_without_ends.size() != 0) || + (curves_no_overlap_out.size() != curves_with_overlap_out.size())) do_intersect = true; - if (do_intersect_out != do_intersect) + if (do_intersect_out != do_intersect) { + std::cerr << "Error: do_intersect()\n"; return -1; + } - std::cout<<"OK\n"; + std::cout << "Passed\n"; return 0; } -void ReadCurveList(std::ifstream& inp, CurveList& clist) -{ - int count; - inp >> count; - //std::cout << "ReadCurveList " << count << "\n"; +#if CGAL_ARR_TEST_TRAITS == CGAL_SEGMENT_TRAITS - for (int i = 0; i < count; i++) { +bool read_curves(std::ifstream& inp, Curves& curves, const Traits&) { + int count; + inp >> skip_comment >> count; + std::cout << "read_curves " << count << "\n"; + + for (int i = 0; i < count; ++i) { NT x0, y0, x1, y1; - int ix0, iy0, ix1, iy1; - inp >> ix0 >> iy0 >> ix1 >> iy1; - x0 = ix0; y0 = iy0; x1 = ix1; y1 = iy1; - + inp >> skip_comment >> x0 >> y0 >> x1 >> y1; Point_2 p1(x0, y0); Point_2 p2(x1, y1); - X_monotone_curve_2 curve(p1, p2); - clist.push_back(curve); - //std::cout << curve << "\n"; - } -} - -void ReadCurveListRational(std::ifstream& inp, CurveList& clist) -{ - int count; - inp >> count; - std::cout << "ReadCurveListRational " << count << "\n"; - char ch; - - for (int i = 0; i < count; i++) { - int a, b; - inp >> a >> ch >> b; - NT x0(a,b); - inp >> a >> ch >> b; - NT y0(a,b); - Point_2 p1(x0, y0); - - inp >> a >> ch >> b; - NT x1(a,b); - inp >> a >> ch >> b; - NT y1(a,b); - Point_2 p2(x1, y1); - - X_monotone_curve_2 curve(p1, p2); - clist.push_back(curve); + Curve_2 curve(p1, p2); + curves.push_back(curve); std::cout << curve << "\n"; } + return true; } -void ReadPointList(std::ifstream &inp, PointList &plist) -{ - int count; - inp >> count; - char ch; - std::cout << "ReadPointList " << count << "\n"; - for (int i = 0; i < count; i++) { - int a, b; - inp >> a >> ch >> b; - NT x0(a,b); - inp >> a >> ch >> b; - NT y0(a,b); - Point_2 p(x0, y0); - plist.push_back(p); +bool read_xcurves(std::ifstream& inp, X_monotone_curves& xcurves, + const Traits& traits) +{ return read_curves(inp, xcurves, traits); } + +#elif CGAL_ARR_TEST_TRAITS == CGAL_POLYLINE_TRAITS + +template +bool read_curves_(std::ifstream& inp, Curves_& curves, const Traits& traits, + const Ctr& ctr) { + int count; + inp >> skip_comment >> count; + // std::cout << "read_curves " << count << "\n"; + for (int i = 0; i < count; ++i) { + Points points; + auto rc = read_points(inp, points, traits); + if (! rc) return false; + auto cv = ctr(points.begin(), points.end()); + // std::cout << cv << "\n"; + curves.push_back(cv); } + return true; +} + +/*! Read curves. + */ +bool read_curves(std::ifstream& inp, Curves& curves, const Traits& traits) { + auto ctr_cv = traits.construct_curve_2_object(); + return read_curves_(inp, curves, traits, ctr_cv); +} + +/*! Read x-monotone curves. + */ +bool read_xcurves(std::ifstream& inp, X_monotone_curves& xcurves, + const Traits& traits) { + auto ctr_xcv = traits.construct_x_monotone_curve_2_object(); + return read_curves_(inp, xcurves, traits, ctr_xcv); +} + +#else +#error No traits defined for test +#endif + +bool read_points(std::ifstream& inp, Points& points, const Traits&) { + int count; + inp >> skip_comment >> count; + + // std::cout << "read_points " << count << "\n"; + for (int i = 0; i < count; i++) { + NT x, y; + inp >> skip_comment >> x >> y; + Point_2 p(x, y); + // std::cout << p << "\n"; + points.push_back(p); + } + return true; } #endif diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index a96be0e6d76..52c14ea54b7 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -413,10 +413,8 @@ public: insert( boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* =nullptr ) { diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 048b373187e..884644147f1 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -96,9 +95,10 @@ namespace internal { template struct Itag { - typedef typename boost::mpl::if_::Is_exact, - Exact_intersections_tag, - Exact_predicates_tag>::type type; + using Is_exact = typename Algebraic_structure_traits::Is_exact; + typedef std::conditional_t type; }; } // namespace internal @@ -330,11 +330,11 @@ public: #if 1 template static decltype(auto) get_source(const Segment_2& segment){ - return segment.source(); + return segment[0]; } template static decltype(auto) get_target(const Segment_2& segment){ - return segment.target(); + return segment[1]; } static const Point& get_source(const Constraint& cst){ diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index 34a282b9162..617e8c23a8a 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -385,10 +385,8 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* = nullptr) { return insert_with_info< boost::tuple::type> >(first,last); diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index f7e4a653060..3353b7d7603 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -529,10 +528,8 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - typename std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Weighted_point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* =nullptr ) {return insert_with_info< boost::tuple::type> >(first,last);} diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index c79aa0128d2..14e8604640f 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -710,10 +710,8 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* = NULL) { return insert_with_info< boost::tuple::type> >(first,last); diff --git a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h index 93e00b1680f..29513248384 100644 --- a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 8b22fddd349..63ade11b5e8 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -494,10 +494,8 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* =nullptr) { return insert_with_info< boost::tuple #endif -#include #include #include #include @@ -613,10 +612,9 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - typename std::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value >* =nullptr) + std::is_convertible_v< typename std::iterator_traits::value_type, Weighted_point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr) { return insert_with_info< boost::tuple #include -#include #include namespace CGAL { diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 55f917036af..12e92b65447 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -1224,10 +1223,8 @@ public: insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* =NULL) { return insert_with_info< boost::tuple #include #include -#include #include #include @@ -331,10 +330,8 @@ public: insert( boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, std::enable_if_t< - boost::mpl::and_< - std::is_convertible< typename std::iterator_traits::value_type, Point >, - std::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - >::value + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > >* =nullptr ) { 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 78b8822f598..01f08ac186c 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 @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h index e93418c19cf..20c4351bc49 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h @@ -16,7 +16,6 @@ #include #include -#include template diff --git a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp index e4f80d9149f..c1b00d9aca9 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp @@ -37,9 +37,9 @@ struct Tester void test_iterator_on_pair() const { typedef std::vector > Container; - typedef typename boost::mpl::if_, - std::add_const_t, - Container>::type Cast_type; + typedef std::conditional_t, + Container> Cast_type; Container points; points.push_back(std::make_pair(Weighted_point(Bare_point(0.160385, 0.599679, 0.374932), -0.118572), 0)); @@ -90,9 +90,9 @@ struct Tester void test_zip_iterator() const { typedef std::vector Container; - typedef typename boost::mpl::if_, - std::add_const_t, - Container >::type Cast_type; + typedef std::conditional_t, + Container > Cast_type; Container points; points.push_back(Weighted_point(Bare_point(0,0,0),1)); @@ -156,9 +156,9 @@ struct Tester void test_transform_iterator() const { typedef std::vector< Weighted_point > Container; - typedef typename boost::mpl::if_, - std::add_const_t, - Container >::type Cast_type; + typedef std::conditional_t, + Container > Cast_type; Container points; points.push_back(Weighted_point(Bare_point(0,0,0),1));