aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-09-08 15:53:58 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-09-08 15:53:58 +0200
commitc380946750613f9ace78919154a30f00f175ee1e (patch)
treef9a7dcffc4c54e0131f4228746f18118cd3bdaa5
parent24c61f008c912f21125d612f4e0761c058ee53ed (diff)
downloadoscad_gridfinity-c380946750613f9ace78919154a30f00f175ee1e.tar.gz
gitignore
-rw-r--r--.gitignore1
-rw-r--r--psu.scad62
2 files changed, 63 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 2deeaa0..24d2518 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.gcode
*.3mf
+*.stl
stlout/
pngout/
diff --git a/psu.scad b/psu.scad
new file mode 100644
index 0000000..a2e8fda
--- /dev/null
+++ b/psu.scad
@@ -0,0 +1,62 @@
+use <gridfinity.scad>
+
+$fn = $preview ? 10 : 50;
+
+// preview offset
+po = $preview ? 0.01 : 0;
+
+tol = 0.5;
+
+ux = 3;
+uy = 1;
+uz = 8;
+
+module_x = 72 + tol;
+module_y = 39 + tol;
+module_clip_width = 12 + tol;
+
+plug_r = 4 + tol;
+
+plug_distance = 19;
+
+usb_x = 11.6 + tol;
+usb_y = 21.5 + tol;
+usb_z = 1 + tol;
+
+module module_negative() {
+ rotate([90,0,0]) linear_extrude(5) {
+ translate([-2, module_y/2 - module_clip_width/2]) square([2,module_clip_width]);
+ translate([module_x,module_y/2 - module_clip_width/2]) square([2,module_clip_width]);
+ square([module_x,module_y]);
+ }
+}
+
+module plug_negative() {
+ rotate([90,0,0]) linear_extrude(5) circle(plug_r);
+}
+
+module usb_inset() {
+ translate([0,0,0]) difference() {
+ linear_extrude(2) offset(delta=1) square([usb_x,usb_y]);
+ translate([0,0,1+po]) linear_extrude(1) square([usb_x,usb_y]);
+ }
+}
+
+module usb_hole_negative() {
+ translate([-1,-5,0]) cube([usb_x+2,5,8]);
+}
+
+usb_location = [100,0,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();
+ }
+}
+
+translate(concat(gf_inner_origin(), [gf_inner_bottom()]))
+ translate(usb_location) usb_inset();