aboutsummaryrefslogtreecommitdiff
path: root/adapter-plate/adapter-plate.scad
blob: 06081db74cffa174e1fd1fa946f04b5146418f74 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
$fn=50;
inch = 25.4;

module roundedRect(size, radius)
{
        x = size[0];
        y = size[1];
        z = size[2];

        linear_extrude(height=z)
        hull()
        {
                // place 4 circles in the corners, with the given radius
                translate([(-x/2)+radius, (-y/2)+radius, 0])
                circle(r=radius);

                translate([(x/2)-radius, (-y/2)+radius, 0])
                circle(r=radius);

                translate([(-x/2) + radius, (y/2)-radius, 0])
                circle(r=radius);

                translate([(x/2)-radius, (y/2)-radius, 0])
                circle(r=radius);
        }

}

module counterSunk(position, radius)
{
union()
    {
     translate(position)
     union()
        {
     cylinder(3, radius, radius, 8, center=false);
     cylinder(3, 0, 3, center=false);
        }
    }
    
}

difference()
{
roundedRect([4.5*inch, 3.5*inch, 3], 5, center=false);

translate([-4*inch/2, -3*inch/2, 0])
cylinder(3, 0.13*inch, 0.13*inch, 8, center=false);
    
translate([-4*inch/2, 3*inch/2, 0])
cylinder(3, 0.13*inch, 0.13*inch, 8, center=false);
    
translate([4*inch/2, -3*inch/2, 0])
cylinder(3, 0.13*inch, 0.13*inch, 8, center=false);
    
translate([4*inch/2, 3*inch/2, 0])
cylinder(3, 0.13*inch, 0.13*inch, 8, center=false);

counterSunk([3*inch/2, 2*inch/2, 0], 0.056*inch);
counterSunk([-3*inch/2, 2*inch/2, 0], 0.056*inch);
counterSunk([3*inch/2, -2*inch/2, 0], 0.056*inch);
counterSunk([-3*inch/2, -2*inch/2, 0], 0.056*inch);



linear_extrude(height=5)
offset(r=3){
offset(r=-6){
union(){
square([4*inch,1.8*inch], center=true);
square([2.8*inch,3*inch], center=true);
}
}
}
}