1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-31 10:11:53 +02:00

refactor: use contains

This commit is contained in:
Justin Lin
2022-04-15 09:50:25 +08:00
parent 178e3372c6
commit 5d26af0f31
2 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
use <experimental/mz_cube.scad>;
use <experimental/mz_cube_get.scad>;
use <util/has.scad>;
use <util/contains.scad>;
use <crystal_ball.scad>;
layers = 4;
@@ -41,11 +41,11 @@ module draw_3dmaze(cells, cell_width, road_width) {
}
}
function z_road(type) = !has(["Z_WALL", "Z_Y_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type);
function z_road(type) = !contains(["Z_WALL", "Z_Y_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type);
function y_road(type) = !has(["Y_WALL", "Y_X_WALL", "Z_Y_WALL", "Z_Y_X_WALL", "MASK"], type);
function y_road(type) = !contains(["Y_WALL", "Y_X_WALL", "Z_Y_WALL", "Z_Y_X_WALL", "MASK"], type);
function x_road(type) = !has(["X_WALL", "Y_X_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type);
function x_road(type) = !contains(["X_WALL", "Y_X_WALL", "Z_X_WALL", "Z_Y_X_WALL", "MASK"], type);
module drawCell(cell_width, road_width, channels) {
half_cw = cell_width / 2;