From: Ian Jackson Date: Tue, 2 Oct 2012 16:48:12 +0000 (+0100) Subject: pawn wip X-Git-Tag: filamentspool-v2-release~766 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=10f8e0629cc165bcc0224695239a5ceaea9d20c2 pawn wip --- diff --git a/pawn.scad b/pawn.scad new file mode 100644 index 0000000..805c5f3 --- /dev/null +++ b/pawn.scad @@ -0,0 +1,57 @@ +// -*- C -*- + +// shape parameters + +r1 = 3; +r2 = 6; a2 = 30; +r3 = r2; +r4 = 8; a4 = 30; +r5 = 12; +h6 = 5; a6 = 5; + +// coordinates + + z1 = 0; +h2 = r2 * sin(a2); z2 = z1 - h2; +h3 = r3 * sin(a2); z3 = z2 - h3; +h4 = r4 * sin(a4); z4 = z3 - h4; +h5 = r5 * sin(a4-a6); z5 = z4 - h5; + z6 = z5 - h6; + +x1 = 0 - r1; +x2 = x1 + r2 * (1-cos(a2)); +x3 = x2 + r3 * (1-cos(a2)); +x4 = x3 - r4 * (1-cos(a4)); +x5 = x4 - r5 * (1-cos(a4-a6)); +x6 = x5 - h6 * tan(a6); + +$fa=1; +$fs=0.1; + +module ConvexSegment(xc, zc, r, zmin, zmax){ + intersection(){ + translate([xc,zc]) circle(r=r); + translate([-50,zmin-0.01]) square([55,zmax-zmin+0.02]); + } +} + +module PawnTemplate(){ + intersection(){ + union(){ + ConvexSegment(x1 + r1, z1, r1, z1, 50); + ConvexSegment(x1 + r2, z1, r2, z2, z1); + translate([x5 + r5 * cos(a6), z5]) circle(r=r5); + polygon([[x6,z6-1], + [x5,z5], + [1,z5], + [1,z6-1]]); + difference(){ + translate([-50,z4]) square([52,z2-z4]); +// circle( + } + } + translate([-100,z6]) square([100.1, 200]); + } +} + +PawnTemplate();