chiark / gitweb /
mic-camera-adapter: print settings
[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.25;
11 positive_l = inch * 1/2.;
12
13 negative_dia = inch * 1/4. + 0.25;
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 //$test = true;
26 $test = false;
27 $fs=0.1;
28 $fa=5;
29
30 module Adapter(){
31   translate([0,0,-0.1])
32     english_thread(diameter=positive_dia/inch, threads_per_inch=16,
33                    leadin=1, test=$test,
34                    length= (positive_l + 0.1) / inch);
35   rotate([180,0,0]) {
36     difference(){
37       cylinder(r= spanner/2 * 1/(0.5 * sqrt(3)),
38                h = negative_l + midsection,
39                $fn=6);
40       translate([0,0, midsection])
41         english_thread(diameter=negative_dia/inch,
42                        threads_per_inch=negative_tpi,
43                        leadin=0, internal=true, test=$test,
44                        length= (negative_l + inch/19) / inch);
45       translate([0,0, midsection+negative_l]) {
46         hull(){
47           translate([0,0, negative_chamfer])
48             cylinder(r= negative_dia/2 + negative_chamfer*2,
49                      h=1);
50           mirror([0,0,1])
51             cylinder(r= negative_dia/2 - negative_chamfer*2,
52                      h= negative_chamfer*3);
53         }
54       }
55     }
56   }
57 }
58
59 Adapter();