From 7c217f869144deec5da8dae87bbce7eec64e0438 Mon Sep 17 00:00:00 2001 From: Marian Rudzynski Date: Sat, 30 Nov 2024 22:20:24 -0800 Subject: [PATCH 1/3] if either grid size is 0, we should probably not render the grid --- gridfinity-rebuilt-baseplate.scad | 58 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/gridfinity-rebuilt-baseplate.scad b/gridfinity-rebuilt-baseplate.scad index ba2c150..909d116 100644 --- a/gridfinity-rebuilt-baseplate.scad +++ b/gridfinity-rebuilt-baseplate.scad @@ -156,36 +156,38 @@ module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_option difference() { union() { // Baseplate itself - pattern_linear(grid_size.x, grid_size.y, length) { - // Single Baseplate piece - difference() { - if (minimal) { - square_baseplate_lip(additional_height); - } else { - solid_square_baseplate(additional_height); - } + if (grid_size.x > 0 && grid_size.y > 0) { + pattern_linear(grid_size.x, grid_size.y, length) { + // Single Baseplate piece + difference() { + if (minimal) { + square_baseplate_lip(additional_height); + } else { + solid_square_baseplate(additional_height); + } - // Bottom/through pattern for the solid baseplates. - if (sp == 1) { - cutter_weight(); - } else if (sp == 2 || sp == 3) { - translate([0,0,-TOLLERANCE]) - linear_extrude(additional_height + (2 * TOLLERANCE)) - profile_skeleton(); - } + // Bottom/through pattern for the solid baseplates. + if (sp == 1) { + cutter_weight(); + } else if (sp == 2 || sp == 3) { + translate([0,0,-TOLLERANCE]) + linear_extrude(additional_height + (2 * TOLLERANCE)) + profile_skeleton(); + } - // Add holes to the solid baseplates. - hole_pattern(){ - // Manget hole - translate([0, 0, additional_height+TOLLERANCE]) - mirror([0, 0, 1]) - block_base_hole(hole_options); - - translate([0,0,-TOLLERANCE]) - if (sh == 1) { - cutter_countersink(); - } else if (sh == 2) { - cutter_counterbore(); + // Add holes to the solid baseplates. + hole_pattern(){ + // Manget hole + translate([0, 0, additional_height+TOLLERANCE]) + mirror([0, 0, 1]) + block_base_hole(hole_options); + + translate([0,0,-TOLLERANCE]) + if (sh == 1) { + cutter_countersink(); + } else if (sh == 2) { + cutter_counterbore(); + } } } } From c2d7b4f5154dd3e8bc2237dba23cbdd222a7e62e Mon Sep 17 00:00:00 2001 From: Marian Rudzynski Date: Sat, 30 Nov 2024 22:23:17 -0800 Subject: [PATCH 2/3] in a grid size 0 scenario, use padding only and allow a counterbore on that screw hole --- gridfinity-rebuilt-baseplate.scad | 34 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/gridfinity-rebuilt-baseplate.scad b/gridfinity-rebuilt-baseplate.scad index 909d116..d0a4fdf 100644 --- a/gridfinity-rebuilt-baseplate.scad +++ b/gridfinity-rebuilt-baseplate.scad @@ -224,7 +224,7 @@ module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_option if (screw_together) { translate([0, 0, additional_height/2]) - cutter_screw_together(grid_size.x, grid_size.y, length); + cutter_screw_together(grid_size, padding_mm, length); } } } @@ -392,18 +392,24 @@ module profile_skeleton(size=l_grid) { } } -module cutter_screw_together(gx, gy, size = l_grid) { - - screw(gx, gy); - rotate([0,0,90]) - screw(gy, gx); - - module screw(a, b) { - copy_mirror([1,0,0]) - translate([a*size/2, 0, 0]) - pattern_linear(1, b, 1, size) - pattern_linear(1, n_screws, 1, d_screw_head + screw_spacing) - rotate([0,90,0]) - cylinder(h=size/2, d=d_screw, center = true); +module cutter_screw_together(grid_size, padding_mm, size = l_grid) { + gx = grid_size.x > 0 ? grid_size.x : 0; + gy = grid_size.y > 0 ? grid_size.y : 0; + gh = grid_size.x == 0 ? padding_mm.x : (grid_size.y == 0 ? padding_mm.y : size); + + screw(gx, gy, gh + 1); + + module screw(a, b, h = size) { + translate([a*h/2, 0, 0]) + pattern_linear(1, b, 1, size) + pattern_linear(1, n_screws, 1, d_screw_head + screw_spacing) + rotate([0,90,0]) + cylinder(h=h, d=d_screw, center=true); + + translate([a*h/2, 0, 0]) + pattern_linear(1, b, 1, size) + pattern_linear(1, n_screws, 1, d_screw_head + screw_spacing) + rotate([0,90,0]) + cylinder(h=h, d=(style_hole == 2) ? d_screw*1.8 : d_screw, center=false); } } From 0ff3ae3dbedb6a0e013081eee3f1c409c53682bf Mon Sep 17 00:00:00 2001 From: Marian Rudzynski Date: Sun, 1 Dec 2024 12:08:54 -0800 Subject: [PATCH 3/3] yeeted the mirror and y axis, bring them back --- gridfinity-rebuilt-baseplate.scad | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gridfinity-rebuilt-baseplate.scad b/gridfinity-rebuilt-baseplate.scad index d0a4fdf..30f7b0c 100644 --- a/gridfinity-rebuilt-baseplate.scad +++ b/gridfinity-rebuilt-baseplate.scad @@ -395,12 +395,14 @@ module profile_skeleton(size=l_grid) { module cutter_screw_together(grid_size, padding_mm, size = l_grid) { gx = grid_size.x > 0 ? grid_size.x : 0; gy = grid_size.y > 0 ? grid_size.y : 0; - gh = grid_size.x == 0 ? padding_mm.x : (grid_size.y == 0 ? padding_mm.y : size); + gh = (grid_size.x == 0 ? padding_mm.x : (grid_size.y == 0 ? padding_mm.y : size)) + 1; - screw(gx, gy, gh + 1); + screw(gx, gy, gh); + rotate([0,0,90]) screw(gy, gx, gh); module screw(a, b, h = size) { - translate([a*h/2, 0, 0]) + copy_mirror([1,0,0]) + translate([a*h/2, 0, 0]) pattern_linear(1, b, 1, size) pattern_linear(1, n_screws, 1, d_screw_head + screw_spacing) rotate([0,90,0])