chiark / gitweb /
25da147134f669bf9e7c8856265ecada28410221
[reprap-play.git] / mic-table-clamp.scad
1 // -*- C -*-
2
3 // print Stem and Wingnut on High Detail
4 // but adjust shell thickness to 2mm
5
6 // others on Standard
7
8 include <threads.scad>
9 include <camera-mount.scad>
10
11 positive_dia = inch * 3/8. - 0.375;
12 positive_l = inch * 1/2.;
13
14 stem_l = 40;
15 stem_dia = 12;
16 stem_th = 3;
17 stem_ceil = 2;
18 stem_base_th  = 4;
19 stem_base_dia = 25;
20 stem_inner_l = 30;
21
22 thread_nom = 8;
23 thread_pitch = 1.25;
24 thread_act = thread_nom + 0.600;
25
26 wingnut_th = 5;
27 wingnut_wall = 4;
28 wingnut_wing_mindia = 17.0;
29 wingnut_wing_xrad = 8;
30 wingnut_wing_xh = 5;
31 wingnut_wing_th = 3;
32
33 $test= true;
34 ///$test= false;
35
36 //$fa= 3;
37 //$fs= 0.2;
38
39 // calculated
40
41 wingnut_cnr = wingnut_wing_th/2 -0.1;
42
43 module OurThread(l){
44   translate([0,0,-0.01])
45     metric_thread(diameter=thread_act, pitch=thread_pitch,
46                   leadin=3, internal=true,
47                   test=$test, length=l);
48 }
49
50 module Stem(){ ////toplevel
51   translate([0,0, stem_l -0.1])
52     english_thread(diameter=positive_dia/inch, threads_per_inch=16,
53                    leadin=1, test=$test,
54                    length= (positive_l + 0.1) / inch);
55
56   difference(){
57     union(){
58       cylinder(r= stem_dia/2 * 1/(0.5 * sqrt(3)),
59                h = stem_l,
60                $fn=6);
61       cylinder(r= stem_base_dia/2,
62                h = stem_base_th);
63     }
64     OurThread(stem_inner_l);
65   }
66 }
67
68 module Wingnut(){ ////toplevel
69   difference(){
70     union(){
71       cylinder(r= (thread_nom+wingnut_wall)/2,
72                h= wingnut_th);
73       minkowski(){
74         sphere(r= wingnut_cnr);
75         translate([0,0, wingnut_cnr*0.5])
76           linear_extrude(height= wingnut_wing_xh + wingnut_th
77                          - wingnut_cnr*1.5)
78           square([wingnut_wing_mindia + wingnut_wing_xrad*2 - wingnut_cnr*2,
79                   wingnut_wing_th - wingnut_cnr*2],
80                  center=true);
81       }
82     }
83     translate([0,0, wingnut_th])
84       linear_extrude(height= wingnut_wing_xh+1)
85       square(wingnut_wing_mindia, center=true);
86     translate([0,0, wingnut_th])
87       rotate([180,0,0])
88       OurThread(wingnut_th+3);
89     mirror([0,0,1])
90       linear_extrude(height=5)
91       square(center=true, wingnut_wing_mindia*2);
92   }
93 }
94
95 //Wingnut();
96 //Stem();