Created
October 28, 2015 20:47
-
-
Save hrobeers/c55616a7b3d497845c07 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
//hexcut(5, 3, 10, 10); | |
module hexcut (radius, depth, height, width) { | |
for (i = [0:ceil(height/(radius*2))]) { | |
for (j = [0:ceil(width/(radius*2))]) { | |
x = i*radius*2; | |
y = j*radius*1.75; | |
translate([x+(j%2*radius),y,0]) | |
rotate([0,0,30]) | |
cylinder(r=radius,h=depth,$fn=6); | |
}} | |
} |
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
include<hexcut.scad> | |
height = 85; // height to center of cylinder | |
width = 70; // = diameter of cylinder | |
depth = 13; // thickness | |
wallthick = 1.5; | |
hole_r = 15; | |
cut_depth = 8; | |
$fn = 100; | |
difference() | |
{ | |
union() { | |
difference() { | |
shape(0); | |
hex_cut(); | |
} | |
ring(); | |
} | |
round_cut(); | |
} | |
module shape (substract) | |
{ | |
H=height-substract; | |
W=width-2*substract; | |
D=depth; | |
difference() { | |
union() { | |
cylinder(h=D, d=W, center=false); | |
translate([0,-W/2,0]) | |
cube([H, W, D], center=false); | |
} | |
cylinder(h=D*3, r=hole_r+substract, center=true); | |
} | |
} | |
module hex_cut () | |
{ | |
intersection () | |
{ | |
translate([0,0,-wallthick]) | |
shape(wallthick); | |
radius = wallthick*2.5; | |
translate([-height/2,-width/2+radius/2,-wallthick]) | |
hexcut(radius, depth, height*2, width); | |
} | |
} | |
module ring () | |
{ | |
difference() { | |
cylinder(h=depth, d=width, center=false); | |
translate([0,0,wallthick]) | |
cylinder(h=depth, d=width-2*wallthick, center=false); | |
} | |
} | |
module round_cut () | |
{ | |
cylinder(h=cut_depth*2, | |
d=width-2*wallthick, | |
center=true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment