forked from openscad/openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add manifold corner case tests (openscad#5013)
- Loading branch information
Showing
35 changed files
with
603 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/data/scad/3D/misc/polyhedron-self-touch-edge-nonmanifold.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// A single volume touching itself (two pairs of coincident vertices forming an edge). | ||
// This is a non-manifold object since the collapsed vertices are not distinct. | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.4, 0.5, 0.5], | ||
[0.6, 0.5, 0.5], | ||
], | ||
faces=[ | ||
[5,4,8],[5,8,9], | ||
[4,6,8], | ||
[6,7,9],[6,9,8], | ||
[7,5,9], | ||
|
||
[0,1,9],[0,9,8], | ||
[1,3,9], | ||
[3,2,8],[3,8,9], | ||
[2,0,8], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// A single volume touching itself (two pairs of coincident vertices forming an edge), | ||
// but with a manifold topology (the coincident vertices are distinct). | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.4, 0.5, 0.5], | ||
[0.6, 0.5, 0.5], | ||
|
||
[0.4, 0.5, 0.5], | ||
[0.6, 0.5, 0.5], | ||
], | ||
faces=[ | ||
[5,4,10],[5,10,11], | ||
[4,6,10], | ||
[6,7,11],[6,11,10], | ||
[7,5,11], | ||
|
||
[0,1,9],[0,9,8], | ||
[1,3,9], | ||
[3,2,8],[3,8,9], | ||
[2,0,8], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
]); |
38 changes: 38 additions & 0 deletions
38
tests/data/scad/3D/misc/polyhedron-self-touch-face-nonmanifold.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.4, 0.4, 0.5], | ||
[0.6, 0.4, 0.5], | ||
[0.5, 0.6, 0.5], | ||
], | ||
faces=[ | ||
[5,4,8],[5,8,9], | ||
[4,6,8], | ||
[6,10,8], | ||
[6,7,10], | ||
[7,9,10], | ||
[7,5,9], | ||
[10,9,8], | ||
|
||
[0,1,9],[0,9,8], | ||
[1,3,9], | ||
[3,10,9], | ||
[3,2,10], | ||
[2,8,10], | ||
[2,0,8], | ||
[8,9,10], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// A single volume touching itself (three pairs of coincident vertices forming a triangle). | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.4, 0.4, 0.5], | ||
[0.6, 0.4, 0.5], | ||
[0.5, 0.6, 0.5], | ||
|
||
[0.4, 0.4, 0.5], | ||
[0.6, 0.4, 0.5], | ||
[0.5, 0.6, 0.5], | ||
], | ||
faces=[ | ||
[5,4,11],[5,11,12] | ||
[4,6,11], | ||
[6,13,11], | ||
[6,7,13], | ||
[7,12,13], | ||
[7,5,12], | ||
[13,12,11], | ||
|
||
[0,1,9],[0,9,8], | ||
[1,3,9], | ||
[3,10,9], | ||
[3,2,10], | ||
[2,8,10], | ||
[2,0,8], | ||
[8,9,10], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0,2],[6,0,2], | ||
]); |
30 changes: 30 additions & 0 deletions
30
tests/data/scad/3D/misc/polyhedron-self-touch-vertex-nonmanifold.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.5, 0.5, 0.5], | ||
], | ||
faces=[ | ||
[5,4,8], | ||
[4,6,8], | ||
[6,7,8], | ||
[7,5,8], | ||
|
||
[0,1,8], | ||
[1,3,8], | ||
[3,2,8], | ||
[2,0,8], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
|
||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[0.5, 0.5, 0.5], | ||
[0.5, 0.5, 0.5], | ||
], | ||
faces=[ | ||
[5,4,9], | ||
[4,6,9], | ||
[6,7,9], | ||
[7,5,9], | ||
|
||
[0,1,8], | ||
[1,3,8], | ||
[3,2,8], | ||
[2,0,8], | ||
|
||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
]); |
34 changes: 34 additions & 0 deletions
34
tests/data/scad/3D/misc/polyhedrons-touch-edge-nonmanifold.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Two cubes sharing an edge. | ||
// This is a non-manifold object since the collapsed vertices are not distinct. | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[2, 1, 0], | ||
[1, 2, 0], | ||
[2, 2, 0], | ||
[2, 1, 1], | ||
[1, 2, 1], | ||
[2, 2, 1], | ||
], | ||
faces=[ | ||
[6,7,5,4], | ||
[0,1,3,2], | ||
[4,5,1,0], | ||
[5,7,3,1], | ||
[7,6,2,3], | ||
[6,4,0,2], | ||
[12,13,11,7], | ||
[3,8,10,9], | ||
[7,11,8,3], | ||
[11,13,10,8], | ||
[13,12,9,10], | ||
[12,7,3,9], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[1, 1, 0], | ||
[2, 1, 0], | ||
[1, 2, 0], | ||
[2, 2, 0], | ||
[1, 1, 1], | ||
[2, 1, 1], | ||
[1, 2, 1], | ||
[2, 2, 1], | ||
], | ||
faces=[ | ||
[6,7,5],[6,5,4], | ||
[0,1,3],[0,3,2], | ||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[6,4,0],[6,0,2], | ||
[14,15,13],[14,13,7], | ||
[3,9,11],[3,11,10], | ||
[7,13,9],[7,9,3], | ||
[13,15,11],[13,11,9], | ||
[15,14,10],[15,10,11], | ||
[14,7,3],[14,3,10], | ||
]); |
30 changes: 30 additions & 0 deletions
30
tests/data/scad/3D/misc/polyhedrons-touch-face-nonmanifold.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
polyhedron( | ||
points=[ | ||
[0, 0, 0], | ||
[1, 0, 0], | ||
[0, 1, 0], | ||
[1, 1, 0], | ||
[0, 0, 1], | ||
[1, 0, 1], | ||
[0, 1, 1], | ||
[1, 1, 1], | ||
|
||
[2, 0, 0], | ||
[2, 1, 0], | ||
[2, 0, 1], | ||
[2, 1, 1], | ||
], | ||
faces=[ | ||
[6,7,5],[6,5,4], | ||
[0,1,3],[0,3,2], | ||
[4,5,1],[4,1,0], | ||
[5,7,3],[5,3,1], | ||
[7,6,2],[7,2,3], | ||
[4,0,2],[4,2,6], | ||
[7,11,10],[7,10,5], | ||
[1,8,9],[1,9,3], | ||
[5,10,8],[5,8,1], | ||
[10,11,9],[10,9,8], | ||
[11,7,3],[11,3,9], | ||
[5,1,3],[5,3,7], | ||
]); |
Oops, something went wrong.