summaryrefslogtreecommitdiff
path: root/src/PolySetCGALEvaluator.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-11 23:48:07 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-11 23:48:07 (GMT)
commitf211077d25c6dd50c3e1e9ef868aefaa1e955634 (patch)
tree9705fdc4d5c6fe3eb3864b8a5d8676d2ae69da47 /src/PolySetCGALEvaluator.cc
parent832edd8c30b54de0e7e92132f38897836d30f7b3 (diff)
Fixed render() crash reported by tjhowse. It still fails, but at least doesn't crash anymore
Diffstat (limited to 'src/PolySetCGALEvaluator.cc')
-rw-r--r--src/PolySetCGALEvaluator.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc
index 78d5704..7a9566b 100644
--- a/src/PolySetCGALEvaluator.cc
+++ b/src/PolySetCGALEvaluator.cc
@@ -396,8 +396,13 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const RenderNode &node)
CGAL_Nef_polyhedron N = this->cgalevaluator.evaluateCGALMesh(node);
PolySet *ps = NULL;
if (!N.empty()) {
- ps = N.convertToPolyset();
- ps->convexity = node.convexity;
+ if (!N.p3->is_simple()) {
+ PRINTF("WARNING: Body of render() isn't valid 2-manifold!");
+ }
+ else {
+ ps = N.convertToPolyset();
+ ps->convexity = node.convexity;
+ }
}
return ps;
}
contact: Jan Huwald // Impressum