|
@@ -0,0 +1,30 @@
|
|
1
|
+/*
|
|
2
|
+ * Created by:
|
|
3
|
+ * Thomas Buck <xythobuz@xythobuz.de> in March 2016
|
|
4
|
+ *
|
|
5
|
+ * Licensed under the Creative Commons - Attribution license.
|
|
6
|
+ */
|
|
7
|
+
|
|
8
|
+// -----------------------------------------------------------
|
|
9
|
+
|
|
10
|
+$fn = 50;
|
|
11
|
+
|
|
12
|
+/*
|
|
13
|
+ * Depending on your printer and exact settings, you need to adjust
|
|
14
|
+ * this parameter. I've had a tight fit with 17.8mm for a 17mm lens.
|
|
15
|
+ */
|
|
16
|
+diameter = 17.8; // diameter of the lens
|
|
17
|
+
|
|
18
|
+width = 1; // wall thickness
|
|
19
|
+bottom_width = 1; // bottom wall thickness
|
|
20
|
+height = 6; // height of the whole lens cap
|
|
21
|
+
|
|
22
|
+// -----------------------------------------------------------
|
|
23
|
+
|
|
24
|
+difference() {
|
|
25
|
+ // whole part
|
|
26
|
+ cylinder(h = height, d = (diameter + (2 * width)));
|
|
27
|
+
|
|
28
|
+ translate([0, 0, bottom_width])
|
|
29
|
+ cylinder(h = height - bottom_width, d = diameter);
|
|
30
|
+}
|