summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-01 22:55:21 +0100
committerxengineering <me@xengineering.eu>2024-01-02 15:16:53 +0100
commite9ec4e46cbf3b8a9f9fdefb6fa94dce23bc116f2 (patch)
tree789d86bfe87761cf16fc3df8766591782a4aa303
parenta3ef23906f2b71486d818fd06ca6ffb0c82e3b1c (diff)
downloadsoundbox-e9ec4e46cbf3b8a9f9fdefb6fa94dce23bc116f2.tar
soundbox-e9ec4e46cbf3b8a9f9fdefb6fa94dce23bc116f2.tar.zst
soundbox-e9ec4e46cbf3b8a9f9fdefb6fa94dce23bc116f2.zip
mech: Move from multiple to single production file
This makes the file structure simpler and makes it easy to produce the whole case in one run.
-rw-r--r--mech/assembly.scad23
-rw-r--r--mech/back.scad9
-rw-r--r--mech/bottom.scad18
-rw-r--r--mech/front.scad9
-rw-r--r--mech/mech.mk2
-rw-r--r--mech/production.scad34
-rw-r--r--mech/top.scad11
7 files changed, 50 insertions, 56 deletions
diff --git a/mech/assembly.scad b/mech/assembly.scad
index 3d5a5ec..51338f7 100644
--- a/mech/assembly.scad
+++ b/mech/assembly.scad
@@ -1,8 +1,8 @@
-use <bottom.scad>
-use <top.scad>
-use <back.scad>
-use <front.scad>
+include <parameters.scad>
+
use <pcb_case/pcb.scad>
+use <pcb_case/shell.scad>
+use <pcb_case/panel.scad>
module assembly() {
base_drilling = [3.5, 3.5];
@@ -24,10 +24,17 @@ module assembly() {
t=2
);
- bottom();
-// top();
- back();
-// front();
+ pcb_case_shell_bottom(
+ dim, t, h, [
+ base_socket,
+ base_socket + dx,
+ base_socket + dy,
+ base_socket + dx + dy
+ ]
+ );
+// pcb_case_shell_top(dim, t);
+ pcb_case_panel_back(dim, t);
+// pcb_case_panel_front(dim, t);
}
assembly();
diff --git a/mech/back.scad b/mech/back.scad
deleted file mode 100644
index ec9924e..0000000
--- a/mech/back.scad
+++ /dev/null
@@ -1,9 +0,0 @@
-include <parameters.scad>
-
-use <pcb_case/panel.scad>
-
-module back() {
- pcb_case_panel_back(dim, t);
-}
-
-rotate([0,90,0]) back();
diff --git a/mech/bottom.scad b/mech/bottom.scad
deleted file mode 100644
index f5d75a7..0000000
--- a/mech/bottom.scad
+++ /dev/null
@@ -1,18 +0,0 @@
-include <parameters.scad>
-
-use <pcb_case/shell.scad>
-
-module bottom() {
- union () {
- pcb_case_shell_bottom(
- dim, t, h, [
- base_socket,
- base_socket + dx,
- base_socket + dy,
- base_socket + dx + dy
- ]
- );
- }
-}
-
-bottom();
diff --git a/mech/front.scad b/mech/front.scad
deleted file mode 100644
index f079beb..0000000
--- a/mech/front.scad
+++ /dev/null
@@ -1,9 +0,0 @@
-include <parameters.scad>
-
-use <pcb_case/panel.scad>
-
-module front() {
- pcb_case_panel_front(dim, t);
-}
-
-rotate([0,90,0]) front();
diff --git a/mech/mech.mk b/mech/mech.mk
index b683a4d..4359796 100644
--- a/mech/mech.mk
+++ b/mech/mech.mk
@@ -1,7 +1,7 @@
PRINTER := anycubic_i3_mega_s
PRINTER_CONFIG := $(PRINTER:%=mech/prusa-slicer/%.ini)
MECH_BUILD_DIR := $(BUILD_DIR)/mech
-PARTS := bottom top back front pcb_case/tolerance_tests
+PARTS := production pcb_case/tolerance_tests
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)
diff --git a/mech/production.scad b/mech/production.scad
new file mode 100644
index 0000000..471b3c0
--- /dev/null
+++ b/mech/production.scad
@@ -0,0 +1,34 @@
+include <parameters.scad>
+
+use <pcb_case/shell.scad>
+use <pcb_case/panel.scad>
+
+module production() {
+ spacing = 5;
+
+ pcb_case_shell_bottom(
+ dim, t, h, [
+ base_socket,
+ base_socket + dx,
+ base_socket + dy,
+ base_socket + dx + dy
+ ]
+ );
+
+ translate([-spacing, 0, 0])
+ rotate([0, 180, 0])
+ translate([0, 0, -dim[2]])
+ pcb_case_shell_top(dim, t);
+
+ translate([-spacing, dim[1]+spacing, 0])
+ rotate([0, -90, 0])
+ translate([-t, -t, -t])
+ pcb_case_panel_back(dim, t);
+
+ translate([dim[0], dim[1]+spacing, 0])
+ rotate([0, -90, 0])
+ translate([2*t-dim[0], -t, -t])
+ pcb_case_panel_front(dim, t);
+}
+
+production();
diff --git a/mech/top.scad b/mech/top.scad
deleted file mode 100644
index 7922f70..0000000
--- a/mech/top.scad
+++ /dev/null
@@ -1,11 +0,0 @@
-include <parameters.scad>
-
-use <pcb_case/shell.scad>
-
-module top() {
- difference() {
- pcb_case_shell_top(dim, t);
- }
-}
-
-rotate([180,0,0]) top();