diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..56ad827 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "pegmixer"] + path = pegmixer + url = https://github.com/ahmad-amrey/pegmixer diff --git a/gridfinity-rebuilt-baseplate.scad b/gridfinity-rebuilt-baseplate.scad index d850272..0880922 100644 --- a/gridfinity-rebuilt-baseplate.scad +++ b/gridfinity-rebuilt-baseplate.scad @@ -1,5 +1,6 @@ include include +include use // ===== INFORMATION ===== // @@ -64,6 +65,14 @@ chamfer_holes = true; hole_options = bundle_hole_options(refined_hole=false, magnet_hole=enable_magnet, screw_hole=false, crush_ribs=crush_ribs, chamfer=chamfer_holes, supportless=false); +/* [Pegboard mount] */ +// Add pegboard mounting plate and pegs. +enable_pegboard = false; +pegboard_spacing = 25; +pegboard_thickness = 6; +pegboard_hole_diameter = 6.35; +pegboard_mount_plate_thickness = 3; + // ===== IMPLEMENTATION ===== // color("tomato") @@ -224,6 +233,10 @@ module gridfinityBaseplate(grid_size_bases, length, min_size_mm, sp, hole_option cutter_screw_together(grid_size.x, grid_size.y, length); } } + + if (enable_pegboard) { + pegboard_mount(size_mm); + } } function calculate_offset(style_plate, enable_magnet, style_hole) = @@ -404,3 +417,15 @@ module cutter_screw_together(gx, gy, size = l_grid) { cylinder(h=size/2, d=d_screw, center = true); } } + +/** + * @brief Add pegboard mounting part to gridfinity base + * @param base_dimensions an array (X, Y, Z) of baseplate final dimensions + */ +module pegboard_mount(base_dimensions) { + plate_width = base_dimensions.x - (BASEPLATE_OUTSIDE_RADIUS * 2); + plate_height = (pegboard_spacing + (pegboard_hole_diameter * 2)); + translate([0, (base_dimensions.y / 2) + (pegboard_mount_plate_thickness / 2), (plate_height / 2)]) + pegmixer(spacing = pegboard_spacing, board_thickness = pegboard_thickness, hole_d = pegboard_hole_diameter, peg_hole_percentage = 0.75) + solid([plate_width, pegboard_mount_plate_thickness, plate_height]); +} \ No newline at end of file diff --git a/pegmixer b/pegmixer new file mode 160000 index 0000000..58d8b20 --- /dev/null +++ b/pegmixer @@ -0,0 +1 @@ +Subproject commit 58d8b203fa2e1e38f308e43f520d339257ffec1a