chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7410db3
)
pawn wip fix
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 17:06:17 +0000
(18:06 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 17:06:17 +0000
(18:06 +0100)
pawn.scad
patch
|
blob
|
history
diff --git
a/pawn.scad
b/pawn.scad
index c4eb293f0282b4b4eb5e3f02684ba3ce578710e7..7e62f7cd940eeca51d71ded7aabdbc5f9d080570 100644
(file)
--- a/
pawn.scad
+++ b/
pawn.scad
@@
-11,18
+11,22
@@
h6 = 5; a6 = 5;
// coordinates
// 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;
+ z1 = 0;
+h2 = r2 * sin(a2); z2 = z1 - h2;
+h3 = r3 * sin(a2); z3 = z2 - h3;
+h4 = r4 * sin(a4); z4 = z3 - h4;
+
+zc5 = z4 - r5 * sin(a4);
+z5 = zc5 + r5 * sin(a6); z6 = z5 - h6;
x1 = 0 - r1;
x2 = x1 + r2 * (1-cos(a2));
x3 = x2 + r3 * (1-cos(a2));
x4 = x3 - r4 * (1-cos(a4));
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));
+
+xc5 = x4 + r5 * cos(a4);
+x5 = xc5 - r5 * cos(a6);
+
x6 = x5 - h6 * tan(a6);
$fa=1;
x6 = x5 - h6 * tan(a6);
$fa=1;
@@
-45,11
+49,11
@@
module ConcaveSegment(xc, zc, r, zmin, zmax){
}
module PawnTemplate(){
}
module PawnTemplate(){
- ConvexSegment( x1 + r1,
z1,
r1, z1, 50);
- ConvexSegment( x1 + r2,
z1,
r2, z2, z1);
- ConcaveSegment( x3 - r3,
z3,
r3, z3, z2);
- ConcaveSegment( x3 - r4,
z3,
r4, z4, z3);
- ConvexSegment( x
5 + r5*cos(a6), z5 - r5*sin(a6),
r5, z5, z4);
+ ConvexSegment( x1 + r1,
z1,
r1, z1, 50);
+ ConvexSegment( x1 + r2,
z1,
r2, z2, z1);
+ ConcaveSegment( x3 - r3,
z3,
r3, z3, z2);
+ ConcaveSegment( x3 - r4,
z3,
r4, z4, z3);
+ ConvexSegment( x
c5, zc5,
r5, z5, z4);
polygon([[x6, z6],
[x5, z5+0.01],
[0.01, z5],
polygon([[x6, z6],
[x5, z5+0.01],
[0.01, z5],