X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=rs485-case%2Fcase.scad;h=92d83beed4fd231749b8741a6772a0fee75264ca;hb=refs%2Fheads%2Fmaster;hp=ff3910335c1e9d291fb6ad4d2fdb9d7bb0ec698d;hpb=f2257cc53adabed663b91dde227602442794a481;p=home-hw.git diff --git a/rs485-case/case.scad b/rs485-case/case.scad index ff39103..92d83be 100644 --- a/rs485-case/case.scad +++ b/rs485-case/case.scad @@ -1,6 +1,6 @@ wall_thickness = 1.5; -pcb_length = 53.5; +pcb_length = 54; pcb_width = 18.5; pcb_thickness = 1; pcb_depth = 3; @@ -9,7 +9,10 @@ pcb_rail_width = 1; box_height = 12; box_depth = pcb_thickness + pcb_depth; -usb_width = 10.5; +lid_rail_width = 1; +lid_rail_height = 1.5; + +usb_width = 12.2; usb_height = 11; rs485_width = 16.5; @@ -31,7 +34,7 @@ module bottom() { // USB connector hole translate([pcb_length-over, (pcb_width-usb_width)/2, 0]) - cube([wall_thickness+2, usb_width, box_height+over]); + cube([wall_thickness+2*over, usb_width, box_height+over]); // RS485 connector hole translate([-wall_thickness-over, (pcb_width-rs485_width)/2, 0]) @@ -42,11 +45,11 @@ module bottom() { cube([pcb_length, pcb_width, pcb_thickness+over]); // Sub-PCB holes - translate([0, pcb_rail_width, -pcb_thickness-pcb_depth]) + translate([pcb_length - 10, pcb_rail_width, -pcb_thickness-pcb_depth]) cube([10, pcb_width - 2*pcb_rail_width, pcb_thickness + pcb_depth + over]); - translate([24, pcb_rail_width, -pcb_thickness-pcb_depth]) + translate([pcb_length - 33, pcb_rail_width, -pcb_thickness-pcb_depth]) cube([9, pcb_width - 2*pcb_rail_width, pcb_thickness + pcb_depth + over]); - translate([pcb_length - 9, pcb_rail_width, -pcb_thickness-pcb_depth]) + translate([1, pcb_rail_width, -pcb_thickness-pcb_depth]) cube([8, pcb_width - 2*pcb_rail_width, pcb_thickness + pcb_depth + over]); } } @@ -58,6 +61,12 @@ module top() { translate([-wall_thickness, -wall_thickness, 0]) cube([pcb_length + 2*wall_thickness, pcb_width + 2*wall_thickness, wall_thickness]); + // Rails + translate([0, 0, -lid_rail_height]) + cube([pcb_length, lid_rail_width, lid_rail_height + over]); + translate([0, pcb_width - lid_rail_width, -lid_rail_height]) + cube([pcb_length, lid_rail_width, lid_rail_height + over]); + // USB connector roof translate([pcb_length, (pcb_width - usb_width)/2 + clearance, usb_height - box_height + clearance]) cube([wall_thickness, usb_width - 2*clearance, box_height - usb_height - clearance + over]); @@ -89,5 +98,5 @@ module top() { } } -color([0.7, 0, 0]) bottom(); -color([0, 1, 0]) translate([0, 0, box_height]) top(); +bottom(); +color([1, 0, 0]) translate([0, 0, box_height]) top();