Skip to content

Instantly share code, notes, and snippets.

@JKrag
Created April 26, 2016 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JKrag/a884d3b3767ea8b2d9191a1f5a560148 to your computer and use it in GitHub Desktop.
Save JKrag/a884d3b3767ea8b2d9191a1f5a560148 to your computer and use it in GitHub Desktop.
// 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