$fn = 64; use use use tol = 0.05; tol2 = tol*2; c = [0.2, 0.2, 0.2]; cc = [0.5, 0.5, 0.5]; colorPins="silver"; // values common to all sockets function Socket_Rad() = 1; function Socket_PinDiamiter1() = XT60M_Pin_Diameter(); function Socket_PinDiamiter2() = XT60M_Pin_Diameter(); function Socket_Clearance() = 0.1; function Socket_Thickness1() = 3; function Socket_Thickness2() = 1; function Socket_Width1() = 27; function Socket_Height1() = 20; function Socket_Height2() = 2; function Socket_Depth1() = 19; module SocketFB(width, height, depth, c=c) { widthOuter = width + (Socket_Thickness1()*2) + (Socket_Thickness2()*2) + (Socket_Clearance()*4); heightOuter = height + Socket_Height2(); depthOuter = depth + (Socket_Thickness1()*2) + (Socket_Thickness2()*2) + (Socket_Clearance()*4); translate([-widthOuter/2, -heightOuter/2, -depthOuter/2]) union() { // outer cube difference() { color(c) union() { cubeR([ width + (Socket_Thickness1()*2) + (Socket_Thickness2()*2) + (Socket_Clearance()*4), height + Socket_Height2(), depth + (Socket_Thickness1()*2) + (Socket_Thickness2()*2) + (Socket_Clearance()*4), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true, tol=tol); } color(cc) union() { translate([ Socket_Thickness1(), -tol, Socket_Thickness1()]) cubeR([ width + (Socket_Thickness2()*2) + (Socket_Clearance()*4), height + Socket_Height2()+tol2, depth + (Socket_Thickness2()*2) + (Socket_Clearance()*4), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true, tol=tol); } } // inner cube color(c) union() { translate([ Socket_Thickness1()+Socket_Clearance()+Socket_Thickness2()+Socket_Clearance(), 0, Socket_Thickness1()+Socket_Clearance()+Socket_Thickness2()+Socket_Clearance()]) cubeR([ width, height, depth, Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true); } // back color(c) union() { translate([0, Socket_Height1(), 0]) cubeR([ width+(Socket_Thickness1()*2)+(Socket_Thickness2()*2)+(Socket_Clearance()*4), Socket_Height2(), depth+(Socket_Thickness1()*2)+(Socket_Thickness2()*2)+(Socket_Clearance()*4), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true); } } } // module SocketMB(width, height, depth, c=c) { widthOuter = width + (Socket_Thickness2()*2) + (Socket_Clearance()*2); heightOuter = height + Socket_Height2(); depthOuter = depth + (Socket_Thickness2()*2) + (Socket_Clearance()*2); translate([-widthOuter/2, -heightOuter/2, -depthOuter/2]) union() { // wall difference() { color(c) union() { translate([ 0, Socket_Height2(), 0]) cubeR([ width + (Socket_Thickness2()*2)+(Socket_Clearance()*2), height, depth + (Socket_Thickness2()*2)+(Socket_Clearance()*2), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true); } color(cc) union() { translate([ Socket_Thickness2(), Socket_Height2()-tol, Socket_Thickness2()]) cubeR([ width + (Socket_Clearance()*2), height+tol2, depth + (Socket_Clearance()*2), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true); } } // back color(c) union() { cubeR([ width + (Socket_Thickness2()*2)+(Socket_Clearance()*2), Socket_Height2(), depth + (Socket_Thickness2()*2)+(Socket_Clearance()*2), Socket_Rad()], TP2=true, TP4=true, BT2=true, BT4=true); } } } // function SocketF_Width(width) = width +(Socket_Thickness1()*2)+(Socket_Thickness2()*2)+(Socket_Clearance()*4); function SocketF_Height(height) = height+Socket_Height2(); function SocketF_Depth(depth) = depth +(Socket_Thickness1()*2)+(Socket_Thickness2()*2)+(Socket_Clearance()*4); function SocketF1_Width() = SocketF_Width(Socket_Width1()); function SocketF1_Height() = SocketF_Height(Socket_Height1()); function SocketF1_Depth() = SocketF_Depth(Socket_Depth1()); function SocketM1_Width() = Socket_Width1() + (Socket_Thickness2()*2) + (Socket_Clearance()*2); function SocketM1_Height() = Socket_Height1()+ Socket_Height2(); function SocketM1_Depth() = Socket_Depth1() + (Socket_Thickness2()*2) + (Socket_Clearance()*2); function Socket1_PitchH1() = 14; function Socket1_PitchH2() = 5; function Socket1_PitchH3() = 10; function Socket1_PitchV1() = 10; module Socket1C(height) { union() { // pins pinDiamiter1 = Socket_PinDiamiter1(); pinDiamiter2 = Socket_PinDiamiter2(); pinPitchH1 = Socket1_PitchH1(); pinPitchH2 = Socket1_PitchH2(); pinPitchH3 = Socket1_PitchH3(); pinPitchV1 = Socket1_PitchV1(); // bottom row pins translate([0, 0, -(pinPitchV1/2)]) union() { // Pin 1 & 2 translate([-(pinPitchH1/2)+(pinPitchH2/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } translate([-(pinPitchH1/2)-(pinPitchH2/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } // Pins 3 & 4 translate([+(pinPitchH1/2)+(pinPitchH2/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } translate([+(pinPitchH1/2)-(pinPitchH2/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } } // top row pins translate([0, 0, +(pinPitchV1/2)]) union() { // Pin 1 & 2 translate([-(pinPitchH3/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } translate([0, 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } translate([+(pinPitchH3/2), 0, 0]) union() { translate([0, (height/2), 0]) rotate([90, 0, 0]) translate([0, 0, 0]) translate([0, 0, -tol]) cylinder(d=pinDiamiter1, h=height+tol2); } } } } module SocketF1(c=c) { difference() { union() { SocketFB(Socket_Width1(), Socket_Height1(), Socket_Depth1(), c=c); } color(cc) union() { Socket1C(SocketF1_Height()); } } } // module SocketM1(c=c) { difference() { union() { SocketMB(Socket_Width1(), Socket_Height1(), Socket_Depth1(), c=c); } color(cc) union() { Socket1C(SocketM1_Height()); } } } // //translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) SocketF1(c="orange"); //translate([SocketM_Width()/2, SocketM_Height()/2, SocketM_Depth()/2]) translate([0, -(SocketF1_Height()-1), 0]) difference() { SocketM1(c="green"); dif = 1; translate([-SocketF1_Width()/2-tol, -(SocketF1_Height()/2)-tol-dif, -SocketF1_Depth()/2-tol]) cube([SocketF1_Width()+tol2, SocketF1_Height()+tol2, SocketF1_Depth()+tol2]); } /* function SocketF_Rad() = 8; function SocketF_Wall1() = 4; function SocketF_Wall2() = 3; function SocketF_Width1() = 27.2; function SocketF_Width() = SocketF_Width1()+(SocketF_Wall1()*2)+(SocketF_Wall2()*2); function SocketF_Height1() = 20; function SocketF_Height() = SocketF_Height1()+(SocketF_Wall1()*2)+(SocketF_Wall2()*2); function SocketF_DepthWall() = 14; function SocketF_Depth1() = 16; function SocketF_Depth() = SocketF_Depth1(); module SocketF2(pins=false) { y = 8; dx = 13.5; d = XT60F_Pin_Diameter(); rad3 = 0;//SocketF_Rad(); translate([-(SocketF_Width()/2), -(SocketF_Height()/2), -(SocketF_Depth()/2)]) union() { // outer wall difference()// union() { color(c) union() { cubeR([SocketF_Width(), SocketF_Height(), SocketF_Depth1(), rad3]); } color(cc) union() { translate([SocketF_Wall1(), SocketF_Wall1(), -0.1]) cubeR([ SocketF_Width()-(SocketF_Wall1()*2), SocketF_Height()-(SocketF_Wall1()*2), SocketF_Depth()+0.2, SocketF_Rad()]); } } // inner difference()// union() { color(c) union() { translate([SocketF_Wall1()+SocketF_Wall2(), SocketF_Wall1()+SocketF_Wall2(), 0]) cubeR([SocketF_Width1(), SocketF_Height1(), SocketF_Depth1(), 8]); } color(cc) union() { translate([(SocketF_Width()/2), (SocketF_Height()/2), 0]) union() { translate([0, +y/2, -0.1]) cylinder(d=d, h=SocketF_Depth1()+0.2); translate([+dx/2, -y/2, -0.1]) cylinder(d=d, h=SocketF_Depth1()+0.2); translate([-dx/2, -y/2, -0.1]) cylinder(d=d, h=SocketF_Depth1()+0.2); } } } // difference() { color(c) union() { translate([SocketF_Wall1(), SocketF_Wall1(), 0]) translate([0, 0, SocketF_DepthWall()]) cubeR([ SocketF_Width1()+(SocketF_Wall2()*2), SocketF_Height1()+(SocketF_Wall2()*2), SocketF_Depth1()-SocketF_DepthWall(), 8]); } color(cc) union() { translate([SocketF_Wall1()+SocketF_Wall2(), SocketF_Wall1()+SocketF_Wall2(), 0]) translate([0, 0, SocketF_DepthWall()-0.1]) cubeR([ SocketF_Width1() , SocketF_Height1(), SocketF_Depth1()-SocketF_DepthWall()+0.2, 8]); } } // Pins if (pins) { color(colorPins) translate([(SocketF_Width()/2), (SocketF_Height()/2), 0]) translate([0, 0, XT60F_Pin_Depth()/2]) translate([0, 0, 1]) union() { cube([1, 1, 1]); translate([0, +y/2, 0]) XT60F_Pin(r); translate([+dx/2, -y/2, 0]) XT60F_Pin(); translate([-dx/2, -y/2, 0]) XT60F_Pin(); } } } } // //rotate([0,180,0]) SocketF(); function SocketF_Fused_Thickness1() = 5; function SocketF_Fused_Thickness2() = (SpadeCutout_Dia3()/2); function SocketF_Fused_Width() = SocketF_Width(); function SocketF_Fused_Height() = SocketF_Height()+FuseHolder_Height(); function SocketF_Fused_Depth1() = 5; function SocketF_Fused_Depth5() = 2; function SocketF_Fused_Depth() = FuseHolder_Depth()+ SocketF_Fused_Depth1()+ SocketF_Fused_Depth5(); module SocketF_Fused(pins=false) { //translate([-SocketF_Fused_Width()/2, -SocketF_Fused_Height()/2, -SocketF_Fused_Depth()/2]) union() { translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) SocketF(pins=pins); // Fuse Holder translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) translate([ 0, (SocketF_Height()/2)+(FuseHolder_Height()/2), (FuseHolder_Depth()/2)-(SocketF_Depth()/2) ]) rotate([180, 0, 0]) FuseHolder(); // eather side of fuse holder w = ((SocketF_Width()-FuseHolder_Width())/2); translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) translate([ (-SocketF_Width()/2), (SocketF_Height()/2), (-SocketF_Depth()/2)]) cube([ w, FuseHolder_Height(), FuseHolder_Depth()+SocketF_Fused_Depth1()]); translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) translate([ (+SocketF_Width()/2)- w, (SocketF_Height()/2), (-SocketF_Depth()/2)]) cube([ w, FuseHolder_Height(), FuseHolder_Depth()+SocketF_Fused_Depth1()]); // sides thickness1 = SocketF_Fused_Thickness1(); translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) translate([ (+SocketF_Width()/2)-thickness1, (-SocketF_Fused_Height()/2)+(FuseHolder_Height()/2), (+SocketF_Depth()/2)]) cube([ thickness1, SocketF_Height(), FuseHolder_Depth()-SocketF_Depth()+SocketF_Fused_Depth1()]); translate([SocketF_Width()/2, SocketF_Height()/2, SocketF_Depth()/2]) translate([ (-SocketF_Width()/2), (-SocketF_Fused_Height()/2)+(FuseHolder_Height()/2), (+SocketF_Depth()/2)]) cube([ thickness1, SocketF_Height(), FuseHolder_Depth()-SocketF_Depth()+SocketF_Fused_Depth1()]); // underneath fuse holders translate([SocketF_Fused_Width()/2, 0, 0]) translate([ -FuseHolder_Width()/2, SocketF_Height()+FuseHolder_Height()-SocketF_Fused_Thickness2(), FuseHolder_Depth()]) cube([ FuseHolder_Width(), SocketF_Fused_Thickness2(), SocketF_Fused_Thickness1()]); // sides lower w3 = SocketF_Fused_Thickness2(); d3 = SocketF_Fused_Depth5(); translate([0, 0, SocketF_Fused_Depth()-d3]) union() { translate([0, 0, 0]) cube([w3, SocketF_Fused_Height(), d3]); translate([SocketF_Width()-w3, 0, 0]) cube([w3, SocketF_Fused_Height(), d3]); translate([0, SocketF_Fused_Height()-w3, 0]) cube([SocketF_Fused_Width(), w3, d3]); } } } // //rotate([180, 0, 0]) SocketF_Fused(); function SocketM_Rad() = SocketF_Rad(); function SocketM_Wall2() = SocketF_Wall2()-0.1; function SocketM_Width1() = 27.2; function SocketM_Width() = SocketM_Width1()+(SocketM_Wall2()*2); function SocketM_Height1() = 20; function SocketM_Height() = SocketM_Height1()+(SocketM_Wall2()*2); function SocketM_Depth1() = 7; function SocketM_DepthWall() = SocketF_DepthWall()-1;//SocketF_Depth1()-0.5; function SocketM_Depth() = SocketM_Depth1()+SocketM_DepthWall(); module SocketM(pins=false, rad=SocketM_Rad(), rad2=SocketM_Rad(), lip=0) { y = 8; dx = 13.5; d = XT60F_Pin_Diameter(); d2 = d+0.1; translate([-(SocketM_Width()/2), -(SocketM_Height()/2), -(SocketM_Depth()/2)]) union() { // outer wall difference()// union() { color(c) union() { cubeR([SocketM_Width(), SocketM_Height(), SocketM_DepthWall(), rad]); } color(cc) union() { translate([SocketM_Wall2(), SocketM_Wall2(), -0.1]) cubeR([SocketM_Width1(), SocketM_Height1(), SocketM_DepthWall()+0.2, SocketM_Rad()]); } } // Body difference()// union() { color(c) union() { translate([0, 0, SocketM_DepthWall()]) cubeR([SocketM_Width(), SocketM_Height(), SocketM_Depth1(), rad2]); } color(cc) union() { translate([0, 0, SocketM_DepthWall()]) //translate([0, 0, XT60M_Pin_PinDepth()]) //translate([(width/2), (height/2), (depth/2)]) translate([(SocketM_Width()/2), (SocketM_Height()/2), 0]) union() { translate([0, +y/2, -0.1]) cylinder(d=d2, h=SocketM_Depth1()+0.2); translate([+dx/2, -y/2, -0.1]) cylinder(d=d2, h=SocketM_Depth1()+0.2); translate([-dx/2, -y/2, -0.1]) cylinder(d=d2, h=SocketM_Depth1()+0.2); } } } // Pins if (pins) { color(colorPins) translate([(SocketM_Width()/2), (SocketM_Height()/2), (SocketM_Depth()/2)]) translate([0, 0, SocketM_DepthWall()-XT60M_Pin_PinDepth()]) union() { translate([0, +y/2, 0]) XT60M_Pin(r=180); translate([+dx/2, -y/2, 0]) XT60M_Pin(r=180); translate([-dx/2, -y/2, 0]) XT60M_Pin(r=180); } } // if (lip > 0) { color(c) translate([0, SocketM_Height(), SocketM_DepthWall()]) cube([SocketM_Width(), lip, SocketM_Depth1()]); } } } // //rotate([0,180,0]) SocketM(lip=2, rad2=0); function PlugM_Thickness() = 2; function PlugM_Space() = 25; function PlugM_Rad() = 4; function PlugM_Width() = SocketM_Width()+(PlugM_Thickness()*2); function PlugM_Height() = SocketM_Depth()+PlugM_Space(); function PlugM_Depth() = SocketM_Height()+(PlugM_Thickness()*2); module PlugM(connector=false, rad=SocketM_Rad(), rad3=PlugM_Rad()) { translate([-PlugM_Width()/2, -PlugM_Height()/2, -PlugM_Depth()/2]) union() { difference() { color(c) union() { rotate([90, 0, 0]) translate([0, 0, -PlugM_Height()]) cubeR([PlugM_Width(), PlugM_Depth(), PlugM_Height(), rad3]); } color(cc) union() { translate([PlugM_Thickness(), PlugM_Thickness(), PlugM_Thickness()]) cube([ PlugM_Width()-(PlugM_Thickness()*2), PlugM_Height()-PlugM_Thickness()+0.1, PlugM_Depth()-PlugM_Thickness()+0.1]); translate([PlugM_Width()/2, PlugM_Thickness()+0.1, PlugM_Depth()/2]) rotate([90, 0, 0]) cylinder(d=10, h=PlugM_Thickness()+0.2); } } // lip color(c) union() { lipW = 2; lipH = PlugM_Height()-SocketM_Depth1()-PlugM_Thickness(); translate([ PlugM_Thickness(), PlugM_Height()-SocketM_Depth1()-lipH, PlugM_Thickness()]) cube([ lipW, lipH, PlugM_Depth()-PlugM_Thickness()]); translate([ PlugM_Width()-(PlugM_Thickness()*2), PlugM_Height()-SocketM_Depth1()-lipH, PlugM_Thickness()]) cube([ lipW, lipH, PlugM_Depth()-PlugM_Thickness()]); } } if (connector) { translate([0, SocketM_DepthWall(), 0]) translate([0, 0, -PlugM_Depth()/2]) translate([0, PlugM_Space()/2, PlugM_Thickness()]) rotate([90, 0, 0]) translate([0, SocketM_Height()/2, 0]) SocketM(pins=true, rad=rad, rad2=0, lip=PlugM_Thickness()); } } // //translate([0, 0, PlugM_Depth()/2]) PlugM(); // testing the fit module SocketMF(pins=true) { difference() { union() { tol = 0.05; translate([0, 0, SocketM_DepthWall()]) translate([0, 0, -SocketM_Depth()/2-tol]) rotate([0,180,0]) SocketM(pins); translate([0, 0, SocketF_Depth()/2+tol]) SocketF(pins); } union() { s = 100; translate([0, -s/2, -s/2]) cube([s, s, s]); } } } //SocketMF(); //translate([0, 0, PlugM_Depth()/2]) //PlugM(); */