From 4f7bf1819fca887f2712807077f9e497c262e9ed Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 26 Jul 2012 20:49:58 -0500 Subject: add test for proper rounding of decimals in echo() 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 -- cgit v0.10.1 From fbdce170f4a2c1bd289023a48120296aed7f5771 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 25 Jul 2012 22:31:36 -0400 Subject: Updated Macports dependencies 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: -- cgit v0.10.1 From 4b2b7cb4a18b2fe127654fef52197c2cb4e825f4 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 25 Jul 2012 22:31:17 -0400 Subject: Upgraded CGAL to 4.0.2 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 -- cgit v0.10.1 From 5d0825efd71d93776a01dfb5bd33bbd513b8748e Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 27 May 2012 17:09:39 +0200 Subject: No need to link OpenCSG with Qt 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 -- cgit v0.10.1 From 24fbfdf9551915918f43650057fea74b1ad76286 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 14:57:38 -0500 Subject: fix broken mousewheel scrolling (bug introduced by ctrl-wheel-zoom feature) 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 ); } } -- cgit v0.10.1 From 8e4bc5d598cd59994731f3f8cadd980e9cdad6c7 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 18:43:39 -0500 Subject: change value so that ECHO works more like old Qstring.sprintf 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(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 } -- cgit v0.10.1