diff --git a/src/CSGTermEvaluator.cc b/src/CSGTermEvaluator.cc index e2207f76..6416f29b 100644 --- a/src/CSGTermEvaluator.cc +++ b/src/CSGTermEvaluator.cc @@ -107,7 +107,10 @@ static shared_ptr evaluate_csg_term_from_geometry(const State &state, else { // We cannot render concave polygons, so tessellate any 3D PolySets shared_ptr ps = dynamic_pointer_cast(geom); - if (ps) { + // Since is_convex() doesn't handle non-planar faces, we need to tessellate + // also in the indeterminate state so we cannot just use a boolean comparison. See #1061 + bool convex = ps->convexValue(); + if (ps && !convex) { assert(ps->getDimension() == 3); PolySet *ps_tri = new PolySet(3, ps->convexValue()); ps_tri->setConvexity(ps->getConvexity()); diff --git a/tests/regression/opencsgtest/issue1005-expected.png b/tests/regression/opencsgtest/issue1005-expected.png index 7242d5c5..06503b14 100644 Binary files a/tests/regression/opencsgtest/issue1005-expected.png and b/tests/regression/opencsgtest/issue1005-expected.png differ