Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Attempt to fix radius defines #167

Merged
merged 3 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions gridfinity-rebuilt-utility.scad
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true, only

if (final_cut)
translate([0,0,h_base])
rounded_rectangle(xx+0.002, yy+0.002, h_bot/1.5, r_fo1/2+0.001);
rounded_rectangle(xx+0.002, yy+0.002, h_bot/1.5, r_fo1+0.001);

intersection(){
if (final_cut)
translate([0,0,-1])
rounded_rectangle(xx+0.005, yy+0.005, h_base+h_bot/2*10, r_fo1/2+0.001);
rounded_rectangle(xx+0.005, yy+0.005, h_base+h_bot/2*10, r_fo1+0.001);

if(only_corners) {
difference(){
Expand Down Expand Up @@ -228,14 +228,14 @@ module block_base_solid(dbnx, dbny, l, o) {
mirror([0,0,1])
union() {
hull() {
rounded_rectangle(xx-2*r_c2-2*r_c1+o, yy-2*r_c2-2*r_c1+o, h_base+oo, r_fo3/2);
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, h_base-r_c1+oo, r_fo2/2);
rounded_rectangle(xx-2*r_c2-2*r_c1+o, yy-2*r_c2-2*r_c1+o, h_base+oo, r_fo3);
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, h_base-r_c1+oo, r_fo2);
}
translate([0,0,oo])
hull() {
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, r_c2, r_fo2/2);
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, r_c2, r_fo2);
mirror([0,0,1])
rounded_rectangle(xx+o, yy+o, h_bot/2+abs(10*o), r_fo1/2);
rounded_rectangle(xx+o, yy+o, h_bot/2+abs(10*o), r_fo1);
}
}
}
Expand Down
35 changes: 18 additions & 17 deletions gridfinity-spiral-vase.scad
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ style_base = 0; // [0:all, 1:corners, 2:edges, 3:auto, 4:none]
// tab angle
a_tab = 40;


// ===== IMPLEMENTATION ===== //

color("tomato")
Expand All @@ -79,11 +78,13 @@ x_l = l_grid/2;
dht = (gridz_define==0)?gridz*7 : (gridz_define==1)?h_bot+gridz+h_base : gridz-(enable_lip?3.8:0);
d_height = (enable_zsnap?((abs(dht)%7==0)?dht:dht+7-abs(dht)%7):dht)-h_base;

d_fo1 = 2*r_fo1;

f2c = sqrt(2)*(sqrt(2)-1); // fillet to chamfer ratio
me = ((gridx*l_grid-0.5)/n_divx)-nozzle*4-r_fo1-12.7-4;
me = ((gridx*l_grid-0.5)/n_divx)-nozzle*4-d_fo1-12.7-4;
m = min(d_tabw/1.8 + max(0,me), d_tabw/1.25);
d_ramp = f2c*(l_grid*((d_height-2)/7+1)/12-r_f2)+d_wall2;
d_edge = ((gridx*l_grid-0.5)/n_divx-d_tabw-r_fo1)/2;
d_edge = ((gridx*l_grid-0.5)/n_divx-d_tabw-d_fo1)/2;
n_st = gridz <= 3 ? 6 : d_edge < 2 && style_tab != 0 && style_tab != 6 ? 1 : style_tab == 1 && n_divx <= 1? 0 : style_tab;

n_x = (n_st==0?1:n_divx);
Expand All @@ -108,7 +109,7 @@ module gridfinityVase() {

if (n_st != 6)
transform_style()
transform_vtab_base((n_st<2?gridx*l_grid/n_x-0.5-r_fo1:d_tabw)-nozzle*4)
transform_vtab_base((n_st<2?gridx*l_grid/n_x-0.5-d_fo1:d_tabw)-nozzle*4)
block_tab_base(-nozzle*sqrt(2));
}

Expand All @@ -120,7 +121,7 @@ module gridfinityVase() {
}

if (enable_funnel && gridz > 3)
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*l_grid-r_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*l_grid-d_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
transform_funnel()
block_funnel_outside();

Expand All @@ -129,12 +130,12 @@ module gridfinityVase() {
block_divider();

if (n_divx < 1)
pattern_linear(n_st == 0 ? n_divx>1 ? n_divx-1 : gridx-1 : 1, 1, (gridx*l_grid-r_fo1)/((n_divx>1 ? n_divx : gridx)))
pattern_linear(n_st == 0 ? n_divx>1 ? n_divx-1 : gridx-1 : 1, 1, (gridx*l_grid-d_fo1)/((n_divx>1 ? n_divx : gridx)))
block_tabsupport();
}

if (enable_funnel && gridz > 3)
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*l_grid-r_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*l_grid-d_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
transform_funnel()
block_funnel_inside();

Expand All @@ -160,7 +161,7 @@ module gridfinityBaseVase() {
intersection() {
block_base_blank(0);
translate([0,0,-h_base-1])
rounded_rectangle(l_grid-0.5-0.005, l_grid-0.5-0.005, h_base*10, r_fo1/2+0.001);
rounded_rectangle(l_grid-0.5-0.005, l_grid-0.5-0.005, h_base*10, r_fo1+0.001);
}
translate([0,0,0.01])
difference() {
Expand Down Expand Up @@ -216,13 +217,13 @@ module block_magnet_blank(o = 0, half = true) {
module block_base_blank(o = 0) {
mirror([0,0,1]) {
hull() {
rounded_square(l_grid-o-0.05-2*r_c2-2*r_c1, h_base, r_fo3/2);
rounded_square(l_grid-o-0.05-2*r_c2, h_base-r_c1, r_fo2/2);
rounded_square(l_grid-o-0.05-2*r_c2-2*r_c1, h_base, r_fo3);
rounded_square(l_grid-o-0.05-2*r_c2, h_base-r_c1, r_fo2);
}
hull() {
rounded_square(l_grid-o-0.05-2*r_c2, r_c2, r_fo2/2);
rounded_square(l_grid-o-0.05-2*r_c2, r_c2, r_fo2);
mirror([0,0,1])
rounded_square(l_grid-o-0.05, d_bottom, r_fo1/2);
rounded_square(l_grid-o-0.05, d_bottom, r_fo1);
}
}
}
Expand Down Expand Up @@ -314,7 +315,7 @@ module block_divider() {
// divider slices cut to tabs
if (n_st == 0)
transform_style()
transform_vtab_base((n_st<2?gridx*l_grid/n_x-0.5-r_fo1:d_tabw)-nozzle*4)
transform_vtab_base((n_st<2?gridx*l_grid/n_x-0.5-d_fo1:d_tabw)-nozzle*4)
block_tab_base(-nozzle*sqrt(2));
}
}
Expand Down Expand Up @@ -390,7 +391,7 @@ module block_vase_base() {
translate([shiftauto(i,n_x)*d_edge + shift*d_edge,0,0])
intersection() {
block_vase();
transform_vtab_base(n_st<2?gridx*l_grid/n_x-0.5-r_fo1:d_tabw)
transform_vtab_base(n_st<2?gridx*l_grid/n_x-0.5-d_fo1:d_tabw)
profile_tab();
}
}
Expand Down Expand Up @@ -430,7 +431,7 @@ module block_inset() {
}

module block_inset_sub(x, y, ang) {
translate([0,(gridy*l_grid-0.5)/2+r_fo1/2,0])
translate([0,(gridy*l_grid-0.5)/2+r_fo1,0])
mirror([0,1,0])
linear_extrude(y,center=true)
polygon([[-x,0],[x,0],[0,x*tan(ang)]]);
Expand All @@ -449,7 +450,7 @@ module block_flushscoop() {
linear_extrude(d_height)
union() {
copy_mirror([1,0,0])
polygon([[0,0],[gridx*l_grid/2-r_fo1/2,0],[gridx*l_grid/2-r_fo1/2,1],[gridx*l_grid/2-r_fo1/2-r_c1*5,d_wall2-nozzle*2+1],[0,d_wall2-nozzle*2+1]]);
polygon([[0,0],[gridx*l_grid/2-r_fo1,0],[gridx*l_grid/2-r_fo1,1],[gridx*l_grid/2-r_fo1-r_c1*5,d_wall2-nozzle*2+1],[0,d_wall2-nozzle*2+1]]);
}

transform_scoop()
Expand Down Expand Up @@ -483,7 +484,7 @@ module block_tabscoop(a=m, b=0, c=0, d=-1) {
}

module transform_vtab(a=0,b=1) {
transform_vtab_base(gridx*l_grid/b-0.5-r_fo1+a)
transform_vtab_base(gridx*l_grid/b-0.5-d_fo1+a)
children();
}

Expand Down
6 changes: 3 additions & 3 deletions standard.scad
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ r_c2 = 2.4;
// bottom thiccness of bin
h_bot = 2.2;
// outside radii 1
r_fo1 = 8.5;
r_fo1 = 7.5 / 2;
// outside radii 2
r_fo2 = 3.2;
r_fo2 = 3.2 / 2;
// outside radii 3
r_fo3 = 1.6;
r_fo3 = 1.6 / 2;
// length of a grid unit
l_grid = 42;

Expand Down
Loading