Created
April 26, 2016 09:27
-
-
Save JKrag/a884d3b3767ea8b2d9191a1f5a560148 to your computer and use it in GitHub Desktop.
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
// title : OpenJSCAD.org Logo | |
// author : Rene K. Mueller | |
// license : MIT License | |
// revision : 0.003 | |
// tags : Logo,Intersection,Sphere,Cube | |
// file : logo.jscad | |
function main() { | |
return union( | |
difference( | |
cube({size: 2.5, center: true}), | |
sphere({r:1.5, center: true}), | |
cyl(), | |
cyl().rotateX(90), | |
cyl().rotateY(90) | |
).scale(0.72), | |
truncSphere(0.4).translate([ 1, 1, 1]), | |
truncSphere(0.4).translate([ 1, 1,-1]), | |
truncSphere(0.4).translate([-1,-1, 1]), | |
truncSphere(0.4).translate([-1,-1,-1]), | |
truncSphere(0.4).translate([-1, 1, 1]), | |
truncSphere(0.4).translate([-1, 1,-1]), | |
truncSphere(0.4).translate([ 1,-1, 1]), | |
truncSphere(0.4).translate([ 1,-1,-1]) | |
).translate([0,0,1.5]).scale(10); | |
} | |
function cyl() { | |
return cylinder({r: 1, h: 3}).translate([0,0,-1.5]) | |
} | |
function truncSphere(x) { | |
return intersection( | |
sphere({r: 1.3, center: true}), | |
cube({size: 2.1, center: true}) | |
).scale(x) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment