Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: unexpected vertexes in constrained Delaunay triangulation.

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: unexpected vertexes in constrained Delaunay triangulation.


Chronological Thread 
  • From: Bear <>
  • To:
  • Subject: [cgal-discuss] Re: unexpected vertexes in constrained Delaunay triangulation.
  • Date: Tue, 6 Aug 2013 01:43:03 -0700 (PDT)

I used the typical way to construct the constrained triangulation. Please see
the code bellow, i also attached the full code test_cgal_CT.cpp
<http://cgal-discuss.949826.n4.nabble.com/file/n4657896/test_cgal_CT.cpp> .

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_2<K> VB;
typedef CGAL::Constrained_triangulation_face_base_2<K> FB;
typedef CGAL::Triangulation_face_base_2<K, FB> FBWI;
typedef CGAL::Triangulation_data_structure_2<VB, FBWI> TDS;
typedef CGAL::Exact_predicates_tag PT;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, PT> CDT;

typedef CGAL::Constrained_triangulation_plus_2<CDT> Triangulation;
typedef CGAL::Polygon_2<K> Ring;
typedef Triangulation::Point Point;

void test_cgal_ct()
{
vector<Ring> rings = importPolygons();
Triangulation triangulation;
Triangulation::Face_handle startingSearchFace;
Triangulation::Vertex_handle sourceVertex, targetVertex;

for (vector<Ring>::iterator itrRing=rings.begin();
itrRing!=rings.end();
itrRing++) {
for (Ring::Edge_const_iterator itrEdge =
itrRing->edges_begin(); itrEdge
!= itrRing->edges_end(); ++itrEdge) {
sourceVertex = triangulation.insert(itrEdge->source(),
startingSearchFace);
startingSearchFace =
triangulation.incident_faces(sourceVertex);
targetVertex = triangulation.insert(itrEdge->target(),
startingSearchFace);
triangulation.insert_constraint(sourceVertex,
targetVertex);
startingSearchFace =
triangulation.incident_faces(targetVertex);
}
}


exportTriangulation(triangulation, "constrainted_d_t.edg");
}



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/unexpected-vertexes-in-constrained-Delaunay-triangulation-tp4657889p4657896.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page