Commit dd99ed30 authored by György Kurucz's avatar György Kurucz
Browse files

Add rain gutter filter.

parent 49e96d95
// translate aliases
module tX(x) { translate([x,0,0]) children(); }
module tY(y) { translate([0,y,0]) children(); }
module tZ(z) { translate([0,0,z]) children(); }
......@@ -6,11 +8,22 @@ module tXZ(x,z) { translate([x,0,z]) children(); }
module tYZ(y,z) { translate([0,y,z]) children(); }
module tXYZ(x,y,z) { translate([x,y,z]) children(); }
// rotate aliases
module rX(x) { rotate([x,0,0]) children(); }
module rY(y) { rotate([0,y,0]) children(); }
module rZ(z) { rotate([0,0,z]) children(); }
// operations
// linear extrude, centered along Z axis
module extc(h) {
tZ(-h/2) linear_extrude(h) children();
}
// linear extrude along Z axis
module ext(h) {
linear_extrude(h) children();
}
// same as `difference`
module diff() {
difference() {
children(0);
......
use <../include/short.scad>;
tube_filter_diameter = 65;
tube_filter_length = 10;
tube_filter_ear_count = 6;
tube_filter_grid_spacing = 4;
tube_filter_grid_thickness = 4;
$fn = 100;
module filter_rectangular(
spacing = 4,
wall = -1,
size = 23
) {
_wall = wall < 0 ? spacing / 4 : wall;
step = spacing + _wall;
s = size - _wall;
for (x = [-s/2:step:s/2])
translate([x, -s/2]) square([_wall, size]);
for (y = [-s/2:step:s/2])
translate([-s/2, y]) square([size, _wall]);
}
module ear() {
w = tube_filter_diameter / 5;
tX(tube_filter_diameter / 2) intersection() {
scale([1, 1]) circle(d = w);
tX(-2) tY(-w) square([w * 5, w * 2]);
}
}
module tube_filter() {
wall = 3;
diameter = tube_filter_diameter;
th = tube_filter_grid_thickness;
// tube
ext(tube_filter_length) difference() {
circle(d=diameter); circle(d = diameter - wall * 2);
}
// filter grid
ext(th) intersection() {
filter_rectangular(
spacing = tube_filter_grid_spacing, size = diameter);
circle(d = diameter);
}
// ears
for (i = [0:tube_filter_ear_count]) {
rZ(i * 360 / tube_filter_ear_count) ext(th) ear();
}
}
tube_filter();
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment