From e4ed2012aa9d48b80f1ccbf865830c5e78c1753e Mon Sep 17 00:00:00 2001
From: Jochen Vothknecht <jochen3120@gmail.com>
Date: Fri, 11 Mar 2022 03:39:19 +0100
Subject: [PATCH] Mocking the 2-pin terminal

---
 cad/CyanStripe/PCB.scad | 43 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 39 insertions(+), 4 deletions(-)

diff --git a/cad/CyanStripe/PCB.scad b/cad/CyanStripe/PCB.scad
index 53675a4..93bb814 100644
--- a/cad/CyanStripe/PCB.scad
+++ b/cad/CyanStripe/PCB.scad
@@ -41,7 +41,9 @@ co_y =  -8.6;
 
 
 module pcbScrewHoles(tz=0) {
-  for (tx=[-32.75, 5.75], ty=[-27.5, 27.5]) translate([tx, ty, tz]) children();
+  for (tx=[-32.75, 5.75], ty=[-27.5, 27.5]) 
+    translate([tx, ty, tz])
+      children();
 }
 
 module pcbOutline() {
@@ -69,9 +71,42 @@ module pcb3D(pcb_t=pcb_t()) {
           translate([0, 0, -$E*2]) cylinder(d=M3()-$E,   h=pcb_t()+4*$E);
         }
 
-    Solder()
-      translate([tpow_x(), tpow_y(), pcb_t() - $E])
-        cube([tpow_sx(), tpow_sy(), tpow_sz()], center=true);
+//    Solder()
+//      translate([tpow_x(), tpow_y(), pcb_t() - $E])
+//        cube([tpow_sx(), tpow_sy(), tpow_sz()], center=true);
+    translate([tpow_x(), tpow_y(), pcb_t() - $E])
+      terminal2();
+  }
+}
+
+
+// MP = measure precisely!
+
+t_h0 =  9.5;  // TODO: MP!
+t_h1 = 14.0;  // TODO: MP!
+t_l_sx = 5.5;  // TODO: MP!  // l = lever
+t_oh = 1.5;  // oh = overhang
+
+t2_sx = 11.0 + t_oh;
+t2_sy = 11.5;
+t2_l_sy = 8.5;  // TODO: MP!
+module terminal2() {
+  GreyPlastic() difference() {
+    union() {
+      translate([-t_oh/2, 0, 0])
+        linear_extrude(t_h0)
+          roundRect(t2_sx, t2_sy, 0.69, center=true);
+
+      translate([-t_oh/2, 0, 0])
+        linear_extrude(t_h1)
+          roundRect(t_l_sx, t2_l_sy, 1.337, center=true);
+    }
+
+    _ty = t2_sy * 1/4;
+    for (ty=[-_ty, _ty])
+      translate([-t2_sx/2, ty, t_h0/2])
+        rotate([0, -90, 0])
+          cylinder(d=3, h=8, center=true);
   }
 }
 
-- 
GitLab