reorganize all the parts into subdirectories

src/ was getting pretty unreadable and I finally had time to do
something about it

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
2024-06-20 17:36:22 -05:00
parent dccd2836b2
commit db887b668f
65 changed files with 137 additions and 169 deletions

View File

@@ -6,7 +6,7 @@
include <parameters.scad>
include <components.scad>
use <frame-piece-side-for-box.scad>
use <side.scad>
module side_inner_wall_frame_piece() {
difference() {

View File

@@ -0,0 +1,23 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <top-or-bottom.scad>
module side_box_frame_piece() {
piece_width = panel_support_width+frame_wall+frame_mount_column_width;
difference() {
// side piece is left/right agnostic
frame();
// minus the top and bottom
top_or_bottom_box_frame_piece();
rotate([180, 0, 0]) top_or_bottom_box_frame_piece();
// and just chop out the rest of the frame
translate([piece_width, 0, 0]) cube([frame_x, frame_y+1, frame_z+1], center=true);
}
}
side_box_frame_piece();

View File

@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <top-or-bottom.scad>
module top_or_bottom_aux_and_neutrik_box_frame_piece() {
difference() {
top_or_bottom_box_frame_piece();
// aux button holes
translate([-35.25, -101.5, 0]) rotate([90, 0, 0]) aux_control_three_button_cluster();
translate([-35.25, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
translate([-72.25, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
translate([2, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
// neutrix button hole
translate([frame_center_to_neutrik, -(frame_y/2)+neutrik_panel_thickness, 0])
rotate([270, 0, 0]) neutrik_d_mount();
translate([frame_center_to_neutrik, -(frame_y/2)+neutrik_panel_thickness+4, 0])
frame_cutout();
}
}
top_or_bottom_aux_and_neutrik_box_frame_piece();

View File

@@ -6,7 +6,7 @@
include <parameters.scad>
include <components.scad>
use <frame-piece-top-or-bottom-for-box.scad>
use <top-or-bottom.scad>
module top_or_bottom_inner_wall_frame_piece() {
difference() {

View File

@@ -5,7 +5,7 @@
include <parameters.scad>
include <components.scad>
use <frame-piece-top-or-bottom-for-box.scad>
use <top-or-bottom.scad>
use <top-or-bottom-inner-wall.scad>
module windowed_top_or_bottom_box_frame_piece() {

View File

@@ -0,0 +1,30 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <frames/complete/left-frame.scad>
module top_or_bottom_box_frame_piece() {
piece_width = panel_support_width+frame_wall+frame_mount_column_width;
intersection() {
left_frame();
difference() {
// include the whole bottom wall (including mount columns)
translate([0, -(frame_y/2)+(piece_width/2), 0]) cube([frame_x, piece_width, frame_z], center=true);
// ...minus the frame wall and lip on the left
translate([-frame_x/2+frame_wall/2, 0, 0])
cube([frame_wall, frame_y-frame_wall*2, frame_z], center=true);
linear_extrude(height=frame_z, center=true) polygon([
[-frame_x/2, -frame_y/2], [-frame_x/2+frame_wall, -frame_y/2+frame_wall],
[-frame_x/2, -frame_y/2+frame_wall]
]);
// ...minus a slot for the combining piece to go into
cube([frame_x, frame_y-(panel_support_width+frame_wall)*2, inner_frame_z/3], center=true);
}
}
}
top_or_bottom_box_frame_piece();

View File

@@ -0,0 +1,38 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <frames/complete/left-frame.scad>
use <frames/pieces/box/side.scad>
use <top-or-bottom.scad>
module side_and_bottom_frame_piece_wall() {
// get a slice of the pieces, to use it in extruding
// this doesn't use the side_frame_piece because of the 45 degree angle geometry
// not creating a clean thing to cut, so we just take the whole wall and use that
projection(cut=true) rotate([0, 90, 0]) translate([frame_x/2-frame_wall-(frame_bevel_height/2), 0, 0])
left_frame();
projection(cut=true) translate([0, -frame_y/2+frame_wall, 0]) rotate([90, 90, 0]) bottom_piece_extension();
}
module side_and_bottom_frame_piece_extension() {
// combine the original with a shrunken piece to "pull" the wall out
hull() {
linear_extrude(height=frame_extension_y) scale([0.5, 0.90, 1]) side_and_bottom_frame_piece_wall();
linear_extrude(height=frame_bevel_height) side_and_bottom_frame_piece_wall();
}
}
module extra_extended_left_or_right_frame_piece() {
difference() {
side_box_frame_piece();
// chop off the old edge which is getting replaced with the extension
translate([-frame_x/2+frame_bevel_height/2, 0, 0]) cube([frame_bevel_height, frame_y, frame_z], center=true);
}
translate([-frame_x/2+frame_bevel_height*2, 0, 0]) rotate([0, -90, 0]) side_and_bottom_frame_piece_extension();
}
extra_extended_left_or_right_frame_piece();

View File

@@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <frames/complete/left-frame.scad>
use <frames/pieces/box/side.scad>
use <top-or-bottom-clean-for-extended-side.scad>
module side_frame_piece_wall() {
// get a slice of the piece, to use it in extruding
// this doesn't use the side_frame_piece because of the 45 degree angle geometry
// not creating a clean thing to cut, so we just take the whole wall and use that
projection(cut=true) rotate([0, 90, 0]) translate([frame_x/2-frame_wall-(frame_bevel_height/2), 0, 0])
left_frame();
}
module side_frame_piece_extension() {
// combine the original with a shrunken piece to "pull" the wall out
hull() {
linear_extrude(height=frame_extension_y) scale([0.5, 0.85, 1]) side_frame_piece_wall();
linear_extrude(height=frame_bevel_height) side_frame_piece_wall();
}
}
module extended_bottom_left_or_right_frame_piece() {
difference() {
side_box_frame_piece();
// chop off the old edge which is getting replaced with the extension
translate([-frame_x/2+frame_bevel_height/2, 0, 0]) cube([frame_bevel_height, frame_y, frame_z], center=true);
}
translate([-frame_x/2+frame_bevel_height*2, 0, 0]) rotate([0, -90, 0]) side_frame_piece_extension();
}
extended_bottom_left_or_right_frame_piece();

View File

@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <top-or-bottom-clean-for-extended-side.scad>
module top_or_bottom_aux_and_neutrik_box_frame_piece_for_extended_side() {
difference() {
top_or_bottom_box_frame_piece_for_extended_side();
// aux button holes
translate([-35.25, -101.5, 0]) rotate([90, 0, 0]) aux_control_three_button_cluster();
translate([-35.25, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
translate([-72.25, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
translate([2, -(frame_y/2)+neutrik_panel_thickness+4, 0]) frame_cutout();
// neutrix button hole
translate([frame_center_to_neutrik, -(frame_y/2)+neutrik_panel_thickness, 0])
rotate([270, 0, 0]) neutrik_d_mount();
translate([frame_center_to_neutrik, -(frame_y/2)+neutrik_panel_thickness+4, 0])
frame_cutout();
}
}
top_or_bottom_aux_and_neutrik_box_frame_piece_for_extended_side();

View File

@@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <frames/pieces/box/top-or-bottom.scad>
module top_or_bottom_box_frame_piece_for_extended_side() {
difference() {
top_or_bottom_box_frame_piece();
// ...minus the frame wall and lip on the left
translate([-frame_x/2+frame_wall/2, 0, 0]) cube([frame_wall, frame_y, frame_z], center=true);
}
}
top_or_bottom_box_frame_piece_for_extended_side();

View File

@@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <top-or-bottom-clean-for-extended-side.scad>
module clean_top_or_bottom() {
difference() {
top_or_bottom_box_frame_piece_for_extended_side();
// chop off the lip we left on the basic piece
translate([-frame_x/2+frame_wall/2, 0, 0]) cube([frame_wall, frame_y, frame_z], center=true);
};
}
module bottom_piece_wall() {
// get a slice of the piece (before the bevel), to use it in extruding
projection(cut=true) rotate([-90, 0, 0]) translate([0, frame_y/2-(frame_wall-frame_bevel_height)*3/2, 0])
clean_top_or_bottom();
}
module bottom_piece_extension() {
// combine the original with a shrunken piece to "pull" the wall out
hull() {
linear_extrude(height=frame_extension_y) scale([1, 0.5, 1]) bottom_piece_wall();
linear_extrude(height=(frame_wall-frame_bevel_height)) bottom_piece_wall();
}
}
module extended_top_or_bottom_frame_piece() {
clean_top_or_bottom();
translate([0, -frame_y/2+frame_wall, 0]) rotate([90, 0, 0]) bottom_piece_extension();
}
extended_top_or_bottom_frame_piece();

View File

@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: © 2024 Brian S. Stephan <bss@incorporeal.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
include <parameters.scad>
include <components.scad>
use <box/side.scad>
module interconnect_frame_half_piece() {
translate([frame_x/2-frame_wall, 0, 0]) difference() {
side_box_frame_piece();
rotate([0, 0, 180]) side_chopper();
}
}
module interconnect_frame_piece() {
difference() {
union() {
// slight translate is to make this a 2-manifold in OpenSCAD
translate([-0.01, 0, 0]) interconnect_frame_half_piece();
mirror([1, 0, 0]) interconnect_frame_half_piece();
}
translate([-frame_x/2, 0, 0]) frame_cable_routing_hole();
}
}
interconnect_frame_piece();