Skip to content

Commit

Permalink
only-edges proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanH committed Sep 13, 2024
1 parent 7eb8629 commit 758e98d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion gridfinity-rebuilt-utility.scad
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ module profile_base() {
]);
}

module gridfinityBase(gx, gy, l, dx, dy, hole_options=bundle_hole_options(), off=0, final_cut=true, only_corners=false) {
module gridfinityBase(gx, gy, l, dx, dy, hole_options=bundle_hole_options(), off=0, final_cut=true, only_corners=false, only_edges=false) {
dbnxt = [for (i=[1:5]) if (abs(gx*i)%1 < 0.001 || abs(gx*i)%1 > 0.999) i];
dbnyt = [for (i=[1:5]) if (abs(gy*i)%1 < 0.001 || abs(gy*i)%1 > 0.999) i];
dbnx = 1/(dx==0 ? len(dbnxt) > 0 ? dbnxt[0] : 1 : round(dx));
Expand Down Expand Up @@ -244,6 +244,17 @@ module gridfinityBase(gx, gy, l, dx, dy, hole_options=bundle_hole_options(), off
}
}
}
else if (only_edges) {
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
block_base(gx, gy, l, dbnx, dbny, hole_options, off);

intersection() {
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
block_base(gx, gy, l, dbnx, dbny, bundle_hole_options(), off);

# cube([(gx-1)*l, (gy-1)*l, 14], center=true);
}
}
else {
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
block_base(gx, gy, l, dbnx, dbny, hole_options, off);
Expand Down

0 comments on commit 758e98d

Please sign in to comment.