//casting profile ang=-15; // draft angle r1=3; // radius of bottom fillet r2=3; // radius of top rounding ht=12 ; //height steps=3; //step angle of curves // xt1, yt1, tangent point on bottom circle, center 0,0 xt1=r1*cos(ang+180); yt1=r1*sin(ang+180); //bottom circle bpoints=[ for (i=[270:-steps:180+ang]) [r1*cos(i),r1*sin(i)] ]; // top circle xt2=r2*cos(ang); yt2=r2*sin(ang); tpoints=[ for (i=[ang:steps:90]) [r2*cos(i),r2*sin(i)] ]; //centre top radius xtc=0; ytc=ht-r2; tc=[xtc,ytc]; // draft line top= [xt2,ht-r2+yt2]; tadjacent= ht-r2+yt2; badjacent= yt1; adjacent= tadjacent-badjacent-r1; op=adjacent*tan(ang); bottom=[op+xt2,yt1+r1]; // centre bottom radius bc=[op+xt2-xt1,r1]; // get points tbpoints=[for(point=bpoints)point+(bc)]; ttpoints=[for(point=tpoints)point+(tc)]; origin=[[0,ht],[0,0]]; all=concat(tbpoints,ttpoints,origin); polygon(all);