Skip to content

Commit 59bef57

Browse files
committed
Update sieve.scad
Adding the ability to create tapers on the tubes. This is to make it easier to make sieve funnels for ground coffee.
1 parent 847a2af commit 59bef57

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

sieve.scad

+12-9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ rim_thickness = 1.7; //[.3:.01:5]
2727
// Total height of the outer rim.
2828
rim_height = 3; //[0:.1:50]
2929

30+
// Taper of the tube, circle only, relative to it's height
31+
taper=1; //[1::3]
32+
3033
// If yes, the wires will be placed in different layers, which leads to a quicker and possibly better print, especially when using thin strands.
3134
offset_strands = "yes"; // [yes,no]
3235

@@ -40,10 +43,10 @@ $fn = 72; //[3:1:256]
4043
/* [Hidden] */
4144

4245
// A hollow tube (or only its inside volume if inside != 0)
43-
module tube(r_x, r_y, thick, height, inside=0) {
46+
module tube(r_x, r_y, thick, height, taper, inside=0) {
4447
if(shape == "round") {
4548
stretchx = r_x / r_y;
46-
linear_extrude(height=height, convexity=4) {
49+
linear_extrude(height=height, convexity=4, scale=taper) {
4750
if(inside == 0) {
4851
difference() {
4952
scale(1/stretchx) scale([stretchx,1]) circle(r=r_x);
@@ -103,27 +106,27 @@ module grid(width, length, strand_width, strand_thick, gap, do_offset) {
103106
// rim_height = height of outer rim
104107
// do_offset = offset the strands ("yes" or "no")
105108
//
106-
module sieve(od_x, od_y, strand_width, strand_thick, gap, rim_thick, rim_height, do_offset) {
109+
module sieve(od_x, od_y, strand_width, strand_thick, gap, rim_thick, rim_height, taper, do_offset) {
107110
or_x = od_x/2;
108111
or_y = od_y/2;
109112

110113
// Add .01 margin to ensure good overlap, avoid non-manifold
111114
if(lift_strands > 0) {
112-
tube(or_x, or_y, rim_thick, lift_strands+.01);
115+
tube(or_x, or_y, rim_thick, lift_strands+.01, 1);
113116
}
114117
translate([0, 0, lift_strands]) {
115118
// Trim the grid to the outer shape, minus some margin
116119
intersection() {
117120
grid(od_y, od_x, strand_width, strand_thick, gap, do_offset);
118-
translate([0,0,-1]) tube(or_x, or_y, .1, rim_height+2*strand_thick+lift_strands+2, 1);
121+
translate([0,0,-1]) tube(or_x, or_y, .1, rim_height+2*strand_thick+lift_strands+2, taper, 1);
119122
}
120123
if(do_offset == "yes") {
121-
translate([0, 0, 2*strand_thick-.01]) tube(or_x, or_y, rim_thick, rim_height-2*strand_thick-lift_strands+.01);
124+
translate([0, 0, 2*strand_thick-.01]) tube(or_x, or_y, rim_thick, rim_height-2*strand_thick-lift_strands+.01, taper);
122125
} else {
123-
translate([0, 0, strand_thick-.01]) tube(or_x, or_y, rim_thick, rim_height-strand_thick-lift_strands+.01);
126+
translate([0, 0, strand_thick-.01]) tube(or_x, or_y, rim_thick, rim_height-strand_thick-lift_strands+.01, taper);
124127
}
125128
}
126-
tube(or_x, or_y, rim_thick-.4, rim_height);
129+
tube(or_x, or_y, rim_thick-.4, rim_height, taper);
127130
}
128131

129-
sieve(outer_diameter+stretch, outer_diameter, strand_width, strand_thickness, gap_size, rim_thickness, rim_height, offset_strands);
132+
sieve(outer_diameter+stretch, outer_diameter, strand_width, strand_thickness, gap_size, rim_thickness, rim_height, taper, offset_strands);

0 commit comments

Comments
 (0)