mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-19 13:01:37 +02:00
add mz_square
This commit is contained in:
28
src/maze/mz_square.scad
Normal file
28
src/maze/mz_square.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* mz_square.scad
|
||||
*
|
||||
* @copyright Justin Lin, 2020
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-mz_square.html
|
||||
*
|
||||
**/
|
||||
|
||||
use <_impl/_mz_square_cells_impl.scad>;
|
||||
use <mz_square_initialize.scad>;
|
||||
|
||||
function mz_square(rows, columns, start = [0, 0], init_cells, x_wrapping = false, y_wrapping = false, seed) =
|
||||
let(
|
||||
init_undef = is_undef(init_cells),
|
||||
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells
|
||||
)
|
||||
go_maze(
|
||||
start.x,
|
||||
start.y,
|
||||
mz,
|
||||
len(mz),
|
||||
len(mz[0]),
|
||||
x_wrapping,
|
||||
y_wrapping,
|
||||
seed
|
||||
);
|
Reference in New Issue
Block a user