summaryrefslogtreecommitdiff
path: root/mech
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-01 23:22:23 +0100
committerxengineering <me@xengineering.eu>2024-01-02 15:16:53 +0100
commit84796898e32af3374f5e8ce22e686e04f6f6d11e (patch)
treebfe07a88bc76b9a0e572e12b0095f54a43338b8e /mech
parente9ec4e46cbf3b8a9f9fdefb6fa94dce23bc116f2 (diff)
downloadsoundbox-84796898e32af3374f5e8ce22e686e04f6f6d11e.tar
soundbox-84796898e32af3374f5e8ce22e686e04f6f6d11e.tar.zst
soundbox-84796898e32af3374f5e8ce22e686e04f6f6d11e.zip
mech: Add PCB-oriented parameters
The long term goal is to switch from case-oriented parameters to PCB-oriented parameters to simplify re-using the pcb_case library.
Diffstat (limited to 'mech')
-rw-r--r--mech/assembly.scad19
-rw-r--r--mech/parameters.scad22
2 files changed, 21 insertions, 20 deletions
diff --git a/mech/assembly.scad b/mech/assembly.scad
index 51338f7..12e68fd 100644
--- a/mech/assembly.scad
+++ b/mech/assembly.scad
@@ -5,24 +5,7 @@ use <pcb_case/shell.scad>
use <pcb_case/panel.scad>
module assembly() {
- base_drilling = [3.5, 3.5];
- dx = [23, 0];
- dy = [0, 58];
- pcb(
- dim=[30, 65, 1.4],
- drillings=[
- base_drilling,
- base_drilling + dx,
- base_drilling + dy,
- base_drilling + dx + dy
- ],
- margins=[
- [1, 1],
- [3.6, 1.7],
- [3.5, 27]
- ],
- t=2
- );
+ pcb(pcb_dim, drillings, margins, t);
pcb_case_shell_bottom(
dim, t, h, [
diff --git a/mech/parameters.scad b/mech/parameters.scad
index eb2d368..1cff75e 100644
--- a/mech/parameters.scad
+++ b/mech/parameters.scad
@@ -1,8 +1,26 @@
t = 2;
+
+pcb_dim = [30, 65, 1.4];
+
+margins = [
+ [1, 1],
+ [3.6, 1.7],
+ [3.5, 27]
+];
+
+base_drilling = [3.5, 3.5];
+dx = [23, 0];
+dy = [0, 58];
+drillings = [
+ base_drilling,
+ base_drilling + dx,
+ base_drilling + dy,
+ base_drilling + dx + dy
+];
+
+// TODO deprecated parameters
tol = 1;
base_socket = [3/2+2.3+2*t+tol,3/2+2.1+2.7+t+tol];
-dx = [28.9,0];
-dy = [0,58.1];
dim = [
base_socket[0] + dx[0] + 3/2 + 4 + 2*t + tol,
base_socket[1] + dy[1] + 3/2 + 2 + 0.9 + 6 + t + tol,