summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CGALEvaluator.cc1
-rw-r--r--src/mainwin.cc8
-rw-r--r--src/polyset.cc4
3 files changed, 9 insertions, 4 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/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++) {
contact: Jan Huwald // Impressum