5 module FArcSegment_mask(beta) {
6 for (i=[0 : 0.75 : 3]) {
10 [cos(beta/4), sin(beta/4)]]);
14 module FArcSegment(xc,yc,inrad,outrad,alpha,delta) {
21 rotate(alpha) scale(outrad*2) {
22 FArcSegment_mask(delta);
43 tuberad = tubewidth/2;
44 bend = atan(tuberad/stemlen);
45 mainoutrad = tuberad + mainthick;
46 hookoutrad = hookinrad + hookwidth;
47 hookcy = -(stemlen - hookoutrad);
49 eltop = [topwidth/2, -tuberad + tubeheight + mainthick + 0.1];
50 elmid = [topwidth/2, -tuberad];
51 ellow = tangent_intersect_b([0,hookcy], hookinrad, elmid);
52 ellowextra = 180 - tangent_intersect_beta([0,hookcy], hookinrad, elmid);
55 dy = tubeheight - tuberad*2;
56 FArcSegment(0, dy, tuberad, mainoutrad, -1, 181);
57 FArcSegment(0, 0, tuberad, mainoutrad, -bend, bend+1);
58 translate([tuberad, 0]) square(center=false, size=[mainthick,dy]);
59 FArcSegment(0, 0, tuberad, tuberad + clipthick, 360-clipang, clipang+1);
60 rotate(-bend) translate([tuberad, 0]) mirror([0,1])
61 square(center=false, size=[mainthick, stemlen/cos(bend)]);
64 module ElevationCore(){
65 FArcSegment(0, hookcy, hookinrad, hookoutrad,
68 translate([-hookoutrad*sqrt(0.5),
69 hookcy - hookoutrad*sqrt(0.5) + 0.1])
71 square(center=false, size=[topwidth, stemlen + tubeheight + 20]);
72 polygon([[-hookoutrad, ellow[1]],
79 // after here is all 3D
83 translate([0,0, -(topwidth+10)/2])
84 linear_extrude(height=topwidth+10) Plan();
87 linear_extrude(height=100)
93 translate([-100,-100,0]) cube(center=false,size=[200,200,200]);
96 taperangle = -270 + tangent_intersect_beta([-hookcy, 0],
98 [-eltop[1], -eltop[0]]);
99 module Hook(){ ////toplevel
101 rotate([taperangle,0,0])
102 translate([0,-eltop[1],0])
104 translate([0,0,topwidth/2])
105 rotate([taperangle*2,0,0])
107 translate([0,0,-topwidth/2])
108 mirror([0,0,1]) PlaneAbove(0);