Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Triangulation of non-convex polygon

Subject: CGAL users discussion list

List archive

[cgal-discuss] Triangulation of non-convex polygon


Chronological Thread 
  • From: Jason Park <>
  • To:
  • Subject: [cgal-discuss] Triangulation of non-convex polygon
  • Date: Wed, 1 May 2013 11:43:03 -0700 (PDT)

I was trying to triangulate the non-convex polygon. But when I try to use
Constrained_Delaunay_triangulation_2, it seems that it doesn't work well.
Maybe because this polygon is non-convex shape. So, I decide to partitioning
the polygon to split into convex polygons. and it works!

But when I add some constraints(boundary vertices of polygons), some build
error occurs.
Here's my code and errors.

Thanks in advance!

Best Regards,
Jason Park.

for(int i=0; i<partition_polys.size(); ++i){
Polygon_2* poly_temp = &amp;partition_polys[i];
CDT cdt_temp;
for(int j=0; j&lt;poly_temp->size()-1; ++j){
cdt_temp.insert_constraint(poly_temp->vertex(j),
poly_temp->vertex[j+1]);
}

}


1>E:\Libraries\CGAL-4.2\include\CGAL/Polygon_2.h(421): error C2678: binary
'+' : no operator found which takes a left-hand operand of type
'std::_List_const_iterator<_Mylist>' (or there is no acceptable conversion)
1> with
1> [
1>
_Mylist=std::_List_val<CGAL::Point_2&lt;CGAL::Epick>,std::allocator<CGAL::Point_2&lt;CGAL::Epick>>>
1> ]
1> E:\Libraries\CGAL-4.2\include\CGAL/MP_Float.h(107): could be
'CGAL::MP_Float CGAL::operator +(const CGAL::MP_Float &,const CGAL::MP_Float
&)'
1>
E:\Libraries\CGAL-4.2\include\CGAL/Modular_arithmetic/Residue_type.h(37): or

'CGAL::Residue CGAL::operator +(const CGAL::Residue &)'
1> while trying to match the argument list
'(std::_List_const_iterator<_Mylist>, size_t)'
1> with
1> [
1>
_Mylist=std::_List_val<CGAL::Point_2&lt;CGAL::Epick>,std::allocator<CGAL::Point_2&lt;CGAL::Epick>>>
1> ]
1> E:\Libraries\CGAL-4.2\include\CGAL/Polygon_2.h(421) : while
compiling class template member function 'const CGAL::Point_2<R_>
&CGAL::Polygon_2<Traits_P,Container_P>::vertex(size_t) const'
1> with
1> [
1> R_=CGAL::Epick,
1> Traits_P=CGAL::Epick,
1> Container_P=std::list<CGAL::Point_2&lt;CGAL::Epick>>
1> ]
1> main.cpp(49) : see reference to class template instantiation
'CGAL::Polygon_2<Traits_P,Container_P>' being compiled
1> with
1> [
1> Traits_P=CGAL::Epick,
1> Container_P=std::list<CGAL::Point_2&lt;CGAL::Epick>>
1> ]



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Triangulation-of-non-convex-polygon-tp4657324.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page