Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] how to mesh a concave polygon
  • Date: Tue, 22 Apr 2014 07:24:39 +0200
  • Organization: GeometryFactory

The face type has a member function is_in_domain() that will help you filter those element out.

Sebastien.

http://doc.cgal.org/latest/Mesh_2/classDelaunayMeshFaceBase__2.html#a438ba4b035f8fcc7732565050aea2acf

On 04/21/2014 03:28 AM, TableYoung wrote:
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