-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpcbclamp.scad
88 lines (65 loc) · 1.98 KB
/
pcbclamp.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* Choose one of these things to be displayed */
SHOW_DEMO = false;
LASER_HALFCLAMP = true;
$fs = 0.1;
laserable_depth = 3;
copper_color = [184/255, 115/255, 51/255];
/* size of PCB stock to fit in the frame */
pcb_x = 160;
pcb_y = 100;
pcb_z = 1.6;
/* how much space around the edge of the PCB will we loose by it being used as a clamp */
clamping_width = 3;
/* Our mill has three t-slot slots. This is the spacing between them. This is the bit most likely to need modifications for different mills & such. */
/* Surprisingly, our proxxon (de) mill appears to have come with a slide table that was designed in inches. */
t_slot_spacing = 25.04;
t_slot_bolt_d = 6;
x_margin_width = t_slot_bolt_d + 4;
y_margin_width = 10;
if (LASER_HALFCLAMP) {
projection() {
half_clamp();
}
}
if (SHOW_DEMO) {
color(copper_color)
cube([pcb_x, pcb_y, pcb_z]);
difference() {
union () {
translate([0, 0, pcb_z + 0.01])
half_clamp();
translate([0, 0, -laserable_depth - 0.01])
half_clamp();
}
}
}
/*translate([-t_slot_bolt_d/2, , -(laserable_depth + 1)])
cylinder(r=t_slot_bolt_d/2, h=laserable_depth*2 + pcb_z + 2);
*/
module half_clamp() {
difference(){
translate([-x_margin_width,
-y_margin_width, 0])
cube([pcb_x + 2 * x_margin_width,
pcb_y + 2 * y_margin_width,
laserable_depth]);
translate([clamping_width,
clamping_width, -1])
cube([pcb_x - 2 * clamping_width,
pcb_y - 2 * clamping_width,
laserable_depth+2]);
for (y_offset=[-1 * t_slot_spacing, 0, 1 * t_slot_spacing]) {
echo("Bolt ", y_offset);
translate([0,
pcb_y / 2 + y_offset,
-(laserable_depth + 1)]) {
translate([-x_margin_width/2, 0, 0])
cylinder(r=t_slot_bolt_d/2,
h=laserable_depth * 2 + pcb_z + 2);
translate([pcb_x + x_margin_width/2, 0, 0])
cylinder(r=t_slot_bolt_d/2,
h=laserable_depth * 2 + pcb_z + 2);
}
}
}
}