1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 01:11:30 +02:00

rename block to cell

This commit is contained in:
Justin Lin
2020-12-20 10:49:16 +08:00
parent afaf67c739
commit f594215469
29 changed files with 245 additions and 247 deletions

View File

@@ -1,27 +1,27 @@
use <hull_polyline3d.scad>;
use <ptf/ptf_torus.scad>;
use <maze/mz_square_blocks.scad>;
use <maze/mz_square_cells.scad>;
use <maze/mz_square_walls.scad>;
rows = 36;
columns = 12;
block_width = 2;
cell_width = 2;
wall_thickness = 1;
angle = 180;
twist = 360;
leng = rows * block_width;
leng = rows * cell_width;
radius = 0.5 * leng / PI;
a_step = 360 / leng;
blocks = mz_square_blocks(
cells = mz_square_cells(
rows, columns,
x_wrapping = true, y_wrapping = true
);
walls = mz_square_walls(blocks, rows, columns, block_width, left_border = false, bottom_border = false);
walls = mz_square_walls(cells, rows, columns, cell_width, left_border = false, bottom_border = false);
size = [columns * block_width, rows * block_width];
size = [columns * cell_width, rows * cell_width];
for(wall_pts = walls) {
transformed = [for(pt = wall_pts) ptf_torus(size, pt, [radius, radius / 2], twist = twist)];
hull_polyline3d(transformed, wall_thickness, $fn = 4);