Merge pull request #129 from banpower1:banpower1/gridfinity-refined-holes

Gridfinity Refined magnet holes
This commit is contained in:
Ruud 2023-11-11 20:39:13 +01:00 committed by GitHub
commit c95938da94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 4 deletions

View file

@ -60,7 +60,7 @@ scoop = 1; //[0:0.1:1]
only_corners = false;
/* [Base] */
style_hole = 3; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
style_hole = 4; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit, 4: Gridfinity Refined hole - no glue needed]
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
div_base_x = 0;
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)

View file

@ -119,6 +119,10 @@ module block_base(gx, gy, l, dbnx, dbny, style_hole, off) {
if (style_hole > 0)
pattern_circular(abs(l-d_hole_from_side/2)<0.001?1:4)
if (style_hole == 4)
translate([l/2-d_hole_from_side, l/2-d_hole_from_side, h_slit*2])
refined_hole();
else
translate([l/2-d_hole_from_side, l/2-d_hole_from_side, 0])
block_base_hole(style_hole, off);
}
@ -161,6 +165,39 @@ module block_base_hole(style_hole, o=0) {
}
}
module refined_hole() {
/**
* Refined hole based on Printables @grizzie17's Gridfinity Refined
* https://www.printables.com/model/413761-gridfinity-refined
*/
// Meassured magnet hole diameter to be 5.86mm (meassured in fusion360
r = r_hole2-0.32;
// Magnet height
m = 2;
mh = m-0.1;
// Poke through - For removing a magnet using a toothpick
ptl = h_slit*3; // Poke Through Layers
pth = mh+ptl; // Poke Through Height
ptr = 2.5; // Poke Through Radius
union() {
hull() {
// Magnet hole - smaller than the magnet to keep it squeezed
translate([10, -r, 0]) cube([1, r*2, mh]);
cylinder(1.9, r=r);
}
hull() {
// Poke hole
translate([-9+5.60, -ptr/2, -ptl]) cube([1, ptr, pth]);
translate([-12.53+5.60, 0, -ptl]) cylinder(pth, d=ptr);
}
}
}
module profile_wall_sub_sub() {
polygon([
[0,0],