From: Ian Jackson Date: Thu, 2 Dec 2021 19:33:27 +0000 (+0000) Subject: adafruit-powerboost: sort out and revamp sizes etc. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a885f33ca1de84099c293375c143c3720e5926d1;p=reprap-play.git adafruit-powerboost: sort out and revamp sizes etc. Signed-off-by: Ian Jackson --- diff --git a/adafruit-powerboost-common.scad b/adafruit-powerboost-common.scad index 4fb9322..acbf33b 100644 --- a/adafruit-powerboost-common.scad +++ b/adafruit-powerboost-common.scad @@ -51,10 +51,9 @@ psu_z_down = psu_z + 0.1; psu_fix_sz = NutBox_outer_size(psu_board_nutbox); psu_board_nutbox_y = psu_sz[1]/2 + psu_board_nutbox[0]/2; -psu_mount_outer_sz = psu_sz + - [ psu_board_support_wall * 2, - max(psu_board_support_wall, - psu_board_nutbox_y + psu_fix_sz/2) ]; +psu_mount_outer_sz_x = psu_sz[0] + psu_board_support_wall * 2; // centred +psu_mount_outer_sz_y = psu_y + max(psu_board_support_wall, // at psu_y + psu_board_nutbox_y + psu_fix_sz/2); module PsuBoardRepresentation(){ linear_extrude(height= psu_th) @@ -228,10 +227,11 @@ module PsuMountTest() { ////toplevel translate([0, psu_y, psu_z]) PsuMountPositive(); difference(){ - linextr_x_yz(-(psu_sz[0]/2 + 5), - +(psu_sz[0]/2 + 5)){ + linextr_x_yz(-psu_mount_outer_sz_x/2, + +psu_mount_outer_sz_x/2) { difference(){ - rectfromto([0, -ceil], [psu_sz[1] + 10, psu_z + 10]); + rectfromto([0, -ceil], + [psu_mount_outer_sz_y, psu_z + 10]); rectfromto([ceil,0], 400*[1,1]); } } @@ -252,14 +252,23 @@ psu_initial_layer_thick = 0.400; psu_initial_layer_width = 0.750; psu_window_ledge = 0.50; // each side -module PsuMountTestFullLayerFrame(ix) { - sz = psu_sz*2 + [1,1]*psu_initial_layer_width*(3+ix); - translate([0, psu_y]) difference(){ - square(center=true, sz + 2*[1,1]*psu_initial_layer_width); - square(center=true, sz); +psu_frame_gap = 1.0; + +module PsuMountLayerFrame(bl, tr, ix) { + gap0 = [1,1] * (psu_frame_gap + psu_initial_layer_width*(ix+0)); + gap1 = [1,1] * (psu_frame_gap + psu_initial_layer_width*(ix+1)); + difference(){ + rectfromto(bl-gap1, tr+gap1); + rectfromto(bl-gap0, tr+gap0); } } +module PsuMountTestFullLayerFrame(ix) { + PsuMountLayerFrame([-0.5 * psu_mount_outer_sz_x, 0], + [+0.5 * psu_mount_outer_sz_x, + psu_mount_outer_sz_y], + ix); +} module PsuMountTestFullMain() { ////toplevel ceil = psu_test_ceil;