diff --git a/TODO.md b/TODO.md index afa3cdd..e33230c 100644 --- a/TODO.md +++ b/TODO.md @@ -2,10 +2,6 @@ Notes for "next time". -## v3.3 - -* Try not using roundedcube and instead bezel the top, to get cleaner seams everywhere else - ## v4 * Engraving some cosmetic stuff? Or maybe a place to mount other plates? diff --git a/src/components.scad b/src/components.scad index 21d1fff..772619c 100644 --- a/src/components.scad +++ b/src/components.scad @@ -3,8 +3,6 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -include - module m4_hole() { cylinder(r=m4_bolt_radius, h=100, $fn=50, center=true); } @@ -213,7 +211,28 @@ module bottom_panel() { } module overhang_plate() { - roundedcube([overhang_panel_x, overhang_panel_y, panel_z], center=true, radius=1); + top_points = [ + // top bevel + [(overhang_panel_x/2)-(overhang_panel_bevel_height*2), + (overhang_panel_y/2)-(overhang_panel_bevel_height*2), + panel_z/2-overhang_panel_bevel_height/2], + [-(overhang_panel_x/2)+(overhang_panel_bevel_height*2), + (overhang_panel_y/2)-(overhang_panel_bevel_height*2), + panel_z/2-overhang_panel_bevel_height/2], + [(overhang_panel_x/2)-(overhang_panel_bevel_height*2), + -(overhang_panel_y/2)+(overhang_panel_bevel_height*2), + panel_z/2-overhang_panel_bevel_height/2], + [-(overhang_panel_x/2)+(overhang_panel_bevel_height*2), + -(overhang_panel_y/2)+(overhang_panel_bevel_height*2), + panel_z/2-overhang_panel_bevel_height/2], + ]; + hull() { + for (p = top_points) { + translate(p) cylinder(r=overhang_panel_bevel_height, h=overhang_panel_bevel_height, center=true); + } + translate([0, 0, -overhang_panel_bevel_height]) + cube([overhang_panel_x, overhang_panel_y, panel_z-overhang_panel_bevel_height*2], center=true); + } } // this takes the base_panel and makes it a small frame, putting a larger top plate diff --git a/src/parameters.scad b/src/parameters.scad index be463fc..16bc22f 100644 --- a/src/parameters.scad +++ b/src/parameters.scad @@ -38,8 +38,9 @@ frame_y = 208; frame_z = 57; // this sinks the bottom and top of the frame inward a bit, and is used to math out two shapes -// when creating the frame box +// when creating the frame box / overhang panel frame_bevel_height = 2; +overhang_panel_bevel_height = 1; frame_center_to_neutrik = 70; diff --git a/src/roundedcube.scad b/src/roundedcube.scad deleted file mode 100644 index fb49d62..0000000 --- a/src/roundedcube.scad +++ /dev/null @@ -1,55 +0,0 @@ -// More information: https://danielupshaw.com/openscad-rounded-corners/ - -// Set to 0.01 for higher definition curves (renders slower) -$fs = 0.15; - -module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") { - // If single value, convert to [x, y, z] vector - size = (size[0] == undef) ? [size, size, size] : size; - - translate_min = radius; - translate_xmax = size[0] - radius; - translate_ymax = size[1] - radius; - translate_zmax = size[2] - radius; - - diameter = radius * 2; - - obj_translate = (center == false) ? - [0, 0, 0] : [ - -(size[0] / 2), - -(size[1] / 2), - -(size[2] / 2) - ]; - - translate(v = obj_translate) { - hull() { - for (translate_x = [translate_min, translate_xmax]) { - x_at = (translate_x == translate_min) ? "min" : "max"; - for (translate_y = [translate_min, translate_ymax]) { - y_at = (translate_y == translate_min) ? "min" : "max"; - for (translate_z = [translate_min, translate_zmax]) { - z_at = (translate_z == translate_min) ? "min" : "max"; - - translate(v = [translate_x, translate_y, translate_z]) - if ( - (apply_to == "all") || - (apply_to == "xmin" && x_at == "min") || (apply_to == "xmax" && x_at == "max") || - (apply_to == "ymin" && y_at == "min") || (apply_to == "ymax" && y_at == "max") || - (apply_to == "zmin" && z_at == "min") || (apply_to == "zmax" && z_at == "max") - ) { - sphere(r = radius); - } else { - rotate = - (apply_to == "xmin" || apply_to == "xmax" || apply_to == "x") ? [0, 90, 0] : ( - (apply_to == "ymin" || apply_to == "ymax" || apply_to == "y") ? [90, 90, 0] : - [0, 0, 0] - ); - rotate(a = rotate) - cylinder(h = diameter, r = radius, center = true); - } - } - } - } - } - } -}