From d366fff3e59e4597546e9c956c0276ab5bcc59c1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 2 May 2023 16:40:37 +0100 Subject: [PATCH] yubikey-5c-nano-loop: posts Signed-off-by: Ian Jackson --- yubikey-5c-nano-loop.scad | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/yubikey-5c-nano-loop.scad b/yubikey-5c-nano-loop.scad index c410427..9c18dd9 100644 --- a/yubikey-5c-nano-loop.scad +++ b/yubikey-5c-nano-loop.scad @@ -16,15 +16,16 @@ $fs = 0.1; // caclulated +loop_post_z = hoop_inner_dia/2; +max_z = hoop_inner_dia + hoop_th; + 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); - for (m=[0,1]) { - mirror([m,0,0]) LoopPlan(); - } + LoopPlan2(); } } } @@ -34,20 +35,30 @@ module LoopPlan() { circle(r = hoop_th/2); } +module LoopPlan2() { + for (m=[0,1]) { + mirror([m,0,0]) LoopPlan(); + } +} + module Loop() { - intersection(){ - rotate([90, 0,0]){ - rotate_extrude(){ - LoopPlan(); + translate([0,0, loop_post_z]) { + intersection(){ + rotate([90, 0,0]){ + rotate_extrude(){ + LoopPlan(); + } } + linextr(-0.1, hoop_inner_dia*2) + square(hoop_inner_dia*4, center=true); } - linextr(-0.1, hoop_inner_dia*2) - square(hoop_inner_dia*4, center=true); } + linextr(0, loop_post_z) + LoopPlan2(); } module UseUpTime() { - linextr(-base_th, hoop_inner_dia/2 + hoop_th) + linextr(-base_th, max_z) translate([0, base[0] * 3, 0]) square(time_square, center=true); } -- 2.30.2