chiark / gitweb /
trailerhubcap overhanging fingernails FOR REVERT
[reprap-play.git] / trailerhubcap.scad
1 maindia = 29.2;
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 fingernailbased = 0.5;
18 fingernailwidth = 8;
19
20 bigrad = maindia/2 + mainoverlap;
21 mainth = poleholeh + polecovth;
22 hooklessdepth = hookfullw - hookbasew;
23
24 module base() {
25   rotate_extrude(convexity=10)
26     mirror([1,0,0])
27     polygon(points=[[-bigrad, 0],
28                     [-bigrad + mainth, -mainth],
29                     [0, -mainth],
30                     [0, -poleholeh],
31                     [-poleholerad, -poleholeh],
32                     [-poleholerad, 0]]);
33 }
34
35 module fingernails() {
36   for (ang=[60,180,300])
37     rotate([0,0,ang])
38       translate([bigrad - fingernaildepth,
39                  -fingernailwidth/2,
40                  -fingernailheight-fingernailbased])
41       cube([fingernaildepth + 1, fingernailwidth, fingernailheight]);
42 }
43
44 module hookrim() {
45   rotate_extrude(convexity=10)
46     mirror([1,0,0])
47     translate([-maindia/2, 0, 0])
48     polygon(points=[[hooklessdepth, 0],
49                     [hookfullw, 0],
50                     [hookfullw*0.33, hookheight],
51                     [hookbevelw, hookheight],
52                     [0, hookheight-hookbevelh],
53                     [0, hooklessdepth]]);
54 }
55
56 module hooktriangles() {
57   for (ang=[0,120,240]) {
58     rotate([0,0,ang]) {
59       translate([0,0,-1]) {
60         linear_extrude(height=hookheight+2) {
61           polygon(points=[[0, 0],
62                           [maindia/2 + 1, -hookwidth],
63                           [maindia/2 + 1, +hookwidth]]);
64         }
65       }
66     }
67   }
68 }
69
70 difference(){
71   base();
72   fingernails();
73 }
74 intersection(){
75   hookrim();
76   hooktriangles();
77 }