chiark / gitweb /
mic-table-clamp: wip clamp
[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 //clamp_l = 
27 //ct_h = 7;
28
29 wingnut_th = 5;
30 wingnut_wall = 4;
31 wingnut_wing_mindia = 17.0;
32 wingnut_wing_xrad = 8;
33 wingnut_wing_xh = 5;
34 wingnut_wing_th = 3;
35
36 $test= true;
37 ///$test= false;
38
39 //$fa= 3;
40 //$fs= 0.2;
41
42 // calculated
43
44 wingnut_cnr = wingnut_wing_th/2 -0.1;
45
46 module OurThread(l){
47   translate([0,0,-0.01])
48     metric_thread(diameter=thread_act, pitch=thread_pitch,
49                   leadin=3, internal=true,
50                   test=$test, length=l);
51 }
52
53 module Stem(){ ////toplevel
54   translate([0,0, stem_l -0.1])
55     english_thread(diameter=positive_dia/inch, threads_per_inch=16,
56                    leadin=1, test=$test,
57                    length= (positive_l + 0.1) / inch);
58
59   difference(){
60     union(){
61       cylinder(r= stem_dia/2 * 1/(0.5 * sqrt(3)),
62                h = stem_l,
63                $fn=6);
64       cylinder(r= stem_base_dia/2,
65                h = stem_base_th);
66     }
67     OurThread(stem_inner_l);
68   }
69 }
70
71 module Wingnut(){ ////toplevel
72   difference(){
73     union(){
74       cylinder(r= (thread_nom+wingnut_wall)/2,
75                h= wingnut_th);
76       minkowski(){
77         sphere(r= wingnut_cnr);
78         translate([0,0, wingnut_cnr*0.5])
79           linear_extrude(height= wingnut_wing_xh + wingnut_th
80                          - wingnut_cnr*1.5)
81           square([wingnut_wing_mindia + wingnut_wing_xrad*2 - wingnut_cnr*2,
82                   wingnut_wing_th - wingnut_cnr*2],
83                  center=true);
84       }
85     }
86     translate([0,0, wingnut_th])
87       linear_extrude(height= wingnut_wing_xh+1)
88       square(wingnut_wing_mindia, center=true);
89     translate([0,0, wingnut_th])
90       rotate([180,0,0])
91       OurThread(wingnut_th+3);
92     mirror([0,0,1])
93       linear_extrude(height=5)
94       square(center=true, wingnut_wing_mindia*2);
95   }
96 }
97
98 module ClampTop(){ ////toplevel
99 //  linear_extrude(height);
100 }
101
102 //Wingnut();
103 //Stem();