From e9ace30ccacde77fc2fa88e9e88d740d4dba131f Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 22 Feb 2014 20:00:29 -0500 Subject: [PATCH 01/24] Print error message if upload fails --- tests/test_pretty_print.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 517e9fbd..13ed8b51 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -36,9 +36,11 @@ import subprocess import time import platform try: + from urllib.error import URLError from urllib.request import urlopen from urllib.parse import urlencode except: + from urllib2 import URLError from urllib2 import urlopen from urllib import urlencode @@ -386,7 +388,8 @@ def upload_html(page_url, title, html): } try: response = urlopen(page_url, data=postify(data)) - except: + except URLError, e: + print 'Upload error: ' + str(e) return False return 'success' in response.read().decode() From 3ac8895d7abab97c45226e52b2ab4340cddcab0e Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 23 Feb 2014 15:47:26 -0500 Subject: [PATCH 02/24] Enable experimental features only for snapshot builds --- openscad.pro | 5 +++++ scripts/publish-macosx.sh | 5 ++--- scripts/release-common.sh | 24 +++++++++++++----------- src/Preferences.cc | 4 ++++ src/openscad.cc | 9 ++++++++- tests/CMakeLists.txt | 2 +- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/openscad.pro b/openscad.pro index 58026b76..d59dbeb1 100644 --- a/openscad.pro +++ b/openscad.pro @@ -160,6 +160,11 @@ CONFIG += glib-2.0 #Uncomment the following line to enable QCodeEdit #CONFIG += qcodeedit +# Make experimental features available +experimental { + DEFINES += ENABLE_EXPERIMENTAL +} + mdi { DEFINES += ENABLE_MDI } diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index aff08095..a5fe7840 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -46,8 +46,7 @@ if test -z "$VERSIONDATE"; then fi if test -z "$VERSION"; then VERSION=$VERSIONDATE - COMMIT=-c - SNAPSHOT=true + SNAPSHOT=snapshot fi # Turn off ccache, just for safety @@ -59,7 +58,7 @@ export OPENSCAD_LIBRARIES=$PWD/../libraries/homebrew # Make sure that the correct Qt tools are used export PATH=$OPENSCAD_LIBRARIES/bin:$PATH -`dirname $0`/release-common.sh -v $VERSION $COMMIT +`dirname $0`/release-common.sh -v $VERSION $SNAPSHOT if [[ $? != 0 ]]; then exit 1 fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index e91c79fa..350b4235 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -10,17 +10,14 @@ # Usage: release-common.sh [-v ] [-c] [-mingw[32|64]] # -v Version string (e.g. -v 2010.01) # -d Version date (e.g. -d 2010.01.23) -# -c Build with commit info # -mingw32 Cross-compile for win32 using MXE -# -mingw64 Cross-compile for win64 using Tony Theodore's MXE fork +# -mingw64 Cross-compile for win64 using MXE +# -snapshot Build a snapshot binary (make e.g. experimental features available, build with commit info) # # If no version string or version date is given, todays date will be used (YYYY-MM-DD) -# If only verion date is given, it will be used also as version string. +# If only version date is given, it will be used also as version string. # If no make target is given, release will be used on Windows, none one Mac OS X # -# The commit info will extracted from git and be passed to qmake as OPENSCAD_COMMIT -# to identify a build in the about box. -# # The mingw cross compile depends on the MXE cross-build tools. Please # see the README.md file on how to install these dependencies. @@ -37,6 +34,8 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then exit 1 fi +CONFIG=deploy + if [[ "$OSTYPE" =~ "darwin" ]]; then OS=MACOSX elif [[ $OSTYPE == "msys" ]]; then @@ -63,6 +62,11 @@ if [ "`echo $* | grep mingw64`" ]; then echo Mingw-cross build using ARCH=64 fi +if [ "`echo $* | grep snapshot`" ]; then + CONFIG="$CONFIG experimental" + OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"` +fi + if [ $OS ]; then echo "Detected OS: $OS" else @@ -75,7 +79,6 @@ do case $c in v) VERSION=$OPTARG;; d) VERSIONDATE=$OPTARG;; - c) OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"` esac done @@ -116,7 +119,7 @@ if [ -d .git ]; then git submodule update fi -echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIGURATION..." +echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIG..." if [ ! $NUMCPU ]; then echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)"; @@ -124,7 +127,6 @@ if [ ! $NUMCPU ]; then fi echo "NUMCPU: " $NUMCPU -CONFIG=deploy case $OS in LINUX|MACOSX) TARGET= @@ -148,11 +150,11 @@ esac case $OS in UNIX_CROSS_WIN) - cd $DEPLOYDIR && qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro + cd $DEPLOYDIR && qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro cd $OPENSCADDIR ;; *) - qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro + qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG-=debug openscad.pro ;; esac diff --git a/src/Preferences.cc b/src/Preferences.cc index 2cd38cf3..2d34aa07 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -96,7 +96,11 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) addPrefPage(group, prefsAction3DView, page3DView); addPrefPage(group, prefsActionEditor, pageEditor); addPrefPage(group, prefsActionUpdate, pageUpdate); +#ifdef ENABLE_EXPERIMENTAL addPrefPage(group, prefsActionFeatures, pageFeatures); +#else + this->toolBar->removeAction(prefsActionFeatures); +#endif addPrefPage(group, prefsActionAdvanced, pageAdvanced); connect(group, SIGNAL(triggered(QAction*)), this, SLOT(actionTriggered(QAction*))); diff --git a/src/openscad.cc b/src/openscad.cc index 6f3c43f1..cfcde9ec 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -114,7 +114,9 @@ static void help(const char *progname) "%2%[ --imgsize=width,height ] [ --projection=(o)rtho|(p)ersp] \\\n" "%2%[ --render | --preview[=throwntogether] ] \\\n" "%2%[ --csglimit=num ] \\\n" +#ifdef ENABLE_EXPERIMENTAL "%2%[ --enable= ] \\\n" +#endif "%2%filename\n", progname % (const char *)tabstr); exit(1); @@ -597,7 +599,10 @@ int main(int argc, char **argv) ("d,d", po::value(), "deps-file") ("m,m", po::value(), "makefile") ("D,D", po::value >(), "var=val") - ("enable", po::value >(), "enable experimental features"); +#ifdef ENABLE_EXPERIMENTAL + ("enable", po::value >(), "enable experimental features") +#endif + ; po::options_description hidden("Hidden options"); hidden.add_options() @@ -665,11 +670,13 @@ int main(int argc, char **argv) commandline_commands += ";\n"; } } +#ifdef ENABLE_EXPERIMENTAL if (vm.count("enable")) { BOOST_FOREACH(const string &feature, vm["enable"].as >()) { Feature::enable_feature(feature); } } +#endif vector inputFiles; if (vm.count("input-file")) { inputFiles = vm["input-file"].as >(); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9897d8d5..7a14a989 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -477,7 +477,7 @@ if (DEFINED OPENSCAD_DAY) add_definitions(-DOPENSCAD_DAY=${OPENSCAD_DAY}) endif() -add_definitions(-DOPENSCAD_TESTING) +add_definitions(-DOPENSCAD_TESTING -DENABLE_EXPERIMENTAL) # Search for MCAD in correct place set(CTEST_ENVIRONMENT "${CTEST_ENVIRONMENT};OPENSCADPATH=${CMAKE_CURRENT_SOURCE_DIR}/../libraries") From 2db75975414ea75364cdd8a4a8df403175141f3e Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 23 Feb 2014 16:42:58 -0500 Subject: [PATCH 03/24] Updated RELEASE NOTES --- RELEASE_NOTES | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index a472f20d..4facc435 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,4 +1,4 @@ -OpenSCAD 2014.0X +OpenSCAD 2014.Q1 ================ Language Features: @@ -7,17 +7,20 @@ o Added parent_module() and $parent_modules o Added children() as a replacement for child() o Unicode strings (using UTF-8) are now correctly handled o Ranges can have a negative step value -o Added experimental concat() function for concatenating vectors +o Added norm() and cross() functions Program Features: o Cmd-line: --info parameter prints system/library info -o Cmd-line: --enable parameter to enable experimental features o Cmd-line: --csglimit parameter to change CSG rendering limit +o Cmd-line: Better handling of cmd-line arguments under Windows o GUI: Added Reset View o GUI: Added Search&Replace in editor o GUI: Syntax highlighting now has a dark background theme +o GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes Bugfixes/improvements: +o Reading empty STL files sometimes caused a crash +o OPENSCADPATH now uses semicolon as path separator under Windows o polyhedron() is now much more robust handling almost planar polygons o Automatic reloads of large designs are more robust o Boolean logic in if() statements are now correctly short-circuited From 776df9fc0e274629b6a1d1292e31df1412ed7952 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Mon, 24 Feb 2014 18:24:39 -0600 Subject: [PATCH 04/24] update release-common.sh calls to use 'snapshot', add 'release' stub --- scripts/builder.sh | 28 +++++++++++++++++++++++++--- scripts/release-common.sh | 3 ++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/scripts/builder.sh b/scripts/builder.sh index 150420b6..c8bd167e 100755 --- a/scripts/builder.sh +++ b/scripts/builder.sh @@ -52,6 +52,12 @@ init_variables() DOBUILD=1 DOUPLOAD=1 DRYRUN= + DOSNAPSHOT=1 + if [ "`echo $* | grep release`" ]; then + echo "this script cannot yet build releases, only snapshots" + DOSNAPSHOT=0 + exit 1 + fi if [ "`echo $* | grep uploadonly`" ]; then DOUPLOAD=1 DOBUILD= @@ -69,6 +75,7 @@ init_variables() export DOUPLOAD export DRYRUN export DATECODE + export DOSNAPSHOT } check_starting_path() @@ -104,7 +111,12 @@ build_win32() . ./scripts/setenv-mingw-xbuild.sh clean . ./scripts/setenv-mingw-xbuild.sh ./scripts/mingw-x-build-dependencies.sh - ./scripts/release-common.sh mingw32 + if [ $DOSNAPSHOT ] ; then + ./scripts/release-common.sh snapshot mingw32 + else + echo "this script cant yet build releases, only snapshots" + exit 1 + fi if [ "`echo $? | grep 0`" ]; then echo build of win32 stage over else @@ -120,7 +132,12 @@ build_win64() . ./scripts/setenv-mingw-xbuild.sh clean . ./scripts/setenv-mingw-xbuild.sh 64 ./scripts/mingw-x-build-dependencies.sh 64 - ./scripts/release-common.sh mingw64 + if [ $DOSNAPSHOT ] ; then + ./scripts/release-common.sh snapshot mingw64 + else + echo "this script cant yet build releases, only snapshots" + exit 1 + fi if [ "`echo $? | grep 0`" ]; then echo build of win64 stage over else @@ -135,7 +152,12 @@ build_lin32() { . ./scripts/setenv-unibuild.sh ./scripts/uni-build-dependencies.sh - ./scripts/release-common.sh + if [ $DOSNAPSHOT ] ; then + ./scripts/release-common.sh snapshot + else + echo "this script cant yet build releases, only snapshots" + exit 1 + fi DATECODE=`date +"%Y.%m.%d"` export DATECODE } diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 350b4235..388c010e 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -100,7 +100,8 @@ case $OS in elif [ "`command -v i686-pc-mingw32-makensis`" ]; then MAKENSIS=i686-pc-mingw32-makensis else - echo "makensis not found. please install nsis" + echo "makensis not found. please install nsis on your system." + echo "(for example, on debian linux, try apt-get install nsis)" exit 1 fi echo NSIS makensis found: $MAKENSIS From 020d65eff00d483ccb28ace4b87750cdad73b719 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Mon, 24 Feb 2014 18:38:45 -0600 Subject: [PATCH 05/24] fix issue #671 (regression) --- src/openscad.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/openscad.cc b/src/openscad.cc index cfcde9ec..7971512f 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -457,10 +457,14 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c #include // Only if "fileName" is not absolute, prepend the "absoluteBase". -static QString assemblePath(const fs::path& absoluteBase, +static QString assemblePath(const fs::path& absoluteBaseDir, const string& fileName) { - return fileName.empty() ? "" : QDir(QString::fromStdString((const string&) absoluteBase)) - .absoluteFilePath(QString::fromStdString(fileName)); + if (fileName.empty()) return ""; + QString qsDir = QString::fromUtf8( boosty::stringy( absoluteBaseDir ).c_str() ); + QString qsFile = QString::fromUtf8( fileName.c_str() ); + // if qsfile is absolute, dir is ignored. (see documentation of QFileInfo) + QFileInfo info( qsDir, qsFile ); + return info.absoluteFilePath(); } bool QtUseGUI() From 341571ce52d634aa8b30545dd4c835cd690c5106 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 25 Feb 2014 02:05:21 -0500 Subject: [PATCH 06/24] Manage releases on github, use markdown for release notes --- RELEASE_NOTES | 419 +++++++++++++++++------------------- doc/release-checklist.txt | 6 +- releases/2010.01.md | 11 + releases/2010.02.md | 14 ++ releases/2010.05.md | 7 + releases/2011.04.md | 9 + releases/2011.06.md | 9 + releases/2011.12.md | 41 ++++ releases/2013.01.md | 34 +++ releases/2013.06.md | 48 +++++ releases/2014.Q1.md | 47 ++++ scripts/github-release.sh | 7 + scripts/makereleasejson.py | 13 ++ scripts/makereleasenotes.sh | 9 + 14 files changed, 454 insertions(+), 220 deletions(-) create mode 100644 releases/2010.01.md create mode 100644 releases/2010.02.md create mode 100644 releases/2010.05.md create mode 100644 releases/2011.04.md create mode 100644 releases/2011.06.md create mode 100644 releases/2011.12.md create mode 100644 releases/2013.01.md create mode 100644 releases/2013.06.md create mode 100644 releases/2014.Q1.md create mode 100755 scripts/github-release.sh create mode 100755 scripts/makereleasejson.py create mode 100755 scripts/makereleasenotes.sh diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 4facc435..dc7fb9ee 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,256 +1,239 @@ -OpenSCAD 2014.Q1 -================ -Language Features: -o Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d) -o Added parent_module() and $parent_modules -o Added children() as a replacement for child() -o Unicode strings (using UTF-8) are now correctly handled -o Ranges can have a negative step value -o Added norm() and cross() functions +# OpenSCAD 2014.Q1 -Program Features: -o Cmd-line: --info parameter prints system/library info -o Cmd-line: --csglimit parameter to change CSG rendering limit -o Cmd-line: Better handling of cmd-line arguments under Windows -o GUI: Added Reset View -o GUI: Added Search&Replace in editor -o GUI: Syntax highlighting now has a dark background theme -o GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes +**Language Features:** +* Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d) +* Added parent_module() and $parent_modules +* Added children() as a replacement for child() +* Unicode strings (using UTF-8) are now correctly handled +* Ranges can have a negative step value +* Added norm() and cross() functions -Bugfixes/improvements: -o Reading empty STL files sometimes caused a crash -o OPENSCADPATH now uses semicolon as path separator under Windows -o polyhedron() is now much more robust handling almost planar polygons -o Automatic reloads of large designs are more robust -o Boolean logic in if() statements are now correctly short-circuited -o rands() with zero range caused an infinite loop -o resize(, auto=true) didn't work when shrinking objects -o The $children variable sometimes misbehaved due to dynamic scoping -o The --camera cmd-line option behaved differently then the corresponding GUI function -o PNG export now doesn't leak transparency settings into the target image -o Improved performance of 3D hull() operations -o Some editor misbehaviors were fixed -o Stability fixes of CGAL-related crashes -o Windows cmd-line can now handle spaces in filenames -o Default CSG rendering limit is now 100K elements -o Fixed a crash reading DXF files using comma as decimal separator -o Fixed a crash running the cmd-line without a HOME env. variable -o Intersecting something with nothing now correctly results in an empty object +**Program Features:** +* Cmd-line: --info parameter prints system/library info +* Cmd-line: --csglimit parameter to change CSG rendering limit +* Cmd-line: Better handling of cmd-line arguments under Windows +* GUI: Added Reset View +* GUI: Added Search&Replace in editor +* GUI: Syntax highlighting now has a dark background theme +* GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes -Deprecations: -o child() is no longer supported. Use children() instead. -o polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead. +**Bugfixes/improvements:** +* Reading empty STL files sometimes caused a crash +* OPENSCADPATH now uses semicolon as path separator under Windows +* polyhedron() is now much more robust handling almost planar polygons +* Automatic reloads of large designs are more robust +* Boolean logic in if() statements are now correctly short-circuited +* rands() with zero range caused an infinite loop +* resize(, auto=true) didn't work when shrinking objects +* The $children variable sometimes misbehaved due to dynamic scoping +* The --camera cmd-line option behaved differently then the corresponding GUI function +* PNG export now doesn't leak transparency settings into the target image +* Improved performance of 3D hull() operations +* Some editor misbehaviors were fixed +* Stability fixes of CGAL-related crashes +* Windows cmd-line can now handle spaces in filenames +* Default CSG rendering limit is now 100K elements +* Fixed a crash reading DXF files using comma as decimal separator +* Fixed a crash running the cmd-line without a HOME env. variable +* Intersecting something with nothing now correctly results in an empty object -Misc: -o Test framework now shares more code with the GUI app -o Test report can now be automatically uploaded to dinkypage.com -o Better compatibility with BSD systems -o Qt5 support +**Deprecations:** +* child() is no longer supported. Use children() instead. +* polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead. -OpenSCAD 2013.06 -================ +**Misc:** +* Test framework now shares more code with the GUI app +* Test report can now be automatically uploaded to dinkypage.com +* Better compatibility with BSD systems +* Qt5 support -Language Features: -o linear_extrude now takes a scale parameter: +# OpenSCAD 2013.06 + +**Language Features:** +* linear_extrude now takes a scale parameter: linear_extrude(height=a, slices=b, twist=c, scale=[x,y]) -o Recursive use of modules is now supported (including cascading child() operations): +* Recursive use of modules is now supported (including cascading child() operations): https://github.com/openscad/openscad/blob/master/examples/example024.scad -o Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) .. -o value assignments in parameters can now depend on already declared parameters -o Added resize() module: +* Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) .. +* value assignments in parameters can now depend on already declared parameters +* Added resize() module: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize -Program Features: -o Added basic syntax highlighting in the editor -o There is now a built-in library path in user-space: +**Program Features:** +* Added basic syntax highlighting in the editor +* There is now a built-in library path in user-space: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Library_Locations -o Commandline output to PNG, with various camera and rendering settings. +* Commandline output to PNG, with various camera and rendering settings. Run openscad -h to see usage info or see the OpenSCAD wiki user manual. -o Attempting to open dxf, off or stl files in the GUI will now create an import statement. -o The preview operator (%) will now preserve any manually set color -o The highlight operator (#) will now color the object in transparent red -o Mac: Added document icon -o Mac: Added auto-update check -o Windows: Better cmd-line support using the openscad.com executable +* Attempting to open dxf, off or stl files in the GUI will now create an import statement. +* The preview operator (%) will now preserve any manually set color +* The highlight operator (#) will now color the object in transparent red +* Mac: Added document icon +* Mac: Added auto-update check +* Windows: Better cmd-line support using the openscad.com executable -Bugfixes: -o Importing files is now always relative to the importing script, also for libraries -o We didn't always print a warning when CSG normalization created too many elements -o Binary STLs can now be read on big endian architectures -o Some binary STLs couldn't be read -o Fixed some issues related to ARM builds -o CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data -o The Automatic Reload feature is now more robust -o If a file couldn't be saved it no longer fails silently -o Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models -o The lookup() function had bad boundary condition behavior -o The surface() module failed when the .dat file lacked a trailing newline -o The hull() module could crash if any of the children were empty objects -o Some problems using unicode filenames have been fixed +**Bugfixes:** +* Importing files is now always relative to the importing script, also for libraries +* We didn't always print a warning when CSG normalization created too many elements +* Binary STLs can now be read on big endian architectures +* Some binary STLs couldn't be read +* Fixed some issues related to ARM builds +* CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data +* The Automatic Reload feature is now more robust +* If a file couldn't be saved it no longer fails silently +* Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models +* The lookup() function had bad boundary condition behavior +* The surface() module failed when the .dat file lacked a trailing newline +* The hull() module could crash if any of the children were empty objects +* Some problems using unicode filenames have been fixed -Misc: -o Build scripts have been further improved -o Regression test now creates single monolithic .html file for easier uploading -o Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine -o The backend is finally independent of Qt -o Windows: We now have a 64-bit version +**Misc:** +* Build scripts have been further improved +* Regression test now creates single monolithic .html file for easier uploading +* Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine +* The backend is finally independent of Qt +* Windows: We now have a 64-bit version -Known Bugs: -o Linux: command-line png rendering on Gallium is flaky. +**Known Bugs:** +* Linux: command-line png rendering on Gallium is flaky. Workaround: use CGAL --render or hardware rendering. +# OpenSCAD 2013.01 -OpenSCAD 2013.01 -================ +**Features:** +* Snappier GUI while performing CGAL computations (computations running in separate thread) +* The size of the misc. caches can now be adjusted from Preferences +* The limit for when to disable OpenCSG can now be adjusted from Preferences +* Added Dot product operator: vec * vec +* Added Matrix multiplication operator: vec * mat, mat * mat +* Added search() function +* Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile +* The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries +* .csg files can now be opened from the GUI +* linear_extrude() will now assume that the first parameter means 'height' if it's a number -Features: -o Snappier GUI while performing CGAL computations (computations running in separate thread) -o The size of the misc. caches can now be adjusted from Preferences -o The limit for when to disable OpenCSG can now be adjusted from Preferences -o Added Dot product operator: vec * vec -o Added Matrix multiplication operator: vec * mat, mat * mat -o Added search() function -o Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile -o The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries -o .csg files can now be opened from the GUI -o linear_extrude() will now assume that the first parameter means 'height' if it's a number +**Bugfixes:** +* use'ing an non-existing file sometimes crashed under Windows +* Better font handling: Ensure a monospace font is chosen as default +* Division by zero caused hang in some cases (e.g. sin(1/0)) +* Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown +* Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization +* scale() with a scale factor of zero could cause a crash +* Fixed a number of issues related to use/include +* Providing an unknown parameter on the cmd-line caused a crash +* cmd-line overrides using -D now also work for USEd modules +* Modifier characters can now be used in front of if statements +* rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic. +* .csg files will now have relative filenames whenever possible +* Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones. +* Always use utf-8 file encoding, also under Windows +* A lot of build script fixes +* Some other crash bugs fixes -Bugfixes: -o use'ing an non-existing file sometimes crashed under Windows -o Better font handling: Ensure a monospace font is chosen as default -o Division by zero caused hang in some cases (e.g. sin(1/0)) -o Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown -o Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization -o scale() with a scale factor of zero could cause a crash -o Fixed a number of issues related to use/include -o Providing an unknown parameter on the cmd-line caused a crash -o cmd-line overrides using -D now also work for USEd modules -o Modifier characters can now be used in front of if statements -o rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic. -o .csg files will now have relative filenames whenever possible -o Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones. -o Always use utf-8 file encoding, also under Windows -o A lot of build script fixes -o Some other crash bugs fixes - -Deprecations: -o The old include syntax "" without the include keyword is no +**Deprecations:** +* The old include syntax "" without the include keyword is no longer supported and will cause a syntax error. -OpenSCAD 2011.12 -================ +# OpenSCAD 2011.12 -Features: -o The MCAD library is now bundled with OpenSCAD -o Added len() function. Takes one vector or string parameter and returns its length. -o The index operator [] now works on strings -o The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09] -o The version_num() function will return the OpenSCAD version as a number, e.g. 20110923 -o hull() Now supports 3D objects -o hull() with 2D object can now use for loops and boolean operations as children -o New import() statement reads the correct file format based on the filename extension +**Features:** +* The MCAD library is now bundled with OpenSCAD +* Added len() function. Takes one vector or string parameter and returns its length. +* The index operator [] now works on strings +* The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09] +* The version_num() function will return the OpenSCAD version as a number, e.g. 20110923 +* hull() Now supports 3D objects +* hull() with 2D object can now use for loops and boolean operations as children +* New import() statement reads the correct file format based on the filename extension (.stl, .dxf and .off is supported) -o The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4) -o The color() statement now supports specifying colors as strings, e.g. color("Red") -o The color() statement now overrides colors specified further down in the tree -o if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true. -o Strings can now be lexographically compared using the <, <=, >, >= operators -o Added PI constant. -o Number literals in scientific notation are now accepted by the parser -o Added import and export of the OFF file format -o Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated. +* The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4) +* The color() statement now supports specifying colors as strings, e.g. color("Red") +* The color() statement now overrides colors specified further down in the tree +* if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true. +* Strings can now be lexographically compared using the <, <=, >, >= operators +* Added PI constant. +* Number literals in scientific notation are now accepted by the parser +* Added import and export of the OFF file format +* Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated. -Bugfixes: -o Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview -o square() crashed if any of the dimensions were zero -o Flush Caches didn't flush cached USE'd modules -o STL export should be a bit more robust -o Dropping a file into the editor under Windows didn't work (double C:/C:/ problem) -o On some platforms it was possible to insertion rich text in the editor, causing confusion. -o Less crashes due to CGAL assertions -o OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available -o include now searches librarydir -o The $fs parameter yielded only half the number of segments it should have -o surface(center=true) is now correctly centered in the XY plane +**Bugfixes:** +* Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview +* square() crashed if any of the dimensions were zero +* Flush Caches didn't flush cached USE'd modules +* STL export should be a bit more robust +* Dropping a file into the editor under Windows didn't work (double C:/C:/ problem) +* On some platforms it was possible to insertion rich text in the editor, causing confusion. +* Less crashes due to CGAL assertions +* OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available +* include now searches librarydir +* The $fs parameter yielded only half the number of segments it should have +* surface(center=true) is now correctly centered in the XY plane -Deprecations: -o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. +**Deprecations:** +* dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. Use linear_extrude() and rotate_extrude() instead. -o The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() +* The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() are now deprecated. Use an import() child instead. -o import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. -o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. -o F2 and F3 for Save and Reload is now deprecated +* import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. +* When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. +* F2 and F3 for Save and Reload is now deprecated +# OpenSCAD 2011.06 -OpenSCAD 2011.06 -================ +* Added "Export as Image" menu. -o Added "Export as Image" menu. - -Bugfixes: -o Cylinder tesselation broke existing models which are using cylinders +**Bugfixes:** +* Cylinder tesselation broke existing models which are using cylinders for e.g. captured nut slots and are dependent on the orientation not changing. -o DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating +* DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating to using the AutoCAD 2000 (AC1015) format. Reverted to the old entity-only output, causing LWPOLYLINES to not exported allowed anymore. +# OpenSCAD 2011.04 +* Added hull() for convex hulls (2D object only) +* minkowski() now supports 2D objects +* Added functions: rands(), sign() +* Now supports escaping of the following characters in strings: \n, \t, \r, \\, \" +* Support nested includes +* Improved parsing of numbers +* DXF: output LWPOLYLINE instead of just LINE entities +* Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash +* Some bugs fixed, maybe some new bugs added +# OpenSCAD 2010.05 +* Added functions and statements + * Added abs() function + * Added exp(x), log(b, x), log(x) and ln(x) functions + * Added minkowski() statement for 3d minkowski sums +* Added 'include ' and 'use ' statements + * Old implicit '' include statement is now obsolete +* Some bugs fixed, maybe some new bugs added +# OpenSCAD 2010.02 -OpenSCAD 2011.04 -================ - -o Added hull() for convex hulls (2D object only) -o minkowski() now supports 2D objects -o Added functions: rands(), sign() -o Now supports escaping of the following characters in strings: \n, \t, \r, \\, \" -o Support nested includes -o Improved parsing of numbers -o DXF: output LWPOLYLINE instead of just LINE entities -o Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash -o Some bugs fixed, maybe some new bugs added - -OpenSCAD 2010.05 -================ - - o Added functions and statements - - Added abs() function - - Added exp(x), log(b, x), log(x) and ln(x) functions - - Added minkowski() statement for 3d minkowski sums - o Added 'include ' and 'use ' statements - - Old implicit '' include statement is now obsolete - o Some bugs fixed, maybe some new bugs added - -OpenSCAD 2010.02 -================ - - o Added functions and statements - - Added sqrt() function - - Added round(), ceil() and floor() functions - - Added lookup() function for linear interpolation in value list - - Added projection(cut = true/false) statement - - Added child() statement for accessing child nodes of module instances - - Added mirror() statement - o Improved DXF import code (more entities and some bugs fixed) - o Added feature for dumping animation as PNG files - o Added a preferences dialog - o Now using CGAL's delaunay tesselator - o Now using eigen2 for linear algebra - o Reorganisation of the source tree - o Some bugs fixed, maybe some new bugs added - -OpenSCAD 2010.01 -================ - - o Added functions and statements - - Added intersection_for() - - Added str function - - Added min and max function - - Added color() statement - o Added 2D Subsystem - - New primitives: circle(), square() and polygon() - - 2D->3D path: linear_extrude() and rotate_extrude() - - Import of DXF to 2d subsystem: import_dxf() - - Export of 2D data as DXF files - o Some bugs fixed, maybe some new bugs added +* Added functions and statements + * Added sqrt() function + * Added round(), ceil() and floor() functions + * Added lookup() function for linear interpolation in value list + * Added projection(cut = true/false) statement + * Added child() statement for accessing child nodes of module instances + * Added mirror() statement +* Improved DXF import code (more entities and some bugs fixed) +* Added feature for dumping animation as PNG files +* Added a preferences dialog +* Now using CGAL's delaunay tesselator +* Now using eigen2 for linear algebra +* Reorganisation of the source tree +* Some bugs fixed, maybe some new bugs added +# OpenSCAD 2010.01 +* Added functions and statements + * Added intersection_for() + * Added str function + * Added min and max function + * Added color() statement +* Added 2D Subsystem + * New primitives: circle(), square() and polygon() + * 2D->3D path: linear_extrude() and rotate_extrude() + * Import of DXF to 2d subsystem: import_dxf() + * Export of 2D data as DXF files +* Some bugs fixed, maybe some new bugs added diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index d239278b..9e7c6e0a 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -29,7 +29,9 @@ o Set VERSION and VERSIONDATE environment variable scripts/publish-macosx.sh scripts/publish-mingw-x.sh -o Update RELEASE_NOTES +o Update releases/$VERSION.md +o scripts/makereleasenotes.sh + o Update copyright year in AboutDialog.html and mainwin.cc o Tag release @@ -41,9 +43,9 @@ o build source package o Sanity check; build a binary or two and manually run some tests o git push --tags +o ./scripts/github-release.sh $VERSION o Upload Source package - $ ./scripts/googlecode_upload.py -s 'Source Code' -p openscad -l Featured,Type-Source openscad-$VERSION.src.tar.gz $ scp openscad-$VERSION.src.tar.gz openscad@files.openscad.org:www o Remove VERSION environment variable diff --git a/releases/2010.01.md b/releases/2010.01.md new file mode 100644 index 00000000..f69d90c0 --- /dev/null +++ b/releases/2010.01.md @@ -0,0 +1,11 @@ +* Added functions and statements + * Added intersection_for() + * Added str function + * Added min and max function + * Added color() statement +* Added 2D Subsystem + * New primitives: circle(), square() and polygon() + * 2D->3D path: linear_extrude() and rotate_extrude() + * Import of DXF to 2d subsystem: import_dxf() + * Export of 2D data as DXF files +* Some bugs fixed, maybe some new bugs added diff --git a/releases/2010.02.md b/releases/2010.02.md new file mode 100644 index 00000000..5c0d9158 --- /dev/null +++ b/releases/2010.02.md @@ -0,0 +1,14 @@ +* Added functions and statements + * Added sqrt() function + * Added round(), ceil() and floor() functions + * Added lookup() function for linear interpolation in value list + * Added projection(cut = true/false) statement + * Added child() statement for accessing child nodes of module instances + * Added mirror() statement +* Improved DXF import code (more entities and some bugs fixed) +* Added feature for dumping animation as PNG files +* Added a preferences dialog +* Now using CGAL's delaunay tesselator +* Now using eigen2 for linear algebra +* Reorganisation of the source tree +* Some bugs fixed, maybe some new bugs added diff --git a/releases/2010.05.md b/releases/2010.05.md new file mode 100644 index 00000000..c1c4ba28 --- /dev/null +++ b/releases/2010.05.md @@ -0,0 +1,7 @@ +* Added functions and statements + * Added abs() function + * Added exp(x), log(b, x), log(x) and ln(x) functions + * Added minkowski() statement for 3d minkowski sums +* Added 'include ' and 'use ' statements + * Old implicit '' include statement is now obsolete +* Some bugs fixed, maybe some new bugs added diff --git a/releases/2011.04.md b/releases/2011.04.md new file mode 100644 index 00000000..7405b7d1 --- /dev/null +++ b/releases/2011.04.md @@ -0,0 +1,9 @@ +* Added hull() for convex hulls (2D object only) +* minkowski() now supports 2D objects +* Added functions: rands(), sign() +* Now supports escaping of the following characters in strings: \n, \t, \r, \\, \" +* Support nested includes +* Improved parsing of numbers +* DXF: output LWPOLYLINE instead of just LINE entities +* Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash +* Some bugs fixed, maybe some new bugs added diff --git a/releases/2011.06.md b/releases/2011.06.md new file mode 100644 index 00000000..c3b9eee0 --- /dev/null +++ b/releases/2011.06.md @@ -0,0 +1,9 @@ +* Added "Export as Image" menu. + +**Bugfixes:** +* Cylinder tesselation broke existing models which are using cylinders + for e.g. captured nut slots and are dependent on the orientation not + changing. +* DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating + to using the AutoCAD 2000 (AC1015) format. Reverted to the old entity-only output, + causing LWPOLYLINES to not exported allowed anymore. diff --git a/releases/2011.12.md b/releases/2011.12.md new file mode 100644 index 00000000..ad5825d3 --- /dev/null +++ b/releases/2011.12.md @@ -0,0 +1,41 @@ +**Features:** +* The MCAD library is now bundled with OpenSCAD +* Added len() function. Takes one vector or string parameter and returns its length. +* The index operator [] now works on strings +* The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09] +* The version_num() function will return the OpenSCAD version as a number, e.g. 20110923 +* hull() Now supports 3D objects +* hull() with 2D object can now use for loops and boolean operations as children +* New import() statement reads the correct file format based on the filename extension + (.stl, .dxf and .off is supported) +* The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4) +* The color() statement now supports specifying colors as strings, e.g. color("Red") +* The color() statement now overrides colors specified further down in the tree +* if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true. +* Strings can now be lexographically compared using the <, <=, >, >= operators +* Added PI constant. +* Number literals in scientific notation are now accepted by the parser +* Added import and export of the OFF file format +* Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated. + +**Bugfixes:** +* Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview +* square() crashed if any of the dimensions were zero +* Flush Caches didn't flush cached USE'd modules +* STL export should be a bit more robust +* Dropping a file into the editor under Windows didn't work (double C:/C:/ problem) +* On some platforms it was possible to insertion rich text in the editor, causing confusion. +* Less crashes due to CGAL assertions +* OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available +* include now searches librarydir +* The $fs parameter yielded only half the number of segments it should have +* surface(center=true) is now correctly centered in the XY plane + +**Deprecations:** +* dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. + Use linear_extrude() and rotate_extrude() instead. +* The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() + are now deprecated. Use an import() child instead. +* import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. +* When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. +* F2 and F3 for Save and Reload is now deprecated diff --git a/releases/2013.01.md b/releases/2013.01.md new file mode 100644 index 00000000..e29d8632 --- /dev/null +++ b/releases/2013.01.md @@ -0,0 +1,34 @@ +**Features:** +* Snappier GUI while performing CGAL computations (computations running in separate thread) +* The size of the misc. caches can now be adjusted from Preferences +* The limit for when to disable OpenCSG can now be adjusted from Preferences +* Added Dot product operator: vec * vec +* Added Matrix multiplication operator: vec * mat, mat * mat +* Added search() function +* Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile +* The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries +* .csg files can now be opened from the GUI +* linear_extrude() will now assume that the first parameter means 'height' if it's a number + +**Bugfixes:** +* use'ing an non-existing file sometimes crashed under Windows +* Better font handling: Ensure a monospace font is chosen as default +* Division by zero caused hang in some cases (e.g. sin(1/0)) +* Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown +* Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization +* scale() with a scale factor of zero could cause a crash +* Fixed a number of issues related to use/include +* Providing an unknown parameter on the cmd-line caused a crash +* cmd-line overrides using -D now also work for USEd modules +* Modifier characters can now be used in front of if statements +* rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic. +* .csg files will now have relative filenames whenever possible +* Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones. +* Always use utf-8 file encoding, also under Windows +* A lot of build script fixes +* Some other crash bugs fixes + +**Deprecations:** +* The old include syntax "" without the include keyword is no + longer supported and will cause a syntax error. + diff --git a/releases/2013.06.md b/releases/2013.06.md new file mode 100644 index 00000000..2922990b --- /dev/null +++ b/releases/2013.06.md @@ -0,0 +1,48 @@ +**Language Features:** +* linear_extrude now takes a scale parameter: + linear_extrude(height=a, slices=b, twist=c, scale=[x,y]) +* Recursive use of modules is now supported (including cascading child() operations): + https://github.com/openscad/openscad/blob/master/examples/example024.scad +* Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) .. +* value assignments in parameters can now depend on already declared parameters +* Added resize() module: + http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize + +**Program Features:** +* Added basic syntax highlighting in the editor +* There is now a built-in library path in user-space: + http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Library_Locations +* Commandline output to PNG, with various camera and rendering settings. + Run openscad -h to see usage info or see the OpenSCAD wiki user manual. +* Attempting to open dxf, off or stl files in the GUI will now create an import statement. +* The preview operator (%) will now preserve any manually set color +* The highlight operator (#) will now color the object in transparent red +* Mac: Added document icon +* Mac: Added auto-update check +* Windows: Better cmd-line support using the openscad.com executable + +**Bugfixes:** +* Importing files is now always relative to the importing script, also for libraries +* We didn't always print a warning when CSG normalization created too many elements +* Binary STLs can now be read on big endian architectures +* Some binary STLs couldn't be read +* Fixed some issues related to ARM builds +* CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data +* The Automatic Reload feature is now more robust +* If a file couldn't be saved it no longer fails silently +* Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models +* The lookup() function had bad boundary condition behavior +* The surface() module failed when the .dat file lacked a trailing newline +* The hull() module could crash if any of the children were empty objects +* Some problems using unicode filenames have been fixed + +**Misc:** +* Build scripts have been further improved +* Regression test now creates single monolithic .html file for easier uploading +* Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine +* The backend is finally independent of Qt +* Windows: We now have a 64-bit version + +**Known Bugs:** +* Linux: command-line png rendering on Gallium is flaky. + Workaround: use CGAL --render or hardware rendering. diff --git a/releases/2014.Q1.md b/releases/2014.Q1.md new file mode 100644 index 00000000..317d02aa --- /dev/null +++ b/releases/2014.Q1.md @@ -0,0 +1,47 @@ +**Language Features:** +* Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d) +* Added parent_module() and $parent_modules +* Added children() as a replacement for child() +* Unicode strings (using UTF-8) are now correctly handled +* Ranges can have a negative step value +* Added norm() and cross() functions + +**Program Features:** +* Cmd-line: --info parameter prints system/library info +* Cmd-line: --csglimit parameter to change CSG rendering limit +* Cmd-line: Better handling of cmd-line arguments under Windows +* GUI: Added Reset View +* GUI: Added Search&Replace in editor +* GUI: Syntax highlighting now has a dark background theme +* GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes + +**Bugfixes/improvements:** +* Reading empty STL files sometimes caused a crash +* OPENSCADPATH now uses semicolon as path separator under Windows +* polyhedron() is now much more robust handling almost planar polygons +* Automatic reloads of large designs are more robust +* Boolean logic in if() statements are now correctly short-circuited +* rands() with zero range caused an infinite loop +* resize(, auto=true) didn't work when shrinking objects +* The $children variable sometimes misbehaved due to dynamic scoping +* The --camera cmd-line option behaved differently then the corresponding GUI function +* PNG export now doesn't leak transparency settings into the target image +* Improved performance of 3D hull() operations +* Some editor misbehaviors were fixed +* Stability fixes of CGAL-related crashes +* Windows cmd-line can now handle spaces in filenames +* Default CSG rendering limit is now 100K elements +* Fixed a crash reading DXF files using comma as decimal separator +* Fixed a crash running the cmd-line without a HOME env. variable +* Intersecting something with nothing now correctly results in an empty object + +**Deprecations:** +* child() is no longer supported. Use children() instead. +* polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead. + +**Misc:** +* Test framework now shares more code with the GUI app +* Test report can now be automatically uploaded to dinkypage.com +* Better compatibility with BSD systems +* Qt5 support + diff --git a/scripts/github-release.sh b/scripts/github-release.sh new file mode 100755 index 00000000..6517ed11 --- /dev/null +++ b/scripts/github-release.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Usage (in github root folder): ./scripts/github-release.sh +# +# Requires release.token and releases/.md + +curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $( RELEASE_NOTES +for v in `ls -r releases/*.md`; do + mdfile=${v#releases/} + version=${mdfile%.md} + echo "# OpenSCAD $version\n" >> RELEASE_NOTES + cat $v >> RELEASE_NOTES +done From 36e0d73e699d0cc1f3ba90a5ed3ab68662588167 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Tue, 25 Feb 2014 20:20:14 -0600 Subject: [PATCH 07/24] enable qtaccessibility plugin so that screenreading of QAction menu works (tested on Jaws screenreader demo on Windows 7, per bug report to mailing list by Robert Jaquiss 2/25/2014) --- openscad.pro | 2 ++ src/openscad.cc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/openscad.pro b/openscad.pro index d59dbeb1..3d3857cc 100644 --- a/openscad.pro +++ b/openscad.pro @@ -41,6 +41,8 @@ TEMPLATE = app INCLUDEPATH += src DEPENDPATH += src +QTPLUGIN += qtaccessiblewidgets + # Handle custom library location. # Used when manually installing 3rd party libraries OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES) diff --git a/src/openscad.cc b/src/openscad.cc index 7971512f..93eedb8d 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -70,6 +70,9 @@ #include #include "boosty.h" +#include +Q_IMPORT_PLUGIN(qtaccessiblewidgets) + #ifdef _MSC_VER #define snprintf _snprintf #endif From ced162977f031785240eed55a9760802d9447e60 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 26 Feb 2014 18:07:30 -0600 Subject: [PATCH 08/24] fix broken test build --- src/MainWindow.ui | 13 +++++++++++++ src/openscad.cc | 6 ++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/MainWindow.ui b/src/MainWindow.ui index f5d4b768..2e15c3e7 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -335,6 +335,8 @@ + + @@ -510,6 +512,17 @@ Hide editor + + + Switch focus to editor + + + + + Switch focus to console + + + &Reload and Compile diff --git a/src/openscad.cc b/src/openscad.cc index 93eedb8d..fa63aced 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -70,9 +70,6 @@ #include #include "boosty.h" -#include -Q_IMPORT_PLUGIN(qtaccessiblewidgets) - #ifdef _MSC_VER #define snprintf _snprintf #endif @@ -449,8 +446,9 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c #define OPENSCAD_QTGUI 1 #endif - #ifdef OPENSCAD_QTGUI +#include +Q_IMPORT_PLUGIN(qtaccessiblewidgets) #include "MainWindow.h" #ifdef __APPLE__ #include "EventFilter.h" From afcf7239ab204c2a4d15be09ef0c69fff6d67e43 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 26 Feb 2014 18:29:57 -0600 Subject: [PATCH 09/24] fix broken linux gui build!! --- openscad.pro | 3 +-- src/openscad.cc | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openscad.pro b/openscad.pro index 3d3857cc..0da75f41 100644 --- a/openscad.pro +++ b/openscad.pro @@ -41,8 +41,6 @@ TEMPLATE = app INCLUDEPATH += src DEPENDPATH += src -QTPLUGIN += qtaccessiblewidgets - # Handle custom library location. # Used when manually installing 3rd party libraries OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES) @@ -92,6 +90,7 @@ else { win* { RC_FILE = openscad_win32.rc + QTPLUGIN += qtaccessiblewidgets } CONFIG += qt diff --git a/src/openscad.cc b/src/openscad.cc index fa63aced..f141b933 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -448,7 +448,9 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c #ifdef OPENSCAD_QTGUI #include +#if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSCVER) Q_IMPORT_PLUGIN(qtaccessiblewidgets) +#endif #include "MainWindow.h" #ifdef __APPLE__ #include "EventFilter.h" From 14771c90befe414a2726d09ab1dd8ac5bd7d500f Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 26 Feb 2014 18:40:32 -0600 Subject: [PATCH 10/24] remove experimental menu options --- src/MainWindow.ui | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/MainWindow.ui b/src/MainWindow.ui index 2e15c3e7..f5d4b768 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -335,8 +335,6 @@ - - @@ -512,17 +510,6 @@ Hide editor - - - Switch focus to editor - - - - - Switch focus to console - - - &Reload and Compile From e2d6afecf5bbd121287cf5ea5e35f0b5e5a1e4b9 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 26 Feb 2014 22:39:07 -0600 Subject: [PATCH 11/24] fix crash bug (mainwindow no longer has a 'highlighter' member) --- src/MainWindow.h | 1 - src/editor.cc | 6 ++++++ src/editor.h | 2 +- src/mainwin.cc | 8 +------- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/MainWindow.h b/src/MainWindow.h index 21d1e235..b56059db 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -71,7 +71,6 @@ private slots: void updateTVal(); void setFileName(const QString &filename); void setFont(const QString &family, uint size); - void setSyntaxHighlight(const QString &s); void showProgress(); void openCSGSettingsChanged(); diff --git a/src/editor.cc b/src/editor.cc index 378bfd02..8f45b0a0 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -142,6 +142,12 @@ void Editor::unhighlightLastError() highlighter->unhighlightLastError(); } +void Editor::setHighlightScheme(const QString &name) +{ + highlighter->assignFormatsToTokens( name ); + highlighter->rehighlight(); // slow on large files +} + Editor::~Editor() { delete highlighter; diff --git a/src/editor.h b/src/editor.h index 5b4bb957..2fe3d3bf 100644 --- a/src/editor.h +++ b/src/editor.h @@ -25,7 +25,7 @@ public slots: void setPlainText(const QString &text); void highlightError(int error_pos); void unhighlightLastError(); - + void setHighlightScheme(const QString &name); private: void wheelEvent ( QWheelEvent * event ); Highlighter *highlighter; diff --git a/src/mainwin.cc b/src/mainwin.cc index e0234041..41d24957 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -387,7 +387,7 @@ MainWindow::MainWindow(const QString &filename) connect(Preferences::inst(), SIGNAL(openCSGSettingsChanged()), this, SLOT(openCSGSettingsChanged())); connect(Preferences::inst(), SIGNAL(syntaxHighlightChanged(const QString&)), - this, SLOT(setSyntaxHighlight(const QString&))); + editor, SLOT(setHighlightScheme(const QString&))); Preferences::inst()->apply(); connect(this->findTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(selectFindType(int))); @@ -2100,12 +2100,6 @@ void MainWindow::setFont(const QString &family, uint size) editor->setFont(font); } -void MainWindow::setSyntaxHighlight(const QString &s) -{ - this->highlighter->assignFormatsToTokens( s ); - this->highlighter->rehighlight(); // slow on large files -} - void MainWindow::quit() { QCloseEvent ev; From ec40bae6e9446d53ff8d04bcbc5fa86462982ead Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 27 Feb 2014 00:14:30 -0500 Subject: [PATCH 12/24] Added note about auto-uploading tests --- doc/testing.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/testing.txt b/doc/testing.txt index 311f0b8b..e248664e 100644 --- a/doc/testing.txt +++ b/doc/testing.txt @@ -39,6 +39,16 @@ $ ctest -C Adds extended tests belonging to configs. Bugs - test known bugs (tests will fail) All - test everything + +C) Automatically upload test results (experimental) + +It's possible to automatically upload tests results to an external +server. This is good for CI, as well as being able to easily report +bugs. + +To enable this feature, add '-DOPENSCAD_UPLOAD_TESTS=1' to the cmake cmd-line, e.g.: +cmake -DOPENSCAD_UPLOAD_TESTS=1 . + Adding a new test: ------------------ From 4fe662a90ac718cd6207b217edd7c81db66c6ae3 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 26 Feb 2014 23:50:20 -0600 Subject: [PATCH 13/24] add regression test ('manual') for highlighter scheme changer --- src/highlighter.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/highlighter.cc b/src/highlighter.cc index 2fb7c655..2b5b82b2 100644 --- a/src/highlighter.cc +++ b/src/highlighter.cc @@ -118,6 +118,20 @@ into a blank document. expected result: don't crash esp. on mac +12. action: start openscad, open example 001. open edit/prefs/editor/ + syntax-highlighter, 'for light background'. make your OS use a light + (white) background for the openscad text editor. + expected result: text is clearly visible, colors have good contrast + +13. repeat test 12, but with 'for dark background' and dark background + expected result: text is clearly visible, colors have good contrast + +14. repeat test 12, but turn the syntax highlighter off. + expected result: text is clearly visible, single color has good contrast + +14. repeat test 13, but turn the syntax highlighter off. + expected result: text is clearly visible, single color has good contrast + */ #include "highlighter.h" From 484802d685d97d787f8b4dd2a91275c07f372798 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Thu, 27 Feb 2014 06:14:10 -0600 Subject: [PATCH 14/24] remove extraneous this->highlighter from Mainwindow --- src/MainWindow.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MainWindow.h b/src/MainWindow.h index b56059db..f08e3513 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -20,7 +20,6 @@ public: static void requestOpenFile(const QString &filename); QString fileName; - class Highlighter *highlighter; class Preferences *prefs; From b2fbad4005446d491a060dc28576e5e8997bf31b Mon Sep 17 00:00:00 2001 From: Don Bright Date: Thu, 27 Feb 2014 17:42:22 -0600 Subject: [PATCH 15/24] attempt to band-aid fix issue 677 by changing fromUtf8 to fromLocal8Bit --- src/openscad.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openscad.cc b/src/openscad.cc index f141b933..52a1ef36 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -463,8 +463,8 @@ Q_IMPORT_PLUGIN(qtaccessiblewidgets) static QString assemblePath(const fs::path& absoluteBaseDir, const string& fileName) { if (fileName.empty()) return ""; - QString qsDir = QString::fromUtf8( boosty::stringy( absoluteBaseDir ).c_str() ); - QString qsFile = QString::fromUtf8( fileName.c_str() ); + QString qsDir = QString::fromLocal8Bit( boosty::stringy( absoluteBaseDir ).c_str() ); + QString qsFile = QString::fromLocal8Bit( fileName.c_str() ); // if qsfile is absolute, dir is ignored. (see documentation of QFileInfo) QFileInfo info( qsDir, qsFile ); return info.absoluteFilePath(); From 1d211498c645974b9fde19936e8ecc6930b82b59 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 1 Mar 2014 15:11:52 -0500 Subject: [PATCH 16/24] Added note to encourage people to build with experimental features enabled --- openscad.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openscad.pro b/openscad.pro index 0da75f41..9f8e75f3 100644 --- a/openscad.pro +++ b/openscad.pro @@ -13,6 +13,10 @@ # # http://en.wikibooks.org/wiki/OpenSCAD_User_Manual +!experimental { + message("If you're building a development binary, consider adding CONFIG+=experimental") +} + isEmpty(QT_VERSION) { error("Please use qmake for Qt 4 (probably qmake-qt4)") } From 43088239e07aa33c676cd2d79a0b032dc0c82bf4 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 1 Mar 2014 15:13:34 -0500 Subject: [PATCH 17/24] killed warning --- src/Preferences.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Preferences.ui b/src/Preferences.ui index 0fe9c9ea..4c76c7eb 100644 --- a/src/Preferences.ui +++ b/src/Preferences.ui @@ -386,7 +386,7 @@ - + 75 From 52ceb714449946669860de7d094bdc1c40f5f63d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 1 Mar 2014 15:14:05 -0500 Subject: [PATCH 18/24] devicePixelRatio() is reported to not exist before Qt-5.0.2 --- src/QGLView.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QGLView.h b/src/QGLView.h index 402a5d48..aaab8f57 100644 --- a/src/QGLView.h +++ b/src/QGLView.h @@ -40,7 +40,7 @@ public: else this->cam.projection = Camera::PERSPECTIVE; } std::string getRendererInfo() const; -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= 0x050001 float getDPI() { return this->devicePixelRatio(); } #endif bool save(const char *filename); From bbfddcdd8528cd9458765a1c3ae52d0522c04a94 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 1 Mar 2014 15:15:13 -0500 Subject: [PATCH 19/24] killed warning; unused variable --- src/openscad.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openscad.cc b/src/openscad.cc index 52a1ef36..d9c328f6 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -551,7 +551,7 @@ int gui(vector &inputFiles, const fs::path &original_path, int argc, cha new MainWindow(assemblePath(original_path, infile)); } #else - MainWindow *m = new MainWindow(assemblePath(original_path, inputFiles[0])); + new MainWindow(assemblePath(original_path, inputFiles[0])); #endif app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); int rc = app.exec(); From c6520e22fcc4fcaeff8d116234cc7eba767a92ce Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 1 Mar 2014 15:27:08 -0500 Subject: [PATCH 20/24] Added Arch Linux maintainer --- doc/release-checklist.txt | 1 + src/AboutDialog.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index 9e7c6e0a..bd1cf3af 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -64,6 +64,7 @@ o Notify package managers - Fedora: Miro Hrončok or - OpenSUSE: Pavol Rusnak - MacPorts: Frank Schima + - Arch Linux: Kyle Keen Build and Upload Release Binaries --------------------------------- diff --git a/src/AboutDialog.html b/src/AboutDialog.html index 65a54d71..be666b67 100644 --- a/src/AboutDialog.html +++ b/src/AboutDialog.html @@ -92,6 +92,8 @@ Please visit this link for a copy of the license: chrysn
  • Fedora maintainer: Miro Hrončok +
  • Arch Linux maintainer: + Kyle Keen

    From 780d897ff272e61da68b0921d07658e90ecc14cf Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 1 Mar 2014 15:14:35 -0600 Subject: [PATCH 21/24] fix issue 680 --- src/openscad.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openscad.cc b/src/openscad.cc index 52a1ef36..c6fc6f0c 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -201,6 +201,13 @@ Camera get_camera( po::variables_map vm ) return camera; } +#ifdef OPENSCAD_TESTING +#undef OPENSCAD_QTGUI +#else +#define OPENSCAD_QTGUI 1 +#include +#endif + int cmdline(const char *deps_output_file, const std::string &filename, Camera &camera, const char *output_file, const fs::path &original_path, Render::type renderer, int argc, char ** argv ) { #ifdef OPENSCAD_QTGUI @@ -440,12 +447,6 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c return 0; } -#ifdef OPENSCAD_TESTING -#undef OPENSCAD_QTGUI -#else -#define OPENSCAD_QTGUI 1 -#endif - #ifdef OPENSCAD_QTGUI #include #if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSCVER) @@ -455,7 +456,6 @@ Q_IMPORT_PLUGIN(qtaccessiblewidgets) #ifdef __APPLE__ #include "EventFilter.h" #endif -#include #include #include From fd938e4423c0c47c5c71ee742731ec9ca9afe49c Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 2 Mar 2014 18:38:08 -0500 Subject: [PATCH 22/24] Added openSUSE maintainer --- src/AboutDialog.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AboutDialog.html b/src/AboutDialog.html index be666b67..838eceeb 100644 --- a/src/AboutDialog.html +++ b/src/AboutDialog.html @@ -89,11 +89,13 @@ Please visit this link for a copy of the license: Debian maintainer: - chrysn + chrysn

  • Fedora maintainer: - Miro Hrončok + Miro Hrončok
  • Arch Linux maintainer: - Kyle Keen + Kyle Keen
  • +
  • openSUSE maintainer: + Pavol Rusnak
  • From fbfc9b087963b3d2e041ff62de50171011b8fd18 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 2 Mar 2014 22:09:10 -0500 Subject: [PATCH 23/24] Print each deprecation message only once per compilation. Fixes #678 --- src/control.cc | 2 +- src/fileutils.cc | 2 +- src/import.cc | 4 ++-- src/linearextrude.cc | 2 +- src/mainwin.cc | 1 + src/modcontext.cc | 2 +- src/openscad.cc | 4 ++-- src/primitives.cc | 2 +- src/printutils.cc | 17 +++++++++++++++++ src/printutils.h | 5 ++++- src/rotateextrude.cc | 2 +- src/value.cc | 2 +- 12 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/control.cc b/src/control.cc index 1b58da12..8047167d 100644 --- a/src/control.cc +++ b/src/control.cc @@ -161,7 +161,7 @@ AbstractNode *ControlModule::instantiate(const Context* /*ctx*/, const ModuleIns if (type == CHILD) { - PRINT("DEPRECATED: child() will be removed in future releases. Use children() instead."); + printDeprecation("DEPRECATED: child() will be removed in future releases. Use children() instead."); int n = 0; if (evalctx->numArgs() > 0) { double v; diff --git a/src/fileutils.cc b/src/fileutils.cc index b844b4a8..ac3144ea 100644 --- a/src/fileutils.cc +++ b/src/fileutils.cc @@ -22,7 +22,7 @@ std::string lookup_file(const std::string &filename, if (!fs::exists(absfile) && fs::exists(absfile_fallback)) { resultfile = absfile_fallback.string(); - PRINTB("WARNING: Imported file (%s) found in document root instead of relative to the importing module. This behavior is deprecated", filename); + PRINT_DEPRECATION("DEPRECATED: Imported file (%s) found in document root instead of relative to the importing module. This behavior is deprecated", filename); } else { resultfile = absfile.string(); diff --git a/src/import.cc b/src/import.cc index decd88a0..6f221d3d 100644 --- a/src/import.cc +++ b/src/import.cc @@ -95,7 +95,7 @@ AbstractNode *ImportModule::instantiate(const Context *ctx, const ModuleInstanti if (v.isUndefined()) { v = c.lookup_variable("filename"); if (!v.isUndefined()) { - PRINT("DEPRECATED: filename= is deprecated. Please use file="); + printDeprecation("DEPRECATED: filename= is deprecated. Please use file="); } } std::string filename = lookup_file(v.isUndefined() ? "" : v.toString(), inst->path(), ctx->documentPath()); @@ -119,7 +119,7 @@ AbstractNode *ImportModule::instantiate(const Context *ctx, const ModuleInstanti if (layerval.isUndefined()) { layerval = c.lookup_variable("layername"); if (!layerval.isUndefined()) { - PRINT("DEPRECATED: layername= is deprecated. Please use layer="); + printDeprecation("DEPRECATED: layername= is deprecated. Please use layer="); } } node->layername = layerval.isUndefined() ? "" : layerval.toString(); diff --git a/src/linearextrude.cc b/src/linearextrude.cc index 1812504a..8304b193 100644 --- a/src/linearextrude.cc +++ b/src/linearextrude.cc @@ -74,7 +74,7 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI Value slices = c.lookup_variable("slices", true); if (!file.isUndefined() && file.type() == Value::STRING) { - PRINT("DEPRECATED: Support for reading files in linear_extrude will be removed in future releases. Use a child import() instead."); + printDeprecation("DEPRECATED: Support for reading files in linear_extrude will be removed in future releases. Use a child import() instead."); node->filename = lookup_file(file.toString(), inst->path(), c.documentPath()); } diff --git a/src/mainwin.cc b/src/mainwin.cc index 41d24957..5eed1846 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -1313,6 +1313,7 @@ bool MainWindow::fileChangedOnDisk() void MainWindow::compileTopLevelDocument() { updateTemporalVariables(); + resetPrintedDeprecations(); this->last_compiled_doc = editor->toPlainText(); std::string fulltext = diff --git a/src/modcontext.cc b/src/modcontext.cc index 21b04fdd..60596ca0 100644 --- a/src/modcontext.cc +++ b/src/modcontext.cc @@ -115,7 +115,7 @@ const AbstractModule *ModuleContext::findLocalModule(const std::string &name) co } std::string replacement = Builtins::instance()->isDeprecated(name); if (!replacement.empty()) { - PRINTB("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement); + PRINT_DEPRECATION("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement); } return m; } diff --git a/src/openscad.cc b/src/openscad.cc index 76973661..cc00bab7 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -651,12 +651,12 @@ int main(int argc, char **argv) output_file = vm["o"].as().c_str(); } if (vm.count("s")) { - PRINT("DEPRECATED: The -s option is deprecated. Use -o instead.\n"); + printDeprecation("DEPRECATED: The -s option is deprecated. Use -o instead.\n"); if (output_file) help(argv[0]); output_file = vm["s"].as().c_str(); } if (vm.count("x")) { - PRINT("DEPRECATED: The -x option is deprecated. Use -o instead.\n"); + printDeprecation("DEPRECATED: The -x option is deprecated. Use -o instead.\n"); if (output_file) help(argv[0]); output_file = vm["x"].as().c_str(); } diff --git a/src/primitives.cc b/src/primitives.cc index 029f7df8..cebc0314 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -245,7 +245,7 @@ AbstractNode *PrimitiveModule::instantiate(const Context *ctx, const ModuleInsta // backwards compatable node->faces = c.lookup_variable("triangles"); if (node->faces.type() != Value::UNDEFINED) { - PRINT("DEPRECATED: polyhedron(triangles=[]) will be removed in future releases. Use polyhedron(faces=[]) instead."); + printDeprecation("DEPRECATED: polyhedron(triangles=[]) will be removed in future releases. Use polyhedron(faces=[]) instead."); } } } diff --git a/src/printutils.cc b/src/printutils.cc index 37092fa8..f02ef69b 100644 --- a/src/printutils.cc +++ b/src/printutils.cc @@ -69,3 +69,20 @@ std::string two_digit_exp_format( double x ) s << x; return two_digit_exp_format( s.str() ); } + +#include + +std::set printedDeprecations; + +void printDeprecation(const std::string &str) +{ + if (printedDeprecations.find(str) == printedDeprecations.end()) { + PRINT(str); + printedDeprecations.insert(str); + } +} + +void resetPrintedDeprecations() +{ + printedDeprecations.clear(); +} diff --git a/src/printutils.h b/src/printutils.h index 18aaddee..dfe59051 100644 --- a/src/printutils.h +++ b/src/printutils.h @@ -15,6 +15,10 @@ void set_output_handler(OutputHandlerFunc *newhandler, void *userdata); extern std::list print_messages_stack; void print_messages_push(); void print_messages_pop(); +void printDeprecation(const std::string &str); +void resetPrintedDeprecations(); + +#define PRINT_DEPRECATION(_fmt, _arg) do { printDeprecation(str(boost::format(_fmt) % _arg)); } while (0) void PRINT(const std::string &msg); #define PRINTB(_fmt, _arg) do { PRINT(str(boost::format(_fmt) % _arg)); } while (0) @@ -49,5 +53,4 @@ public: } }; - #endif diff --git a/src/rotateextrude.cc b/src/rotateextrude.cc index a79b92e1..816698a6 100644 --- a/src/rotateextrude.cc +++ b/src/rotateextrude.cc @@ -69,7 +69,7 @@ AbstractNode *RotateExtrudeModule::instantiate(const Context *ctx, const ModuleI Value scale = c.lookup_variable("scale", true); if (!file.isUndefined()) { - PRINT("DEPRECATED: Support for reading files in rotate_extrude will be removed in future releases. Use a child import() instead."); + printDeprecation("DEPRECATED: Support for reading files in rotate_extrude will be removed in future releases. Use a child import() instead."); node->filename = lookup_file(file.toString(), inst->path(), c.documentPath()); } diff --git a/src/value.cc b/src/value.cc index 3a6540f1..af2a4b42 100644 --- a/src/value.cc +++ b/src/value.cc @@ -641,7 +641,7 @@ Value Value::operator[](const Value &v) void Value::RangeType::normalize() { if ((step_val>0) && (end_val < begin_val)) { std::swap(begin_val,end_val); - PRINT("DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated."); + printDeprecation("DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated."); } } From 8635e941662750b272cfed602144e26a547e2d7e Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 2 Mar 2014 23:31:36 -0500 Subject: [PATCH 24/24] Updated tests after fixing #678 --- tests/regression/echotest/for-tests-expected.echo | 5 +---- tests/regression/echotest/range-tests-expected.echo | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/regression/echotest/for-tests-expected.echo b/tests/regression/echotest/for-tests-expected.echo index 7820a41c..39a8d584 100644 --- a/tests/regression/echotest/for-tests-expected.echo +++ b/tests/regression/echotest/for-tests-expected.echo @@ -1,5 +1,4 @@ DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. -DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. WARNING: Bad range parameter in for statement: too many elements (4294967295). ECHO: nan ECHO: inf @@ -12,9 +11,7 @@ ECHO: "INF", 0 WARNING: Bad range parameter in for statement: too many elements (4294967295). ECHO: "-INF", 1 WARNING: Bad range parameter in for statement: too many elements (4294967295). -DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. -WARNING: Bad range parameter in for statement: too many elements (4294967295). -DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. +WARNING: Bad range parameter in for statement: too many elements (4294967295). WARNING: Bad range parameter in for statement: too many elements (4294967295). WARNING: Bad range parameter in for statement: too many elements (4294967295). WARNING: Bad range parameter in for statement: too many elements (4294967295). diff --git a/tests/regression/echotest/range-tests-expected.echo b/tests/regression/echotest/range-tests-expected.echo index ddff38e4..36865efd 100644 --- a/tests/regression/echotest/range-tests-expected.echo +++ b/tests/regression/echotest/range-tests-expected.echo @@ -22,7 +22,6 @@ ECHO: "[a05] ", -2 ECHO: "[a05] ", -1 ECHO: "[a05] ", 0 ECHO: "[a06] ----- [0:-3]" -DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. ECHO: "[a06] ", -3 ECHO: "[a06] ", -2 ECHO: "[a06] ", -1 @@ -34,7 +33,6 @@ ECHO: "[a07] ", 0 ECHO: "[a07] ", 1 ECHO: "[a07] ", 2 ECHO: "[a08] ----- [2:-2]" -DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated. ECHO: "[a08] ", -2 ECHO: "[a08] ", -1 ECHO: "[a08] ", 0