1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// common base module for front and back connector
include <parameters.scad>
use <nipple.scad>
use <rail.scad>
module connector_half(
border_side = false,
border_top = false,
border_bottom = false
) difference() {
union() {
// vertical bar
cube([bar_thickness/2, bar_thickness, tray_height]);
if (!border_side) {
// upper horizontal bar
translate([0, 0, tray_height - bar_thickness])
cube([tray_width / 2, bar_thickness, bar_thickness]);
// lower horizontal bar
cube([bar_thickness/2 + rail_width + pla_epsilon, bar_thickness, bar_thickness]);
}
// male downward positioning nippel
if (!border_bottom && !border_side)
translate([rail_width, bar_thickness / 2, 0]) nipple();
}
// receiver for rail
if (!border_side)
translate([bar_thickness/2 - rail_thickness, 0, bar_thickness - rail_thickness])
rail();
// female downward positioning nippel
if (!border_top)
translate([rail_width, bar_thickness / 2, tray_height]) nipple(pla_epsilon);
}
module connector(
border_left = false,
border_right = false,
border_top = false,
border_bottom = false
) {
difference() {
children();
// female leftward positioning nippel
if (!border_left)
translate([-tray_width/2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple(pla_epsilon);
}
// male rightward positioning nippel
if (!border_right)
translate([tray_width / 2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple();
}
|