\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.13.1 - 2D Movable Separability of Sets

These functions determine whether a cavity (of a mold in the plane) that has the shape of a given polygon could be casted in the mold using a given edge as the top edge and then pulled out of the mold without colliding into the mold (but possibly sliding along the mold boundary).

If the polygon is castable this way, the function computes the closed range of pullout directions.

Functions

template<typename CastingTraits_2 >
std::pair< bool, std::pair< typename CastingTraits_2::Direction_2, typename CastingTraits_2::Direction_2 > > CGAL::Set_movable_separability_2::Single_mold_translational_casting::pullout_directions (const CGAL::Polygon_2< CastingTraits_2 > &polygon, const typename CGAL::Polygon_2< CastingTraits_2 >::Edge_const_iterator &it, CastingTraits_2 &traits=CastingTraits_2())
 Given a simple polygon and an edge of the polygon, this function determines whether a cavity (of a mold in the plane) that has the shape of the polygon can be used so that the polygon could be casted in the mold using the input edge as the top edge and then pulled out of the mold without colliding into the mold (but possibly sliding along the mold surface). More...
 
template<typename CastingTraits_2 >
std::pair< bool, std::pair< typename CastingTraits_2::Direction_2, typename CastingTraits_2::Direction_2 > > CGAL::Set_movable_separability_2::Single_mold_translational_casting::pullout_directions (const CGAL::Polygon_2< CastingTraits_2 > &polygon, const typename CGAL::Polygon_2< CastingTraits_2 >::Edge_const_iterator &it, CGAL::Orientation orientation, CastingTraits_2 &traits=CastingTraits_2())
 Same as above with the additional orientation argument. More...
 

Function Documentation

◆ pullout_directions() [1/2]

template<typename CastingTraits_2 >
std::pair<bool, std::pair<typename CastingTraits_2::Direction_2, typename CastingTraits_2::Direction_2> > CGAL::Set_movable_separability_2::Single_mold_translational_casting::pullout_directions ( const CGAL::Polygon_2< CastingTraits_2 > &  polygon,
const typename CGAL::Polygon_2< CastingTraits_2 >::Edge_const_iterator &  it,
CastingTraits_2 traits = CastingTraits_2() 
)

#include <CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h>

Given a simple polygon and an edge of the polygon, this function determines whether a cavity (of a mold in the plane) that has the shape of the polygon can be used so that the polygon could be casted in the mold using the input edge as the top edge and then pulled out of the mold without colliding into the mold (but possibly sliding along the mold surface).

If the polygon is castable this way, the function computes the closed range of pullout directions.

The type that substitutes the template parameter CastingTraits_2 must be a model of the concept CastingTraits_2.

Parameters
polygonthe input polygon.
itan iterator to an edge in polygon.
traitsthe traits to use.
Returns
a pair of elements, where the first is a Boolean that indicates whether the input edge is a valid top edge, and the second is a closed range of pullout directions represented as a pair of the extreme directions in the range. If the input edge is not a valid top edge, the range is nondeterministic.
Precondition
polygon must be non-degenerate (has at least 3 vertices) and simple, and it does not have three consecutive collinear vertices.
Examples:
Set_movable_separability_2/pullout_directions_single_mold_trans_cast.cpp.

◆ pullout_directions() [2/2]

template<typename CastingTraits_2 >
std::pair<bool, std::pair<typename CastingTraits_2::Direction_2, typename CastingTraits_2::Direction_2> > CGAL::Set_movable_separability_2::Single_mold_translational_casting::pullout_directions ( const CGAL::Polygon_2< CastingTraits_2 > &  polygon,
const typename CGAL::Polygon_2< CastingTraits_2 >::Edge_const_iterator &  it,
CGAL::Orientation  orientation,
CastingTraits_2 traits = CastingTraits_2() 
)

#include <CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h>

Same as above with the additional orientation argument.

If the orientation of the polygon is known upon invocation, specify it. Otherwise, it has to be computed. Note that finding the orientation of a polygon requires time linear in the number of edges.

Parameters
polygonthe input polygon.
itan iterator to an edge in polygon.
orientationthe orientation of polygon.
traitsthe traits to use.
Returns
a pair of elements, where the first is a Boolean that indicates whether the input edge is a valid top edge, and the second is a closed range of pullout directions represented as a pair of the extreme directions in the range. If the input edge is not a valid top edge, the range is nondeterministic.
Precondition
polygon must be non-degenerate (has at least 3 vertices) and simple, and it does not have three consecutive collinear vertices.