3 module FArcSegment_mask(beta) {
4 for (i=[0 : 0.75 : 3]) {
8 [cos(beta/4), sin(beta/4)]]);
12 module FArcSegment(xc,yc,inrad,outrad,alpha,delta) {
19 rotate(alpha) scale(outrad*2) {
20 FArcSegment_mask(delta);
41 tuberad = tubewidth/2;
42 bend = atan(tuberad/stemlen);
43 mainoutrad = tuberad + mainthick;
44 hookoutrad = hookinrad + hookwidth;
45 hookcy = stemlen - hookoutrad;
48 eltopy = -tuberad + tubeheight + mainthick + 1;
53 dy = tubeheight - tuberad*2;
54 FArcSegment(0, dy, tuberad, mainoutrad, -1, 181);
55 FArcSegment(0, 0, tuberad, mainoutrad, -bend, bend+1);
56 translate([tuberad, 0]) square(center=false, size=[mainthick,dy]);
57 FArcSegment(0, 0, tuberad, tuberad + clipthick, 360-clipang, clipang+1);
58 rotate(-bend) translate([tuberad, 0]) mirror([0,1])
59 square(center=false, size=[mainthick, stemlen/cos(bend)]);
63 FArcSegment(0, -hookcy, hookinrad, hookoutrad, 180, 90+hookcurl);
64 translate([-hookoutrad*sqrt(0.5), -(stemlen+10)]) mirror([1,0])
65 square(center=false, size=[topwidth, stemlen + tubeheight + 20]);