From a209035a831688c5e3b6a1c8e02c76d7d11d793a Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 21 Apr 2015 10:41:44 -0400 Subject: [PATCH 1/4] Bumped version to 2015.03-1 --- openscad.pro | 2 ++ scripts/publish-macosx.sh | 2 ++ scripts/publish-mingw-x.sh | 2 +- scripts/release-common.sh | 4 ++-- tests/CMakeLists.txt | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openscad.pro b/openscad.pro index 23beea7e..7d09a757 100644 --- a/openscad.pro +++ b/openscad.pro @@ -39,6 +39,8 @@ isEmpty(QT_VERSION) { } } +VERSION = 2015.03-1 +VERSIONDATE = 2015.04.21 # If VERSION is not set, populate VERSION, VERSION_YEAR, VERSION_MONTH from system date include(version.pri) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index a891e13e..2175eb09 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -3,6 +3,8 @@ # Usage: # ./scripts/publish-macosx.sh [buildonly] # +VERSION=2015.03-1 +VERSIONDATE=2015.04.21 export NUMCPU=$(sysctl -n hw.ncpu) diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index ce27f8ee..462a9fb6 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -4,7 +4,7 @@ # if test -z "$VERSION"; then - VERSION=`date "+%Y.%m.%d"` + VERSION=2015.03-1 COMMIT=-c fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 92598eb6..83e24736 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -110,10 +110,10 @@ do done if test -z "$VERSIONDATE"; then - VERSIONDATE=`date "+%Y.%m.%d"` + VERSIONDATE=2015.04.21 fi if test -z "$VERSION"; then - VERSION=$VERSIONDATE + VERSION=2015.03-1 fi export VERSIONDATE diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 94324721..a7c27a0d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -571,6 +571,7 @@ include_directories(../src ../src/libtess2/Include) # Handle OpenSCAD version based on VERSION env. variable. # Use current timestamp if not specified (development builds) +set(ENV{VERSION} "2015.03-1") if ("$ENV{VERSION}" STREQUAL "") # Timestamp is only available in cmake >= 2.8.11 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.10) From 4d0745d337b726aad06f94c4cb5614822773df9d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 21 Apr 2015 11:09:23 -0400 Subject: [PATCH 2/4] Revert "Bumped version to 2015.03-1" This reverts commit a209035a831688c5e3b6a1c8e02c76d7d11d793a. --- openscad.pro | 2 -- scripts/publish-macosx.sh | 2 -- scripts/publish-mingw-x.sh | 2 +- scripts/release-common.sh | 4 ++-- tests/CMakeLists.txt | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/openscad.pro b/openscad.pro index 7d09a757..23beea7e 100644 --- a/openscad.pro +++ b/openscad.pro @@ -39,8 +39,6 @@ isEmpty(QT_VERSION) { } } -VERSION = 2015.03-1 -VERSIONDATE = 2015.04.21 # If VERSION is not set, populate VERSION, VERSION_YEAR, VERSION_MONTH from system date include(version.pri) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index 2175eb09..a891e13e 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -3,8 +3,6 @@ # Usage: # ./scripts/publish-macosx.sh [buildonly] # -VERSION=2015.03-1 -VERSIONDATE=2015.04.21 export NUMCPU=$(sysctl -n hw.ncpu) diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index 462a9fb6..ce27f8ee 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -4,7 +4,7 @@ # if test -z "$VERSION"; then - VERSION=2015.03-1 + VERSION=`date "+%Y.%m.%d"` COMMIT=-c fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 83e24736..92598eb6 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -110,10 +110,10 @@ do done if test -z "$VERSIONDATE"; then - VERSIONDATE=2015.04.21 + VERSIONDATE=`date "+%Y.%m.%d"` fi if test -z "$VERSION"; then - VERSION=2015.03-1 + VERSION=$VERSIONDATE fi export VERSIONDATE diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a7c27a0d..94324721 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -571,7 +571,6 @@ include_directories(../src ../src/libtess2/Include) # Handle OpenSCAD version based on VERSION env. variable. # Use current timestamp if not specified (development builds) -set(ENV{VERSION} "2015.03-1") if ("$ENV{VERSION}" STREQUAL "") # Timestamp is only available in cmake >= 2.8.11 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.10) From 172f1bfd3e6198721797da92445d02c3890eaf13 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 21 Apr 2015 11:10:02 -0400 Subject: [PATCH 3/4] bugfix: bash substitution of SHORTVERSION was wrong --- scripts/publish-macosx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index a891e13e..89c7ef1e 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -56,7 +56,7 @@ if test -z "$VERSION"; then VERSION=$VERSIONDATE SNAPSHOT=snapshot fi -SHORTVERSION=${VERSION##-} +SHORTVERSION=${VERSION%%-*} # Turn off ccache, just for safety PATH=${PATH//\/opt\/local\/libexec\/ccache:} From e6989526ca1514a4b6e04354040c0292d0bbc8d1 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 25 Apr 2015 15:20:09 -0400 Subject: [PATCH 4/4] #1325 Fixed crash when polygons with > 3 indices turn out to be degenerate --- src/polyset-utils.cc | 5 ++++- testdata/scad/3D/issues/issue1325.scad | 10 ++++++++++ .../cgalpngtest/issue1325-expected.png | Bin 0 -> 4408 bytes .../monotonepngtest/issue1325-expected.png | Bin 0 -> 4408 bytes .../opencsgtest/issue1325-expected.png | Bin 0 -> 4408 bytes .../throwntogethertest/issue1325-expected.png | Bin 0 -> 4408 bytes .../xcshareddata/xcschemes/OpenSCAD.app.xcscheme | 12 +++++++----- 7 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 testdata/scad/3D/issues/issue1325.scad create mode 100644 tests/regression/cgalpngtest/issue1325-expected.png create mode 100644 tests/regression/monotonepngtest/issue1325-expected.png create mode 100644 tests/regression/opencsgtest/issue1325-expected.png create mode 100644 tests/regression/throwntogethertest/issue1325-expected.png diff --git a/src/polyset-utils.cc b/src/polyset-utils.cc index 3b3e19b2..57671a76 100644 --- a/src/polyset-utils.cc +++ b/src/polyset-utils.cc @@ -77,7 +77,10 @@ namespace PolysetUtils { if (currface.empty() || idx != currface.back()) currface.push_back(idx); } if (currface.front() == currface.back()) currface.pop_back(); - if (currface.size() < 3) faces.pop_back(); // Cull empty triangles + if (currface.size() < 3) { + faces.pop_back(); // Cull empty triangles + if (faces.empty()) polygons.pop_back(); // All faces were culled + } } // Tessellate indexed mesh diff --git a/testdata/scad/3D/issues/issue1325.scad b/testdata/scad/3D/issues/issue1325.scad new file mode 100644 index 00000000..c1d12b1f --- /dev/null +++ b/testdata/scad/3D/issues/issue1325.scad @@ -0,0 +1,10 @@ +polyhedron(points = [ +[0, -4, 1], +[0, -5, 1], +[0, -5, 2], +[0, -4, 0] +], +faces = [ +[1, 2, 2, 1], +[0, 0, 3, 3] +]); diff --git a/tests/regression/cgalpngtest/issue1325-expected.png b/tests/regression/cgalpngtest/issue1325-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..08ee92b2216f45ca6b83efbc3b78c9fdabf45a71 GIT binary patch literal 4408 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&t&wwUqN(1_puuo-U3d6^w7MGV(Gg@Gv_b z*za4?v*2+)UsdcS+v4fU4h;;A^A5apoi>Akk%?tr1LFsF77l?9E{TSWk4eG`4hI;1 z0L3|6Sa}?_RBYrFP)K0-15&w&iA^DD&kdkj1BSW=phzGivw&_~4p6NGgFVR96%C9X zV)|x4wLA^-3JwhpAqN;-y2WP$)v_Jn7f^6e&`MxfbhO(SsGIo#JBNURfT#h(#Yacg z92$VmU>Akk%?tr1LFsF77l?9E{TSWk4eG`4hI;1 z0L3|6Sa}?_RBYrFP)K0-15&w&iA^DD&kdkj1BSW=phzGivw&_~4p6NGgFVR96%C9X zV)|x4wLA^-3JwhpAqN;-y2WP$)v_Jn7f^6e&`MxfbhO(SsGIo#JBNURfT#h(#Yacg z92$VmU>Akk%?tr1LFsF77l?9E{TSWk4eG`4hI;1 z0L3|6Sa}?_RBYrFP)K0-15&w&iA^DD&kdkj1BSW=phzGivw&_~4p6NGgFVR96%C9X zV)|x4wLA^-3JwhpAqN;-y2WP$)v_Jn7f^6e&`MxfbhO(SsGIo#JBNURfT#h(#Yacg z92$VmU>Akk%?tr1LFsF77l?9E{TSWk4eG`4hI;1 z0L3|6Sa}?_RBYrFP)K0-15&w&iA^DD&kdkj1BSW=phzGivw&_~4p6NGgFVR96%C9X zV)|x4wLA^-3JwhpAqN;-y2WP$)v_Jn7f^6e&`MxfbhO(SsGIo#JBNURfT#h(#Yacg z92$VmU> - + + isEnabled = "NO"> + argument = "issue1276.scad" + isEnabled = "YES"> - +