bevel overhang panels in the same way as the frame
this also ends our last usage of roundedcube.scad Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
parent
412e6231d5
commit
41bfe3a661
4
TODO.md
4
TODO.md
|
@ -2,10 +2,6 @@
|
||||||
|
|
||||||
Notes for "next time".
|
Notes for "next time".
|
||||||
|
|
||||||
## v3.3
|
|
||||||
|
|
||||||
* Try not using roundedcube and instead bezel the top, to get cleaner seams everywhere else
|
|
||||||
|
|
||||||
## v4
|
## v4
|
||||||
|
|
||||||
* Engraving some cosmetic stuff? Or maybe a place to mount other plates?
|
* Engraving some cosmetic stuff? Or maybe a place to mount other plates?
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include <roundedcube.scad>
|
|
||||||
|
|
||||||
module m4_hole() {
|
module m4_hole() {
|
||||||
cylinder(r=m4_bolt_radius, h=100, $fn=50, center=true);
|
cylinder(r=m4_bolt_radius, h=100, $fn=50, center=true);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +211,28 @@ module bottom_panel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
module overhang_plate() {
|
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
|
// this takes the base_panel and makes it a small frame, putting a larger top plate
|
||||||
|
|
|
@ -38,8 +38,9 @@ frame_y = 208;
|
||||||
frame_z = 57;
|
frame_z = 57;
|
||||||
|
|
||||||
// this sinks the bottom and top of the frame inward a bit, and is used to math out two shapes
|
// 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;
|
frame_bevel_height = 2;
|
||||||
|
overhang_panel_bevel_height = 1;
|
||||||
|
|
||||||
frame_center_to_neutrik = 70;
|
frame_center_to_neutrik = 70;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue