chiark / gitweb /
77c3fc4f94177a7a11aa435da96283c9053ff123
[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 = 7;
13 stem_dia = 12;
14
15 base_th = 3;
16 base_dia = 60;
17
18 module Base(){
19   translate([0,0,-0.1])
20     english_thread(diameter=positive_dia/inch, threads_per_inch=16,
21                    leadin=1, test=$test,
22                    length= (positive_l + 0.1) / inch);
23
24   rotate([180,0,0]) {
25     cylinder(r= stem_dia/2 * 1/(0.5 * sqrt(3)),
26              h = stem_l + 1,
27              $fn=6);
28     translate([0,0, stem_l])
29       cylinder(r= base_dia/2, h= base_th);
30   }
31 }
32
33 thread_nom = 8;
34 thread_act = thread_nom + 0.375;
35
36 wingnut_th = 5;
37 wingnut_wall = 4;
38 wingnut_wing_mindia = 17.0;
39 wingnut_wing_xrad = 8;
40 wingnut_wing_xh = 5;
41 wingnut_wing_th = 3;
42
43 //$test= true;
44 $test= false;
45
46 $fa= 3;
47 $fs= 0.2;
48
49 // calculated
50
51 wingnut_cnr = wingnut_wing_th/2 -0.1;
52
53 module Wingnut(){
54   difference(){
55     union(){
56       cylinder(r= (thread_nom+wingnut_wall)/2,
57                h= wingnut_th);
58       minkowski(){
59         sphere(r= wingnut_cnr);
60         translate([0,0, wingnut_cnr*0.5])
61           linear_extrude(height= wingnut_wing_xh + wingnut_th
62                          - wingnut_cnr*1.5)
63           square([wingnut_wing_mindia + wingnut_wing_xrad*2 - wingnut_cnr*2,
64                   wingnut_wing_th - wingnut_cnr*2],
65                  center=true);
66       }
67     }
68     translate([0,0, wingnut_th])
69       linear_extrude(height= wingnut_wing_xh+1)
70       square(wingnut_wing_mindia, center=true);
71     translate([0,0, wingnut_th])
72       rotate([180,0,0])
73       translate([0,0,-0.01])
74       metric_thread(diameter=thread_act, leadin=3, internal=true,
75                     test=$test, length=wingnut_th+3);
76     mirror([0,0,1])
77       linear_extrude(height=5)
78       square(center=true, wingnut_wing_mindia*2);
79   }
80 }
81
82 Wingnut();