mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 16:26:47 +02:00
rename
This commit is contained in:
@@ -31,13 +31,13 @@ module heart_base(name, font_name, font_size, radius, ring_thickness, tip_r_of_h
|
|||||||
}
|
}
|
||||||
|
|
||||||
module heart2heart_maze(names, font_name, font_size, radius_of_heart, tip_r_of_heart, wall_thickness, ccells, levels, spacing) {
|
module heart2heart_maze(names, font_name, font_size, radius_of_heart, tip_r_of_heart, wall_thickness, ccells, levels, spacing) {
|
||||||
maze = mz_square_cells(
|
cells = mz_square_cells(
|
||||||
ccells, levels, y_wrapping = true
|
ccells, levels, y_wrapping = true
|
||||||
);
|
);
|
||||||
|
|
||||||
translate([0, 0, wall_thickness])
|
translate([0, 0, wall_thickness])
|
||||||
linear_extrude(wall_thickness)
|
linear_extrude(wall_thickness)
|
||||||
heart_maze(maze, radius_of_heart, ccells, levels, wall_thickness);
|
heart_maze(cells, radius_of_heart, ccells, levels, wall_thickness);
|
||||||
heart_base(names[0], font_name, font_size, radius_of_heart + wall_thickness / 2, wall_thickness, tip_r_of_heart);
|
heart_base(names[0], font_name, font_size, radius_of_heart + wall_thickness / 2, wall_thickness, tip_r_of_heart);
|
||||||
|
|
||||||
translate([radius_of_heart * 4, 0, 0]) {
|
translate([radius_of_heart * 4, 0, 0]) {
|
||||||
@@ -50,7 +50,7 @@ module heart2heart_maze(names, font_name, font_size, radius_of_heart, tip_r_of_h
|
|||||||
heart(radius_of_heart, tip_r_of_heart);
|
heart(radius_of_heart, tip_r_of_heart);
|
||||||
linear_extrude(wall_thickness * 2)
|
linear_extrude(wall_thickness * 2)
|
||||||
offset(delta = spacing)
|
offset(delta = spacing)
|
||||||
heart_maze(maze, radius_of_heart, ccells, levels, wall_thickness);
|
heart_maze(cells, radius_of_heart, ccells, levels, wall_thickness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ module heart_to_heart_wall(radius, length, angle, thickness) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module heart_maze(maze, radius, ccells, levels, thickness = 1) {
|
module heart_maze(cells, radius, ccells, levels, thickness = 1) {
|
||||||
function no_wall(cell) = get_wall_type(cell) == "NO_WALL";
|
function no_wall(cell) = get_wall_type(cell) == "NO_WALL";
|
||||||
function top_wall(cell) = get_wall_type(cell) == "TOP_WALL";
|
function top_wall(cell) = get_wall_type(cell) == "TOP_WALL";
|
||||||
function right_wall(cell) = get_wall_type(cell) == "RIGHT_WALL";
|
function right_wall(cell) = get_wall_type(cell) == "RIGHT_WALL";
|
||||||
@@ -78,8 +78,8 @@ module heart_maze(maze, radius, ccells, levels, thickness = 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for(i = [0:len(maze) - 1]) {
|
for(i = [0:len(cells) - 1]) {
|
||||||
cell = maze[i];
|
cell = cells[i];
|
||||||
cr = get_x(cell) + 1;
|
cr = get_x(cell) + 1;
|
||||||
cc = get_y(cell);
|
cc = get_y(cell);
|
||||||
|
|
||||||
@@ -93,8 +93,8 @@ module heart_maze(maze, radius, ccells, levels, thickness = 1) {
|
|||||||
|
|
||||||
render() union() {
|
render() union() {
|
||||||
// road to the next level
|
// road to the next level
|
||||||
for(i = [0:len(maze) - 1]) {
|
for(i = [0:len(cells) - 1]) {
|
||||||
cell = maze[i];
|
cell = cells[i];
|
||||||
cr = get_x(cell) + 1;
|
cr = get_x(cell) + 1;
|
||||||
cc = get_y(cell);
|
cc = get_y(cell);
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ module heart_maze(maze, radius, ccells, levels, thickness = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maze = mz_square_cells(
|
cells = mz_square_cells(
|
||||||
ccells, levels, y_wrapping = true
|
ccells, levels, y_wrapping = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ intersection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
linear_extrude(height_of_heart, center = true)
|
linear_extrude(height_of_heart, center = true)
|
||||||
heart_maze(maze, radius_of_heart, ccells, levels, wall_thickness);
|
heart_maze(cells, radius_of_heart, ccells, levels, wall_thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
linear_extrude(wall_thickness * 2, center = true)
|
linear_extrude(wall_thickness * 2, center = true)
|
||||||
|
@@ -49,7 +49,7 @@ module regular_polygon_maze(radius, ccells, levels, thickness = 1, sides) {
|
|||||||
arc_angle = 360 / ccells;
|
arc_angle = 360 / ccells;
|
||||||
r = radius / (levels + 1);
|
r = radius / (levels + 1);
|
||||||
|
|
||||||
maze = mz_square_cells(
|
cells = mz_square_cells(
|
||||||
ccells, levels, y_wrapping = true
|
ccells, levels, y_wrapping = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -60,8 +60,8 @@ module regular_polygon_maze(radius, ccells, levels, thickness = 1, sides) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for(i = [0:len(maze) - 1]) {
|
for(i = [0:len(cells) - 1]) {
|
||||||
cell = maze[i];
|
cell = cells[i];
|
||||||
cr = get_x(cell) + 1;
|
cr = get_x(cell) + 1;
|
||||||
cc = get_y(cell);
|
cc = get_y(cell);
|
||||||
|
|
||||||
@@ -78,8 +78,8 @@ module regular_polygon_maze(radius, ccells, levels, thickness = 1, sides) {
|
|||||||
// ring_regular_polygon_sector(r, arc_angle / 1.975 , thickness, r / 3, sides);
|
// ring_regular_polygon_sector(r, arc_angle / 1.975 , thickness, r / 3, sides);
|
||||||
|
|
||||||
// road to the next level
|
// road to the next level
|
||||||
for(i = [0:len(maze) - 1]) {
|
for(i = [0:len(cells) - 1]) {
|
||||||
cell = maze[i];
|
cell = cells[i];
|
||||||
cr = get_x(cell) + 1;
|
cr = get_x(cell) + 1;
|
||||||
cc = get_y(cell);
|
cc = get_y(cell);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user