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_hole_pos = [ 2.05, // from back edge of psu_sz[0]
9                  0.55 * 0.5 * 25.4, // from centreline
10                  ];
11
12 psu_baffle_gap = 1.0 + 0.5;
13 psu_baffle_cnr_y = 7.45; // from connector end
14 psu_baffle_th = [ 0.8, 3.5 ];
15 psu_usbend_led_x = 4.5;
16 psu_innerend_led_depth = 10;
17
18 // ----- calculated -----
19
20 psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x;
21
22
23 module PsuLedBafflePlan(){
24   baffle_tr = [0, psu_baffle_cnr_y]
25     + 0.5 * [psu_baffle_th[1], psu_baffle_th[0]];
26   translate([0, -psu_sz[1]/2]) {
27     mirror([1,0,0]) {
28       rectfromto([-psu_baffle_th[1]/2, 0],
29                  baffle_tr);
30       rectfromto([-psu_sz[0]/2 - psu_board_support_wall *2,
31                   baffle_tr[1] - psu_baffle_th[0]],
32                  baffle_tr);
33     }
34   }
35 }
36
37 module PsuLedWindowsPlanCore(){
38   difference(){
39     union(){
40       AtPsuMountCorner(1,0) {
41         rectfromto([ -(psu_board_support_wall + 0.1),
42                      +psu_usbend_led_x ],
43                    [ psu_sz[0]/2,
44                      +psu_usbend_led_depth ]);
45       }
46       AtPsuMountCorner(0,0) {
47         sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0];
48         translate([0, psu_baffle_cnr_y])
49           rectfromto([ -(psu_board_support_wall + 0.1),
50                        -sz/2 ],
51                      [ psu_sz[0]/2,
52                        +sz/2 ]);
53       }
54       AtPsuMountCorner(0,1){
55         rectfromto([0,0],
56                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
57                      psu_innerend_led_depth]);
58       }
59     }
60     translate([0, -psu_sz[1]/2])
61       square(center=true, [psu_baffle_th[1], psu_sz[1]]);;
62   }
63 }