]> www.fi.muni.cz Git - things.git/commitdiff
mate808 lens holder
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 24 Feb 2017 09:22:30 +0000 (10:22 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 24 Feb 2017 09:22:30 +0000 (10:22 +0100)
808-lens-holder.scad [new file with mode: 0644]

diff --git a/808-lens-holder.scad b/808-lens-holder.scad
new file mode 100644 (file)
index 0000000..62a581e
--- /dev/null
@@ -0,0 +1,55 @@
+infty = 100;
+eps = 0.01;
+
+lens_size = 9;
+lens_depth = 2;
+wall = 1.5;
+
+difference() {
+       translate([-lens_size/2-wall, 0, 0])
+               cube([lens_size+2*wall, 2*wall+lens_depth, wall+lens_size]);
+       // lens body
+       translate([-lens_size/2, wall, wall])
+               cube([lens_size, lens_depth, lens_size + eps]);
+       // lens front
+       translate([-lens_size/2+wall, wall, -eps])
+               cube([lens_size-2*wall, lens_depth+wall+eps, lens_size + wall + 2*eps]);
+}
+
+base_d = 5;
+rear_l = 20;
+
+// rear base
+translate([-base_d/2, -rear_l, 0])
+       cube([base_d, base_d, wall]);
+
+// rear stem
+hull() {
+       translate([-wall/2, -rear_l+base_d/2, 0])
+               cube([wall, base_d/2, wall]);
+       translate([-wall/2, 0, 0])
+               cube([wall, eps, 3*wall]);
+}
+
+side_l = 20;
+for (i=[-1, 1]) scale([i, 1, 1]) {
+       // side squares
+       translate([side_l-base_d, -base_d, 0])
+               cube([base_d, base_d, wall]);
+
+       // side stem
+       hull() {
+               translate([side_l-base_d/2, -base_d/2, 0])
+                       cylinder(r = wall, h = wall, $fn = 32);
+               translate([lens_size/2+wall-eps, 0, 0])
+                       cube([eps, wall, 3*wall]);
+       }
+
+       // side to rear beam
+       hull() {
+               translate([side_l-base_d/2, -base_d/2, 0])
+                       cylinder(r = wall/2, h = wall, $fn = 32);
+               translate([0, -rear_l+base_d/2, 0])
+                       cylinder(r = wall, h = wall, $fn = 32);
+       }
+}