summaryrefslogtreecommitdiff
path: root/mech
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-12-23 20:45:06 +0100
committerxengineering <me@xengineering.eu>2024-01-02 14:24:06 +0100
commitabea476c152f402622f30caace72f18fb219eaea (patch)
tree540ff2180a3c68b55c3652c5772f194eadf1243c /mech
parent51931398725207104fb61fa571c0c27b918285de (diff)
downloadsoundbox-abea476c152f402622f30caace72f18fb219eaea.tar
soundbox-abea476c152f402622f30caace72f18fb219eaea.tar.zst
soundbox-abea476c152f402622f30caace72f18fb219eaea.zip
mech: pcb_case: Fix bug if no sockets are given
Diffstat (limited to 'mech')
-rw-r--r--mech/pcb_case/shell.scad9
1 files changed, 5 insertions, 4 deletions
diff --git a/mech/pcb_case/shell.scad b/mech/pcb_case/shell.scad
index d60248b..ff34061 100644
--- a/mech/pcb_case/shell.scad
+++ b/mech/pcb_case/shell.scad
@@ -58,13 +58,14 @@ module pcb_case_shell(dim, t, h, sockets) {
union() {
shell_base(dim, t);
shell_connector(dim, t);
- for (socket = [0:len(sockets)-1]) {
- translate([sockets[socket][0], sockets[socket][1], 0])
+ for (socket = sockets) {
+ echo(socket=socket);
+ translate([socket[0], socket[1], 0])
cylinder(d=nut_d+2, h=h);
}
}
- for (socket = [0:len(sockets)-1]) {
- translate([sockets[socket][0], sockets[socket][1], 0]) {
+ for (socket = sockets) {
+ translate([socket[0], socket[1], 0]) {
cylinder(d=bolt_d, h=h);
cylinder(d=0.9*nut_d, h=nut_h);
}