Skip to content

Enable base plates to be CNC'd with 1/4" bits by modding bottom most corner radius to 3.175mm (Rough POC edits for feedback...) #42

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
81 changes: 64 additions & 17 deletions gridfinity_cup_modules.scad
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ default_half_pitch = false;
default_lip_style = "normal";
// Limit attachments (magnets and scres) to box corners for faster printing.
box_corner_attachments_only = false;
// Label recess depth, use to increase tolerance for top of label. Useful if printing
// gridfinity cubes when printer tuning and experiencing poor cooling resulting in lift
// or warping, but still want a usable cube.
// Zack's design is 0mm
label_recess = 1.5;

basic_cup(
num_x=2,
num_y=1,
Expand Down Expand Up @@ -74,10 +80,21 @@ module basic_cup(

difference() {
grid_block(num_x, num_y, num_z, magnet_diameter, screw_depth, hole_overhang_remedy=hole_overhang_remedy, half_pitch=half_pitch, box_corner_attachments_only=box_corner_attachments_only);
color("red") partitioned_cavity(num_x, num_y, num_z, withLabel=withLabel,
labelWidth=labelWidth, fingerslide=fingerslide, magnet_diameter=magnet_diameter,
screw_depth=screw_depth, floor_thickness=floor_thickness, wall_thickness=wall_thickness,
efficient_floor=efficient_floor, separator_positions=separator_positions, lip_style=lip_style);
color("red")
partitioned_cavity(
num_x,
num_y,
num_z,
withLabel=withLabel,
labelWidth=labelWidth,
fingerslide=fingerslide,
magnet_diameter=magnet_diameter,
screw_depth=screw_depth,
floor_thickness=floor_thickness,
wall_thickness=wall_thickness,
efficient_floor=efficient_floor,
separator_positions=separator_positions,
lip_style=lip_style);
}
}

Expand All @@ -100,6 +117,7 @@ module irregular_cup(
separator_positions=[],
lip_style=default_lip_style
) {

difference() {
grid_block(num_x, num_y, num_z, magnet_diameter, screw_depth, hole_overhang_remedy=hole_overhang_remedy, half_pitch=half_pitch, box_corner_attachments_only=box_corner_attachments_only);
color("red") partitioned_cavity(num_x, num_y, num_z, withLabel=withLabel,
Expand All @@ -110,11 +128,21 @@ module irregular_cup(
}


module partitioned_cavity(num_x, num_y, num_z, withLabel=default_withLabel,
labelWidth=default_labelWidth, fingerslide=default_fingerslide,
magnet_diameter=default_magnet_diameter, screw_depth=default_screw_depth,
floor_thickness=default_floor_thickness, wall_thickness=default_wall_thickness,
efficient_floor=default_efficient_floor, separator_positions=[], lip_style=default_lip_style) {
module partitioned_cavity(
num_x,
num_y,
num_z,
withLabel=default_withLabel,
labelWidth=default_labelWidth,
fingerslide=default_fingerslide,
magnet_diameter=default_magnet_diameter,
screw_depth=default_screw_depth,
floor_thickness=default_floor_thickness,
wall_thickness=default_wall_thickness,
efficient_floor=default_efficient_floor,
separator_positions=[],
lip_style=default_lip_style) {

// cavity with removed segments so that we leave dividing walls behind
gp = gridfinity_pitch;
outer_wall_th = 1.8; // cavity is this far away from the 42mm 'ideal' block
Expand All @@ -131,9 +159,17 @@ module partitioned_cavity(num_x, num_y, num_z, withLabel=default_withLabel,
cavity_xsize = gp*num_x-2*outer_wall_th;

difference() {
basic_cavity(num_x, num_y, num_z, fingerslide=fingerslide, magnet_diameter=magnet_diameter,
screw_depth=screw_depth, floor_thickness=floor_thickness, wall_thickness=wall_thickness,
efficient_floor=efficient_floor, lip_style=lip_style);
basic_cavity(
num_x,
num_y,
num_z,
fingerslide=fingerslide,
magnet_diameter=magnet_diameter,
screw_depth=screw_depth,
floor_thickness=floor_thickness,
wall_thickness=wall_thickness,
efficient_floor=efficient_floor,
lip_style=lip_style);

if (len(separator_positions) > 0) {
for (i=[0:len(separator_positions)-1]) {
Expand Down Expand Up @@ -161,7 +197,10 @@ module partitioned_cavity(num_x, num_y, num_z, withLabel=default_withLabel,
: 0 ;

hull() for (i=[0,1, 2])
translate([(-gridfinity_pitch/2) + ((chamberStart + label_pos_x) * gridfinity_pitch), yz[i][0], yz[i][1]])
translate([
(-gridfinity_pitch/2) + ((chamberStart + label_pos_x) * gridfinity_pitch),
yz[i][0],
-label_recess + yz[i][1]])
rotate([0, 90, 0])
union(){
tz(abs(label_num_x)*gridfinity_pitch)
Expand All @@ -174,10 +213,18 @@ module partitioned_cavity(num_x, num_y, num_z, withLabel=default_withLabel,
}


module basic_cavity(num_x, num_y, num_z, fingerslide=default_fingerslide,
magnet_diameter=default_magnet_diameter, screw_depth=default_screw_depth,
floor_thickness=default_floor_thickness, wall_thickness=default_wall_thickness,
efficient_floor=default_efficient_floor, lip_style=default_lip_style) {
module basic_cavity(
num_x,
num_y,
num_z,
fingerslide=default_fingerslide,
magnet_diameter=default_magnet_diameter,
screw_depth=default_screw_depth,
floor_thickness=default_floor_thickness,
wall_thickness=default_wall_thickness,
efficient_floor=default_efficient_floor,
lip_style=default_lip_style) {

eps = 0.1;
// I couldn't think of a good name for this ('q') but effectively it's the
// size of the overhang that produces a wall thickness that's less than the lip
Expand Down
57 changes: 43 additions & 14 deletions gridfinity_modules.scad
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ module grid_block(num_x=1, num_y=1, num_z=2, magnet_diameter=6.5, screw_depth=6,
cube([gridfinity_pitch*num_x, gridfinity_pitch*num_y, totalht-5]);
}

// crop with outer cylinders
// crop outer corners with outer cylinders
translate([0, 0, -0.1])
hull()
cornercopy(block_corner_position, num_x, num_y)
cylinder(r=corner_radius, h=totalht+0.2, $fn=32);
}

// remove top so XxY can fit on top
color("blue")
translate([0, 0, gridfinity_zpitch*num_z])
pad_oversize(num_x, num_y, 1);
color("blue")
translate([0, 0, gridfinity_zpitch*num_z])
pad_oversize(num_x, num_y, 1);

if (esd > 0) { // add pockets for screws if requested
gridcopycorners(ceil(num_x), ceil(num_y), magnet_position, box_corner_attachments_only)
Expand Down Expand Up @@ -145,31 +145,60 @@ module pad_oversize(num_x=1, num_y=1, margins=0) {
// female parts are a bit oversize for a nicer fit
radialgap = margins ? 0.25 : 0; // oversize cylinders for a bit of clearance
axialdown = margins ? 0.1 : 0; // a tiny bit of axial clearance present in Zack's design


small_radius = 1.6;
med_radius = 3.2;
big_radius = 7.5;
block_corner_outer_radius = big_radius;

// Use to enable containers to fit trays CNC carved with 1/4" bit
bottom_radius = margins ? small_radius : 3.175;
bottom_radius_offset = (bottom_radius - small_radius) / 2;

translate([0, 0, -axialdown])
difference() {
union() {
// Pad upper taper
color("purple")
hull() cornercopy(pad_corner_position, num_x, num_y) {
if (sharp_corners) {
cylsq(d=1.6+2*radialgap, h=0.1);
translate([0, 0, bevel1_top]) cylsq(d=3.2+2*radialgap, h=1.9);
translate([0, 0, bevel2_bottom])
cylsq2(d1=med_radius+2*radialgap, d2=block_corner_outer_radius+0.5+2*radialgap+2*bonus_ht, h=bevel2_top-bevel2_bottom+bonus_ht);
}
else {
cylinder(d=1.6+2*radialgap, h=0.1, $fn=24);
translate([0, 0, bevel1_top]) cylinder(d=3.2+2*radialgap, h=1.9, $fn=32);
translate([0, 0, bevel2_bottom])
cylinder(d1=med_radius+2*radialgap, d2=block_corner_outer_radius+0.5+2*radialgap+2*bonus_ht, h=bevel2_top-bevel2_bottom+bonus_ht, $fn=32);
}
}

hull() cornercopy(pad_corner_position, num_x, num_y) {
// Pad mid vertical
color("blue")
hull()
cornercopy(pad_corner_position, num_x, num_y)
{
if (sharp_corners) {
translate([0, 0, bevel2_bottom])
cylsq2(d1=3.2+2*radialgap, d2=7.5+0.5+2*radialgap+2*bonus_ht, h=bevel2_top-bevel2_bottom+bonus_ht);
cylsq(d=small_radius+2*radialgap, h=0.1);
translate([0, 0, bevel1_top]) cylsq(d=med_radius+2*radialgap, h=1.9);
}
else {
translate([0, 0, bevel2_bottom])
cylinder(d1=3.2+2*radialgap, d2=7.5+0.5+2*radialgap+2*bonus_ht, h=bevel2_top-bevel2_bottom+bonus_ht, $fn=32);
translate([0, 0, bevel1_top]) cylinder(d=med_radius+2*radialgap, h=1.9, $fn=32);
}
}

// Pad lower taper
color("green")
hull()
union()
{
cornercopy(pad_corner_position, num_x, num_y)
{
translate([0, 0, bevel1_top]) cylinder(d=med_radius+2*radialgap, h=0.1, $fn=32);
}
cornercopy(pad_corner_position - bottom_radius_offset, num_x, num_y)
{
cylinder(d=bottom_radius+2*radialgap, h=bevel1_top, $fn=32);
}
}
}

// cut off bottom if we're going to go negative
Expand Down