Update TPU toy cubes
@@ -138,13 +138,6 @@ Model files:
|
||||
|
||||
* m5-atom-echo-hsw-mount.scad
|
||||
|
||||
## magnet-mount
|
||||
|
||||
|
||||
Model files:
|
||||
|
||||
* magnet-mount.scad
|
||||
|
||||
## map-wall-clamp
|
||||
|
||||

|
||||
@@ -229,11 +222,9 @@ Model files:
|
||||
|
||||
## toy-cubes
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Model files:
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
SCAD=toy-cubes.scad
|
||||
SUFFIX=.stl
|
||||
|
||||
# match "module foobar() { // `make` me"
|
||||
TARGETS != sed -n 's/^module *\([A-Za-z0-9_-]*\)(.*) *.*make.* me.*$$/\1$(SUFFIX)/p' $(SCAD)
|
||||
|
||||
$(shell mkdir -p output)
|
||||
|
||||
all: ${TARGETS}
|
||||
|
||||
.SUFFIXES: ${SUFFIX}
|
||||
|
||||
${TARGETS}: $(SCAD)
|
||||
echo -e 'use <$(SCAD)>;\n$*();' | openscad -m make -o output/$@ -
|
||||
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 52 KiB |
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB |