From 1d85e13cceff7e3c5d3cc7e841bf9791d7d7c3aa Mon Sep 17 00:00:00 2001 From: pbpc-terrance Date: Thu, 19 Mar 2026 14:17:57 -0400 Subject: [PATCH] Add square cutouts to openGrid --- openGrid/openGrid.scad | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/openGrid/openGrid.scad b/openGrid/openGrid.scad index 6f22d38..ca09da1 100644 --- a/openGrid/openGrid.scad +++ b/openGrid/openGrid.scad @@ -31,6 +31,8 @@ Change Log: - Like 2 openGrids back to back for rigidity in freestanding / side hung installations and double sided use - Original Heavy design by @KYZ Design on Makerworld https://makerworld.com/en/@KYZDesign - Implementation by sfcgeorge +- 2026-03-19 + - Add square cutouts to openGrid @@ -108,6 +110,14 @@ Max_Tile_Width = 8; Max_Tile_Depth = 8; Tile_Spacing = 5; +/*[Beta - Square Cutout]*/ +//Removes a rectangular section of full grid squares. Coordinates are zero-based from the top-left tile. +Enable_Square_Cutout = false; +Square_Cutout_Start_X = 0; +Square_Cutout_Start_Y = 0; +Square_Cutout_Width = 1; +Square_Cutout_Length = 1; + adjustedStackCount = Add_Adhesive_Base ? 1 : Stack_Count; adjustedInterfaceThickness = Stacking_Method == "Interface Layer" ? Interface_Thickness : 0; @@ -297,6 +307,7 @@ module openGrid(Board_Width, Board_Height, tileSize = 28, Tile_Thickness = 6.8, //TODO: Modularize positioning (Outside Corners, inside corners, inside all) and holes (chamfer and screw holes) applyTileCornerModifications(Board_Width, Board_Height, tileSize, Tile_Thickness, Screw_Mounting, Chamfers, anchor); + applySquareCutoutModifications(Board_Width, Board_Height, tileSize, Tile_Thickness); if (Connector_Holes) { //top and bottom connector holes @@ -458,6 +469,22 @@ module openGrid(Board_Width, Board_Height, tileSize = 28, Tile_Thickness = 6.8, } } +module applySquareCutoutModifications(Board_Width, Board_Height, tileSize = 28, Tile_Thickness = 6.8) { + cutout_start_x = max(0, Square_Cutout_Start_X); + cutout_start_y = max(0, Square_Cutout_Start_Y); + cutout_width = min(max(0, Square_Cutout_Width), max(0, Board_Width - cutout_start_x)); + cutout_length = min(max(0, Square_Cutout_Length), max(0, Board_Height - cutout_start_y)); + + if (Enable_Square_Cutout && cutout_width > 0 && cutout_length > 0) + tag("remove") + translate([ + -Board_Width * tileSize / 2 + (cutout_start_x + cutout_width / 2) * tileSize, + Board_Height * tileSize / 2 - (cutout_start_y + cutout_length / 2) * tileSize, + Tile_Thickness / 2 + ]) + cuboid([cutout_width * tileSize, cutout_length * tileSize, Tile_Thickness + 0.02], anchor=CENTER); +} + module applyTileCornerModifications(Board_Width, Board_Height, tileSize = 28, Tile_Thickness = 6.8, Screw_Mounting = "None", Chamfers = "None", anchor = CENTER) { Intersection_Distance = 4.2; tileChamfer = sqrt(Intersection_Distance ^ 2 * 2);