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 (parent:
10f8e06
)
pawn wip
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 16:57:00 +0000
(17:57 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 16:57:00 +0000
(17:57 +0100)
pawn.scad
patch
|
blob
|
history
diff --git
a/pawn.scad
b/pawn.scad
index 805c5f383127e92d767566ebb988e77b94c855ef..88113c10d597e7039210399cf9616b0f0e8864bc 100644
(file)
--- a/
pawn.scad
+++ b/
pawn.scad
@@
-28,18
+28,32
@@
x6 = x5 - h6 * tan(a6);
$fa=1;
$fs=0.1;
$fa=1;
$fs=0.1;
+module SegmentBasisSquare(zmin, zmax, xmin){
+ translate([xmin, zmin-0.01]) square([-xmin+0.01, zmax-zmin+0.02]);
+}
module ConvexSegment(xc, zc, r, zmin, zmax){
intersection(){
translate([xc,zc]) circle(r=r);
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]);
+ SegmentBasisSquare(zmin,zmax,-50);
+ }
+}
+module ConcaveSegment(xc, zc, r, zmin, zmax){
+ difference(){
+ SegmentBasisSquare(zmin,zmax, xc);
+ translate([xc,zc]) circle(r=r);
}
}
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( x5 + r5*cos(a6), z5 - r5*sin(a6), r5, z5, z4);
+
+if(0)
intersection(){
union(){
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],
translate([x5 + r5 * cos(a6), z5]) circle(r=r5);
polygon([[x6,z6-1],
[x5,z5],