summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-19 21:43:04 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-19 21:43:04 (GMT)
commitf16d3a65a1176475f0c71676d6bf0640fabe45c6 (patch)
treee3d4e037b6164769bc05dd086956ad3dbad3fef0
parentef51ee8a7fc855bd06f82ac24fdcab5fa2a98815 (diff)
print only a single warning about intersecting vertices at dxf tessellation
, instead of spamming it over and over. also mention that it might be due to intersecting lines, not just duplicate vertices (duplicate vertices being perhaps generated by cgal's tessellator when it deals with intersecting lines)
-rw-r--r--src/dxftess-cgal.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc
index 9cd3bfd..506b34a 100644
--- a/src/dxftess-cgal.cc
+++ b/src/dxftess-cgal.cc
@@ -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 )
+ PRINTB( "WARNING: duplicate vertices and/or intersecting lines found during DXF Tessellation. Render may be incorrect.", duplicate_vertices );
+
}
catch (CGAL::Assertion_exception e) {
PRINTB("CGAL error in dxf_tesselate(): %s", e.what());
contact: Jan Huwald // Impressum