Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] how to mesh a concave polygon

Subject: CGAL users discussion list

List archive

[cgal-discuss] how to mesh a concave polygon


Chronological Thread 
  • From: TableYoung <>
  • To:
  • Subject: [cgal-discuss] how to mesh a concave polygon
  • Date: Sun, 20 Apr 2014 18:28:34 -0700 (PDT)

Hi everyone
recently,i use mesh_2 class to generate mesh of my input
polygon.but the result is as not same as i want.
<http://cgal-discuss.949826.n4.nabble.com/file/n4659166/%E4%BE%8B%E5%AD%90.png>

<http://cgal-discuss.949826.n4.nabble.com/file/n4659166/iec.png> the scond
figure2 is what want to get,the picture1 is the result of Delaunay
Triangulation and mesh.how can i remove those redundant triangles near the
original point. following is my code:
CDT cdt;
std::ifstream in("data/triangulation_prog1.cin");
std::istream_iterator<Point> begin(in);
std::istream_iterator<Point> end;
std::istream_iterator<Point>itr=begin;
Point temp=(*itr);
itr++;
for (;itr!=end;++itr)
{
cdt.insert_constraint(cdt.insert(temp),cdt.insert((*itr)));
temp=(*itr);
}
std::list<Point> list_of_seeds;
list_of_seeds.push_back(Point(0, 0));
CGAL::refine_Delaunay_mesh_2(cdt, list_of_seeds.begin(),
list_of_seeds.end(),
Criteria());
std::cout<<"faces number:"<<cdt.number_of_faces();
&lt;nabble_a
href=&quot;triangulation_prog1.cin&quot;>triangulation_prog1.cin
please someone help me.thx



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/how-to-mesh-a-concave-polygon-tp4659166.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page