\( \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.12 - 2D Movable Separability of Sets

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

Functions

template<typename CastingTraits_2 , typename OutputIterator >
OutputIterator CGAL::Set_movable_separability_2::Single_mold_translational_casting::top_edges (const CGAL::Polygon_2< CastingTraits > &polygon, OutputIterator oi, CastingTraits_2 &traits=CastingTraits_2())
 Given a simple 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 and then pulled out of the mold without colliding into the mold (but possibly sliding along the mold surface). More...
 
template<typename CastingTraits_2 , typename OutputIterator >
OutputIterator CGAL::Set_movable_separability_2::Single_mold_translational_casting::top_edges (const CGAL::Polygon_2< CastingTraits > &polygon, OutputIterator oi, CGAL::Orientation orientation, CastingTraits_2 &traits=CastingTraits_2())
 Same as above with the additional orientation argument. More...
 

Function Documentation

◆ top_edges() [1/2]

template<typename CastingTraits_2 , typename OutputIterator >
OutputIterator CGAL::Set_movable_separability_2::Single_mold_translational_casting::top_edges ( const CGAL::Polygon_2< CastingTraits > &  polygon,
OutputIterator  oi,
CastingTraits_2 traits = CastingTraits_2() 
)

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

Given a simple 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 and then pulled out of the mold without colliding into the mold (but possibly sliding along the mold surface).

If the polygon is castable, the function computes the set of top edges of such cavities and the corresponding closed ranges of pullout directions. Let \(n\) denote the normal to a top edge \(e\), and let \(d\) denote a pullout direction of \(e\). Naturally, the angle between \(n\) and \(d\) must be in the open range (-90°, 90°); that is, \(n \cdot d > 0\). Each top edge and corresponding range is added to a container referred to by a given output iterator.

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

Parameters
polygonthe input polygon.
oithe output iterator. Its dereference type is a pair, where (i) the first element in the pair is an iterator to a top edge, and (ii) the second element is a closed range of pullout directions represented as a pair of the extreme directions in the range of type CastingTraits_2::Direction_2.
traitsthe traits to use.
Returns
the past-the-end iterator of the output container.
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/top_edges_single_mold_trans_cast.cpp.

◆ top_edges() [2/2]

template<typename CastingTraits_2 , typename OutputIterator >
OutputIterator CGAL::Set_movable_separability_2::Single_mold_translational_casting::top_edges ( const CGAL::Polygon_2< CastingTraits > &  polygon,
OutputIterator  oi,
CGAL::Orientation  orientation,
CastingTraits_2 traits = CastingTraits_2() 
)

#include <CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.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.
oithe output iterator. Its dereference type is a pair, where (i) the first element in the pair is an iterator to a top edge, and (ii) the second element is a closed range of pullout directions represented as a pair of the extreme directions in the range of type CastingTraits_2::Direction_2.
orientationthe orientation of polygon.
traitsthe traits to use.
Returns
the past-the-end iterator of the output container.
Precondition
polygon must be non-degenerate (has at least 3 vertices) and simple, and it does not have three consecutive collinear vertices.