chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sleepphone-cable-box: from v1, adjust wall_bot
[reprap-play.git]
/
pawn.scad
diff --git
a/pawn.scad
b/pawn.scad
index b7c2bed814a912ffe50ffc6b358c41263eb4f894..7277dcda5218dc7026ee7ece0bfc2f3a682804e6 100644
(file)
--- a/
pawn.scad
+++ b/
pawn.scad
@@
-2,12
+2,12
@@
// shape parameters
// shape parameters
-r1 =
3
;
+r1 =
2.85
;
r2 = 4; a2 = 27;
r3 = r2;
r2 = 4; a2 = 27;
r3 = r2;
-r4 = 4; a4 =
20
;
-r5 = 3
5
;
-h6 =
5; a6 = 5
;
+r4 = 4; a4 =
18
;
+r5 = 3
0
;
+h6 =
7; a6 = 4
;
// coordinates
// coordinates
@@
-29,11
+29,17
@@
x5 = xc5 - r5 * cos(a6);
x6 = x5 - h6 * tan(a6);
x6 = x5 - h6 * tan(a6);
-$fa=1;
-$fs=0.1;
+htotal = r1 - z6;
+echo("height", htotal);
+
+d = 0.01;
+dx = 0.00;
+
+$fa=2;
+$fs=0.2;
module SegmentBasisSquare(zmin, zmax, xmin){
module SegmentBasisSquare(zmin, zmax, xmin){
- translate([xmin, zmin-
0.01]) square([-xmin+0.01, zmax-zmin+0.0
2]);
+ translate([xmin, zmin-
d]) square([-xmin+dx, zmax-zmin+d*
2]);
}
module ConvexSegment(xc, zc, r, zmin, zmax){
intersection(){
}
module ConvexSegment(xc, zc, r, zmin, zmax){
intersection(){
@@
-55,9
+61,20
@@
module PawnTemplate(){
ConcaveSegment( x3 - r4, z3, r4, z4, z3);
ConvexSegment( xc5, zc5, r5, z5, z4);
polygon([[x6, z6],
ConcaveSegment( x3 - r4, z3, r4, z4, z3);
ConvexSegment( xc5, zc5, r5, z5, z4);
polygon([[x6, z6],
- [x5, z5+0.01],
- [0.01, z5],
- [0.01, z6]]);
+ [x5, z5+d],
+ [dx, z5+d],
+ [dx, z6]]);
+}
+
+module Pawn(h=htotal){
+ scale(h/htotal) {
+ rotate_extrude(convexity=10, $fn=50){
+ assign($fn=undef){
+ PawnTemplate();
+ }
+ }
+ }
}
}
-PawnTemplate();
+Pawn(h=30);
+//PawnTemplate();