From 471dbd8d1d578ad6d2d558c1c1bb2e39d589f070 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 14 Sep 2024 19:34:30 +0200 Subject: psu --- Makefile | 3 +++ psu.scad | 35 +++++++++++++++++++++++++---------- psu_cover.scad | 2 ++ psu_lid.scad | 2 ++ psu_main.scad | 2 ++ 5 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 psu_cover.scad create mode 100644 psu_lid.scad create mode 100644 psu_main.scad diff --git a/Makefile b/Makefile index a127a6e..0cd82e9 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,9 @@ stl: $(STLDIR) $(STL) $(STLDIR)/gridfinity.stl: gridfinity.scad @echo +$(STLDIR)/psu.stl: $(BITSTORAGE_SIZES) + @echo + $(STLDIR)/bitstorage_%.stl: bitstorage.scad @echo [ STL ] $< $* @$(SCAD) $(STLOPTS) \ diff --git a/psu.scad b/psu.scad index a2e8fda..4e0ae8c 100644 --- a/psu.scad +++ b/psu.scad @@ -23,6 +23,8 @@ usb_x = 11.6 + tol; usb_y = 21.5 + tol; usb_z = 1 + tol; +usb_location = [100,0,0]; + module module_negative() { rotate([90,0,0]) linear_extrude(5) { translate([-2, module_y/2 - module_clip_width/2]) square([2,module_clip_width]); @@ -46,17 +48,30 @@ module usb_hole_negative() { translate([-1,-5,0]) cube([usb_x+2,5,8]); } -usb_location = [100,0,0]; +module psu_lid() { + gridfinity(ux, uy, 1, lip=true, magnets=false, fill = false, bottom_height = 0); +} -difference() { - gridfinity(ux, uy, uz, lip=true, magnets=false, fill = false, bottom_height = 0); - translate(concat(gf_inner_origin(), [gf_inner_bottom()])) { - translate([5,0,10]) module_negative(); - translate([90,0,15]) plug_negative(); - translate([90,0,15+plug_distance]) plug_negative(); - translate(usb_location) usb_hole_negative(); +module psu_cover() { + difference() { + gridfinity(ux, uy, uz + 1, lip=true, magnets=false, fill = false, bottom_height = 0); + translate(concat(gf_inner_origin(), [gf_inner_bottom()])) { + translate([0,-5,0]) cube([gf_inner(ux),5,gf_top(uz+1)-gf_inner_bottom() + 5]); + } } } -translate(concat(gf_inner_origin(), [gf_inner_bottom()])) - translate(usb_location) usb_inset(); +module psu_main() { + difference() { + gridfinity(ux, uy, uz, lip=true, magnets=false, fill = false, bottom_height = 0); + translate(concat(gf_inner_origin(), [gf_inner_bottom()])) { + translate([5,0,10]) module_negative(); + translate([90,0,15]) plug_negative(); + translate([90,0,15+plug_distance]) plug_negative(); + translate(usb_location) usb_hole_negative(); + } + } + + translate(concat(gf_inner_origin(), [gf_inner_bottom()])) + translate(usb_location) usb_inset(); +} diff --git a/psu_cover.scad b/psu_cover.scad new file mode 100644 index 0000000..f870e6a --- /dev/null +++ b/psu_cover.scad @@ -0,0 +1,2 @@ +use +psu_cover(); diff --git a/psu_lid.scad b/psu_lid.scad new file mode 100644 index 0000000..c2b1484 --- /dev/null +++ b/psu_lid.scad @@ -0,0 +1,2 @@ +use +psu_lid(); diff --git a/psu_main.scad b/psu_main.scad new file mode 100644 index 0000000..9b45138 --- /dev/null +++ b/psu_main.scad @@ -0,0 +1,2 @@ +use +psu_main(); -- cgit v1.2.3