diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-05 20:38:33 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-05 20:38:33 (GMT) |
commit | 966eb8f55e9460e5b200100940d98d88f5d47933 (patch) | |
tree | c4f4ff5d2aebe5b3db71b1d6c696c87936abfc58 /module.cc | |
parent | a02e00083f385a1770103569e07b2b5eb8d7ee4f (diff) |
Clifford Wolf:
Added missing "N.dim != 0" checks as needed e.g. for "if (false);" child nodes
(fixes bug reported by Andrew Plumb)
git-svn-id: http://svn.clifford.at/openscad/trunk@204 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'module.cc')
-rw-r--r-- | module.cc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -241,14 +241,16 @@ static CGAL_Nef_polyhedron render_cgal_nef_polyhedron_backend(const AbstractNode return *that->cgal_nef_cache[cache_id]; } - bool is_first = true; + bool first = true; CGAL_Nef_polyhedron N; foreach (AbstractNode *v, that->children) { if (v->modinst->tag_background) continue; - if (is_first) + if (first) { N = v->render_cgal_nef_polyhedron(); - else if (N.dim == 2) { + if (N.dim != 0) + first = false; + } else if (N.dim == 2) { if (intersect) N.p2 *= v->render_cgal_nef_polyhedron().p2; else @@ -259,7 +261,6 @@ static CGAL_Nef_polyhedron render_cgal_nef_polyhedron_backend(const AbstractNode else N.p3 += v->render_cgal_nef_polyhedron().p3; } - is_first = false; } that->cgal_nef_cache.insert(cache_id, new CGAL_Nef_polyhedron(N), N.weight()); |