mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 13:31:30 +02:00
adjust params
This commit is contained in:
@@ -2,15 +2,16 @@ include <line2d.scad>;
|
|||||||
include <hollow_out.scad>;
|
include <hollow_out.scad>;
|
||||||
include <square_maze.scad>;
|
include <square_maze.scad>;
|
||||||
include <ellipse_extrude.scad>;
|
include <ellipse_extrude.scad>;
|
||||||
|
include <arc.scad>;
|
||||||
// only for creating a small maze
|
|
||||||
|
|
||||||
radius_of_heart = 15;
|
radius_of_heart = 15;
|
||||||
|
height_of_heart = 25;
|
||||||
|
tip_r_of_heart = 5;
|
||||||
wall_thickness = 2;
|
wall_thickness = 2;
|
||||||
wall_height = 1;
|
|
||||||
cblocks = 6;
|
cblocks = 6;
|
||||||
levels = 3;
|
levels = 3;
|
||||||
semi_minor_axis = 15;
|
|
||||||
|
$fn = 36;
|
||||||
|
|
||||||
module heart(radius, tip_r) {
|
module heart(radius, tip_r) {
|
||||||
offset_h = 0.410927 * radius;
|
offset_h = 0.410927 * radius;
|
||||||
@@ -48,18 +49,23 @@ module ring_heart_sector(radius, angle, thickness, width) {
|
|||||||
module heart_to_heart_wall(radius, length, angle, thickness) {
|
module heart_to_heart_wall(radius, length, angle, thickness) {
|
||||||
intersection() {
|
intersection() {
|
||||||
difference() {
|
difference() {
|
||||||
heart(radius + 1 + length , 5);
|
heart(radius + thickness / 2 + length , 5);
|
||||||
heart(radius + 1, 5);
|
heart(radius + thickness / 2, 5);
|
||||||
}
|
}
|
||||||
rotate([0, 0, angle])
|
rotate([0, 0, angle])
|
||||||
line2d([0, 0], [0, (radius + length) * 2 + thickness], thickness);
|
line2d([0, 0], [0, (radius + length) * 2 + thickness], thickness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module heart_maze(maze, radius, cblocks, levels, thickness = 1) {
|
module heart_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]) {
|
||||||
@@ -81,9 +87,6 @@ module heart_maze(maze, radius, cblocks, levels, thickness = 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() union() {
|
render() union() {
|
||||||
// maze entry
|
|
||||||
// ring_heart_sector(r, arc_angle / 1.975 , thickness, r / 3);
|
|
||||||
|
|
||||||
// road to the next level
|
// road to the next level
|
||||||
for(i = [0:len(maze) - 1]) {
|
for(i = [0:len(maze) - 1]) {
|
||||||
block = maze[i];
|
block = maze[i];
|
||||||
@@ -98,14 +101,20 @@ module heart_maze(maze, radius, cblocks, levels, thickness = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maze = go_maze(1, 1,
|
intersection() {
|
||||||
starting_maze(cblocks, levels),
|
union() {
|
||||||
cblocks, levels, y_circular = true
|
ellipse_extrude(height_of_heart / 2)
|
||||||
);
|
heart(radius_of_heart + wall_thickness , tip_r_of_heart);
|
||||||
|
|
||||||
ellipse_extrude(semi_minor_axis, 10)
|
mirror([0, 0, 1])
|
||||||
heart_maze(maze, radius_of_heart, cblocks, levels, wall_thickness);
|
ellipse_extrude(height_of_heart / 2)
|
||||||
|
heart(radius_of_heart + wall_thickness, tip_r_of_heart);
|
||||||
|
}
|
||||||
|
|
||||||
mirror([0, 0, 1])
|
linear_extrude(height_of_heart, center = true)
|
||||||
ellipse_extrude(semi_minor_axis, semi_minor_axis / 3 * 2)
|
heart_maze(radius_of_heart, cblocks, levels, wall_thickness);
|
||||||
heart_maze(maze, radius_of_heart, cblocks, levels, wall_thickness);
|
}
|
||||||
|
|
||||||
|
linear_extrude(wall_thickness * 2, center = true)
|
||||||
|
translate([0, radius_of_heart * 1.25])
|
||||||
|
arc(radius = radius_of_heart / 3, angle = [25, 145], width = wall_thickness);
|
Reference in New Issue
Block a user