chiark / gitweb /
mic-table-clamp: fixes from v3
[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_pitch = 1.25;
35 thread_act = thread_nom + 0.375;
36
37 wingnut_th = 5;
38 wingnut_wall = 4;
39 wingnut_wing_mindia = 17.0;
40 wingnut_wing_xrad = 8;
41 wingnut_wing_xh = 5;
42 wingnut_wing_th = 3;
43
44 //$test= true;
45 $test= false;
46
47 $fa= 3;
48 $fs= 0.2;
49
50 // calculated
51
52 wingnut_cnr = wingnut_wing_th/2 -0.1;
53
54 module Wingnut(){
55   difference(){
56     union(){
57       cylinder(r= (thread_nom+wingnut_wall)/2,
58                h= wingnut_th);
59       minkowski(){
60         sphere(r= wingnut_cnr);
61         translate([0,0, wingnut_cnr*0.5])
62           linear_extrude(height= wingnut_wing_xh + wingnut_th
63                          - wingnut_cnr*1.5)
64           square([wingnut_wing_mindia + wingnut_wing_xrad*2 - wingnut_cnr*2,
65                   wingnut_wing_th - wingnut_cnr*2],
66                  center=true);
67       }
68     }
69     translate([0,0, wingnut_th])
70       linear_extrude(height= wingnut_wing_xh+1)
71       square(wingnut_wing_mindia, center=true);
72     translate([0,0, wingnut_th])
73       rotate([180,0,0])
74       translate([0,0,-0.01])
75       metric_thread(diameter=thread_act, pitch=thread_pitch,
76                     leadin=3, internal=true,
77                     test=$test, length=wingnut_th+3);
78     mirror([0,0,1])
79       linear_extrude(height=5)
80       square(center=true, wingnut_wing_mindia*2);
81   }
82 }
83
84 Wingnut();