mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-01 18:54:39 +02:00
adjust space and h
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
module soccer_polyhedron(circumradius, spacing) {
|
module soccer_polyhedron(circumradius, spacing, jigsaw_base = false) {
|
||||||
tau = 1.618034;
|
tau = 1.618034;
|
||||||
a = -37.377368;
|
a = -37.377368;
|
||||||
scale_f = 0.201774;
|
scale_f = 0.201774;
|
||||||
@@ -9,22 +9,49 @@ module soccer_polyhedron(circumradius, spacing) {
|
|||||||
pentagon_r = 1.701302;
|
pentagon_r = 1.701302;
|
||||||
pentagon_h = 4.654877;
|
pentagon_h = 4.654877;
|
||||||
|
|
||||||
|
convex_r = pentagon_r / 5 - s / 2;
|
||||||
|
r_off = s / sin(atan(pentagon_h / pentagon_r)) / cos(36);
|
||||||
|
h_off = s / cos(atan(pentagon_h / pentagon_r));
|
||||||
|
|
||||||
color("black")
|
color("black")
|
||||||
translate([0, 0, -pentagon_h])
|
translate([0, 0, -pentagon_h])
|
||||||
linear_extrude(pentagon_h, scale = 0.001)
|
linear_extrude(pentagon_h - h_off, scale = 0.001)
|
||||||
rotate(-36)
|
rotate(-36) {
|
||||||
circle(pentagon_r - s / cos(36) , $fn = 5);
|
circle(pentagon_r - r_off, $fn = 5);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module hexagonal_pyramid() {
|
module hexagonal_pyramid() {
|
||||||
hexagon_r = 2;
|
hexagon_r = 2;
|
||||||
hexagon_h = 4.534568;
|
hexagon_h = 4.534568;
|
||||||
|
pentagon_r = 1.701302;
|
||||||
|
concave_r = pentagon_r / 5 + s / 2;
|
||||||
|
|
||||||
|
r_off = s / sin(atan(hexagon_h / hexagon_r)) / cos(30);
|
||||||
|
h_off = s / cos(atan(hexagon_h / hexagon_r));
|
||||||
|
|
||||||
color("white")
|
color("white")
|
||||||
translate([0, 0, -hexagon_h])
|
translate([0, 0, -hexagon_h])
|
||||||
linear_extrude(hexagon_h, scale = 0.001)
|
linear_extrude(hexagon_h - h_off, scale = 0.001)
|
||||||
rotate(-30)
|
rotate(-30) {
|
||||||
circle(hexagon_r - s / cos(30), $fn = 6);
|
difference() {
|
||||||
|
circle(hexagon_r - r_off, $fn = 6);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module one_component_around_pentagonal_pyramid() {
|
module one_component_around_pentagonal_pyramid() {
|
||||||
@@ -55,4 +82,4 @@ module soccer_polyhedron(circumradius, spacing) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
soccer_polyhedron(30, 1);
|
soccer_polyhedron(30, 1);
|
||||||
%sphere(10, $fn = 48);
|
%sphere(30, $fn = 48);
|
Reference in New Issue
Block a user