-
Notifications
You must be signed in to change notification settings - Fork 0
/
WE_IDE_DB37_cover.scad
140 lines (111 loc) · 4.06 KB
/
WE_IDE_DB37_cover.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/************************************************************************
WE_IDE_DB37_cover.scad
Acorn Archimedes WE IDE Podule (DB37) cover
Copyright (C) 2020 Simon Inns
This is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Email: simon.inns@gmail.com
************************************************************************/
$fn = 30;
sides = 30;
// This is a replacement podule cover for the Watford Electronics IDE
// podules produced in 1991 which has a 37 pin female D-SUB external
// connector.
// D-Sub functions copied from the openscad-model-library:
// https://github.com/cznewt/openscad-model-library/blob/master/lib/connector/connector_dsub.scad
module hex_bolt_extrude(depth, head_h, body, head, clear) {
translate([0,0,head_h/2]) rotate([0, 0, 90]) hex_head_extrude(head_h, head, clear);
translate([0,0,head_h]) bolt_body_extrude(depth-head_h+clear, body, clear);
}
module bolt_body_extrude(height, diameter, clear) {
radius = diameter/2+clear*2;
cylinder(h=height, r1=radius, r2=radius, center=false, $fn=50);
}
module hex_head_extrude(height, diameter, clear) {
height = height+clear;
radius = diameter+1+clear*4;
angle = 360/6;
cote = (radius)/tan(angle);
union() {
rotate([0,0,0])
cube([radius,cote,height],center=true);
rotate([0,0,angle])
cube([radius,cote,height],center=true);
rotate([0,0,2*angle])
cube([radius,cote,height],center=true);
}
}
// Note: this is modified slightly to get the holes to the right diameter
module m1_6_hex_bolt_extrude(depth, head, clear) {
translate([0,0,-depth/2]) hex_bolt_extrude(depth, head, 2.5, 3.41, clear);
}
module connector_dsub_extrusion(dimensions,depth,clear)
{
b = dimensions[0];
d = dimensions[1];
f = dimensions[2];
k = dimensions[3];
h = depth+clear;
g = clear;
cut_angle = 10;
mounting_hole = 3.05;
o = 2*(g+f-k)*tan(cut_angle);
union()
{
hull()
{
translate([-(g+d-k),(g+f-k),-h/2])
cylinder(h=h, d=k, $fn=sides);
translate([(g+d-k),(g+f-k),-h/2])
cylinder(h=h, d=k, $fn=sides);
translate([-(g+d-k)+o,-(g+f-k),-h/2])
cylinder(h=h, d=k, $fn=sides);
translate([(g+d-k)-o,-(g+f-k),-h/2])
cylinder(h=h, d=k, $fn=sides);
}
translate([-b,0,0])
m1_6_hex_bolt_extrude(h, 1, 0.1);
translate([b,0,0])
m1_6_hex_bolt_extrude(h, 1, 0.1);
}
}
module connector_dsub_37F_extrusion(depth,clear)
{
dimensions = [31.75,29.54,6.53,2.11];
connector_dsub_extrusion(dimensions,depth,clear);
}
// End of copied modules
// Main code to draw podule plate
// Standard plate thickness is 1.6mm
plate_thickness = 1.6;
difference() {
// Main plate
cube([128.6, 25.0, plate_thickness], center = false);
// M2.5 screw hole left
translate([(128.6 - 122.5) / 2, 7.5, -1.0]) {
cylinder(plate_thickness + 2, 3.0 / 2, 3.0 / 2);
}
// M2.5 screw hole right
translate([128.6 - ((128.6 - 122.5) / 2), 7.5, -1.0]) {
cylinder(plate_thickness + 2, 3.0 / 2, 3.0 / 2);
}
translate([22 + 31.5,11,0]) {
connector_dsub_37F_extrusion(plate_thickness + 2, 0.2);
}
}
// Add some text to the cover
content = "IDE";
font = "Liberation Sans";
translate ([93, (25 / 2) - (10 / 2) , plate_thickness]) {
linear_extrude(height = 0.5) {
text(content, font = font, size = 10);
}
}