Update TPU toy cubes
This commit is contained in:
@@ -4,8 +4,6 @@ cube_h = 40;
|
||||
cube_w = 40;
|
||||
rounding = 2;
|
||||
|
||||
cube_diag = cube_w*sqrt(2);
|
||||
|
||||
cutout_d = 20;
|
||||
|
||||
$fn=150;
|
||||
@@ -33,7 +31,7 @@ module cube_long_with_round_hole() { // make me
|
||||
/* Cylinders */
|
||||
|
||||
module cylinder_simple() { // make me
|
||||
cyl(d=cube_diag, h=cube_h, rounding=rounding);
|
||||
cyl(d=(4*cube_w)/PI, h=cube_h, rounding=rounding);
|
||||
}
|
||||
|
||||
module cylinder_with_round_hole() { // make me
|
||||
@@ -46,7 +44,7 @@ module cylinder_with_round_hole() { // make me
|
||||
/* Triangle */
|
||||
|
||||
module triangle_simple() { // make me
|
||||
rounded_prism(regular_ngon(n=3, od=cube_diag), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
rounded_prism(regular_ngon(n=3, side=(4*cube_w)/3), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
}
|
||||
|
||||
module triangle_with_round_hole() { // make me
|
||||
@@ -59,7 +57,7 @@ module triangle_with_round_hole() { // make me
|
||||
/* Pentagon */
|
||||
|
||||
module pentagon_simple() { // make me
|
||||
rounded_prism(regular_ngon(n=5, od=cube_diag), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
rounded_prism(regular_ngon(n=5, side=(4*cube_w)/5), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
}
|
||||
|
||||
module pentagon_with_round_hole() { // make me
|
||||
@@ -72,7 +70,7 @@ module pentagon_with_round_hole() { // make me
|
||||
/* Hexagon */
|
||||
|
||||
module hexagon_simple() { // make me
|
||||
rounded_prism(regular_ngon(n=6, od=cube_diag), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
rounded_prism(regular_ngon(n=6, side=(4*cube_w)/6), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
}
|
||||
|
||||
module hexagon_with_round_hole() { // make me
|
||||
@@ -82,5 +80,15 @@ module hexagon_with_round_hole() { // make me
|
||||
}
|
||||
}
|
||||
|
||||
/* Octagon */
|
||||
|
||||
cube_with_round_hole();
|
||||
module octagon_simple() { // make me
|
||||
rounded_prism(regular_ngon(n=8, side=(4*cube_w)/8), joint_top=rounding, joint_bot=rounding, joint_sides=rounding, h=cube_h);
|
||||
}
|
||||
|
||||
module octagon_with_round_hole() { // make me
|
||||
difference() {
|
||||
octagon_simple();
|
||||
cyl(h=cube_h, d=cutout_d, chamfer=-rounding/2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user