Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Need help on Constrained Delaunay Triangulation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Need help on Constrained Delaunay Triangulation


Chronological Thread 
  • From: thomasyoung <>
  • To:
  • Subject: [cgal-discuss] Need help on Constrained Delaunay Triangulation
  • Date: Fri, 19 Feb 2010 12:11:56 -0800 (PST)


HI,

I have such a problem: There is one closed 2D area (no hole) with boundary
specified by a closed curve (defined with vertices and edges). There are
also some vertices falling inside the curve (I am sure about this).
I am creating a triangular mesh inside the area. So I am trying to use
Constrained Delaunay Triangulation in CGAL.

First I define some types as example did:

typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
typedef CDT::Point Point;
CDT cdt;

Then I insert all points:
std::vector<CDT::Vertex_handle > vhandler;
while (it != list.end()) {
vhandler.push_back(cdt.insert(Point((*it)[0], (*it)[1])));
it++;
}

Now I want to know the vertices of each triangle face so I can write them
into obj file. That is, for each triangle face, I need to get the index of
all vertices, say, a triangle consists of 1st, 10th and 15th vertices.

But I can't find the correct way to do this. If you have any sample code
piece, please help me. I really appreciate that.

Thank you.




--
View this message in context:
http://n4.nabble.com/Need-help-on-Constrained-Delaunay-Triangulation-tp1562183p1562183.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page