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

feat: support partially extending bases & adjustable half-grid hole positions #258

Open
wants to merge 4 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
12 changes: 10 additions & 2 deletions gridfinity-rebuilt-bins.scad
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ gridx = 3; //.5
gridy = 2; //.5
// bin height. See bin height information and "gridz_define" below.
gridz = 6; //.1
/* [Advanced Settings] */
// extend total grid width (in mm, negative is to left, pos to right)
extrax=0; // [-41.99:0.01:41.99]
// extend total grid length (in mm, negative is to front, pos to back)
extray=0; // [-41.99:0.01:41.99]

/* [Linear Compartments] */
// number of X Divisions (set to zero to have solid bin)
Expand Down Expand Up @@ -98,13 +103,15 @@ chamfer_holes = true;
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;
// Align holes to the left of the base for half grid bases
half_grid_hole_alignment = 0; // [0: Upper left corner, 1: Base pattern but left aligned, 2: Normal base pattern]

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

// ===== IMPLEMENTATION ===== //

color("tomato") {
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), height_internal, sl=style_lip) {
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), height_internal, sl=style_lip, extra=[extrax,extray]) {

if (divx > 0 && divy > 0) {

Expand All @@ -113,9 +120,10 @@ gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap
} else if (cdivx > 0 && cdivy > 0) {

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], hole_options=hole_options, only_corners=only_corners, thumbscrew=enable_thumbscrew);
gridfinityBase([gridx, gridy], hole_options=hole_options, only_corners=only_corners, thumbscrew=enable_thumbscrew, half_grid_hole_alignment=half_grid_hole_alignment, extra=[extrax, extray]);
}


Expand Down
Loading
Loading