summaryrefslogtreecommitdiff
path: root/module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'module.cc')
-rw-r--r--module.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/module.cc b/module.cc
index 4a0b703..2ddfaa4 100644
--- a/module.cc
+++ b/module.cc
@@ -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());
contact: Jan Huwald // Impressum