diff options
-rwxr-xr-x | scripts/macosx-build-dependencies.sh | 4 | ||||
-rw-r--r-- | src/CGALEvaluator.cc | 1 | ||||
-rw-r--r-- | src/mainwin.cc | 8 | ||||
-rw-r--r-- | src/polyset.cc | 4 | ||||
-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 |
9 files changed, 20 insertions, 6 deletions
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh index 1036320..6313b2b 100755 --- a/scripts/macosx-build-dependencies.sh +++ b/scripts/macosx-build-dependencies.sh @@ -284,7 +284,7 @@ build_eigen() EIGENDIR="none" if [ $version = "2.0.17" ]; then EIGENDIR=eigen-eigen-b23437e61a07; fi - if [ $version = "3.1.1" ]; then EIGENDIR=eigen-eigen-43d9075b23ef; fi + if [ $version = "3.1.2" ]; then EIGENDIR=eigen-eigen-5097c01bcdc4; fi if [ $EIGENDIR = "none" ]; then echo Unknown eigen version. Please edit script. exit 1 @@ -365,7 +365,7 @@ fi echo "Using basedir:" $BASEDIR mkdir -p $SRCDIR $DEPLOYDIR -build_eigen 3.1.1 +build_eigen 3.1.2 build_gmp 5.0.5 build_mpfr 3.1.1 build_boost 1.51.0 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/src/mainwin.cc b/src/mainwin.cc index 4b0df70..dc5b79b 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -588,7 +588,9 @@ void MainWindow::refreshDocument() this->fileName.toStdString() % file.errorString().toStdString()); } else { - QString text = QTextStream(&file).readAll(); + QTextStream reader(&file); + reader.setCodec("UTF-8"); + QString text = reader.readAll(); PRINTB("Loaded design '%s'.", this->fileName.toStdString()); editor->setPlainText(text); } @@ -900,7 +902,9 @@ void MainWindow::actionSave() PRINTB("Failed to open file for writing: %s (%s)", this->fileName.toStdString() % file.errorString().toStdString()); } else { - QTextStream(&file) << this->editor->toPlainText(); + QTextStream writer(&file); + writer.setCodec("UTF-8"); + writer << this->editor->toPlainText(); PRINTB("Saved design '%s'.", this->fileName.toStdString()); this->editor->setContentModified(false); } diff --git a/src/polyset.cc b/src/polyset.cc index b412f5f..3b3be34 100644 --- a/src/polyset.cc +++ b/src/polyset.cc @@ -157,7 +157,7 @@ void PolySet::render_surface(csgmode_e csgmode, const Transform3d &m, GLint *sha } #endif /* ENABLE_OPENCSG */ if (this->is2d) { - double zbase = csgmode; + double zbase = 1; // Render 2D objects 1mm thick glBegin(GL_TRIANGLES); for (double z = -zbase/2; z < zbase; z += zbase) { @@ -248,7 +248,7 @@ void PolySet::render_edges(csgmode_e csgmode) const { glDisable(GL_LIGHTING); if (this->is2d) { - double zbase = csgmode; + double zbase = 1; // Render 2D objects 1mm thick for (double z = -zbase/2; z < zbase; z += zbase) { for (size_t i = 0; i < borders.size(); i++) { 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 |