Last active
August 29, 2015 14:20
-
-
Save adrianwebb/d1c1a3244be032326c1c to your computer and use it in GitHub Desktop.
OpenSCAD 3D printed part for connecting stacked Raspberry Pi systems (side)
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
// | |
// Global properties (mm) | |
// | |
part_height = 3; | |
ring_outer_diameter = 13; | |
ring_inner_diameter = 7; | |
connector_bridge_length = 38; | |
connector_bridge_width = 7; | |
connector_distance = 89; | |
brace_offset_degrees = 90; | |
object_resolution = 100; | |
// | |
// Reusable modules | |
// | |
module ring (h, od, id) { | |
difference() { | |
cylinder(h = h, r = (od/2), $fn = object_resolution); | |
cylinder(h = h, r = (id/2), $fn = object_resolution); | |
} | |
} | |
module connector (bl, bw, h, od, id) { | |
cube(size = [(bl-id),h,bw], center = true, $fn = object_resolution); | |
rotate([-90,0,0]) { | |
translate([(bl/2),0,-1*(h/2)]) { | |
ring(h = h, od = od, id = id); | |
} | |
translate([-1*(bl/2),0,-1*(h/2)]) { | |
ring(h = h, od = od, id = id); | |
} | |
} | |
} | |
module brace (bl, d, h, w, id, o = 90, r = 1) { | |
fl = (sqrt(pow(d/2,2) + pow(bl/2,2)) * 2) - id; | |
a = asin(bl/fl); | |
rotate([0,(a+o)*r,0]) { | |
cube(size = [fl,h,w], center = true, $fn = object_resolution); | |
} | |
} | |
// | |
// Design definition | |
// | |
translate([0,0,(connector_distance/2)]) { | |
connector( | |
bl = connector_bridge_length, | |
bw = connector_bridge_width, | |
h = part_height, | |
od = ring_outer_diameter, | |
id = ring_inner_diameter | |
); | |
} | |
translate([0,0,-1*(connector_distance/2)]) { | |
connector( | |
bl = connector_bridge_length, | |
bw = connector_bridge_width, | |
h = part_height, | |
od = ring_outer_diameter, | |
id = ring_inner_diameter | |
); | |
} | |
brace( | |
bl = connector_bridge_length, | |
d = connector_distance, | |
h = part_height, | |
w = connector_bridge_width, | |
id = ring_inner_diameter, | |
o = brace_offset_degrees | |
); | |
brace( | |
bl = connector_bridge_length, | |
d = connector_distance, | |
h = part_height, | |
w = connector_bridge_width, | |
id = ring_inner_diameter, | |
o = brace_offset_degrees, | |
r = -1 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment