I want to generate a polygon for each face in a CGAL arrangement (reason: see my related question)
As input, i added polyline curves with multiple calls of:
std::list<Point_2> points;
(.. add points ..)
Polyline_2 pi1 (points.begin(), points.end());
insert (arr, pi1);
However, when I output the face:
std::ofstream ofs ("cgal_output.txt", std::ofstream::out);
template<class Arrangement>
void print_ccb (typename Arrangement::Ccb_halfedge_const_circulator circ)
{
typename Arrangement::Ccb_halfedge_const_circulator curr = circ;
do
{
typename Arrangement::Halfedge_const_handle he = curr;
ofs << he->curve() << std::endl;
} while (++curr != circ);
ofs << "#" << std::endl; // end of face mark
return;
}
the points of the curves are not traversed in a way, that a consistantly winded polygon outline can be drawn with the coordinates.
How can I fix this?