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