break out tweakable parameters into a separate file

this allows for:

include <parameters.scad>
// override a variable such as
frame_z = 60;
include <components.scad>

which will let individual components tweak settings, e.g. the height of
a frame
This commit is contained in:
Brian S. Stephan 2023-11-20 14:25:27 -06:00
parent 9a5792580c
commit ae40fd7289
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
45 changed files with 125 additions and 69 deletions

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <frame-left.scad>
use <frame-right.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module bottom_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <bottom-panel-solo.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <bottom-panel-left.scad>
use <bottom-panel-right.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <bottom-panel-left.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module bottom_panel_solo() {

View File

@ -18,75 +18,6 @@
include <roundedcube.scad>
/* QUASI-CONSTANTS */
// adjustments
hole_tolerance = 0.15;
// M2
m2_screw_selftap_radius = 0.95;
// M3
m3_screw_selftap_radius = 1.3;
// M4
m4_bolt_radius = 2 + hole_tolerance;
m4_bolt_countersink_radius = 6.1 + hole_tolerance;
m4_bolt_hex_exterior_radius = 3.6 + hole_tolerance;
// 24mm button
small_button_radius = 12 + hole_tolerance;
// 30mm button
big_button_radius = 15 + hole_tolerance;
// JLF mount dimensions
lever_mount_x = 53;
lever_mount_y = 95;
lever_mount_z = 2;
// standard lever hole
lever_plate_hole = 12;
// case dimensions
// base frame box. reminder: top of inside (including mounts) is chopped by top_plate_z for plates
frame_x = 233;
frame_y = 208;
frame_z = 50;
// depth of the "lip" of the frame that the top plate sets into/supports the overhang
frame_wall = 4;
// per neutrik (mm)
neutrik_panel_thickness = 3;
// top plate, which can either be the whole plate ("inset") or the mounting frame for a plate that overhangs
top_plate_x = frame_x - (frame_wall * 2);
top_plate_y = frame_y - (frame_wall * 2);
top_plate_z = 5;
// how much the top plate x/y is expanded to overhang the frame
// note that this is relative to the top plate (so the wall is added back)
top_plate_overhang_amount = 8.5;
overhang_top_plate_x = top_plate_x + (frame_wall * 2) + (top_plate_overhang_amount * 2);
overhang_top_plate_y = top_plate_y + (frame_wall * 2) + (top_plate_overhang_amount * 2);
plate_to_frame_point_x = (top_plate_x/2)-10;
plate_to_frame_point_y = (top_plate_y/2)-10;
// frame interior that supports the top plates
panel_support_width = 5;
// neutrik D screw holes
neutrik_d_screw_radius = 1.6 + hole_tolerance;
neutrik_d_radius = 12 + hole_tolerance;
// additional button radius for decorative panels, etc.
decorative_radius_scale = 1.75;
jumbo_decorative_radius_scale = 2;
/* PARTS */
module m4_hole() {
cylinder(r=m4_bolt_radius, h=100, $fn=50, center=true);
}

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module base_left_frame() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module base_middle_frame() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module base_right_frame() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module solo_frame() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module button_24mm_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_plus_w_24mm_8_button_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_plus_w_30mm_and_sega_2p_plus_one_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_plus_w_30mm_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module sega_2p_6_button_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module sega_2p_plus_one_decorative_plate() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module jlf_dustwasher() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module lsx_nobi_dustwasher() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <misc-neutrik-d-plate.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <misc-neutrik-d-plate.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module neutrik_d_plate() {

82
src/parameters.scad Normal file
View File

@ -0,0 +1,82 @@
/* Copyright Brian Stephan 2023
*
* This file is part of the Buildable Stick System.
*
* The Buildable Stick System is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* The Buildable Stick System is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
// adjustments
hole_tolerance = 0.15;
// M2
m2_screw_selftap_radius = 0.95;
// M3
m3_screw_selftap_radius = 1.3;
// M4
m4_bolt_radius = 2 + hole_tolerance;
m4_bolt_countersink_radius = 6.1 + hole_tolerance;
m4_bolt_hex_exterior_radius = 3.6 + hole_tolerance;
// 24mm button
small_button_radius = 12 + hole_tolerance;
// 30mm button
big_button_radius = 15 + hole_tolerance;
// JLF mount dimensions
lever_mount_x = 53;
lever_mount_y = 95;
lever_mount_z = 2;
// standard lever hole
lever_plate_hole = 12;
// case dimensions
// base frame box. reminder: top of inside (including mounts) is chopped by top_plate_z for plates
frame_x = 233;
frame_y = 208;
frame_z = 50;
// depth of the "lip" of the frame that the top plate sets into/supports the overhang
frame_wall = 4;
// per neutrik (mm)
neutrik_panel_thickness = 3;
// top plate, which can either be the whole plate ("inset") or the mounting frame for a plate that overhangs
top_plate_x = frame_x - (frame_wall * 2);
top_plate_y = frame_y - (frame_wall * 2);
top_plate_z = 5;
// how much the top plate x/y is expanded to overhang the frame
// note that this is relative to the top plate (so the wall is added back)
top_plate_overhang_amount = 8.5;
overhang_top_plate_x = top_plate_x + (frame_wall * 2) + (top_plate_overhang_amount * 2);
overhang_top_plate_y = top_plate_y + (frame_wall * 2) + (top_plate_overhang_amount * 2);
plate_to_frame_point_x = (top_plate_x/2)-10;
plate_to_frame_point_y = (top_plate_y/2)-10;
// frame interior that supports the top plates
panel_support_width = 5;
// neutrik D screw holes
neutrik_d_screw_radius = 1.6 + hole_tolerance;
neutrik_d_radius = 12 + hole_tolerance;
// additional button radius for decorative panels, etc.
decorative_radius_scale = 1.75;
jumbo_decorative_radius_scale = 2;

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-inset-dir_arc-plus-w-30mm-plus-one.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_w_30mm_plus_one_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_inset_lever_and_dir_arc_w_30mm() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-inset-lever.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
// combine the lever mount and generic plate, with mounting holes

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module namco_noir_plus_one_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module namco_noir_plus_two_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-inset-sega-2p-plus-one-plus-control.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_inset_sega_2p_plus_one_plus_control() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module sega_2p_plus_one_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_left_lever_and_dir_arc_w_30mm() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
// combine the lever mount and generic plate, with mounting holes

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-middle-dir_arc-plus-w-30mm.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_middle_dir_arc_w_30mm() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-right-sega-2p-plus-one-plus-control-with-mount.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-right-sega-2p-plus-one-plus-control.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_right_sega_2p_plus_one_plus_control() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
use <top-panel-right-sega-2p-plus-one.scad>

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_right_sega_2p_plus_one() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_24mm_6_button_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module dir_arc_plus_w_24mm_8_button_panel() {

View File

@ -16,6 +16,7 @@
* the Buildable Stick System. If not, see <https://www.gnu.org/licenses/>.
*/
include <parameters.scad>
include <components.scad>
module top_panel_solo_lever_and_sega_2p_6_button() {