chiark / gitweb /
adafruit-powerboost: wip common
[reprap-play.git] / adafruit-powerboost-500.scad
1 // -*- C -*-
2
3 psu_sz_nom = [ 21.59, 35.56 ];
4
5 //// toplevels-from:
6 include <adafruit-powerboost-common.scad>
7
8 psu_baffle_cnr_y = 7.45; // from connector end
9 psu_baffle_th = [ 0.8, 3.5 ];
10 psu_usbend_led_x = 4.5;
11 psu_innerend_led_depth = 10;
12
13 // ----- calculated -----
14
15 psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x;
16
17
18 module PsuLedBafflePlan(){
19   baffle_tr = [0, psu_baffle_cnr_y]
20     + 0.5 * [psu_baffle_th[1], psu_baffle_th[0]];
21   translate([0, -psu_sz[1]/2]) {
22     mirror([1,0,0]) {
23       rectfromto([-psu_baffle_th[1]/2, 0],
24                  baffle_tr);
25       rectfromto([-psu_sz[0]/2 - psu_board_support_wall *2,
26                   baffle_tr[1] - psu_baffle_th[0]],
27                  baffle_tr);
28     }
29   }
30 }
31
32 module PsuLedWindowsPlanCore(){
33   difference(){
34     union(){
35       AtPsuMountCorner(1,0) {
36         rectfromto([ -(psu_board_support_wall + 0.1),
37                      +psu_usbend_led_x ],
38                    [ psu_sz[0]/2,
39                      +psu_usbend_led_depth ]);
40       }
41       AtPsuMountCorner(0,0) {
42         sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0];
43         translate([0, psu_baffle_cnr_y])
44           rectfromto([ -(psu_board_support_wall + 0.1),
45                        -sz/2 ],
46                      [ psu_sz[0]/2,
47                        +sz/2 ]);
48       }
49       AtPsuMountCorner(0,1){
50         rectfromto([0,0],
51                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
52                      psu_innerend_led_depth]);
53       }
54     }
55     translate([0, -psu_sz[1]/2])
56       square(center=true, [psu_baffle_th[1], psu_sz[1]]);;
57   }
58 }