chiark / gitweb /
digispark-with-cable: wip
[reprap-play.git] / digispark-with-cable.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 //tongue_w = 11.92 + 0.4;
6
7 usb_w = 12.01 - 0.3;
8 usb_wall_w = 0.75 - 0.1;
9 usb_tongue_d = 8.97 - 0.2;
10 usb_wall_h = 4.54 - 2.04;
11 usb_ceil_th = 0.125;
12
13 side_wall_th = 1.5;
14
15 board_l = 13.56 + 0.2;
16 board_w = 19.14 + 0.2;
17 board_th = 1.92 + 0.1;
18
19 module BothSides(){
20   for (m=[0,1]) {
21     mirror([m,0]) {
22       children();
23     }
24   }
25 }
26 module TopSmallWallsPlan() {
27   for (m=[0,1]) {
28     mirror([m,0]) {
29       rectfromto([ -usb_w/2,              -0.01        ],
30                  [ -usb_w/2 + usb_wall_w, usb_tongue_d ]);
31     }
32   }
33 }
34 module TopCeilPlan() {
35   BothSides(){
36     rectfromto([ -usb_w/2,              -0.01        ],
37                [ 0.1,                   usb_tongue_d ]);
38     rectfromto([ -board_w/2 - side_wall_th, 0            ],
39                [ 0.1,                       -board_l     ]);
40   }
41 }
42 module TopMainWallsPlan() {
43   BothSides(){
44     rectfromto([ -board_w/2 - side_wall_th, 0            ],
45                [ -board_w/2,                -board_l     ]);
46   }
47 }
48
49 module Top(){
50   linextr(0, usb_wall_h)
51     TopSmallWallsPlan();
52   linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
53     TopCeilPlan();
54   linextr(-board_th, usb_wall_h)
55     TopMainWallsPlan();
56 }
57
58 Top();