chiark / gitweb /
yubikey-5c-nano-loop: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 May 2023 14:43:59 +0000 (15:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 May 2023 14:43:59 +0000 (15:43 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
yubikey-5c-nano-loop.scad [new file with mode: 0644]

diff --git a/yubikey-5c-nano-loop.scad b/yubikey-5c-nano-loop.scad
new file mode 100644 (file)
index 0000000..5594ec2
--- /dev/null
@@ -0,0 +1,41 @@
+// -*- C -*-
+
+include <utils.scad>
+
+base = [ 8.4, 4.1 ];
+base_th = 0.7;
+base_slope = 2.0;
+
+hoop_th = 2.8;
+hoop_inner_dia = 2.5;
+
+// caclulated
+
+module Base() {
+  hull(){
+    linextr(-base_th, -base_th + 0.01)
+      square(base, center=true);
+    linextr(-base_th, 0)
+      square(base - 2 * base_th * base_slope * [1,1], center=true);
+  }
+}
+
+module Loop() {
+  intersection(){
+    rotate([90, 0,0]){
+      rotate_extrude(){
+       translate([hoop_inner_dia/2 + hoop_th/2, 0])
+         circle(r = hoop_th/2);
+      }
+    }
+    linextr(-0.1, hoop_inner_dia*2)
+      square(hoop_inner_dia*4, center=true);
+  }
+}
+
+module Whole() {
+  Base();
+  Loop();
+}
+
+Whole();