Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problem with boolean operations on Polygons.

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problem with boolean operations on Polygons.


Chronological Thread 
  • From: gilou_66 <>
  • To:
  • Subject: [cgal-discuss] Problem with boolean operations on Polygons.
  • Date: Wed, 14 Jan 2015 01:11:24 -0800 (PST)

Hello,

I have inserted these lines in my Project :

/// Construct the two input polygons.
Polygon_2 P;
P.push_back (Point_2 (0, 0));
P.push_back (Point_2 (5, 0));
P.push_back (Point_2 (3.5, 1.5));
P.push_back (Point_2 (2.5, 0.5));
P.push_back (Point_2 (1.5, 1.5));
std::cout << "P = "; print_polygon (P);
Polygon_2 Q;
Q.push_back (Point_2 (0, 2));
Q.push_back (Point_2 (1.5, 0.5));
Q.push_back (Point_2 (2.5, 1.5));
Q.push_back (Point_2 (3.5, 0.5));
Q.push_back (Point_2 (5, 2));
std::cout << "Q = "; print_polygon (Q);

// Compute the difference of P and Q.
Pwh_list_2 intR;
Pwh_list_2::const_iterator it;
CGAL::difference (P, Q, std::back_inserter(intR));

std::cout << "The difference:" << std::endl;
for (it = intR.begin(); it != intR.end(); ++it) {
std::cout << "--> ";
print_polygon_with_holes (*it);
}/

...and I get compiling error :

no match for 'operator=' (operand types are
'std::back_insert_iterator<std::list&lt;CGAL::Polygon_with_holes_2&lt;CGAL::Epick>
> >'.....

Any clue ?







--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Problem-with-boolean-operations-on-Polygons-tp4660305.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page