add physical case for USB hub
This commit is contained in:
parent
13c5469ba2
commit
4eb4a1993d
|
@ -0,0 +1,187 @@
|
|||
$fn=30;
|
||||
|
||||
BOARD_WIDTH=96.5;
|
||||
BOARD_HEIGHT=96.0;
|
||||
BOARD_THICKNESS=1.6;
|
||||
HOLE_NW_X=4.0;
|
||||
HOLE_NW_Y=4.0;
|
||||
HOLE_NE_X=92.5;
|
||||
HOLE_NE_Y=4.0;
|
||||
HOLE_SW_X=4.0;
|
||||
HOLE_SW_Y=92.0;
|
||||
HOLE_SE_X=92.5;
|
||||
HOLE_SE_Y=92.0;
|
||||
|
||||
WALL_SPACE=1.0;
|
||||
WALL_THICKNESS=2.0;
|
||||
HOLE_HEIGHT=15.0; // USB A is 14.5
|
||||
|
||||
module pillar() {
|
||||
translate([0,0,HOLE_HEIGHT/2]) {
|
||||
difference() {
|
||||
cylinder(h=HOLE_HEIGHT, d=6, center=true);
|
||||
cylinder(h=HOLE_HEIGHT, d=3.5, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mirror([1,0,0]) { // we used bottom view
|
||||
|
||||
// bottom plate
|
||||
cube([BOARD_WIDTH+2*WALL_SPACE+2*WALL_THICKNESS, BOARD_HEIGHT+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS]);
|
||||
|
||||
// screw mounts
|
||||
translate([WALL_THICKNESS+WALL_SPACE+HOLE_NW_X,WALL_THICKNESS+WALL_SPACE+HOLE_NW_Y,WALL_THICKNESS]) {
|
||||
pillar();
|
||||
}
|
||||
translate([WALL_THICKNESS+WALL_SPACE+HOLE_NE_X,WALL_THICKNESS+WALL_SPACE+HOLE_NE_Y,WALL_THICKNESS]) {
|
||||
pillar();
|
||||
}
|
||||
translate([WALL_THICKNESS+WALL_SPACE+HOLE_SW_X,WALL_THICKNESS+WALL_SPACE+HOLE_SW_Y,WALL_THICKNESS]) {
|
||||
pillar();
|
||||
}
|
||||
translate([WALL_THICKNESS+WALL_SPACE+HOLE_SE_X,WALL_THICKNESS+WALL_SPACE+HOLE_SE_Y,WALL_THICKNESS]) {
|
||||
pillar();
|
||||
}
|
||||
|
||||
// side
|
||||
MARGIN=1.0;
|
||||
USB_B_WIDTH=12.0+MARGIN;
|
||||
USB_B_HEIGHT=11.0+MARGIN;
|
||||
USB_A_WIDTH=7.0+MARGIN;
|
||||
USB_A_HEIGHT=14.5+MARGIN;
|
||||
BARREL_WIDTH=9.0+MARGIN;
|
||||
BARREL_HEIGHT=11.3+MARGIN;
|
||||
INDUCTOR_HEIGHT=7.5;
|
||||
|
||||
// side north
|
||||
difference() {
|
||||
cube([BOARD_WIDTH+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS, WALL_THICKNESS+HOLE_HEIGHT+BOARD_THICKNESS+INDUCTOR_HEIGHT]);
|
||||
// DFP 7 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+12.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 7 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+28-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
// DFP 6 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+40.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 6 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+56-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
// DFP 5 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+68.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 5 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+84-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
}
|
||||
|
||||
// side west
|
||||
difference() {
|
||||
cube([WALL_THICKNESS, BOARD_HEIGHT+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS+HOLE_HEIGHT+BOARD_THICKNESS+INDUCTOR_HEIGHT]);
|
||||
// USB B
|
||||
translate([0,WALL_THICKNESS+WALL_SPACE+48-USB_B_WIDTH/2,WALL_THICKNESS+HOLE_HEIGHT-USB_B_HEIGHT]) {
|
||||
cube([WALL_THICKNESS,USB_B_WIDTH,USB_B_HEIGHT]);
|
||||
}
|
||||
// 5V BARREL
|
||||
translate([0,WALL_THICKNESS+WALL_SPACE+33-BARREL_WIDTH/2,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([WALL_THICKNESS,BARREL_WIDTH,BARREL_HEIGHT]);
|
||||
}
|
||||
// 12V BARREL
|
||||
translate([0,WALL_THICKNESS+WALL_SPACE+63-BARREL_WIDTH/2,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([WALL_THICKNESS,BARREL_WIDTH,BARREL_HEIGHT]);
|
||||
}
|
||||
}
|
||||
|
||||
// side south
|
||||
translate([0,BOARD_HEIGHT+WALL_THICKNESS+2*WALL_SPACE,0]) {
|
||||
difference() {
|
||||
cube([BOARD_WIDTH+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS, WALL_THICKNESS+HOLE_HEIGHT+BOARD_THICKNESS+INDUCTOR_HEIGHT]);
|
||||
// DFP 1 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+27.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 1 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+12-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
// DFP 2 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+55.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 2 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+40-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
// DFP 3 USB A
|
||||
translate([WALL_THICKNESS+WALL_SPACE+83.5-USB_A_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([USB_A_WIDTH,WALL_THICKNESS,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 3 BARREL
|
||||
translate([WALL_THICKNESS+WALL_SPACE+68-BARREL_WIDTH/2,0,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([BARREL_WIDTH,WALL_THICKNESS,BARREL_HEIGHT]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// side east
|
||||
translate([BOARD_WIDTH+WALL_THICKNESS+2*WALL_SPACE,0,0]) {
|
||||
difference() {
|
||||
cube([WALL_THICKNESS, BOARD_HEIGHT+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS+HOLE_HEIGHT+BOARD_THICKNESS+INDUCTOR_HEIGHT]);
|
||||
// DFP 4 USB A
|
||||
translate([0,WALL_THICKNESS+WALL_SPACE+40.5-USB_A_WIDTH/2,WALL_THICKNESS+HOLE_HEIGHT-USB_A_HEIGHT]) {
|
||||
cube([WALL_THICKNESS,USB_A_WIDTH,USB_A_HEIGHT]);
|
||||
}
|
||||
// DFP 4 BARREL
|
||||
translate([0,WALL_THICKNESS+WALL_SPACE+56-BARREL_WIDTH/2,WALL_THICKNESS+HOLE_HEIGHT-BARREL_HEIGHT]) {
|
||||
cube([WALL_THICKNESS,BARREL_WIDTH,BARREL_HEIGHT]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// top plate
|
||||
SWITCH_WIDTH=3.0+0.5;
|
||||
SWITCH_LENGTH=6.0+0.5;
|
||||
|
||||
translate([0,0,WALL_THICKNESS+HOLE_HEIGHT+BOARD_THICKNESS+INDUCTOR_HEIGHT]) {
|
||||
difference() {
|
||||
cube([BOARD_WIDTH+2*WALL_SPACE+2*WALL_THICKNESS, BOARD_HEIGHT+2*WALL_SPACE+2*WALL_THICKNESS, WALL_THICKNESS]);
|
||||
// DFP 7
|
||||
translate([WALL_THICKNESS+WALL_SPACE+20.0, WALL_THICKNESS+WALL_SPACE+6.7,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 6
|
||||
translate([WALL_THICKNESS+WALL_SPACE+48.0, WALL_THICKNESS+WALL_SPACE+6.7,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 5
|
||||
translate([WALL_THICKNESS+WALL_SPACE+76.0, WALL_THICKNESS+WALL_SPACE+6.7,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 4
|
||||
translate([WALL_THICKNESS+WALL_SPACE+89.7, WALL_THICKNESS+WALL_SPACE+48.0,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_LENGTH, SWITCH_WIDTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 3
|
||||
translate([WALL_THICKNESS+WALL_SPACE+76.0, WALL_THICKNESS+WALL_SPACE+89.3,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 2
|
||||
translate([WALL_THICKNESS+WALL_SPACE+48.0, WALL_THICKNESS+WALL_SPACE+89.3,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
// DFP 1
|
||||
translate([WALL_THICKNESS+WALL_SPACE+20.0, WALL_THICKNESS+WALL_SPACE+89.3,WALL_THICKNESS/2]) {
|
||||
cube([SWITCH_WIDTH, SWITCH_LENGTH, WALL_THICKNESS], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="103mm"
|
||||
height="102mm"
|
||||
viewBox="-103 -102 103 102"
|
||||
version="1.1"
|
||||
id="svg4172"
|
||||
sodipodi:docname="top_plate.svg"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs4176" />
|
||||
<sodipodi:namedview
|
||||
id="namedview4174"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.0246119"
|
||||
inkscape:cx="362.08831"
|
||||
inkscape:cy="323.04914"
|
||||
inkscape:window-width="1916"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="37"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4172" />
|
||||
<title
|
||||
id="title4168">OpenSCAD Model</title>
|
||||
<path
|
||||
d=" M 0,-102 L -102.5,-102 L -102.5,-0 L 0,-0 z M -24.75,-89.05 L -24.75,-95.55 L -21.25,-95.55 L -21.25,-89.05 z M -52.75,-89.05 L -52.75,-95.55 L -49.25,-95.55 L -49.25,-89.05 z M -80.75,-89.05 L -80.75,-95.55 L -77.25,-95.55 L -77.25,-89.05 z M -95.95,-49.25 L -95.95,-52.75 L -89.45,-52.75 L -89.45,-49.25 z M -24.75,-6.45 L -24.75,-12.95 L -21.25,-12.95 L -21.25,-6.45 z M -52.75,-6.45 L -52.75,-12.95 L -49.25,-12.95 L -49.25,-6.45 z M -80.75,-6.45 L -80.75,-12.95 L -77.25,-12.95 L -77.25,-6.45 z "
|
||||
stroke="black"
|
||||
fill="lightgray"
|
||||
stroke-width="0.5"
|
||||
id="path4170"
|
||||
style="stroke:#ff0000;fill:none" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue