Introduce corners in TestPiece*
Introduce TestPiece_holes2corners
Change TileBase argument
tile_hard_edge_hole_dist + round_edge_rad));
thehd = [ tile_hard_edge_hole_dist, tile_hard_edge_hole_dist ];
tile_hard_edge_hole_dist + round_edge_rad));
thehd = [ tile_hard_edge_hole_dist, tile_hard_edge_hole_dist ];
+thehd_tr = thehd;
+thehd_tl = [ -thehd_tr[0], thehd_tr[1] ];
+thehd_bl = -thehd_tr;
+thehd_br = -thehd_tl;
interlock_rad = interlock_dia/2;
interlock_negative_rad = interlock_rad + 0.125;
interlock_rad = interlock_dia/2;
interlock_negative_rad = interlock_rad + 0.125;
-module TileBase(botleft_post, topright_post){
- botleft = botleft_post - thehd;
- size = topright_post - botleft_post + thehd * 2;
+module TileBase(botleft, topright){
+ size = topright - botleft;
+ botleft_post = botleft + thehd_tr;
+ topright_post = topright - thehd_bl;
+ echo(botleft_post, topright_post);
difference(){
mirror([0,0,1])
translate(concat(botleft, [0]))
difference(){
mirror([0,0,1])
translate(concat(botleft, [0]))
InterlockCore(interlock_rad, 0, 1);
}
InterlockCore(interlock_rad, 0, 1);
}
+function TestPiece_holes2corners(holes) =
+ [ holes[0] + thehd_bl,
+ holes[1] + thehd_br,
+ holes[0] + thehd_tl,
+ holes[1] + thehd_tr ];
+
module TestPiece1(){ ////toplevel
holes = [ [-100, 0],
[ 0, 0]
];
module TestPiece1(){ ////toplevel
holes = [ [-100, 0],
[ 0, 0]
];
+ corners = TestPiece_holes2corners(holes);
- TileBase(holes[0], holes[1]);
+ TileBase(corners[0], corners[3]);
InterlockNegative(holes[1], holes[1] + [0,1]);
}
Posts(holes);
InterlockNegative(holes[1], holes[1] + [0,1]);
}
Posts(holes);
holes = [ [ 0, 0],
[ 50, 0]
];
holes = [ [ 0, 0],
[ 50, 0]
];
- TileBase(holes[0], holes[1]);
+ corners = TestPiece_holes2corners(holes);
+ TileBase(corners[0], corners[3]);
Posts(holes);
RoundEdge(holes[0], holes[1]);
Interlock(holes[0], holes[0] + [0, -1]);
Posts(holes);
RoundEdge(holes[0], holes[1]);
Interlock(holes[0], holes[0] + [0, -1]);