diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-30 01:25:42 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-30 01:25:42 (GMT) |
commit | f3b3eaac687f0ba9a2a9b9382e7b605f106bf2b0 (patch) | |
tree | 8f9f7dc43b14748f5b6171cad70966439bd84977 /testdata | |
parent | e7001dd4592735e35779d26a77b4a7da69d547c0 (diff) |
Added polyhedron-tests
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/scad/features/polyhedron-tests.scad | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testdata/scad/features/polyhedron-tests.scad b/testdata/scad/features/polyhedron-tests.scad new file mode 100644 index 0000000..690d962 --- /dev/null +++ b/testdata/scad/features/polyhedron-tests.scad @@ -0,0 +1,20 @@ +module polyhedrons() { + polyhedron(points = [[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]], + triangles = [[0,4,2],[0,2,5],[0,3,4],[0,5,3],[1,2,4],[1,5,2],[1,4,3], [1,3,5]]); + + // One face flipped + translate([2,0,0]) + polyhedron(points = [[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]], + triangles = [[0,4,2],[0,2,5],[0,3,4],[0,5,3],[1,2,4],[1,5,2],[1,3,4], [1,3,5]]); + + // All faces flipped + 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]]); +} + +polyhedrons(); +translate([0,2,0]) difference() { + polyhedrons(); + translate([2,0,2]) cube([8,3,3], center=true); +} |