From cf9852c42d8eb3f0bd1d813dfd3327ac2c0cadd4 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Sat, 28 Dec 2024 17:12:55 +0100 Subject: [PATCH] style --- psu-mount.scad | 75 +++++++++++++++++----------------------- umc404_mount.scad | 88 +++++++++++++++++++++-------------------------- 2 files changed, 72 insertions(+), 91 deletions(-) diff --git a/psu-mount.scad b/psu-mount.scad index c45c73e..f599268 100644 --- a/psu-mount.scad +++ b/psu-mount.scad @@ -7,43 +7,38 @@ height=50 + thickness; off=10; hole_dist=15; -module wall() -{ - cube([thickness, depth, height]); +module wall() { + cube([thickness, depth, height]); - translate([0,0,height]) - difference() - { - hull() { - cube([thickness, depth, thickness]); + translate([0,0,height]) + difference() { + hull() { + cube([thickness, depth, thickness]); - translate([-off, depth/2-hole_dist, 0]) - cylinder(h=thickness, d=5, $fn=64); - translate([-off, depth/2+hole_dist, 0]) - cylinder(h=thickness, d=5, $fn=64); - } + translate([-off, depth/2-hole_dist, 0]) + cylinder(h=thickness, d=5, $fn=64); + translate([-off, depth/2+hole_dist, 0]) + cylinder(h=thickness, d=5, $fn=64); + } - translate([-off, depth/2-hole_dist, 0]) - cylinder(h=thickness, d=2, $fn=64); - translate([-off, depth/2+hole_dist, 0]) - cylinder(h=thickness, d=2, $fn=64); + translate([-off, depth/2-hole_dist, 0]) + cylinder(h=thickness, d=2, $fn=64); + translate([-off, depth/2+hole_dist, 0]) + cylinder(h=thickness, d=2, $fn=64); - translate([-off, depth/2-hole_dist, 0]) - cylinder(h=2, d=4, $fn=64); - translate([-off, depth/2+hole_dist, 0]) - cylinder(h=2, d=4, $fn=64); + translate([-off, depth/2-hole_dist, 0]) + cylinder(h=2, d=4, $fn=64); + translate([-off, depth/2+hole_dist, 0]) + cylinder(h=2, d=4, $fn=64); } - } // sides -difference() -{ - wall(); +difference() { + wall(); - translate([0, depth/2, height/2]) + translate([0, depth/2, height/2]) cube([10, 65, 40], center=true); - } translate([width, 0, 0]) @@ -53,28 +48,22 @@ wall(); // base cube([width, depth, thickness]); -module wall2() -{ -difference() -{ -cube([width, thickness, 10]); +module wall2() { + difference() { + cube([width, thickness, 10]); - translate([37.5+thickness, 6, 4+thickness]) - rotate([90,0,0]) - cylinder(h=4, d=6, $fn=64); - - translate([127.5+thickness, 6, 4+thickness]) - rotate([90,0,0]) - cylinder(h=4, d=6, $fn=64); + translate([37.5+thickness, 6, 4+thickness]) + rotate([90,0,0]) + cylinder(h=4, d=6, $fn=64); + translate([127.5+thickness, 6, 4+thickness]) + rotate([90,0,0]) + cylinder(h=4, d=6, $fn=64); + } } -} - wall2(); - translate([0, depth, 0]) mirror([0,1,0]) wall2(); - diff --git a/umc404_mount.scad b/umc404_mount.scad index f584529..bd07ee9 100644 --- a/umc404_mount.scad +++ b/umc404_mount.scad @@ -14,62 +14,54 @@ cube([10+2, thickness, height+thickness]); translate([-2, 0, 0]) cube([2, depth, height+thickness]); -translate([0,0,height]) -{ +translate([0,0,height]) { + difference() { + hull() { + translate([-5, 2*depth/3,0]) + cylinder(h=thickness, d=10, $fn=64); - difference() - { - hull() { - translate([-5, 2*depth/3,0]) - cylinder(h=thickness, d=10, $fn=64); + translate([-5, 1*depth/3,0]) + cylinder(h=thickness, d=10, $fn=64); - translate([-5, 1*depth/3,0]) - cylinder(h=thickness, d=10, $fn=64); + translate([-1, 4*depth/5,0]) + cylinder(h=thickness, d=2, $fn=64); - - translate([-1, 4*depth/5,0]) - cylinder(h=thickness, d=2, $fn=64); - - translate([-1, 1*depth/5,0]) - cylinder(h=thickness, d=2, $fn=64); - } + translate([-1, 1*depth/5,0]) + cylinder(h=thickness, d=2, $fn=64); + } translate([-6, 2*depth/3, 0]) - cylinder(h=thickness, d=2, $fn=64); + cylinder(h=thickness, d=2, $fn=64); - translate([-6, 2*depth/3, 0]) - cylinder(h=2, d=4, $fn=64); + translate([-6, 2*depth/3, 0]) + cylinder(h=2, d=4, $fn=64); - translate([-6, 1*depth/3, 0]) - cylinder(h=thickness, d=2, $fn=64); + translate([-6, 1*depth/3, 0]) + cylinder(h=thickness, d=2, $fn=64); - translate([-6, 1*depth/3, 0]) - cylinder(h=2, d=4, $fn=64); - - } -} - -// back screw -translate([0,depth+thickness,height]) -{ - difference() - { - hull() { - translate([5,5,0]) - cylinder(h=thickness, d=5, $fn=64); - - translate([0.5, 0,0]) - cylinder(h=thickness, d=thickness, $fn=64); - - translate([10-thickness/2, 0,0]) - cylinder(h=thickness, d=thickness, $fn=64); - } - - translate([5, 4, 0]) - cylinder(h=thickness, d=2, $fn=64); - - translate([5, 4, 0]) - cylinder(h=2, d=4, $fn=64); + translate([-6, 1*depth/3, 0]) + cylinder(h=2, d=4, $fn=64); } } +// back screw +translate([0,depth+thickness,height]) { + difference() { + hull() { + translate([5,5,0]) + cylinder(h=thickness, d=5, $fn=64); + + translate([0.5, 0,0]) + cylinder(h=thickness, d=thickness, $fn=64); + + translate([10-thickness/2, 0,0]) + cylinder(h=thickness, d=thickness, $fn=64); + } + + translate([5, 4, 0]) + cylinder(h=thickness, d=2, $fn=64); + + translate([5, 4, 0]) + cylinder(h=2, d=4, $fn=64); + } +}