Created
January 2, 2014 23:37
-
-
Save GilesBathgate/8229461 to your computer and use it in GitHub Desktop.
OpenSCAD hollow test case
This file contains hidden or 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
//----TEST 1 ---------------- | |
module test1() { | |
module hollow_cube() { | |
polyhedron([[-5,5,-5],[-5,-5,-5],[-5,-5,5],[-5,5,5],[5,-5,-5],[5,-5,5],[5,5,5],[5,5,-5],[-2.5,2.5,-2.5],[-2.5,-2.5,-2.5],[-2.5,-2.5,2.5],[-2.5,2.5,2.5],[2.5,-2.5,-2.5],[2.5,-2.5,2.5],[2.5,2.5,2.5],[2.5,2.5,-2.5]],[[0,1,2,3],[2,1,4,5],[3,2,5,6],[4,1,0,7],[7,0,3,6],[5,4,7,6],[8,9,10,11],[10,9,12,13],[11,10,13,14],[12,9,8,15],[15,8,11,14],[13,12,15,14]]); | |
} | |
difference(){ | |
hollow_cube(); | |
cube(5); | |
} | |
} | |
//-----TEST 2 ---------------- | |
module test2() { | |
module hollow_cube() { | |
difference(){ | |
cube(10,center=true); | |
cube(5,center=true); | |
} | |
} | |
difference(){ | |
hollow_cube(); | |
cube(5); | |
} | |
} | |
test1(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment