flower pot + generation script
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
// --- Parameters ---
|
||||
base_radius = 45;
|
||||
slot_depth = 2;
|
||||
floor_thickness = 1.5;
|
||||
|
||||
total_base_h = slot_depth + floor_thickness;
|
||||
|
||||
wall_height = 110;
|
||||
wall_thickness = 1.5;
|
||||
flare_angle = 10;
|
||||
|
||||
hole_d = 8;
|
||||
slot_width = 8;
|
||||
$fn = 500;
|
||||
|
||||
// --- assembly ---
|
||||
difference() {
|
||||
flower_pot_body();
|
||||
// radial slots
|
||||
translate([0, 0, -0.1])
|
||||
linear_extrude(height = slot_depth + 0.1)
|
||||
radial_slots_pattern();
|
||||
// drainage holes
|
||||
translate([0, 0, -0.1])
|
||||
linear_extrude(height = total_base_h + 0.2)
|
||||
holes_pattern();
|
||||
}
|
||||
|
||||
// --- modules ---
|
||||
module flower_pot_body() {
|
||||
top_x_outer = base_radius + wall_height * tan(flare_angle);
|
||||
top_x_inner = top_x_outer - (wall_thickness / cos(flare_angle));
|
||||
|
||||
rotate_extrude() {
|
||||
polygon(points = [
|
||||
[0, 0],
|
||||
[base_radius, 0],
|
||||
[top_x_outer, wall_height + total_base_h],
|
||||
[top_x_inner, wall_height + total_base_h],
|
||||
[base_radius - wall_thickness, total_base_h],
|
||||
[0, total_base_h]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
module radial_slots_pattern() {
|
||||
// 6 slots
|
||||
for(a = [0 : 60 : 359]) {
|
||||
rotate([0, 0, a])
|
||||
translate([base_radius / 2, 0, 0])
|
||||
square([base_radius + 5, slot_width], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
module holes_pattern() {
|
||||
union() {
|
||||
circle(d = hole_d);
|
||||
|
||||
for(r = [18, 30]) {
|
||||
for(a = [0 : 60 : 359]) {
|
||||
rotate([0, 0, a])
|
||||
translate([r, 0, 0])
|
||||
circle(d = hole_d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// --- Parameters ---
|
||||
base_radius = 55;
|
||||
wall_height = 20;
|
||||
wall_height_tray = 20;
|
||||
thickness = 1.5;
|
||||
flare_angle = 20;
|
||||
$fn = 500;
|
||||
@@ -11,8 +11,8 @@ rotate_extrude() {
|
||||
polygon(points = [
|
||||
[0, 0],
|
||||
[base_radius, 0],
|
||||
[base_radius + wall_height * tan(flare_angle), wall_height],
|
||||
[base_radius + wall_height * tan(flare_angle) - (thickness / cos(flare_angle)), wall_height],
|
||||
[base_radius + wall_height_tray * tan(flare_angle), wall_height_tray],
|
||||
[base_radius + wall_height_tray * tan(flare_angle) - (thickness / cos(flare_angle)), wall_height_tray],
|
||||
[base_radius - thickness, thickness],
|
||||
[0, thickness]
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user