summaryrefslogtreecommitdiff
path: root/connector_front.scad
blob: c3382cc90343bc9739f55df4bf20e6d7b912b6a7 (plain)
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
59
60
61
62
63
64
65
66
67
include <parameters.scad>

use <nipple.scad>
use <rail.scad>

module half() difference() {
  union() {	 
    // upper horizontal bar
    translate([0, 0, tray_height - bar_thickness])
      cube([tray_width / 2, bar_thickness, bar_thickness]);

    // vertical bar
    cube([bar_thickness/2, bar_thickness, tray_height]);

    // lower horizontal bar
    cube([bar_thickness/2 + rail_width + pla_epsilon, bar_thickness, bar_thickness]);

    // vertical thread bold receiver
    translate([0,                            bar_thickness, tray_height-bar_thickness]) cube([bar_thickness/2, bar_thickness, bar_thickness]);
    translate([tray_width/2 - bar_thickness, bar_thickness, tray_height-bar_thickness]) cube([bar_thickness, bar_thickness, bar_thickness]);

    // male downward positioning nippel
    translate([rail_width, bar_thickness / 2, 0]) nipple();
  }

  // receiver for rail
  translate([bar_thickness/2 - rail_thickness, 0, bar_thickness - rail_thickness])
    rail();

  // holes for thread rods (horizontal, vertical)
  translate([0, bar_thickness / 2, 0])
    cylinder(h = tray_height, r = (rod_diameter + pla_epsilon) / 2, $fs=0.1);
  translate([0, bar_thickness * 1.5, tray_height - bar_thickness / 2]) rotate([0, 90, 0])
    cylinder(h = tray_width / 2, r = (rod_diameter + pla_epsilon) / 2, $fs=0.1);

  // hole for nut on the bottom of the vertical rod
  translate([0, bar_thickness / 2, 0])
    cylinder(h=nut_height, r=nut_diameter/2 + pla_epsilon, $fs=0.1);

  // female downward positioning nippel
  translate([rail_width, bar_thickness / 2, tray_height]) nipple(pla_epsilon);
}


module front_connector(
  border_left   = false,
  border_right  = false,
  border_top    = false,
  border_bottom = false
) {
  difference() {
    union() {
      half(border_right);
      mirror() half(border_left);
    }

    // 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();
}

front_connector(border_right=true);
contact: Jan Huwald // Impressum