Created
August 26, 2012 17:59
-
-
Save joewalnes/3482116 to your computer and use it in GitHub Desktop.
3D printable shower door lock.
This file contains 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
// A 3D printable shower door safety device. | |
// See: http://www.thingiverse.com/thing:20805 | |
// See: http://todayimade.co/items/joe-walnes-made-shower-door-safety-clip | |
// 2012, Joe Walnes, Creative Commons Attribution Share Alike, blah de blah. | |
// Render in http://openscad.org/ | |
//$fn = 24; // Smooth, but very slow rendering | |
$fn = 12; // Faster! | |
// All dimensions in mm. | |
channel_thickness = 13; | |
channel_depth = 10; | |
divider_thickness = 1; | |
divider_height = 1; | |
wall_thickness = 5; | |
outer_length = 100; | |
fillet_radius = 5; | |
minkowski_radius = 2; | |
fudge = 0.1; | |
additional_hollow = 3; | |
module main_volume() { | |
difference() { | |
// Main volume | |
translate(v=[-outer_length / 2, -channel_thickness / 2 - wall_thickness, 0]) { | |
cube(center=false, size=[ | |
outer_length, | |
channel_thickness + wall_thickness * 2, | |
channel_depth + wall_thickness | |
]); | |
} | |
// Subtract 4 fillets (large arcs at ends and in middle) | |
translate(v=[-outer_length / 2 + fillet_radius, -channel_thickness / 2 - wall_thickness, fillet_radius]) { | |
mirror([1, 0, 1]) fillet(); | |
} | |
translate(v=[outer_length / 2 - fillet_radius, -channel_thickness / 2 - wall_thickness, fillet_radius]) { | |
mirror([0, 0, 1]) fillet(); | |
} | |
translate(v=[-fillet_radius, -channel_thickness / 2 - wall_thickness, fillet_radius]) { | |
mirror([0, 0, 1]) fillet(); | |
} | |
translate(v=[fillet_radius, -channel_thickness / 2 - wall_thickness, fillet_radius]) { | |
mirror([1, 0, 1]) fillet(); | |
} | |
} | |
} | |
module fillet() { | |
difference() { | |
cube(center=false, size=[ | |
fillet_radius + fudge, | |
channel_thickness + wall_thickness * 2, | |
fillet_radius + fudge | |
]); | |
intersection() { | |
cube(center=false, size=[ | |
fillet_radius, | |
channel_thickness + wall_thickness * 2, | |
fillet_radius]); | |
rotate(a=[-90, 0, 0]) { | |
cylinder(h=channel_thickness + wall_thickness * 2 + fudge, r=fillet_radius); | |
} | |
} | |
} | |
} | |
module hollow_volume() { | |
difference() { | |
// Top of doors | |
translate(v=[-outer_length / 2 - additional_hollow, -channel_thickness / 2, -additional_hollow]) { | |
cube(center=false, size=[ | |
outer_length + additional_hollow * 2, | |
channel_thickness, | |
channel_depth + additional_hollow | |
]); | |
} | |
// Slight gap between doors | |
translate(v=[-divider_thickness / 2, -channel_thickness / 2, channel_depth - divider_height]) { | |
cube(center=false, size=[ | |
divider_thickness, | |
channel_thickness, | |
divider_height | |
]); | |
} | |
} | |
} | |
module main() { | |
difference() { | |
minkowski() { | |
main_volume(); | |
sphere(r=minkowski_radius); | |
} | |
hollow_volume(); | |
} | |
} | |
// Flip it upside down for 3D printing. | |
rotate(a=[0, 180, 0]) main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment