mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 13:31:30 +02:00
use ellipse_extrude
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
include <line2d.scad>;
|
include <line2d.scad>;
|
||||||
include <hollow_out.scad>;
|
include <hollow_out.scad>;
|
||||||
include <square_maze.scad>;
|
include <square_maze.scad>;
|
||||||
|
include <ellipse_extrude.scad>;
|
||||||
|
|
||||||
// only for creating a small maze
|
// only for creating a small maze
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ wall_thickness = 2;
|
|||||||
wall_height = 1;
|
wall_height = 1;
|
||||||
cblocks = 6;
|
cblocks = 6;
|
||||||
levels = 3;
|
levels = 3;
|
||||||
|
semi_minor_axis = 15;
|
||||||
|
|
||||||
module heart(radius, tip_r) {
|
module heart(radius, tip_r) {
|
||||||
offset_h = 0.410927 * radius;
|
offset_h = 0.410927 * radius;
|
||||||
@@ -54,15 +56,10 @@ module heart_to_heart_wall(radius, length, angle, thickness) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module heart_maze(radius, cblocks, levels, thickness = 1) {
|
module heart_maze(maze, radius, cblocks, levels, thickness = 1) {
|
||||||
arc_angle = 360 / cblocks;
|
arc_angle = 360 / cblocks;
|
||||||
r = radius / (levels + 1);
|
r = radius / (levels + 1);
|
||||||
|
|
||||||
maze = go_maze(1, 1,
|
|
||||||
starting_maze(cblocks, levels),
|
|
||||||
cblocks, levels, y_circular = true
|
|
||||||
);
|
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
render() union() {
|
render() union() {
|
||||||
for(i = [1 : levels + 1]) {
|
for(i = [1 : levels + 1]) {
|
||||||
@@ -101,5 +98,14 @@ module heart_maze(radius, cblocks, levels, thickness = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linear_extrude(wall_height)
|
maze = go_maze(1, 1,
|
||||||
heart_maze(radius_of_heart, cblocks, levels, wall_thickness);
|
starting_maze(cblocks, levels),
|
||||||
|
cblocks, levels, y_circular = true
|
||||||
|
);
|
||||||
|
|
||||||
|
ellipse_extrude(semi_minor_axis, 10)
|
||||||
|
heart_maze(maze, radius_of_heart, cblocks, levels, wall_thickness);
|
||||||
|
|
||||||
|
mirror([0, 0, 1])
|
||||||
|
ellipse_extrude(semi_minor_axis, semi_minor_axis / 3 * 2)
|
||||||
|
heart_maze(maze, radius_of_heart, cblocks, levels, wall_thickness);
|
Reference in New Issue
Block a user