chiark / gitweb /
trailerhubcap a bit tighter
[reprap-play.git] / trailerhubcap.scad
1 maindia = 29.7;
2 poleholeh = 5.0;
3 polecovth = 0.4;
4 poleholerad = 6;
5
6 mainoverlap = 1.5;
7
8 hookbasew = 3.5;
9 hookfullw = 6;
10 hookheight = 4.5;
11 hookwidth = 5;
12 hookbevelw = 0.75;
13 hookbevelh = 1.5;
14
15 fingernaildepth = 5;
16 fingernailheight = 2.5;
17 fingernailwidth = 6;
18
19 bigrad = maindia/2 + mainoverlap;
20 mainth = poleholeh + polecovth;
21 hooklessdepth = hookfullw - hookbasew;
22
23 module base() {
24   rotate_extrude(convexity=10)
25     mirror([1,0,0])
26     polygon(points=[[-bigrad, 0],
27                     [-bigrad + mainth, -mainth],
28                     [0, -mainth],
29                     [0, -poleholeh],
30                     [-poleholerad, -poleholeh],
31                     [-poleholerad, 0]]);
32 }
33
34 module fingernails() {
35   for (ang=[60,180,300])
36     rotate([0,0,ang])
37       translate([bigrad - fingernaildepth,
38                  -fingernailwidth/2,
39                  -fingernailheight])
40       cube([fingernaildepth + 1, fingernailwidth, fingernailheight + 1]);
41 }
42
43 module hookrim() {
44   rotate_extrude(convexity=10)
45     mirror([1,0,0])
46     translate([-maindia/2, 0, 0])
47     polygon(points=[[hooklessdepth, 0],
48                     [hookfullw, 0],
49                     [hookfullw*0.33, hookheight],
50                     [hookbevelw, hookheight],
51                     [0, hookheight-hookbevelh],
52                     [0, hooklessdepth]]);
53 }
54
55 module hooktriangles() {
56   for (ang=[0,120,240]) {
57     rotate([0,0,ang]) {
58       translate([0,0,-1]) {
59         linear_extrude(height=hookheight+2) {
60           polygon(points=[[0, 0],
61                           [maindia/2 + 1, -hookwidth],
62                           [maindia/2 + 1, +hookwidth]]);
63         }
64       }
65     }
66   }
67 }
68
69 difference(){
70   base();
71   fingernails();
72 }
73 intersection(){
74   hookrim();
75   hooktriangles();
76 }