diff options
-rw-r--r-- | src/dxftess-cgal.cc | 8 | ||||
-rw-r--r-- | tests/regression/cgalpngtest/polygon-intersect-expected.png | bin | 5170 -> 3012 bytes | |||
-rw-r--r-- | tests/regression/cgalpngtest/polygon-mesh-expected.png | bin | 5170 -> 3448 bytes | |||
-rw-r--r-- | tests/regression/cgalpngtest/polygon-self-intersect-expected.png | bin | 5170 -> 2918 bytes | |||
-rw-r--r-- | tests/regression/opencsgtest/polygon-intersect-expected.png | bin | 5170 -> 2901 bytes | |||
-rw-r--r-- | tests/regression/opencsgtest/polygon-mesh-expected.png | bin | 5170 -> 4597 bytes | |||
-rw-r--r-- | tests/regression/opencsgtest/polygon-self-intersect-expected.png | bin | 5170 -> 2405 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/polygon-intersect-expected.png | bin | 1810 -> 3006 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/polygon-mesh-expected.png | bin | 1810 -> 4682 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/polygon-self-intersect-expected.png | bin | 1810 -> 2403 bytes |
10 files changed, 6 insertions, 2 deletions
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc index d01c1d5..e40f1d3 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,9 @@ 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. Render may be incorrect." ); + } catch (const CGAL::Assertion_exception &e) { PRINTB("CGAL error in dxf_tesselate(): %s", e.what()); diff --git a/tests/regression/cgalpngtest/polygon-intersect-expected.png b/tests/regression/cgalpngtest/polygon-intersect-expected.png Binary files differindex 6f4f437..54e8d6b 100644 --- a/tests/regression/cgalpngtest/polygon-intersect-expected.png +++ b/tests/regression/cgalpngtest/polygon-intersect-expected.png diff --git a/tests/regression/cgalpngtest/polygon-mesh-expected.png b/tests/regression/cgalpngtest/polygon-mesh-expected.png Binary files differindex 6f4f437..a8fe41a 100644 --- a/tests/regression/cgalpngtest/polygon-mesh-expected.png +++ b/tests/regression/cgalpngtest/polygon-mesh-expected.png diff --git a/tests/regression/cgalpngtest/polygon-self-intersect-expected.png b/tests/regression/cgalpngtest/polygon-self-intersect-expected.png Binary files differindex 6f4f437..b93b5fb 100644 --- a/tests/regression/cgalpngtest/polygon-self-intersect-expected.png +++ b/tests/regression/cgalpngtest/polygon-self-intersect-expected.png diff --git a/tests/regression/opencsgtest/polygon-intersect-expected.png b/tests/regression/opencsgtest/polygon-intersect-expected.png Binary files differindex 6f4f437..c0a3cc9 100644 --- a/tests/regression/opencsgtest/polygon-intersect-expected.png +++ b/tests/regression/opencsgtest/polygon-intersect-expected.png diff --git a/tests/regression/opencsgtest/polygon-mesh-expected.png b/tests/regression/opencsgtest/polygon-mesh-expected.png Binary files differindex 6f4f437..b907a74 100644 --- a/tests/regression/opencsgtest/polygon-mesh-expected.png +++ b/tests/regression/opencsgtest/polygon-mesh-expected.png diff --git a/tests/regression/opencsgtest/polygon-self-intersect-expected.png b/tests/regression/opencsgtest/polygon-self-intersect-expected.png Binary files differindex 6f4f437..899bb6f 100644 --- a/tests/regression/opencsgtest/polygon-self-intersect-expected.png +++ b/tests/regression/opencsgtest/polygon-self-intersect-expected.png diff --git a/tests/regression/throwntogethertest/polygon-intersect-expected.png b/tests/regression/throwntogethertest/polygon-intersect-expected.png Binary files differindex 81eb514..d889f06 100644 --- a/tests/regression/throwntogethertest/polygon-intersect-expected.png +++ b/tests/regression/throwntogethertest/polygon-intersect-expected.png diff --git a/tests/regression/throwntogethertest/polygon-mesh-expected.png b/tests/regression/throwntogethertest/polygon-mesh-expected.png Binary files differindex 81eb514..1c2751c 100644 --- a/tests/regression/throwntogethertest/polygon-mesh-expected.png +++ b/tests/regression/throwntogethertest/polygon-mesh-expected.png diff --git a/tests/regression/throwntogethertest/polygon-self-intersect-expected.png b/tests/regression/throwntogethertest/polygon-self-intersect-expected.png Binary files differindex 81eb514..ebce31e 100644 --- a/tests/regression/throwntogethertest/polygon-self-intersect-expected.png +++ b/tests/regression/throwntogethertest/polygon-self-intersect-expected.png |