From 0bd307947afe8fc556898ce9b2505859b359af3a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 23 Nov 2019 21:35:58 +0100 Subject: [PATCH] RS485 case: v1.1 --- rs485-case/case.scad | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) 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(); -- 2.39.5