mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-23 06:43:10 +02:00
refactor
This commit is contained in:
@@ -79,7 +79,7 @@ function gyroid_points(pp, w)=
|
||||
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
|
||||
]) // 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) [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
|
||||
|
@@ -18,15 +18,11 @@ module gyroid(detail, thickness, period) {
|
||||
}
|
||||
}
|
||||
|
||||
for(z = [0:period.z - 1]) {
|
||||
for(y = [0:period.y - 1]) {
|
||||
for(x = [0:period.x - 1]) {
|
||||
for(z = [0:period.z - 1], y = [0:period.y - 1], x = [0:period.x - 1]) {
|
||||
translate([x, y, z] * 360)
|
||||
cell();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// detail = 10;
|
||||
// thickness = 20;
|
||||
|
Reference in New Issue
Block a user