- 
      
 - 
        
Save miho/fce8dde240a2be822354b797eb2a412f to your computer and use it in GitHub Desktop.  
    Truncated octahedron as 3D-Model in OpenSCAD
  
        
  
    
      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
    
  
  
    
  | /* | |
| Truncated octahedron. | |
| */ | |
| module truncocta() { | |
| // octahedron based on code by Willliam A Adams | |
| octapoints = [ | |
| [+1, 0, 0], // + x axis | |
| [-1, 0, 0], // - x axis | |
| [0, +1, 0], // + y axis | |
| [0, -1, 0], // - y axis | |
| [0, 0, +1], // + z axis | |
| [0, 0, -1] // - z axis | |
| ]; | |
| octafaces = [ | |
| [4,2,0],[4,0,3],[4,3,1],[4,1,2],[5,0,2],[5,3,0],[5,1,3], [5,2,1] | |
| ]; | |
| intersection() { | |
| scale(v=3) { | |
| polyhedron(points=octapoints,triangles=octafaces); | |
| } | |
| % cube(size=4,center=true); | |
| } | |
| } | |
| truncocta(); | |
| translate([2,2,2]) { truncocta(); } | |
| /* | |
| TODO: | |
| Create wireframe, see | |
| http://www.thingiverse.com/thing:9560 | |
| http://www.thingiverse.com/thing:10409 | |
| And/or plates (could be connected by magnets: | |
| http://www.thingiverse.com/thing:6497 ) | |
| */ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment