Skip to content
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
5 changes: 4 additions & 1 deletion gridfinity_basic_cup.scad
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ flat_base_rounded_easyPrint = -1;
align_grid_x = "near";//[near, far]
// grid position y
align_grid_y = "near";//[near, far]
// Enable click groove that compatible base plates can use to lock the cup in place
enable_click_groove = false;

/* [Label] */
label_style = "disabled"; //[disabled: no label, normal:normal, gflabel:gflabel basic label, pred:pred - labels by pred, cullenect:Cullenect click labels V2, cullenect_legacy:Cullenect click labels v1]
Expand Down Expand Up @@ -356,7 +358,8 @@ gridfinity_cup(
minimumPrintablePadSize=minimum_printable_pad_size,
flatBaseRoundedRadius = flat_base_rounded_radius,
flatBaseRoundedEasyPrint = flat_base_rounded_easyPrint,
alignGrid = [align_grid_x, align_grid_y]
alignGrid = [align_grid_x, align_grid_y],
clickGroove = enable_click_groove
),
wall_thickness=wall_thickness,
vertical_chambers = ChamberSettings(
Expand Down
21 changes: 21 additions & 0 deletions modules/module_gridfinity_block.scad
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ if(show_gridfinity_demo){
}
}

// add a click groove running along the x axis, centered on the y axis.
module click_groove(length) {
height = 1.5;
depth = height/2;
gap = 0.1;
translate([0, 2.15+env_clearance().x/2, 2.6]) rotate([0, 90, 0]) linear_extrude(length, center=true) polygon([[(1.8-height)/2-gap, -gap], [0.9, depth], [1.8-(1.8-height)/2+gap, -gap]]);
}

// basic block with cutout in top to be stackable, optional holes in bottom
// start with this and begin 'carving'
//grid_block();
Expand Down Expand Up @@ -203,6 +211,19 @@ module grid_block(
magnetChamfer = cupBase_settings[iCupBase_MagnetChamfer]
);
}

if (cupBase_settings[iCupBase_ClickGroove]) {
// For full pitch, we can use a normal groove that ends just before the corners. But with sub pitch, we need to handle the case where
// the bin is offset one subcell, and the center of the baseplate cell is actually at the edge of the bin. To avoid interference here,
// cut the groove along the entire length of the block.
length = env_pitch() * (sub_pitch == 1 ? 0.7 : 1);
for (ix = [0:(num_x * sub_pitch)-1], iy = [0:(num_y * sub_pitch)-1]) translate([env_pitch().x/sub_pitch*ix, env_pitch().x/sub_pitch*iy]) {
translate([env_pitch().x/2, 0]) click_groove(length.x);
translate([env_pitch().x/2, env_pitch().y/sub_pitch]) rotate([0, 0, 180]) click_groove(length.x);
translate([0, env_pitch().y/2]) rotate([0, 0, -90]) click_groove(length.y);
translate([env_pitch().x/sub_pitch, env_pitch().y/2]) rotate([0, 0, 90]) click_groove(length.y);
}
}
}

HelpTxt("grid_block",[
Expand Down
15 changes: 10 additions & 5 deletions modules/module_gridfinity_cup_base.scad
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ iCupBase_AlignGrid=17;
iCupBase_MagnetSideAccess=18;
iCupBase_MagnetCrushDepth=19;
iCupBase_MagnetChamfer=20;
iCupBase_ClickGroove=21;

iCylinderDimension_Diameter=0;
iCylinderDimension_Height=1;
Expand Down Expand Up @@ -108,8 +109,9 @@ function CupBaseSettings(
magnetCrushDepth = 0,
magnetChamfer = 0,
alignGrid = ["near", "near"],
magnetSideAccess = false
) =
magnetSideAccess = false,
clickGroove = false
) =
let(
magnetSize =
is_num(magnetSize)
Expand Down Expand Up @@ -150,13 +152,14 @@ function CupBaseSettings(
alignGrid,
validateMagnetSideAccess(magnetSideAccess),
magnetCrushDepth,
magnetChamfer
magnetChamfer,
clickGroove
],
validatedResult = ValidateCupBaseSettings(result)
) validatedResult;

function ValidateCupBaseSettings(settings, num_x, num_y) =
assert(is_list(settings) && len(settings) == 21, typeerror_list("CupBase Settings", settings, 19))
assert(is_list(settings) && len(settings) == 22, typeerror_list("CupBase Settings", settings, 22))
assert(is_list(settings[iCupBase_MagnetSize]) && len(settings[iCupBase_MagnetSize])==2, "CupBase Magnet Setting must be a list of length 2")
assert(is_list(settings[iCupBase_CenterMagnetSize]) && len(settings[iCupBase_CenterMagnetSize])==2, "CenterMagnet Magnet Setting must be a list of length 2")
assert(is_list(settings[iCupBase_ScrewSize]) && len(settings[iCupBase_ScrewSize])==2, "ScrewSize Magnet Setting must be a list of length 2")
Expand All @@ -171,6 +174,7 @@ function ValidateCupBaseSettings(settings, num_x, num_y) =
assert(is_num(settings[iCupBase_MagnetCaptiveHeight]), "CupBase Magnet Captive height setting must a number")
assert(is_list(settings[iCupBase_AlignGrid]) && len(settings[iCupBase_AlignGrid])==2, "CupBase AlignGrid Setting must be a list of length 2")
assert(is_string(settings[iCupBase_MagnetSideAccess]), "CupBase MagnetSideAccess Settings must be a string")
assert(is_bool(settings[iCupBase_ClickGroove]), "CupBase ClickGroove Setting must be a boolean")
[
settings[iCupBase_MagnetSize],
validateMagnetEasyRelease(settings[iCupBase_MagnetEasyRelease]),
Expand All @@ -192,5 +196,6 @@ function ValidateCupBaseSettings(settings, num_x, num_y) =
settings[iCupBase_AlignGrid],
settings[iCupBase_MagnetSideAccess],
settings[iCupBase_MagnetCrushDepth],
settings[iCupBase_MagnetChamfer]
settings[iCupBase_MagnetChamfer],
settings[iCupBase_ClickGroove]
];