]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB Case: Tuning parameters...
authorMartin Mares <mj@ucw.cz>
Sat, 29 Feb 2020 17:15:12 +0000 (18:15 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 29 Feb 2020 17:15:12 +0000 (18:15 +0100)
bsb/case/case.scad

index 6298e511a4c0b270f5dcb37e0873d34ac9697eaf..b5b75fc986c4a93c1a2409c142987d177b5789c0 100644 (file)
@@ -1,13 +1,13 @@
 // x,y is [0,0] at near left PCB screw
 // z=0 is the bottom of the PCB
 
-wall_thickness = 1.5;
-front_panel_thickness = 1.2;
+wall_thickness = 1.8;
+front_panel_thickness = 1.35;
 
 // Measured between PCB screws
 pcb_width = 66;                // x
 pcb_length = 58.4;     // y
-screw_inside_diam = 2;
+screw_inside_diam = 2.5;
 screw_outside_diam = 5;
 
 // From screws to PCB edges
@@ -45,8 +45,8 @@ holder_tail_depth = 14;
 
 // Lid
 lid_thickness = 2;
-lid_screw_thickness = 3;
-lid_screw_head_diam = 5.8;
+lid_screw_thickness = 3.2;
+lid_screw_head_diam = 6;
 lid_screw_head_height = 2.8;
 lid_screw_holder_height = 4;   // includes lid_thickness
 // we want lid_screw_holder_height + (holder_depth + holder_tail_depth)/2 >= screw length (13 mm)
@@ -146,6 +146,14 @@ module lid_screw_hole() {
                cylinder(h = lid_screw_head_height + over, d1 = lid_screw_thickness, d2 = lid_screw_head_diam);
 }
 
+module lid_text(overshoot = 0) {
+       translate([pcb_width / 2, 10, -text_depth/2])
+       rotate(0)
+       scale([0.8, 0.8, 1])
+               linear_extrude(text_depth + overshoot, center = true)
+               text("USB – BSB", font = "Liberation Serif", halign="center");
+}
+
 module lid() {
        difference() {
                union() {
@@ -173,13 +181,10 @@ module lid() {
                        lid_screw_hole();
 
                // Text
-               translate([pcb_width / 2, 10, -text_depth/2])
-               rotate(0)
-               scale([0.8, 0.8, 1])
-                       linear_extrude(text_depth + over, center = true)
-                       text("USB – BSB", font = "Liberation Serif", halign="center");
+               lid_text(over);
        }
 }
 
 bottom();
-color([1, 0, 0]) translate([0, 0, box_height]) lid();
+// color([1, 0, 0]) translate([0, 0, box_height]) lid();
+// color([0, 0, 1]) translate([0, 0, box_height]) lid_text(0);