-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmount.scad
More file actions
204 lines (185 loc) · 3.71 KB
/
Copy pathmount.scad
File metadata and controls
204 lines (185 loc) · 3.71 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Night Vision adapter for P8079HP image intensifier
//
// Uses EF mount from:
// http://www.thingiverse.com/thing:1029872/#files (adapted to add locking tabs)
// and nut cutout from:
// https://www.printables.com/model/772241-m3-nut-cutout-model-with-openscad-code/files
//
// I found with that EF mount there where no locking 'tabs' so I added those.
// I added a cylinder which the night vision tube fits into, battery holder and
// switch holder.
$fn = 256;
$fa = 1.0;
$fs = 1.0;
clearance = 0.0; // increase up to max 1.0 if too tight
module wedge_180(h, r, d)
{
rotate(d) difference()
{
rotate(180-d) difference()
{
cylinder(h = h, r = r);
translate([-(r+1), 0, -1]) cube([r*2+2, r+1, h+2]);
}
translate([-(r+1), 0, -1]) cube([r*2+2, r+1, h+2]);
}
}
module wedge(h, r, d)
{
intersection()
{
if(d <= 180)
wedge_180(h, r, d);
else
rotate(d) difference()
{
cylinder(h = h, r = r);
translate([0, 0, -1]) wedge_180(h+2, r+1, 360-d);
}
}
}
module Ring(outer, inner, height)
{
intersection()
{
difference()
{
cylinder(h = height, r = outer/2);
cylinder(h = height, r = inner/2);
}
}
}
module EFmountSocket()
{
union()
{
translate([0, 0, 7])
difference()
{
Ring(59, 51, 1.5);
union()
{
wid = 80;
wedge(1.5, 59, wid);
rotate([0, 0, 240])
wedge(1.5, 59, wid);
rotate([0, 0, 120])
wedge(1.5, 59, wid);
}
}
difference()
{
translate([0, 0, 5])
cylinder(h = 6, r = 60/2);
union()
{
translate([0, 0, 7])
cylinder(h = 4, r = 55/2 + clearance);
translate([0, 0, 5])
cylinder(h = 2, r = 55/2 + clearance);
}
}
}
}
screw_dim=3.2;
nut_dim=6.64;
nut_height=2.6;
nut_first_plat=0.4;
nut_second_plat=0.2;
first_plat_size=3.2;
second_plat_size=5.75;
// Nut cutout with bolt holder
module draw_nut_cutout(screw_length)
{
cylinder( d=nut_dim, h=nut_height, $fn=6);
translate([0,0,nut_height])
cylinder( d=screw_dim, h=screw_length);
}
difference(){
// Thickness of wall
wall = 2;
bat_len = 95 + 6.9 + wall;
bat_wid = 21 + wall;
bat_hig = 21;
tube_len = 110;
union()
{
// Internal diameter
nighttube = 71;
// External diameter
nighttube_edge = 75;
// EF lens holder
translate([0, 0, 10])
Ring(nighttube_edge, 55, wall);
EFmountSocket();
// Add locking tabs for EF mount
for(i = [0 : 3])
{
rotate(36 + (i * 120))
{
translate([0, (55 / 2) - 1.5, 7 + (1.5/2)])
{
cube([1.5, 1.5, 3]);
}
}
}
translate([0, 0, 10])
difference()
{
// Night vision tube holder and cones for bolts
union()
{
Ring(nighttube_edge, nighttube, tube_len);
for(i = [0 : 2])
{
rotate([-i * 120 + 300, 90, 0])
translate([-80, 0, 35.4 + 3])
cylinder(h=3, r1=8, r2=8/2, center = true);
}
}
// Add nut holders
for(i = [0 : 2])
{
rotate([-i * 120 + 300, 90, 0])
translate([-80, 0, 35.4])
union()
{
draw_nut_cutout(100);
}
}
}
rotate([0, 90, 0])
translate([-(tube_len + 10), -((bat_wid + wall) / 2), 35.3])
union(){
translate([95, 0, 0])
// Switch holder
difference()
{
union()
{
difference()
{
cube([10, bat_wid+wall, bat_hig + wall - 6.5]);
translate([6.9 / 2 - 1.5 / 2, 12.7 / 2, 8])
cube([2.5, 12.7, bat_hig + wall - 6.5]);
}
translate([-wall, 0, 0])
cube([wall, bat_wid+wall, bat_hig + wall]);
}
translate([-wall, 0, 0])
cube([10, bat_wid, 12.7]);
}
// Battery holder
difference()
{
cube([bat_len + wall, bat_wid + wall, bat_hig + wall]);
translate([wall, wall, wall])
cube([bat_len - wall, bat_wid - wall, bat_hig]);
}
}
}
// Hole for wires
translate([0, 0, 35])
rotate([0, 90, 0])
cylinder(100, 4, 4);
}