diff options
author | Marius Kintel <marius@kintel.net> | 2012-12-27 16:30:13 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-12-27 16:30:13 (GMT) |
commit | bc7ff5aa8d73ff08bd847bc8d0f41dc26deee54e (patch) | |
tree | e71160704ffa4ec9d3a670c3c4324b1582ccf2b0 | |
parent | ffae0bb3a5797aefcb5fc701ad8084d406f2a9e3 (diff) |
Ignore dimension when evaluating control modules mixed with geometry children. Fixes #229
-rw-r--r-- | src/CGALEvaluator.cc | 1 | ||||
-rw-r--r-- | testdata/scad/features/control-hull-dimension.scad | 4 | ||||
-rw-r--r-- | tests/regression/cgalpngtest/control-hull-dimension-expected.png | bin | 0 -> 6301 bytes | |||
-rw-r--r-- | tests/regression/dumptest/control-hull-dimension-expected.txt | 5 | ||||
-rw-r--r-- | tests/regression/opencsgtest/control-hull-dimension-expected.png | bin | 0 -> 6868 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/control-hull-dimension-expected.png | bin | 0 -> 6868 bytes |
6 files changed, 10 insertions, 0 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 5e16892..a4744c2 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -130,6 +130,7 @@ CGAL_Nef_polyhedron CGALEvaluator::applyHull(const CgaladvNode &node) const CGAL_Nef_polyhedron &chN = item.second; // FIXME: Don't use deep access to modinst members if (chnode->modinst->isBackground()) continue; + if (chN.dim == 0) continue; // Ignore object with dimension 0 (e.g. echo) if (dim == 0) { dim = chN.dim; } diff --git a/testdata/scad/features/control-hull-dimension.scad b/testdata/scad/features/control-hull-dimension.scad new file mode 100644 index 0000000..c8736db --- /dev/null +++ b/testdata/scad/features/control-hull-dimension.scad @@ -0,0 +1,4 @@ +hull() { + circle(1); + echo(1); +} diff --git a/tests/regression/cgalpngtest/control-hull-dimension-expected.png b/tests/regression/cgalpngtest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..ceeaf54 --- /dev/null +++ b/tests/regression/cgalpngtest/control-hull-dimension-expected.png diff --git a/tests/regression/dumptest/control-hull-dimension-expected.txt b/tests/regression/dumptest/control-hull-dimension-expected.txt new file mode 100644 index 0000000..be2e4ee --- /dev/null +++ b/tests/regression/dumptest/control-hull-dimension-expected.txt @@ -0,0 +1,5 @@ + hull() { + circle($fn = 0, $fa = 12, $fs = 2, r = 1); + group(); + } + diff --git a/tests/regression/opencsgtest/control-hull-dimension-expected.png b/tests/regression/opencsgtest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..52d11c1 --- /dev/null +++ b/tests/regression/opencsgtest/control-hull-dimension-expected.png diff --git a/tests/regression/throwntogethertest/control-hull-dimension-expected.png b/tests/regression/throwntogethertest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..52d11c1 --- /dev/null +++ b/tests/regression/throwntogethertest/control-hull-dimension-expected.png |