chiark / gitweb /
laptop-camera-tripod-bracket: wip
[reprap-play.git] / mic-camera-adapter.scad
1 // -*- C -*-
2
3 // print on High Detail
4 // but adjust infill to 50%
5
6 include <threads.scad>
7
8 inch = 25.4;
9
10 positive_dia = inch * 3/8. - 0.375;
11 positive_l = inch * 1/2.;
12
13 negative_dia = inch * 1/4. + 0.375;
14 negative_l =   10.0;
15
16 negative_wall = 4;
17 midsection = 4;
18
19 spanner = 12;
20
21 negative_tpi = 20;
22 negative_pitch = inch/negative_tpi;
23 negative_chamfer = negative_pitch/2;
24
25 base_dia = 35;
26 base_th_min = 1;
27 base_th_max = 4;
28
29 //$test = true;
30 $test = false;
31 $fs=0.1;
32 $fa=5;
33
34 module Adapter(){
35   translate([0,0,-0.1])
36     english_thread(diameter=positive_dia/inch, threads_per_inch=16,
37                    leadin=1, test=$test,
38                    length= (positive_l + 0.1) / inch);
39   rotate([180,0,0]) {
40     difference(){
41       union(){
42         cylinder(r= spanner/2 * 1/(0.5 * sqrt(3)),
43                  h = negative_l + midsection,
44                  $fn=6);
45         translate([0,0, midsection+negative_l]) {
46           mirror([0,0,1]) {
47             hull(){
48               cylinder(r= base_dia/2, h = base_th_min);
49               cylinder(r= 0.1,        h = base_th_max);
50             }
51           }
52         }
53       }
54       translate([0,0, midsection])
55         english_thread(diameter=negative_dia/inch,
56                        threads_per_inch=negative_tpi,
57                        leadin=0, internal=true, test=$test,
58                        length= (negative_l + inch/19) / inch);
59       translate([0,0, midsection+negative_l]) {
60         hull(){
61           translate([0,0, negative_chamfer])
62             cylinder(r= negative_dia/2 + negative_chamfer*2,
63                      h=1);
64           mirror([0,0,1])
65             cylinder(r= negative_dia/2 - negative_chamfer*2,
66                      h= negative_chamfer*3);
67         }
68       }
69     }
70   }
71 }
72
73 Adapter();