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
18 module TopSmallWallsPlan() {
19   for (m=[0,1]) {
20     mirror([m,0]) {
21       rectfromto([ -usb_w/2,              -0.01        ],
22                  [ -usb_w/2 + usb_wall_w, usb_tongue_d ]);
23     }
24   }
25 }
26 module BothSides(){
27   for (m=[0,1]) {
28     mirror([m,0]) {
29       children();
30     }
31   }
32 }
33 module TopCeilPlan() {
34   BothSides(){
35     rectfromto([ -usb_w/2,              -0.01        ],
36                [ 0.1,                   usb_tongue_d ]);
37     rectfromto([ -board_w/2 - side_wall_th, 0            ],
38                [ 0.1,                       -board_l     ]);
39   }
40 }
41 module TopMainWallsPlan() {
42   
43 }
44
45 module Top(){
46   linextr(0, usb_wall_h)
47     TopSmallWallsPlan();
48   linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
49     TopCeilPlan();
50 }
51
52 Top();