mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-12-22 14:53:25 +00:00
Merge branch 'main' into make-scoop-customizable
This commit is contained in:
commit
b07d85e58f
5 changed files with 34 additions and 19 deletions
|
@ -6,6 +6,8 @@ A ground-up port (with a few extra features) of the stock [gridfinity](https://w
|
|||
|
||||
Full documentation can be found at the project's [website](https://kennetek.github.io/gridfinity-rebuilt-openscad/).
|
||||
|
||||
The project can also be found on [Printables](https://www.printables.com/model/274917-gridfinity-rebuilt-in-openscad) if you want to support the project.
|
||||
|
||||
[<img src="./images/base_dimension.gif" width="320">]()
|
||||
[<img src="./images/compartment_dimension.gif" width="320">]()
|
||||
[<img src="./images/height_dimension.gif" width="320">]()
|
||||
|
|
|
@ -45,6 +45,8 @@ d_tabh = 15.85;
|
|||
d_tabw = 42;
|
||||
// angle of tab
|
||||
a_tab = 36;
|
||||
// lip height
|
||||
h_lip = 3.548;
|
||||
|
||||
d_wall2 = r_base-r_c1-d_clear*sqrt(2);
|
||||
d_magic = -2*d_clear-2*d_wall+d_div;
|
||||
|
|
|
@ -46,8 +46,8 @@ divy = 1;
|
|||
/* [Toggles] */
|
||||
// snap gridz height to nearest 7mm increment
|
||||
enable_zsnap = false;
|
||||
// enable upper lip for stacking other bins
|
||||
enable_lip = true;
|
||||
// how should the top lip act
|
||||
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
|
||||
|
||||
/* [Other] */
|
||||
// determine what the variable "gridz" applies to based on your use case
|
||||
|
@ -72,8 +72,9 @@ div_base_y = 0;
|
|||
// ===== IMPLEMENTATION ===== //
|
||||
|
||||
color("tomato") {
|
||||
gridfinityInit(gridx, gridy, height(gridz, gridz_define, enable_lip, enable_zsnap), height_internal, length) {
|
||||
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), height_internal, length) {
|
||||
|
||||
if (divx > 0 && divy > 0)
|
||||
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = scoop);
|
||||
}
|
||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole);
|
||||
|
|
|
@ -6,8 +6,8 @@ include <gridfinity-constants.scad>
|
|||
// ===== User Modules ===== //
|
||||
|
||||
// functions to convert gridz values to mm values
|
||||
function hf (z, d, l) = (d==0)?z*7:(d==1)?h_bot+z+h_base:z-(l?3.8:0);
|
||||
function height (z,d=0,l=true,s=true) = (s?((abs(hf(z,d,l))%7==0)?hf(z,d,l):hf(z,d,l)+7-abs(hf(z,d,l))%7):hf(z,d,l))-h_base;
|
||||
function hf (z, d, l) = ((d==0)?z*7:(d==1)?h_bot+z+h_base:z-((l==1)?h_lip:0))+(l==2?h_lip:0);
|
||||
function height (z,d=0,l=0,s=true) = (s?((abs(hf(z,d,l))%7==0)?hf(z,d,l):hf(z,d,l)+7-abs(hf(z,d,l))%7):hf(z,d,l))-h_base;
|
||||
|
||||
// Creates equally divided cutters for the bin
|
||||
//
|
||||
|
@ -36,7 +36,7 @@ module gridfinityInit(gx, gy, h, h0 = 0, l) {
|
|||
}
|
||||
color("royalblue")
|
||||
block_wall(gx, gy, l) {
|
||||
if (enable_lip) profile_wall();
|
||||
if (style_lip == 0) profile_wall();
|
||||
else profile_wall2();
|
||||
}
|
||||
}
|
||||
|
@ -183,6 +183,9 @@ module profile_wall() {
|
|||
offset(delta = -r_f1)
|
||||
profile_wall_sub();
|
||||
}
|
||||
// remove any negtive geometry in edge cases
|
||||
mirror([0,1,0])
|
||||
square(100*length);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,10 +225,10 @@ module block_cutter(x,y,w,h,t,s) {
|
|||
v_ang_tab = a_tab;
|
||||
v_ang_lip = 45;
|
||||
|
||||
ycutfirst = y == 0 && enable_lip;
|
||||
ycutlast = abs(y+h-$gyy)<0.001 && enable_lip;
|
||||
xcutfirst = x == 0 && enable_lip;
|
||||
xcutlast = abs(x+w-$gxx)<0.001 && enable_lip;
|
||||
ycutfirst = y == 0 && style_lip == 0;
|
||||
ycutlast = abs(y+h-$gyy)<0.001 && style_lip == 0;
|
||||
xcutfirst = x == 0 && style_lip == 0;
|
||||
xcutlast = abs(x+w-$gxx)<0.001 && style_lip == 0;
|
||||
zsmall = ($dh+h_base)/7 < 3;
|
||||
|
||||
ylen = h*($gyy*length+d_magic)/$gyy-d_div;
|
||||
|
|
|
@ -18,7 +18,7 @@ $fs = 0.25;
|
|||
type = 0; // [0:bin, 1:base]
|
||||
|
||||
/* [Printer Settings] */
|
||||
// printer nozzle size
|
||||
// extrusion width (walls will be twice this size)
|
||||
nozzle = 0.6;
|
||||
// slicer layer size
|
||||
layer = 0.35;
|
||||
|
@ -59,6 +59,7 @@ gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments -
|
|||
// how tabs are implemented
|
||||
style_tab = 0; // [0:continuous, 1:broken, 2:auto, 3:right, 4:center, 5:left, 6:none]
|
||||
// where to put X cutouts for attaching bases
|
||||
// selecting none will also disable crosses on bases
|
||||
style_base = 0; // [0:all, 1:corners, 2:edges, 3:auto, 4:none]
|
||||
|
||||
// tab angle
|
||||
|
@ -74,7 +75,7 @@ else gridfinityVase(); // Generate the bin
|
|||
|
||||
// ===== CONSTRUCTION ===== //
|
||||
|
||||
d_bottom = layer*bottom_layer;
|
||||
d_bottom = layer*(max(bottom_layer,1));
|
||||
x_l = length/2;
|
||||
|
||||
dht = (gridz_define==0)?gridz*7 : (gridz_define==1)?h_bot+gridz+h_base : gridz-(enable_lip?3.8:0);
|
||||
|
@ -147,6 +148,10 @@ module gridfinityVase() {
|
|||
block_inset();
|
||||
if (enable_pinch)
|
||||
block_pinch();
|
||||
|
||||
if (bottom_layer <= 0)
|
||||
translate([0,0,-50+layer+0.01])
|
||||
cube([gridx*length*10,gridy*length*10,100], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,6 +174,7 @@ module gridfinityBaseVase() {
|
|||
rotate([0,0,90])
|
||||
translate([0,0,-h_base+d_bottom+0.01])
|
||||
cube([0.001,length*gridx,d_height+d_bottom*2]);
|
||||
|
||||
}
|
||||
|
||||
pattern_circular(4)
|
||||
|
@ -191,6 +197,7 @@ module gridfinityBaseVase() {
|
|||
cube([length*2, length*2, h_base], center = true);
|
||||
}
|
||||
|
||||
if (style_base != 4)
|
||||
linear_extrude(d_bottom)
|
||||
profile_x(0.1);
|
||||
}
|
||||
|
@ -403,17 +410,17 @@ module profile_wall_sub_sub() {
|
|||
|
||||
module block_inset() {
|
||||
ixx = (gridx*length-0.5)/2;
|
||||
iyy = d_height/2+d_bottom*2;
|
||||
iyy = d_height/1.875;
|
||||
izz = sqrt(ixx^2+iyy^2)*tan(40);
|
||||
if (enable_scoop_chamfer && enable_inset)
|
||||
difference() {
|
||||
intersection() {
|
||||
rotate([0,90,0])
|
||||
translate([-iyy+d_bottom*2,0,0])
|
||||
translate([-iyy,0,0])
|
||||
block_inset_sub(iyy, gridx*length, 45);
|
||||
|
||||
rotate([0,90,0])
|
||||
translate([-iyy+d_bottom*2,0,0])
|
||||
translate([-iyy,0,0])
|
||||
rotate([0,90,0])
|
||||
block_inset_sub(ixx, d_height*2, 45);
|
||||
}
|
||||
|
@ -465,14 +472,14 @@ module profile_tabscoop(m) {
|
|||
module block_tabscoop(a=m, b=0, c=0, d=-1) {
|
||||
translate([0,d_tabh*cos(a_tab)-length*gridy/2+0.25+b,0])
|
||||
difference() {
|
||||
translate([0,0,-d_tabh*sin(a_tab)*2+d_height+d_bottom*2])
|
||||
translate([0,0,-d_tabh*sin(a_tab)*2+d_height+2.1])
|
||||
profile_tabscoop(a);
|
||||
|
||||
translate([-gridx*length/2,-m,-m])
|
||||
cube([gridx*length,m-d_tabh*cos(a_tab)+0.005+c,d_height*2]);
|
||||
|
||||
if (d >= 0)
|
||||
translate([0,0,-d_tabh*sin(a_tab)+d_height+d_bottom*2+m/2+d])
|
||||
translate([0,0,-d_tabh*sin(a_tab)+d_height+m/2+d+2.1])
|
||||
cube([gridx*length,gridy*length,m],center=true);
|
||||
}
|
||||
}
|
||||
|
@ -483,7 +490,7 @@ module transform_vtab(a=0,b=1) {
|
|||
}
|
||||
|
||||
module transform_vtab_base(a) {
|
||||
translate([0,d_tabh*cos(a_tab)-length*gridy/2+0.25,-d_tabh*sin(a_tab)+d_height+d_bottom*2])
|
||||
translate([0,d_tabh*cos(a_tab)-length*gridy/2+0.25,-d_tabh*sin(a_tab)+d_height+2.1])
|
||||
rotate([90,0,270])
|
||||
linear_extrude(a, center=true)
|
||||
children();
|
||||
|
@ -506,7 +513,7 @@ module block_tab_base(del) {
|
|||
module transform_scoop() {
|
||||
intersection() {
|
||||
block_vase();
|
||||
translate([0,gridy*length/2-d_ramp,1.21])
|
||||
translate([0,gridy*length/2-d_ramp,layer*max(bottom_layer*1)])
|
||||
rotate([90,0,90])
|
||||
linear_extrude(2*length*gridx,center=true)
|
||||
children();
|
||||
|
|
Loading…
Reference in a new issue