1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-02-24 17:42:44 +01:00
dotSCAD/examples/maze/mobius_maze.scad

28 lines
683 B
OpenSCAD
Raw Normal View History

2020-01-28 10:08:01 +08:00
use <hull_polyline3d.scad>;
use <rotate_p.scad>;
use <square_maze.scad>;
2020-02-13 14:11:43 +08:00
use <experimental/tf_ring.scad>;
2019-09-07 15:59:59 +08:00
rows = 48;
columns = 8;
block_width = 2;
wall_thickness = 1;
angle = 180;
// $fn = 24;
leng = rows * block_width;
radius = 0.5 * leng / PI;
a_step = 360 / leng;
blocks = go_maze(
1, 1, // starting point
starting_maze(rows, columns),
rows, columns, y_circular = true
);
walls = maze_walls(blocks, rows, columns, block_width, bottom_border = false);
2020-02-13 14:11:43 +08:00
size = [columns * block_width, rows * block_width];
for(wall_pts = walls) {
2020-02-13 14:13:11 +08:00
transformed = [for(pt = wall_pts) tf_ring(size, pt, radius, 360, angle)];
hull_polyline3d(transformed, wall_thickness);
2019-09-07 15:59:59 +08:00
}