summaryrefslogtreecommitdiff
path: root/src/CGALEvaluator.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-08 03:42:24 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-08 03:42:24 (GMT)
commit1ff36169651f78e4810e1c2f5f5a19dc6c30a00d (patch)
treeadacb0d059afa5a81e636de06429acae5bbf394c /src/CGALEvaluator.cc
parent56692369cea8cb2339fc657deb7e5e039622c528 (diff)
Drop possibly corrupt polyhedron after a minkowski error
Diffstat (limited to 'src/CGALEvaluator.cc')
-rw-r--r--src/CGALEvaluator.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index a6b2f06..cc1c749 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -86,6 +86,11 @@ void CGALEvaluator::process(CGAL_Nef_polyhedron &target, const CGAL_Nef_polyhedr
// union && difference assert triggered by testdata/scad/bugs/rotate-diff-nonmanifold-crash.scad
std::string opstr = op == CGE_UNION ? "union" : op == CGE_INTERSECTION ? "intersection" : op == CGE_DIFFERENCE ? "difference" : op == CGE_MINKOWSKI ? "minkowski" : "UNKNOWN";
PRINTF("CGAL error in CGAL_Nef_polyhedron's %s operator: %s", opstr.c_str(), e.what());
+
+ // Minkowski errors can result in corrupt polyhedrons
+ if (op == CGE_MINKOWSKI) {
+ target = src;
+ }
}
CGAL::set_error_behaviour(old_behaviour);
}
contact: Jan Huwald // Impressum