chiark / gitweb /
yubikey-5c-nano-loop: wip
[reprap-play.git] / yubikey-5c-nano-loop.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 base = [ 8.4, 4.1 ];
6 base_th = 0.7;
7 base_slope = 2.0;
8
9 hoop_th = 2.4;
10 hoop_inner_dia = 2.5;
11
12 $fa = 3;
13 $fs = 0.1;
14
15 // caclulated
16
17 module Base() {
18   hull(){
19     linextr(-base_th, -base_th + 0.01)
20       square(base, center=true);
21     linextr(-base_th, 0) {
22       square(base - 2 * base_th * base_slope * [1,1], center=true);
23       for (m=[0,1]) {
24         mirror([m,0,0]) LoopPlan();
25       }
26     }
27   }
28 }
29
30 module LoopPlan() {
31   translate([hoop_inner_dia/2 + hoop_th/2, 0])
32     circle(r = hoop_th/2);
33 }
34
35 module Loop() {
36   intersection(){
37     rotate([90, 0,0]){
38       rotate_extrude(){
39         LoopPlan();
40       }
41     }
42     linextr(-0.1, hoop_inner_dia*2)
43       square(hoop_inner_dia*4, center=true);
44   }
45 }
46
47 module Whole() {
48   Base();
49   Loop();
50 }
51
52 Whole();