-
Notifications
You must be signed in to change notification settings - Fork 0
/
relay-mount.scad
65 lines (57 loc) · 1.79 KB
/
relay-mount.scad
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
$fn = 60;
padding = .1;
pcb_hole_dist = 35;
pcb_hole_r = 1.5;
pcb_w = 40;
module pcb_holes() {
translate([2.5,2.5,-15]) {
cylinder(r=pcb_hole_r, h=20);
translate([pcb_hole_dist,0,0]) cylinder(r=pcb_hole_r, h=20);
}
}
pcb_thickness = 1.5;
module pcb() {
difference() {
cube([pcb_w, 50, pcb_thickness]);
//pcb_holes();
}
}
//%translate([(mount_peg_dist+((mount_margin_xy+mount_hole_r)*2)-pcb_w)/2,10,mount_thickness]) pcb();
mount_peg_dist = 37;
mount_hole_r = 2;
mount_margin_xy = 3;
mount_thickness = 1;
difference() {
translate([mount_margin_xy+mount_hole_r, mount_margin_xy+mount_hole_r, 0]) {
hull() {
// Mounting Side
cylinder(r=mount_margin_xy+mount_hole_r);
translate([mount_peg_dist, 0, 0]) cylinder(r=mount_margin_xy+mount_hole_r);
// PCB side
translate([1,10-pcb_hole_r,0]) {
cylinder(r=mount_margin_xy+pcb_hole_r);
translate([pcb_hole_dist, 0, 0]) cylinder(r=mount_margin_xy+pcb_hole_r);
}
}
pcb_side_thickness = (mount_thickness*2)+pcb_thickness;
translate([1,10-pcb_hole_r,0]) {
cylinder(r=mount_margin_xy+pcb_hole_r, h=pcb_side_thickness);
translate([pcb_hole_dist, 0, 0]) cylinder(r=mount_margin_xy+pcb_hole_r, h=pcb_side_thickness);
//translate([(pcb_w/2)-mount_margin_xy,1-10,0]) cylinder(r=mount_margin_xy+pcb_hole_r, h=mount_thickness);
}
}
translate([(mount_peg_dist+((mount_margin_xy+mount_hole_r)*2)-pcb_w)/2,8+mount_margin_xy,mount_thickness]) {
pcb_holes();
pcb();
}
/*
* Wheat mounting posts
*
* These are the posts on the corner with the DC input. The posts are 37mm
* apart, and the holes are 4mm.
*/
translate([mount_margin_xy+mount_hole_r,mount_margin_xy+mount_hole_r,-padding]) {
cylinder(r=2, h=mount_thickness+(padding*2));
translate ([mount_peg_dist,0,0]) cylinder(r=2, h=mount_thickness+(padding*2));
}
}