summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/checklist-macosx.txt4
-rw-r--r--patches/OpenCSG-1.3.2-MacOSX-port.patch3
-rwxr-xr-xscripts/macosx-build-dependencies.sh7
-rw-r--r--src/editor.cc2
-rw-r--r--src/value.cc7
-rw-r--r--testdata/scad/misc/echo-tests.scad4
-rw-r--r--tests/regression/echotest/echo-tests-expected.txt1
7 files changed, 21 insertions, 7 deletions
diff --git a/doc/checklist-macosx.txt b/doc/checklist-macosx.txt
index ff1c7ea..a72a8d3 100644
--- a/doc/checklist-macosx.txt
+++ b/doc/checklist-macosx.txt
@@ -3,8 +3,8 @@ NB! This is the Mac OS X deployment checklist.
OpenSCAD for your system only without manually compiling all
dependencies.
-o MacPorts libs
- port install eigen
+o Macports:
+ sudo port install cmake ImageMagick
o Qt4
- Download and install the combined 32-bit and 64-bit build for 10.5-10.6 from here:
diff --git a/patches/OpenCSG-1.3.2-MacOSX-port.patch b/patches/OpenCSG-1.3.2-MacOSX-port.patch
index ba4bcc4..7262307 100644
--- a/patches/OpenCSG-1.3.2-MacOSX-port.patch
+++ b/patches/OpenCSG-1.3.2-MacOSX-port.patch
@@ -34,7 +34,7 @@ diff --git a/src/src.pro b/src/src.pro
index 4843a12..04d3f4d 100644
--- a/src/src.pro
+++ b/src/src.pro
-@@ -1,10 +1,31 @@
+@@ -1,10 +1,32 @@
TEMPLATE = lib
TARGET = opencsg
VERSION = 1.3.2
@@ -43,6 +43,7 @@ index 4843a12..04d3f4d 100644
CONFIG += opengl warn_on release
-INCLUDEPATH += ../include ../glew/include ../
+INCLUDEPATH += ../include ../
++CONFIG -= qt
+
+# Optionally specify deployment location using the
+# OPENSCAD_LIBRARIES env. variable
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index 0ce9908..f7b6b18 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -200,8 +200,9 @@ build_cgal()
cd $BASEDIR/src
rm -rf CGAL-$version
if [ ! -f CGAL-$version.tar.gz ]; then
- #4.0
- curl -O https://gforge.inria.fr/frs/download.php/30387/CGAL-$version.tar.gz
+ # 4.0.2
+ curl -O https://gforge.inria.fr/frs/download.php/31175/CGAL-$version.tar.gz
+ # 4.0 curl -O https://gforge.inria.fr/frs/download.php/30387/CGAL-$version.tar.gz
# 3.9 curl -O https://gforge.inria.fr/frs/download.php/29125/CGAL-$version.tar.gz
# 3.8 curl -O https://gforge.inria.fr/frs/download.php/28500/CGAL-$version.tar.gz
# 3.7 curl -O https://gforge.inria.fr/frs/download.php/27641/CGAL-$version.tar.gz
@@ -301,6 +302,6 @@ build_gmp 5.0.5
build_mpfr 3.1.0
build_boost 1.47.0
# NB! For CGAL, also update the actual download URL in the function
-build_cgal 4.0
+build_cgal 4.0.2
build_glew 1.7.0
build_opencsg 1.3.2
diff --git a/src/editor.cc b/src/editor.cc
index bba8d4f..92aeefe 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -104,6 +104,8 @@ void Editor::wheelEvent ( QWheelEvent * event )
zoomIn();
else if (event->delta() < 0 )
zoomOut();
+ } else {
+ QTextEdit::wheelEvent( event );
}
}
diff --git a/src/value.cc b/src/value.cc
index 666062a..3b7f357 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -198,7 +198,12 @@ public:
}
return tmpstr;
#else
- return boost::lexical_cast<std::string>(op1);
+ // attempt to emulate Qt's QString.sprintf("%g"); from old OpenSCAD.
+ // see https://github.com/openscad/openscad/issues/158
+ std::stringstream tmp;
+ tmp.unsetf(std::ios::floatfield);
+ tmp << op1;
+ return tmp.str();
#endif
}
diff --git a/testdata/scad/misc/echo-tests.scad b/testdata/scad/misc/echo-tests.scad
index c42a67e..6753c61 100644
--- a/testdata/scad/misc/echo-tests.scad
+++ b/testdata/scad/misc/echo-tests.scad
@@ -12,3 +12,7 @@ echo(vec = [1,2,3]);
echo(range = [0:2]);
echo(str("string generated by str()"));
+
+// https://github.com/openscad/openscad/issues/158 rept by nop head
+// 0.8 should print 0.8 not 0.80000...004 (regardless of internal representation)
+echo(0.8);
diff --git a/tests/regression/echotest/echo-tests-expected.txt b/tests/regression/echotest/echo-tests-expected.txt
index ee9705f..d7ebe2f 100644
--- a/tests/regression/echotest/echo-tests-expected.txt
+++ b/tests/regression/echotest/echo-tests-expected.txt
@@ -7,3 +7,4 @@ ECHO: [1 : 2 : 10]
ECHO: vec = [1, 2, 3]
ECHO: range = [0 : 1 : 2]
ECHO: "string generated by str()"
+ECHO: 0.8
contact: Jan Huwald // Impressum