#793 Added testcase

master
Marius Kintel 2015-02-01 18:43:18 -05:00
parent ea165eeb58
commit 111197f694
11 changed files with 5 additions and 30 deletions

View File

@ -0,0 +1,2 @@
polyhedron(points = [[0, 0, 0], [2, 4, 0], [8, 4, 0], [10, 0, 0], [10, 10, 0], [0, 10, 0], [0, 0, 5], [2, 4, 5], [8, 4, 5], [10, 0, 5], [10, 10, 5], [0, 10, 5]], faces = [[0, 1, 2, 3, 4, 5], [0, 6, 7], [0, 7, 1], [1, 7, 8], [1, 8, 2], [2, 8, 9], [2, 9, 3], [3, 9, 10], [3, 10, 4], [4, 10, 11], [4, 11, 5], [5, 11, 6], [5, 6, 0], [11, 10, 9, 8, 7, 6]], convexity = 2);

View File

@ -11,30 +11,6 @@ module polyhedrons() {
translate([4,0,0])
polyhedron(points = [[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],
triangles = [[0,2,4],[0,5,2],[0,4,3],[0,3,5],[1,4,2],[1,2,5],[1,3,4], [1,5,3]]);
// Containing concave polygons
translate([6,0,0])
polyhedron(points=[
[-0.8,-0.8,-0.8],
[0,0,-0.8],
[0.8,-0.8,-0.8],
[0.8,0.8,-0.8],
[-0.8,0.8,-0.8],
[-0.8,-0.8,0.8],
[0,0,0.8],
[0.8,-0.8,0.8],
[0.8,0.8,0.8],
[-0.8,0.8,0.8],
],
triangles=[
[0,1,2,3,4],
[5,6,1,0],
[6,7,2,1],
[7,8,3,2],
[8,9,4,3],
[9,5,0,4],
[9,8,7,6,5],
], convexity=2);
}
polyhedrons();

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -0,0 +1,3 @@
group() {
polyhedron(points = [[0, 0, 0], [2, 4, 0], [8, 4, 0], [10, 0, 0], [10, 10, 0], [0, 10, 0], [0, 0, 5], [2, 4, 5], [8, 4, 5], [10, 0, 5], [10, 10, 5], [0, 10, 5]], faces = [[0, 1, 2, 3, 4, 5], [0, 6, 7], [0, 7, 1], [1, 7, 8], [1, 8, 2], [2, 8, 9], [2, 9, 3], [3, 9, 10], [3, 10, 4], [4, 10, 11], [4, 11, 5], [5, 11, 6], [5, 6, 0], [11, 10, 9, 8, 7, 6]], convexity = 2);
}

View File

@ -7,9 +7,6 @@ group() {
multmatrix([[1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
polyhedron(points = [[1, 0, 0], [-1, 0, 0], [0, 1, 0], [0, -1, 0], [0, 0, 1], [0, 0, -1]], faces = [[0, 2, 4], [0, 5, 2], [0, 4, 3], [0, 3, 5], [1, 4, 2], [1, 2, 5], [1, 3, 4], [1, 5, 3]], convexity = 1);
}
multmatrix([[1, 0, 0, 6], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
polyhedron(points = [[-0.8, -0.8, -0.8], [0, 0, -0.8], [0.8, -0.8, -0.8], [0.8, 0.8, -0.8], [-0.8, 0.8, -0.8], [-0.8, -0.8, 0.8], [0, 0, 0.8], [0.8, -0.8, 0.8], [0.8, 0.8, 0.8], [-0.8, 0.8, 0.8]], faces = [[0, 1, 2, 3, 4], [5, 6, 1, 0], [6, 7, 2, 1], [7, 8, 3, 2], [8, 9, 4, 3], [9, 5, 0, 4], [9, 8, 7, 6, 5]], convexity = 2);
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) {
difference() {
@ -21,9 +18,6 @@ group() {
multmatrix([[1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
polyhedron(points = [[1, 0, 0], [-1, 0, 0], [0, 1, 0], [0, -1, 0], [0, 0, 1], [0, 0, -1]], faces = [[0, 2, 4], [0, 5, 2], [0, 4, 3], [0, 3, 5], [1, 4, 2], [1, 2, 5], [1, 3, 4], [1, 5, 3]], convexity = 1);
}
multmatrix([[1, 0, 0, 6], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
polyhedron(points = [[-0.8, -0.8, -0.8], [0, 0, -0.8], [0.8, -0.8, -0.8], [0.8, 0.8, -0.8], [-0.8, 0.8, -0.8], [-0.8, -0.8, 0.8], [0, 0, 0.8], [0.8, -0.8, 0.8], [0.8, 0.8, 0.8], [-0.8, 0.8, 0.8]], faces = [[0, 1, 2, 3, 4], [5, 6, 1, 0], [6, 7, 2, 1], [7, 8, 3, 2], [8, 9, 4, 3], [9, 5, 0, 4], [9, 8, 7, 6, 5]], convexity = 2);
}
}
multmatrix([[1, 0, 0, 3], [0, 1, 0, 0], [0, 0, 1, 2], [0, 0, 0, 1]]) {
cube(size = [8, 3, 3], center = true);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB