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

Base Updates. Fixes lite bins. #243

Merged
merged 9 commits into from
Nov 6, 2024
8 changes: 4 additions & 4 deletions gridfinity-rebuilt-baseplate.scad
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ module hole_pattern(){
}

module cutter_countersink(){
screw_hole(SCREW_HOLE_RADIUS + d_clear, 2*h_base,
screw_hole(SCREW_HOLE_RADIUS + d_clear, 2*BASE_HEIGHT,
false, BASEPLATE_SCREW_COUNTERSINK_ADDITIONAL_RADIUS);
}

module cutter_counterbore(){
screw_radius = SCREW_HOLE_RADIUS + d_clear;
counterbore_height = BASEPLATE_SCREW_COUNTERBORE_HEIGHT + 2*LAYER_HEIGHT;
union(){
cylinder(h=2*h_base, r=screw_radius);
cylinder(h=2*BASE_HEIGHT, r=screw_radius);
difference() {
cylinder(h = counterbore_height, r=BASEPLATE_SCREW_COUNTERBORE_RADIUS);
make_hole_printable(screw_radius, BASEPLATE_SCREW_COUNTERBORE_RADIUS, counterbore_height);
Expand Down Expand Up @@ -321,7 +321,7 @@ module baseplate_lip(height=0, width=l_grid, length=l_grid) {

additional_height = height + BASEPLATE_CLEARANCE_HEIGHT;

sweep_rounded(width-2*BASEPLATE_OUTSIDE_RADIUS, length-2*BASEPLATE_OUTSIDE_RADIUS)
sweep_rounded([width-2*BASEPLATE_OUTSIDE_RADIUS, length-2*BASEPLATE_OUTSIDE_RADIUS])
translate([translation_x, additional_height, 0])
polygon(concat(BASEPLATE_LIP, [
[0, -additional_height],
Expand All @@ -341,7 +341,7 @@ module square_baseplate_lip(height=0, size = l_grid) {

corner_center_distance = size/2 - BASEPLATE_OUTSIDE_RADIUS;

render(convexity = 2) // Fixes ghosting in preview
//render(convexity = 2) // Fixes ghosting in preview
union() {
baseplate_lip(height, size, size);
pattern_circular(4)
Expand Down
81 changes: 18 additions & 63 deletions gridfinity-rebuilt-lite.scad
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ hole_options = bundle_hole_options(refined_holes, magnet_holes, screw_holes, cru

// Input all the cutter types in here
color("tomato")
render()
gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, l_grid, hole_options, only_corners) {
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = 0);
}
Expand All @@ -77,70 +78,24 @@ gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, l_gri

module gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, length, style_hole, only_corners) {
height_mm = height(gridz, gridz_define, style_lip, enable_zsnap);
union() {

// Lower the bin start point by this amount.
// Made up for in bin height.
// Ensures divider walls smoothly transition to the bottom
lower_by_mm = BASE_HEIGHT + bottom_layer;

difference() {
translate([0, 0, -lower_by_mm])
gridfinityInit(gridx, gridy, height_mm+lower_by_mm, 0, length, sl=style_lip)
children();

// Underside of the base. Keep out zone.
render()
difference() {
union() {
gridfinityInit(gridx, gridy, height_mm, 0, length, sl=style_lip)
children();
gridfinityBase([gridx, gridy], [length, length], hole_options=style_hole, only_corners=only_corners);
}

difference() {
union() {
intersection() {
difference() {
gridfinityBase([gridx, gridy], [length, length], hole_options=style_hole, -d_wall*2, false, only_corners=only_corners);
translate([-gridx*length/2,-gridy*length/2,2*h_base])
cube([gridx*length,gridy*length,1000]);
}
translate([0,0,-1])
rounded_rectangle(gridx*length-0.5005-d_wall*2, gridy*length-0.5005-d_wall*2, 1000, r_f2);
translate([0,0,bottom_layer])
rounded_rectangle(gridx*1000, gridy*1000, 1000, r_f2);
}
translate([0,0,h_base+d_clear])
rounded_rectangle(gridx*length-0.5005-d_wall*2, gridy*length-0.5005-d_wall*2, h_base, r_f2);
}

translate([0,0,-4*h_base])
gridfinityInit(gridx, gridy, height(20,0), 0, length, sl=style_lip)
children();
}
cube([gridx*length, gridy*length, BASE_HEIGHT*2], center=true);
gridfinityBase([gridx, gridy], hole_options=style_hole, only_corners=only_corners);
}
difference() {
translate([0,0,-1.6])
difference() {
difference() {
union() {
gridfinityInit(gridx, gridy, height_mm, 0, length, sl=style_lip)
children();
}

difference() {
intersection() {
difference() {
gridfinityBase([gridx, gridy], [length, length], hole_options=style_hole, -d_wall*2, false, only_corners=only_corners);
translate([-gridx*length/2,-gridy*length/2,2*h_base])
cube([gridx*length,gridy*length,1000]);
}
translate([0,0,-1])
rounded_rectangle(gridx*length-0.5005-d_wall*2, gridy*length-0.5005-d_wall*2, 1000, r_f2);
translate([0,0,bottom_layer])
rounded_rectangle(gridx*1000, gridy*1000, 1000, r_f2);
}

translate([0,0,-4*h_base])
gridfinityInit(gridx, gridy, height(20,0), 0, length, sl=style_lip)
children();
}

}
translate([0,0,9])
rounded_rectangle(gridx*1000, gridy*1000, gridz*1000, gridz);
}
translate([0,0,0])
rounded_rectangle(gridx*1000, gridy*1000, 5, r_f2);
}

}

gridfinity_base_lite([gridx, gridy], d_wall, bottom_layer, hole_options=style_hole, only_corners=only_corners);
}
107 changes: 37 additions & 70 deletions gridfinity-spiral-vase.scad
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,23 @@ a_tab = 40;
// ===== IMPLEMENTATION ===== //

color("tomato")
if (type != 0) gridfinityBaseVase(); // Generate a single base
if (type != 0) gridfinityBaseVase(2*nozzle, d_bottom); // Generate a single base
else gridfinityVase(); // Generate the bin


// ===== CONSTRUCTION ===== //

//Deprecated Variables
r_fo2 = 3.2 / 2; // outside radii 2
r_fo3 = 1.6 / 2; // outside radii 3
r_c2 = 2.4; // upper base chamfer "radius"
d_hole = 26; // center-to-center distance between holes
//End Deprecated Variables

d_bottom = layer*(max(bottom_layer,1));
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;
dht = (gridz_define==0)?gridz*7 : (gridz_define==1)?h_bot+gridz+BASE_HEIGHT : gridz-(enable_lip?3.8:0);
d_height = (enable_zsnap?((abs(dht)%7==0)?dht:dht+7-abs(dht)%7):dht)-BASE_HEIGHT;

d_fo1 = 2*+BASE_OUTSIDE_RADIUS;
d_fo1 = 2*+BASE_TOP_RADIUS;

f2c = sqrt(2)*(sqrt(2)-1); // fillet to chamfer ratio
me = ((gridx*l_grid-0.5)/n_divx)-nozzle*4-d_fo1-12.7-4;
Expand Down Expand Up @@ -164,90 +161,60 @@ module gridfinityVase() {
}
}

module gridfinityBaseVase() {
module gridfinityBaseVase(wall_thickness, bottom_thickness) {
difference() {
union() {
difference() {
intersection() {
block_base_blank(0);
translate([0,0,-h_base-1])
rounded_square([l_grid-0.5-0.005, l_grid-0.5-0.005, h_base*10], BASE_OUTSIDE_RADIUS+0.001, center=true);
union() {
base_outer_shell(wall_thickness, bottom_thickness);
intersection() {
pattern_circular(4){
rotate([0,0,45])
translate([-wall_thickness/2, 3, 0])
cube([wall_thickness, l_grid, BASE_PROFILE_MAX.y]);

if (enable_holes) {
block_magnet_blank(wall_thickness);
}
}
base_solid();
}
if (style_base != 4) {
translate([0, 0, BASE_PROFILE_MAX.y])
linear_extrude(bottom_thickness)
profile_x(0.1);
}
}
translate([0,0,0.01])
difference() {
block_base_blank(nozzle*4);
translate([0,0,-h_base])
cube([l_grid*2,l_grid*2,d_bottom*2],center=true);
if (enable_holes) {
pattern_circular(4)
block_magnet_blank(0, false);
}
// magic slice
rotate([0,0,90])
translate([0,0,-h_base+d_bottom+0.01])
cube([0.001,l_grid*gridx,d_height+d_bottom*2]);

}

pattern_circular(4)
intersection() {
rotate([0,0,45])
translate([-nozzle,3,-h_base+d_bottom+0.01])
cube([nozzle*2,l_grid*gridx,d_height+d_bottom*2]);

block_base_blank(nozzle*4-0.1);
}
if (enable_holes)
pattern_circular(4)
block_magnet_blank(nozzle);
}
if (enable_holes)
pattern_circular(4)
block_magnet_blank(0, false);

translate([0,0,h_base/2])
cube([l_grid*2, l_grid*2, h_base], center = true);
// magic slice
// Tricks slicer into not ignoring the center.
rotate([0, 0, 90])
translate([0, 0, bottom_thickness])
cube([0.005, 2*l_grid, 2*BASE_HEIGHT]);
}

if (style_base != 4)
linear_extrude(d_bottom)
profile_x(0.1);
}

module block_magnet_blank(o = 0, half = true) {
magnet_radius = MAGNET_HOLE_RADIUS + o;

translate([d_hole/2,d_hole/2,-h_base+0.1])
translate([d_hole/2, d_hole/2, 0.1])
difference() {
hull() {
cylinder(r = magnet_radius, h = MAGNET_HOLE_DEPTH*2, center = true);
cylinder(r = magnet_radius-(h_base+0.1-MAGNET_HOLE_DEPTH), h = (h_base+0.1)*2, center = true);
cylinder(r = magnet_radius-(BASE_HEIGHT+0.1-MAGNET_HOLE_DEPTH), h = (BASE_HEIGHT+0.1)*2, center = true);
}
if (half)
mirror([0,0,1])
cylinder(r=magnet_radius*2, h = (h_base+0.1)*4);
}
}

module block_base_blank(o = 0) {
mirror([0,0,1]) {
hull() {
linear_extrude(h_base)
rounded_square(l_grid-o-0.05-2*r_c2-2*r_c1, r_fo3, center=true);
linear_extrude(h_base-r_c1)
rounded_square(l_grid-o-0.05-2*r_c2, r_fo2, center=true);
}
hull() {
linear_extrude(r_c2)
rounded_square(l_grid-o-0.05-2*r_c2, r_fo2, center=true);
mirror([0,0,1])
linear_extrude(d_bottom)
rounded_square(l_grid-o-0.05, BASE_OUTSIDE_RADIUS, center=true);
}
cylinder(r=magnet_radius*2, h = (BASE_HEIGHT+0.1)*4);
}
}

module block_pinch(height_mm) {
assert(is_num(height_mm));

translate([0, 0, -h_base])
translate([0, 0, -BASE_HEIGHT])
block_wall(gridx, gridy, l_grid) {
translate([d_wall2-nozzle*2-d_clear*2,0,0])
profile_wall(height_mm);
Expand Down Expand Up @@ -360,7 +327,7 @@ module block_funnel_outside() {
module block_vase_base() {
difference() {
// base
translate([0,0,-h_base]) {
translate([0,0,-BASE_HEIGHT]) {
translate([0,0,-0.1])
color("firebrick")
block_bottom(d_bottom, gridx, gridy, l_grid);
Expand Down
4 changes: 2 additions & 2 deletions src/core/gridfinity-rebuilt-holes.scad
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ module assert_hole_options_valid(hole_options) {
* @brief A single magnet/screw hole. To be cut out of the base.
* @details Supports multiple options that can be mixed and matched.
* @pram hole_options @see bundle_hole_options
* @param o Offset
* @param o offset Grows or shrinks the final shapes. Similar to `scale`, but in mm.
*/
module block_base_hole(hole_options, o=0) {
assert_hole_options_valid(hole_options);
Expand All @@ -280,7 +280,7 @@ module block_base_hole(hole_options, o=0) {
screw_radius = SCREW_HOLE_RADIUS - (o/2);
magnet_radius = MAGNET_HOLE_RADIUS - (o/2);
magnet_inner_radius = MAGNET_HOLE_CRUSH_RIB_INNER_RADIUS - (o/2);
screw_depth = h_base-o;
screw_depth = BASE_HEIGHT - o;
// If using supportless / printable mode, need to add additional layers, so they can be removed later.
supportless_additional_layers = screw_hole ? 2 : 3;
magnet_depth = MAGNET_HOLE_DEPTH - o +
Expand Down
Loading
Loading