From 47866365de66e97d698379d1e6788bcf7463a901 Mon Sep 17 00:00:00 2001
From: Jochen Vothknecht <jochen3120@gmail.com>
Date: Mon, 28 Feb 2022 00:49:42 +0100
Subject: [PATCH] Really abandoning the clip but needs a little more fine
 tuning to be printable

---
 pcb/10W/TransportProtection.scad | 87 ++++++++++++++++++++++++++------
 1 file changed, 72 insertions(+), 15 deletions(-)

diff --git a/pcb/10W/TransportProtection.scad b/pcb/10W/TransportProtection.scad
index 86f3645..7366744 100644
--- a/pcb/10W/TransportProtection.scad
+++ b/pcb/10W/TransportProtection.scad
@@ -60,18 +60,6 @@ module body(wi, hi, ri, height=pcb_t, off=pcb_off, _str=box_str) {
 }
 
 
-module outerRing(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off, _str=box_str) {
-
-  s2 = _str/2;
-
-  difference() {
-    pcb3D(w,    h,    r, off=off);
-    pcb3D(w-s2, h-s2, r, off=off);
-  }
-}
-
-translate([0, 0, 10]) outerRing();
-
 module PCBMockUp(w=pcb_w, h=pcb_h, r=pcb_r, off_xy=pcb_sc_off) {
   
   w2 = w / 2;
@@ -85,6 +73,11 @@ module PCBMockUp(w=pcb_w, h=pcb_h, r=pcb_r, off_xy=pcb_sc_off) {
 }
 
 
+
+// WARNIN: The clip is in an abandoned state at the time.
+// Code will stay here only for reference for future projects
+// reason: I don't really see my printer doing this itty-gritty kinda stuff
+
 // TODO: is "rastnase" really "clip" in english???
 
 // The female form of the clip connection
@@ -104,14 +97,78 @@ module clipReceptacle(w=10, h=3, d=2) {
   ]);
   
 }
-
 // clipReceptacle();
 
 
-body(pcb_w, pcb_h, pcb_r);
+module minkowskiDemonstration() {
+  translate([-100, 0, 0]) {
+    color([10 /255, 230 /255, 20 /255]) {
+      cube([50, 20, 10]);
+      cylinder(d1=0, d2=10, h=5);
+    }
+
+    translate([0, 0, 15]) minkowski() {
+      cube([50, 20, 10]);
+      cylinder(d1=0, d2=10, h=5);
+    }
+  }
+}
+
+
+module outerRing(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off, _str=box_str) {
+
+  s2 = _str/2;
+
+  difference() {
+    pcb3D(w,    h,    r, off=off);
+    pcb3D(w-s2, h-s2, r, off=off);
+  }
+}
+
+
+module outerRingTop(w, h, r, off, _str) {
+  minkowski() {
+    outerRing(w, h, r, off, _str);
+    cylinder(d1=0, d2=3, h=3, $fs=1.0, $fa=0.7);
+  }
+}
+
+
+
+module TransportProtection(w=pcb_w, h=pcb_h, r=pcb_r, height=pcb_t, off=pcb_off, _str=box_str) {
+
+  _h = height + 2;
+
+  difference() {
+    body(w, h, r, _h, off, _str);
+
+    translate([0, 0, _h-2]) outerRingTop(w, h, r, off, _str);
+
+    translate([0, 0, 3]) rotate([0, 180, 0]) outerRingTop(w, h, r, _str+1, _str);
+
+  }
 
-translate([0, 0,box_str]) PCBMockUp();
+}
 
 
+/*translate([0, 0, 10]) minkowski() {
+  outerRing();
+  cylinder(d1=0, d2=3, h=3, $fs=1.0, $fa=0.5);
+}*/
+
+
+if ($preview) {
+  
+  // translate([0, 0,box_str]) PCBMockUp();
+
+  TransportProtection();
+
+  // minkowskiDemonstration();
+
+} else {
+  
+  TransportProtection();
+  
+}
 
 
-- 
GitLab