1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-23 14:54:12 +02:00
This commit is contained in:
Justin Lin
2022-03-12 08:37:38 +08:00
parent c76766f5b4
commit da4342441f
2 changed files with 5 additions and 9 deletions

View File

@@ -79,7 +79,7 @@ function gyroid_points(pp, w)=
let(wall=(k==0 || k==2*j || j==pp) ? 0 : i) let(wall=(k==0 || k==2*j || j==pp) ? 0 : i)
wall_gyroid(p_xy.x,p_xy.y,gyroid_point(x=p_xy.x, y=p_xy.y),wall) // calculate point in row, line within gyroid wall wall_gyroid(p_xy.x,p_xy.y,gyroid_point(x=p_xy.x, y=p_xy.y),wall) // calculate point in row, line within gyroid wall
]) // matrix of points for all primitives of a gyroid micro cell ]) // matrix of points for all primitives of a gyroid micro cell
[ [for(i=p) i], // copy of p [ p, // copy of p
[for(i=p) [180,180,180]-i], // diagonally oposing part of p [for(i=p) [180,180,180]-i], // diagonally oposing part of p
[for(i=p) [i.y,i.z,i.x]], // first cyclic permutation of coordinates [for(i=p) [i.y,i.z,i.x]], // first cyclic permutation of coordinates
[for(i=p) [180-i.y,180-i.z,180-i.x]], // diagonally oposing part of permutation [for(i=p) [180-i.y,180-i.z,180-i.x]], // diagonally oposing part of permutation

View File

@@ -18,15 +18,11 @@ module gyroid(detail, thickness, period) {
} }
} }
for(z = [0:period.z - 1]) { for(z = [0:period.z - 1], y = [0:period.y - 1], x = [0:period.x - 1]) {
for(y = [0:period.y - 1]) {
for(x = [0:period.x - 1]) {
translate([x, y, z] * 360) translate([x, y, z] * 360)
cell(); cell();
} }
} }
}
}
// detail = 10; // detail = 10;
// thickness = 20; // thickness = 20;