Skip to content

Commit d5f5d69

Browse files
committed
Add flat-top style baseplates
The current design of the baseplates with a sharp edge at the top of the base plates is not ideal for printability. Slicers try to approximate this sharp edge with a thin perimeter line that is usually disjoint from the perimeters at the grid intersections. The end result is quite uneven. Introduce a new "top style" configuration option which defaults to "sharp" - the current behavior. An alternate "flattened" setting removes two top two layers of the baseplate, leaving a flat surface with a width of roughly two perimeter lines on top. This is sliced much more consistently and the printed result also looks a lot better. The functional impact of not having a sharp edge on top is neglible.
1 parent 5906ee0 commit d5f5d69

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

gridfinity-rebuilt-baseplate.scad

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ style_plate = 3; // [0: thin, 1:weighted, 2:skeletonized, 3: screw together, 4:
5656
// hole styles
5757
style_hole = 0; // [0:none, 1:countersink, 2:counterbore]
5858

59+
// top style
60+
style_top = 0; // [0:sharp, 1: flattened]
61+
5962
/* [Magnet Hole] */
6063
// Baseplate will have holes for 6mm Diameter x 2mm high magnets.
6164
enable_magnet = true;
@@ -69,7 +72,7 @@ hole_options = bundle_hole_options(refined_hole=false, magnet_hole=enable_magnet
6972
// ===== IMPLEMENTATION ===== //
7073

7174
color("tomato")
72-
gridfinityBaseplate([gridx, gridy], l_grid, [distancex, distancey], style_plate, hole_options, style_hole, [fitx, fity]);
75+
gridfinityBaseplate([gridx, gridy], l_grid, [distancex, distancey], style_plate, hole_options, style_hole, style_top, [fitx, fity]);
7376

7477
// ===== CONSTRUCTION ===== //
7578

@@ -85,9 +88,10 @@ gridfinityBaseplate([gridx, gridy], l_grid, [distancex, distancey], style_plate,
8588
* @param sp Baseplate Style
8689
* @param hole_options
8790
* @param sh Style of screw hole allowing the baseplate to be mounted to something.
91+
* @param style_top Style of the top edge of the baseplate. Can be 0 (sharp edge) or 1 (flattened for better printability).
8892
* @param fit_offset Determines where padding is added.
8993
*/
90-
module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_options, sh, fit_offset = [0, 0]) {
94+
module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_options, sh, style_top, fit_offset = [0, 0]) {
9195

9296
assert(is_list(grid_size_bases) && len(grid_size_bases) == 2,
9397
"grid_size_bases must be a 2d list");
@@ -99,6 +103,8 @@ module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_option
99103
"Must have positive x grid amount!");
100104
assert(grid_size_bases.y > 0 || min_size_mm.y > 0,
101105
"Must have positive y grid amount!");
106+
assert(style_top >= 0 && style_top <= 1,
107+
"style_top must be 0 or 1");
102108

103109
additional_height = calculate_offset(sp, hole_options[1], sh);
104110

@@ -213,6 +219,12 @@ module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_option
213219
translate([0, 0, additional_height/2])
214220
cutter_screw_together(grid_size.x, grid_size.y, length);
215221
}
222+
223+
if (style_top == 1) {
224+
translate([0, 0, baseplate_height_mm])
225+
// Cut off 2 layers from the top so the slicer can generate 2 perimeters side-by-side.
226+
cube([size_mm[0] + 2, size_mm[1] + 2, LAYER_HEIGHT*4], center=true);
227+
}
216228
}
217229
}
218230

0 commit comments

Comments
 (0)