Skip to content

Commit cb5fc5f

Browse files
committed
re: soil protection evenly spaced holes
1 parent 4f4af5d commit cb5fc5f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

plant_soil_protection.scad

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
stem_radius_mm = 15;
2+
stem_shaft_width_mm = 3;
23
plate_radius_mm = 110;
3-
water_hole_radius_mm = 5;
4-
water_hole_distance_mm = 30;
5-
water_hole_angle_step = 30;
6-
plate_thickness_mm = 1;
4+
water_hole_radius_mm = 3;
5+
num_water_holes_cross_axis = 9;
6+
plate_thickness_mm = 0.4;
77
offset = 0;
88

99
module plate() {
@@ -17,15 +17,16 @@ module stem_hole() {
1717
}
1818

1919
module shaft_to_stem_hole() {
20-
translate([offset - stem_radius_mm, 0, 0]) {
21-
cube([stem_radius_mm*2, plate_radius_mm, plate_thickness_mm]);
20+
translate([offset - stem_shaft_width_mm/2, 0, 0]) {
21+
cube([stem_shaft_width_mm, plate_radius_mm, plate_thickness_mm]);
2222
}
2323
}
2424

2525
module water_holes() {
26-
for (radius = [0:water_hole_distance_mm:plate_radius_mm]) {
27-
for (phi = [0:water_hole_angle_step:359]) {
28-
translate([radius*cos(phi), radius*sin(phi), 0]) {
26+
water_hole_distance_mm = (plate_radius_mm*2) / num_water_holes_cross_axis;
27+
for (x = [-plate_radius_mm+water_hole_distance_mm/2:water_hole_distance_mm:plate_radius_mm-water_hole_distance_mm/2]) {
28+
for (y = [-plate_radius_mm+water_hole_distance_mm/2:water_hole_distance_mm:plate_radius_mm-water_hole_distance_mm/2]) {
29+
translate([x, y, 0]) {
2930
cylinder(h=plate_thickness_mm, r=water_hole_radius_mm);
3031
}
3132
}

0 commit comments

Comments
 (0)