1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 21:12:08 +02:00

accept 2D offset

This commit is contained in:
Justin Lin
2020-03-11 10:13:32 +08:00
parent 4316b5dc61
commit a8bed95fb6
2 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,8 @@ module circle_maze(start, r_blocks, block_width, wall_thickness, origin_offset)
width = double_r_blocks * block_width;
walls = mz_walls(blocks, double_r_blocks, double_r_blocks, block_width);
offset = is_undef(origin_offset) ? width / 2 : origin_offset;
half_width = width / 2;
offset = is_undef(origin_offset) ? [half_width, half_width] : origin_offset;
for(wall = walls) {
for(i = [0:len(wall) - 2]) {
@@ -26,7 +27,7 @@ module circle_maze(start, r_blocks, block_width, wall_thickness, origin_offset)
circle_maze(
start = [1, 1],
r_blocks = 10,
r_blocks = 5,
block_width = 2,
wall_thickness = .75
);