mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-12 01:34:12 +02:00
refactor
This commit is contained in:
@@ -10,20 +10,15 @@ wall_thickness = 1;
|
|||||||
angle = 180;
|
angle = 180;
|
||||||
// $fn = 24;
|
// $fn = 24;
|
||||||
|
|
||||||
function y_twist(walls, angle, rows, columns, block_width) =
|
|
||||||
let(size = [columns * block_width, rows * block_width])
|
|
||||||
[
|
|
||||||
for(wall_pts = walls)
|
|
||||||
[for(pt = wall_pts) tf_y_twist(size, pt, angle)]
|
|
||||||
];
|
|
||||||
|
|
||||||
blocks = go_maze(
|
blocks = go_maze(
|
||||||
1, 1, // starting point
|
1, 1, // starting point
|
||||||
starting_maze(rows, columns),
|
starting_maze(rows, columns),
|
||||||
rows, columns
|
rows, columns
|
||||||
);
|
);
|
||||||
|
|
||||||
walls = maze_walls(blocks, rows, columns, block_width);
|
walls = maze_walls(blocks, rows, columns, block_width);
|
||||||
for(wall_pts = y_twist(walls, angle, rows, columns, block_width)) {
|
|
||||||
hull_polyline3d(wall_pts, wall_thickness);
|
size = [columns * block_width, rows * block_width];
|
||||||
|
for(wall_pts = walls) {
|
||||||
|
transformed = [for(pt = wall_pts) tf_y_twist(size, pt, angle)];
|
||||||
|
hull_polyline3d(transformed, wall_thickness);
|
||||||
}
|
}
|
Reference in New Issue
Block a user