2019-12-07 20:41:27 +08:00
|
|
|
module soccer_polyhedron(circumradius, spacing, jigsaw_base = false, half = false) {
|
2019-10-12 21:51:20 +08:00
|
|
|
tau = 1.618034;
|
|
|
|
a = -37.377368;
|
|
|
|
scale_f = 0.201774;
|
2019-12-06 11:28:51 +08:00
|
|
|
|
2019-12-07 17:35:03 +08:00
|
|
|
s = scale_f * spacing / 2;
|
2019-10-12 21:51:20 +08:00
|
|
|
|
|
|
|
module pentagonal_pyramid() {
|
|
|
|
pentagon_r = 1.701302;
|
|
|
|
pentagon_h = 4.654877;
|
2019-12-07 19:42:38 +08:00
|
|
|
|
|
|
|
convex_r = pentagon_r / 5 - s / 2;
|
2019-12-07 19:46:32 +08:00
|
|
|
|
|
|
|
r_off = s / 0.759856;
|
|
|
|
h_off = s / 0.343279;
|
2019-10-12 21:51:20 +08:00
|
|
|
|
2019-10-13 06:59:09 +08:00
|
|
|
color("black")
|
2019-12-07 17:14:27 +08:00
|
|
|
translate([0, 0, -pentagon_h])
|
2019-12-07 19:42:38 +08:00
|
|
|
linear_extrude(pentagon_h - h_off, scale = 0.001)
|
|
|
|
rotate(-36) {
|
|
|
|
circle(pentagon_r - r_off, $fn = 5);
|
2019-12-08 07:37:41 +08:00
|
|
|
|
|
|
|
// rewrite here if you want to make different convex parts
|
2019-12-07 19:42:38 +08:00
|
|
|
if(jigsaw_base) {
|
|
|
|
for(i = [0:4]) {
|
|
|
|
rotate(36 + i * 72)
|
|
|
|
translate([pentagon_r - r_off - convex_r / 2, 0, 0])
|
|
|
|
circle(convex_r, $fn = 36);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-12 21:51:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module hexagonal_pyramid() {
|
|
|
|
hexagon_r = 2;
|
|
|
|
hexagon_h = 4.534568;
|
2019-12-07 19:42:38 +08:00
|
|
|
pentagon_r = 1.701302;
|
|
|
|
concave_r = pentagon_r / 5 + s / 2;
|
|
|
|
|
2019-12-07 19:46:32 +08:00
|
|
|
r_off = s / 0.792377;
|
|
|
|
h_off = s / 0.403548;
|
2019-10-13 06:59:09 +08:00
|
|
|
|
|
|
|
color("white")
|
2019-12-07 17:14:27 +08:00
|
|
|
translate([0, 0, -hexagon_h])
|
2019-12-07 19:42:38 +08:00
|
|
|
linear_extrude(hexagon_h - h_off, scale = 0.001)
|
|
|
|
rotate(-30) {
|
|
|
|
difference() {
|
|
|
|
circle(hexagon_r - r_off, $fn = 6);
|
2019-12-08 07:37:41 +08:00
|
|
|
|
|
|
|
// rewrite here if you want to make different concave parts
|
2019-12-07 19:42:38 +08:00
|
|
|
if(jigsaw_base) {
|
|
|
|
for(i = [0:2]) {
|
|
|
|
rotate(90 + i * 120)
|
|
|
|
translate([hexagon_r - r_off - concave_r, 0, 0])
|
|
|
|
circle(concave_r, $fn = 36);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-12 21:51:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module one_component_around_pentagonal_pyramid() {
|
|
|
|
mirror([1, 0, 0])
|
|
|
|
rotate([0, -a, 60]) {
|
|
|
|
pentagonal_pyramid();
|
|
|
|
for(i = [0:1]) {
|
|
|
|
rotate([0, a, 72 * i])
|
|
|
|
hexagonal_pyramid();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module half_soccer_polyhedron() {
|
|
|
|
pentagonal_pyramid();
|
|
|
|
for(i = [0:4]) {
|
|
|
|
rotate([0, a, 72 * i])
|
|
|
|
one_component_around_pentagonal_pyramid();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
scale(scale_f * circumradius) {
|
|
|
|
half_soccer_polyhedron();
|
2019-12-07 20:41:27 +08:00
|
|
|
if(!half) {
|
2019-12-07 20:10:51 +08:00
|
|
|
rotate(36)
|
|
|
|
mirror([0, 0, 1])
|
|
|
|
half_soccer_polyhedron();
|
|
|
|
}
|
2019-10-12 21:51:20 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-07 17:35:03 +08:00
|
|
|
soccer_polyhedron(30, 1);
|
2019-12-07 19:42:38 +08:00
|
|
|
%sphere(30, $fn = 48);
|