From 1cfbb7a34d7cafe0ca644d6d45fc9ac8fbe069e5 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 17 Nov 2016 09:53:30 +0200 Subject: [PATCH] Updated --- .../single_mold_translational_casting_2.h | 23 +++++++++++++++---- ...edge_single_mold_translational_casting_2.h | 12 +++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Set_movable_separability_2/include/CGAL/single_mold_translational_casting_2.h b/Set_movable_separability_2/include/CGAL/single_mold_translational_casting_2.h index afe56a7af61..5f3f03c47c8 100644 --- a/Set_movable_separability_2/include/CGAL/single_mold_translational_casting_2.h +++ b/Set_movable_separability_2/include/CGAL/single_mold_translational_casting_2.h @@ -92,13 +92,14 @@ bool is_any_edge_colinear(const CGAL::Polygon_2& pgn) /*! \fn OutputIterator find_single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, OutputIterator oi) * \param[in] pgn the input polygon that we want to check if is castable or not. * \param[in,out] oi the output iterator to put the top edges in + * \param[in] kernel the kernel to use. * \return all the possible top edges of the polygon and there pullout direction * (with no rotation) */ template OutputIterator single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, - OutputIterator oi) + OutputIterator oi, Kernel& kernel) { /* Legend * point = Represented as Direction_2. It is the intersection between the @@ -115,11 +116,10 @@ single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, CGAL::Orientation poly_orientation = pgn.orientation(); auto segment_outer_circle = get_segment_outer_circle(*e_it++, poly_orientation); - internal::Circle_arrangment - circle_arrangment(segment_outer_circle); + internal::Circle_arrangment circle_arrangment(segment_outer_circle); ++edge_index; - for (; e_it!= pgn.edges_end(); ++e_it,++edge_index) { + for (; e_it!= pgn.edges_end(); ++e_it, ++edge_index) { segment_outer_circle = get_segment_outer_circle(*e_it, poly_orientation); circle_arrangment.add_segment_outer_circle(segment_outer_circle, edge_index); @@ -129,6 +129,21 @@ single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, return oi; } +/*! \fn OutputIterator find_single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, OutputIterator oi) + * \param[in] pgn the input polygon that we want to check if is castable or not. + * \param[in,out] oi the output iterator to put the top edges in + * \return all the possible top edges of the polygon and there pullout direction + * (with no rotation) + */ +template +OutputIterator +single_mold_translational_casting_2(const CGAL::Polygon_2& pgn, + OutputIterator oi) +{ + Kernel kernel; + return single_mold_translational_casting_2(pgn, oi, kernel); +} + } // end of namespace Set_movable_separability_2 } // end of namespace CGAL diff --git a/Set_movable_separability_2/include/CGAL/top_edge_single_mold_translational_casting_2.h b/Set_movable_separability_2/include/CGAL/top_edge_single_mold_translational_casting_2.h index 1a3470a443d..87052197333 100644 --- a/Set_movable_separability_2/include/CGAL/top_edge_single_mold_translational_casting_2.h +++ b/Set_movable_separability_2/include/CGAL/top_edge_single_mold_translational_casting_2.h @@ -28,13 +28,23 @@ template std::pair > top_edge_single_mold_translational_casting_2 -(const CGAL::Polygon_2& pgn, size_t i) +(const CGAL::Polygon_2& pgn, size_t i, Kernel& kernel) { typedef CastingTraits_2 Casting_traits_2; typename Casting_traits_2::Direction_2 d1, d2; return std::make_pair(false, std::make_pair(d1, d2)); } +template +std::pair > +top_edge_single_mold_translational_casting_2 +(const CGAL::Polygon_2& pgn, size_t i) +{ + Kernel kernel; + return top_edge_single_mold_translational_casting_2(pgn, i, kernel); +} + } // end of namespace Set_movable_separability_2 } // end of namespace CGAL