Please visit http://OpenSCAD.DIY3DTech.com for more information on this and many other projects! As in this episode we will be designing a parametric dual socket electrical utility box in Open SCAD. Plenty of handy Open SCAD tips and tricks to be found here! Also our follow episode will be the cover too!
Warning line voltages can kill, use care with working with electricity and ensure you DO NOT use conductive material for any project which electricity.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
/* * Open SCAD Name.: Utility Box * Copyright (c)..: 2016 www.DIY3DTech.com * * Creation Date..:04/15/2016 * Discription....: Dual utility box * * Rev 1: Developed Model * Rev 2: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If used commercially attribution is required (OpenSCAD.DIY3DTech.com) * */ /*------------------Customizer View-------------------*/ // None /*---------------------Parameters---------------------*/ Box_Height = 92.5; //y axis Box_Width = 102; //x axis Box_Depth = 60; //z axis Box_Thickness = 3; Peg_Size = 8; Peg_Opening = 3.3; Peg_Offset = 46; Tab_Width = 20; Tab_Length = 20; Lug_Dia = 9; /*-----------------------Execute----------------------*/ utility_box(); /*-----------------------Modules----------------------*/ module utility_box(){ union(){ difference() { //create outer box cube(size = [Box_Width+(Box_Thickness*2),Box_Height+(Box_Thickness*2),Box_Depth+(Box_Thickness*1)], center = true); //create inter-box (hole) translate([0,0,(Box_Thickness/2)+0.5]) cube(size = [Box_Width,Box_Height,Box_Depth+0.5], center = true); //create lug offset translate ([-(Box_Width/2),0,-(Box_Depth/2)+((Lug_Dia/2)+(Box_Thickness*2))]) rotate ([90,0,90]) cylinder(Box_Thickness*4, Lug_Dia/2,Lug_Dia/2, center=true); }//end differance difference() { //create solid pegs union(){ //upper left translate ([Peg_Offset/2,(Box_Height/2)-4,0]) cylinder(Box_Depth+(Box_Thickness), Peg_Size/2, Peg_Size/2, center=true); translate ([Peg_Offset/2,(Box_Height/2)-2,0]) cube(size=[Peg_Size,Peg_Size/2,Box_Depth+(Box_Thickness)], center=true); //lower left translate ([Peg_Offset/2,-(Box_Height/2)+4,0]) cylinder(Box_Depth+(Box_Thickness), Peg_Size/2, Peg_Size/2, center=true); translate ([Peg_Offset/2,-(Box_Height/2)+2,0]) cube(size=[Peg_Size,Peg_Size/2,Box_Depth+(Box_Thickness)], center=true); //upper right translate ([-Peg_Offset/2,(Box_Height/2)-4,0]) cylinder(Box_Depth+(Box_Thickness), Peg_Size/2, Peg_Size/2, center=true); translate ([-Peg_Offset/2,(Box_Height/2)-2,0]) cube(size=[Peg_Size,Peg_Size/2,Box_Depth+(Box_Thickness)], center=true); //lower right translate ([-Peg_Offset/2,-(Box_Height/2)+4,0]) cylinder(Box_Depth+(Box_Thickness), Peg_Size/2, Peg_Size/2, center=true); translate ([-Peg_Offset/2,-(Box_Height/2)+2,0]) cube(size=[Peg_Size,Peg_Size/2,Box_Depth+(Box_Thickness)], center=true); }//end union to create solid pegs //create holes in pegs //upper left translate ([Peg_Offset/2,(Box_Height/2)-4,1]) cylinder(Box_Height+(Box_Thickness), 1,Peg_Opening/2, $fn=60,center=true); //lower left translate ([Peg_Offset/2,-(Box_Height/2)+4,1]) cylinder(Box_Height+(Box_Thickness), 1,Peg_Opening/2, $fn=60,center=true); //upper right translate ([-Peg_Offset/2,(Box_Height/2)-4,1]) cylinder(Box_Height+(Box_Thickness), 1,Peg_Opening/2, $fn=60,center=true); //lower right translate ([-Peg_Offset/2,-(Box_Height/2)+4,1]) cylinder(Box_Height+(Box_Thickness), 1,Peg_Opening/2, $fn=60,center=true); //create lug offset translate ([-(Box_Width/2),0,-(Box_Depth/2)+((Lug_Dia/2)+(Box_Thickness*2))]) rotate ([90,0,90]) cylinder(Box_Thickness*4, Lug_Dia/2,Lug_Dia/2, center=true); }//end differance for pegs //create tabs translate([(Box_Width/2)-(Tab_Width/2),(Box_Height/2)+(18/2),-((Box_Depth/2))]) rotate([0,0,90]) tab(Tab_Width,Tab_Length,Box_Thickness,4); translate([-(Box_Width/2)+(Tab_Width/2),(Box_Height/2)+(18/2),-((Box_Depth/2))]) rotate([0,0,90]) tab(Tab_Width,Tab_Length,Box_Thickness,4); translate([(Box_Width/2)-(Tab_Width/2),-(Box_Height/2)-(18/2),-((Box_Depth/2))]) rotate([0,0,270]) tab(Tab_Width,Tab_Length,Box_Thickness,4); translate([-(Box_Width/2)+(Tab_Width/2),-(Box_Height/2)-(18/2),-((Box_Depth/2))]) rotate([0,0,270]) tab(Tab_Width,Tab_Length,Box_Thickness,4); }//end union }//end utility_box module module tab(width,length,thickness,opening_dia){ difference() { union(){ //create solid tab cube([width,length,thickness],center=true); translate ([(length/2),0,0]) cylinder(thickness, width/2, width/2,$fn=60, center=true); //create triangle reinforcement for tab translate ([-((width)/2)+1,-2,0]) rotate ([270,270,0]) linear_extrude(height=thickness){ polygon(points=[[0,0],[width/2,0],[0,width]], paths=[[0,1,2]]); }//end linear_extrude }//end union //create bolt hole translate ([width/2,0,0]) cylinder(thickness+1, opening_dia/2, opening_dia/2, $fn=60,center=true); //create seat area for bolt head translate ([width/2,0,(thickness-0.25)]) cylinder(thickness+1, opening_dia*2, opening_dia*2, $fn=60,center=true); }//end differance }//end tab module /*----------------------End Code----------------------*/ |
If your looking for looking 3D Printer, Laser Cutter and CNC Swag (T-Shirts, Hats, Mugs, etc), please support the channel by visiting our online shop at: http://swag.DIY3DTech.com
Also subscribe to our parent YouTube Channel DIY3DTech.com YouTube Channel for 3D Printing, Laser Manufacturing and CNC Machining: http://YouTube.DIY3DTech.com
More Ideas!
OpenSCAD – Designing a Compression Cover!
OpenSCAD – Designing a Pressure Fit Endcap!
Open SCAD – Complex Flange Designer!