Merge pull request #1326 from openscad/issue1325

Fixes Issue #1325
master
Marius Kintel 2015-04-25 16:57:05 -04:00
commit 2b3392266f
8 changed files with 22 additions and 7 deletions

View File

@ -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:}

View File

@ -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

10
testdata/scad/3D/issues/issue1325.scad vendored Normal file
View File

@ -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]
]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -49,7 +49,8 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E0034E3D19AA8651009F0BD0"
@ -69,15 +70,15 @@
</CommandLineArgument>
<CommandLineArgument
argument = "testdata/scad/3D/issues/issue1061.scad -o out.png"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "testdata/scad/3D/issues/minkowski-thin-cylinder.scad -o out.png"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "spheres.scad -o out.png"
isEnabled = "NO">
argument = "issue1276.scad"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "non-manifold2.scad -o non-manifold2.stl --debug=GeometryUtils"
@ -113,7 +114,8 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E0034E3D19AA8651009F0BD0"