summaryrefslogtreecommitdiff
path: root/src/dxftess-cgal.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-03-06 04:27:12 (GMT)
committerMarius Kintel <marius@kintel.net>2013-03-06 04:27:12 (GMT)
commitf70578f362c8c2c78036c9de846c20802ac7aa81 (patch)
treef327de271f14382c0915677a87e53867785551f7 /src/dxftess-cgal.cc
parent32469374cfe2985f936f017a204d4e9d7dcd3e2f (diff)
parent03be37d16b585e64de87118053206aaae06e7cf8 (diff)
Merge branch 'master' into epec-kernel
Diffstat (limited to 'src/dxftess-cgal.cc')
-rw-r--r--src/dxftess-cgal.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc
index d01c1d5..0197473 100644
--- a/src/dxftess-cgal.cc
+++ b/src/dxftess-cgal.cc
@@ -24,7 +24,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
-typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
+typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds, CGAL::Exact_predicates_tag > CDT;
//typedef CGAL::Delaunay_mesh_criteria_2<CDT> Criteria;
typedef CDT::Vertex_handle Vertex_handle;
@@ -109,6 +109,7 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool /* do_tr
Grid2d<point_info_t> point_info(GRID_FINE);
boost::unordered_map<edge_t,int> edge_to_triangle;
boost::unordered_map<edge_t,int> edge_to_path;
+ int duplicate_vertices = 0;
CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
try {
@@ -131,7 +132,7 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool /* do_tr
// ..maybe it would be better to assert here. But this would
// break compatibility with the glu tesselator that handled such
// cases just fine.
- PRINT( "WARNING: Duplicate vertex found during Tessellation. Render may be incorrect." );
+ duplicate_vertices++;
continue;
}
@@ -165,6 +166,11 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool /* do_tr
}
}
+ if ( duplicate_vertices > 0 ) {
+ PRINT( "WARNING: Duplicate vertices and/or intersecting lines found during DXF Tessellation." );
+ PRINT( "WARNING: Modify the polygon to be a Simple Polygon. Render is incomplete." );
+ }
+
}
catch (const CGAL::Assertion_exception &e) {
PRINTB("CGAL error in dxf_tesselate(): %s", e.what());
contact: Jan Huwald // Impressum