mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 02:34:12 +02:00
rename
This commit is contained in:
@@ -3,7 +3,7 @@ use <hollow_out.scad>;
|
|||||||
use <ellipse_extrude.scad>;
|
use <ellipse_extrude.scad>;
|
||||||
use <arc.scad>;
|
use <arc.scad>;
|
||||||
use <maze/mz_square_blocks.scad>;
|
use <maze/mz_square_blocks.scad>;
|
||||||
use <maze/mz_get.scad>;
|
use <maze/mz_square_get.scad>;
|
||||||
|
|
||||||
radius_of_heart = 12;
|
radius_of_heart = 12;
|
||||||
height_of_heart = 25;
|
height_of_heart = 25;
|
||||||
@@ -64,9 +64,9 @@ module heart_maze(maze, radius, cblocks, levels, thickness = 1) {
|
|||||||
function right_wall(block) = get_wall_type(block) == "RIGHT_WALL";
|
function right_wall(block) = get_wall_type(block) == "RIGHT_WALL";
|
||||||
function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL";
|
function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL";
|
||||||
|
|
||||||
function get_x(block) = mz_get(block, "x");
|
function get_x(block) = mz_square_get(block, "x");
|
||||||
function get_y(block) = mz_get(block, "y");
|
function get_y(block) = mz_square_get(block, "y");
|
||||||
function get_wall_type(block) = mz_get(block, "w");
|
function get_wall_type(block) = mz_square_get(block, "w");
|
||||||
|
|
||||||
arc_angle = 360 / cblocks;
|
arc_angle = 360 / cblocks;
|
||||||
r = radius / (levels + 1);
|
r = radius / (levels + 1);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
use <line2d.scad>;
|
use <line2d.scad>;
|
||||||
use <hollow_out.scad>;
|
use <hollow_out.scad>;
|
||||||
use <maze/mz_square_blocks.scad>;
|
use <maze/mz_square_blocks.scad>;
|
||||||
use <maze/mz_get.scad>;
|
use <maze/mz_square_get.scad>;
|
||||||
|
|
||||||
// only for creating a small maze
|
// only for creating a small maze
|
||||||
|
|
||||||
@@ -42,9 +42,9 @@ module regular_polygon_maze(radius, cblocks, levels, thickness = 1, sides) {
|
|||||||
function right_wall(block) = get_wall_type(block) == "RIGHT_WALL";
|
function right_wall(block) = get_wall_type(block) == "RIGHT_WALL";
|
||||||
function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL";
|
function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL";
|
||||||
|
|
||||||
function get_x(block) = mz_get(block, "x");
|
function get_x(block) = mz_square_get(block, "x");
|
||||||
function get_y(block) = mz_get(block, "y");
|
function get_y(block) = mz_square_get(block, "y");
|
||||||
function get_wall_type(block) = mz_get(block, "w");
|
function get_wall_type(block) = mz_square_get(block, "w");
|
||||||
|
|
||||||
arc_angle = 360 / cblocks;
|
arc_angle = 360 / cblocks;
|
||||||
r = radius / (levels + 1);
|
r = radius / (levels + 1);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
use <polyline2d.scad>;
|
use <polyline2d.scad>;
|
||||||
use <stereographic_extrude.scad>;
|
use <stereographic_extrude.scad>;
|
||||||
use <maze/mz_blocks.scad>;
|
use <maze/mz_square_blocks.scad>;
|
||||||
use <maze/mz_hex_walls.scad>;
|
use <maze/mz_hex_walls.scad>;
|
||||||
|
|
||||||
columns = 10;
|
columns = 10;
|
||||||
@@ -24,7 +24,7 @@ module hex_maze_stereographic_projection(columns, cell_radius, wall_thickness, f
|
|||||||
pyramid_height = square_w / sqrt(2);
|
pyramid_height = square_w / sqrt(2);
|
||||||
|
|
||||||
// create a maze
|
// create a maze
|
||||||
blocks = mz_blocks(
|
blocks = mz_square_blocks(
|
||||||
[1, 1],
|
[1, 1],
|
||||||
rows, columns
|
rows, columns
|
||||||
);
|
);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
use <hull_polyline3d.scad>;
|
use <hull_polyline3d.scad>;
|
||||||
use <maze/mz_blocks.scad>;
|
use <maze/mz_square_blocks.scad>;
|
||||||
use <maze/mz_square_walls.scad>;
|
use <maze/mz_square_walls.scad>;
|
||||||
use <ptf/ptf_x_twist.scad>;
|
use <ptf/ptf_x_twist.scad>;
|
||||||
use <ptf/ptf_y_twist.scad>;
|
use <ptf/ptf_y_twist.scad>;
|
||||||
@@ -12,7 +12,7 @@ angle = 90;
|
|||||||
axis = "X_AXIS"; // [X_AXIS, Y_AXIS]
|
axis = "X_AXIS"; // [X_AXIS, Y_AXIS]
|
||||||
// $fn = 24;
|
// $fn = 24;
|
||||||
|
|
||||||
blocks = mz_blocks(
|
blocks = mz_square_blocks(
|
||||||
[1, 1],
|
[1, 1],
|
||||||
rows, columns
|
rows, columns
|
||||||
);
|
);
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
use <../mz_get.scad>;
|
use <../mz_square_get.scad>;
|
||||||
|
|
||||||
function _get_x(block) = mz_get(block, "x");
|
function _get_x(block) = mz_square_get(block, "x");
|
||||||
function _get_y(block) = mz_get(block, "y");
|
function _get_y(block) = mz_square_get(block, "y");
|
||||||
function _get_wall_type(block) = mz_get(block, "w");
|
function _get_wall_type(block) = mz_square_get(block, "w");
|
||||||
|
|
||||||
function _is_top_wall(block) = _get_wall_type(block) == "TOP_WALL";
|
function _is_top_wall(block) = _get_wall_type(block) == "TOP_WALL";
|
||||||
function _is_right_wall(block) = _get_wall_type(block) == "RIGHT_WALL";
|
function _is_right_wall(block) = _get_wall_type(block) == "RIGHT_WALL";
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
use <_impl/_mz_hamiltonian_impl.scad>;
|
use <_impl/_mz_hamiltonian_impl.scad>;
|
||||||
use <mz_square_blocks.scad>;
|
use <mz_square_blocks.scad>;
|
||||||
use <mz_get.scad>;
|
use <mz_square_get.scad>;
|
||||||
use <../util/sort.scad>;
|
use <../util/sort.scad>;
|
||||||
use <../util/dedup.scad>;
|
use <../util/dedup.scad>;
|
||||||
|
|
||||||
@@ -15,9 +15,9 @@ function mz_hamiltonian(rows, columns, start, seed) =
|
|||||||
[
|
[
|
||||||
for(block = blocks)
|
for(block = blocks)
|
||||||
let(
|
let(
|
||||||
x = mz_get(block, "x"),
|
x = mz_square_get(block, "x"),
|
||||||
y = mz_get(block, "y"),
|
y = mz_square_get(block, "y"),
|
||||||
wall_type = mz_get(block, "w"),
|
wall_type = mz_square_get(block, "w"),
|
||||||
pts = wall_type == "TOP_WALL" ? _mz_hamiltonian_top(x, y) :
|
pts = wall_type == "TOP_WALL" ? _mz_hamiltonian_top(x, y) :
|
||||||
wall_type == "RIGHT_WALL" ? _mz_hamiltonian_right(x, y) :
|
wall_type == "RIGHT_WALL" ? _mz_hamiltonian_right(x, y) :
|
||||||
wall_type == "TOP_RIGHT_WALL" ? _mz_hamiltonian_top_right(x, y) : []
|
wall_type == "TOP_RIGHT_WALL" ? _mz_hamiltonian_top_right(x, y) : []
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
function mz_get(block, query) =
|
function mz_square_get(block, query) =
|
||||||
let(
|
let(
|
||||||
i = search(query, [
|
i = search(query, [
|
||||||
["x", 0],
|
["x", 0],
|
Reference in New Issue
Block a user