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

Add Gridfinity Refined thumbscrew option #226

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion gridfinity-rebuilt-bins.scad
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ crush_ribs = true;
chamfer_holes = true;
// Magnet/Screw holes will be printed so supports are not needed.
printable_hole_top = true;
// Enable "gridfinity-refined" thumbscrew hole in the center of each base: https://www.printables.com/model/413761-gridfinity-refined
enable_thumbscrew = false;

hole_options = bundle_hole_options(refined_holes, magnet_holes, screw_holes, crush_ribs, chamfer_holes, printable_hole_top);

Expand All @@ -112,7 +114,7 @@ gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap
cutCylinders(n_divx=cdivx, n_divy=cdivy, cylinder_diameter=cd, cylinder_height=ch, coutout_depth=c_depth, orientation=c_orientation, chamfer=c_chamfer);
}
}
gridfinityBase(gridx, gridy, l_grid, div_base_x, div_base_y, hole_options, only_corners=only_corners);
gridfinityBase(gridx, gridy, l_grid, div_base_x, div_base_y, hole_options, only_corners=only_corners, thumbscrew=enable_thumbscrew);
}


Expand Down
45 changes: 31 additions & 14 deletions gridfinity-rebuilt-utility.scad
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
include <standard.scad>
use <generic-helpers.scad>
use <gridfinity-rebuilt-holes.scad>
use <threads.scad>

// ===== User Modules ===== //

Expand Down Expand Up @@ -202,16 +203,18 @@ module cut_move(x, y, w, h) {
/**
*@summary Create the base of a gridfinity bin, or use it for a custom object.
* @param length X,Y size of a single Gridfinity base.
* @param thumbscrew Enable "gridfinity-refined" thumbscrew hole in the center of each base unit. This is a ISO Metric Profile, 15.0mm size, M15x1.5 designation.
EmperorArthur marked this conversation as resolved.
Show resolved Hide resolved
*/
module gridfinityBase(gx, gy, length, dx, dy, hole_options=bundle_hole_options(), off=0, final_cut=true, only_corners=false) {
module gridfinityBase(gx, gy, length, dx, dy, hole_options=bundle_hole_options(), off=0, final_cut=true, only_corners=false, thumbscrew=false) {
assert(
is_num(gx) &&
is_num(gy) &&
is_num(length) &&
is_num(dx) &&
is_num(dy) &&
is_bool(final_cut) &&
is_bool(only_corners)
is_bool(only_corners) &&
is_bool(thumbscrew)
EmperorArthur marked this conversation as resolved.
Show resolved Hide resolved
);

dbnxt = [for (i=[1:5]) if (abs(gx*i)%1 < 0.001 || abs(gx*i)%1 > 0.999) i];
Expand Down Expand Up @@ -242,7 +245,7 @@ module gridfinityBase(gx, gy, length, dx, dy, hole_options=bundle_hole_options()
if(only_corners) {
difference(){
pattern_linear(grid_size.x, grid_size.y, base_center_distance_mm.x, base_center_distance_mm.y)
block_base(bundle_hole_options(), 0, individual_base_size_mm);
block_base(bundle_hole_options(), 0, individual_base_size_mm, thumbscrew=thumbscrew);

copy_mirror([0, 1, 0]) {
copy_mirror([1, 0, 0]) {
Expand All @@ -258,7 +261,7 @@ module gridfinityBase(gx, gy, length, dx, dy, hole_options=bundle_hole_options()
}
else {
pattern_linear(grid_size.x, grid_size.y, base_center_distance_mm.x, base_center_distance_mm.y)
block_base(hole_options, off, individual_base_size_mm);
block_base(hole_options, off, individual_base_size_mm, thumbscrew=thumbscrew);
}
}

Expand All @@ -268,7 +271,7 @@ module gridfinityBase(gx, gy, length, dx, dy, hole_options=bundle_hole_options()
* @param off
* @param size [x, y] size of a single base. Only set if deviating from the standard!
*/
module block_base(hole_options, off=0, size=[BASE_SIZE, BASE_SIZE]) {
module block_base(hole_options, off=0, size=[BASE_SIZE, BASE_SIZE], thumbscrew=false) {
EmperorArthur marked this conversation as resolved.
Show resolved Hide resolved
assert(is_list(size) && len(size) == 2);

// How far, in the +x direction,
Expand All @@ -291,15 +294,29 @@ module block_base(hole_options, off=0, size=[BASE_SIZE, BASE_SIZE]) {
translate([translation_x, 0, 0])
polygon(BASE_PROFILE);

rounded_square(
[
base_bottom_size.x + TOLLERANCE,
base_bottom_size.y + TOLLERANCE,
BASE_PROFILE_MAX.y
],
translation_x,
center=true
);
if (thumbscrew) {
ScrewHole(15, 5, position=[0, 0, 0], pitch=1.5) {
EmperorArthur marked this conversation as resolved.
Show resolved Hide resolved
rounded_square(
[
base_bottom_size.x + TOLLERANCE,
base_bottom_size.y + TOLLERANCE,
BASE_PROFILE_MAX.y
],
translation_x,
center=true
);
}
} else {
rounded_square(
[
base_bottom_size.x + TOLLERANCE,
base_bottom_size.y + TOLLERANCE,
BASE_PROFILE_MAX.y
],
translation_x,
center=true
);
}
}

// 4 holes
Expand Down
Loading
Loading