Index: TO18.scad =================================================================== --- TO18.scad (revision 37521) +++ TO18.scad (revision 37522) @@ -30,7 +30,7 @@ // in any way. // -module to18() +module to18(pin_descent=2.5) { height = 4.83; major_diameter = 5.6; @@ -59,13 +59,12 @@ } } color([0.8,0.8,0.8]) { - translate ([-1.27,0,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset +2.5); - translate ([0,1.27,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset + 2.5); - translate ([1.27,0,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset + 2.5); + translate ([-1.27,0,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset +pin_descent); + translate ([0,1.27,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset + pin_descent); + translate ([1.27,0,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset + pin_descent); } } } - Index: TO220SW.scad =================================================================== --- TO220SW.scad (revision 37521) +++ TO220SW.scad (revision 37522) @@ -31,7 +31,7 @@ // in any way. // -module to220sw() +module to220sw(pin_descent=2.5) { pin_thickness = 0.5; pin_width1 = 1.45; @@ -55,7 +55,7 @@ module pin() { linear_extrude(height=pin_thickness) - polygon([[-pin_width1/2,0],[pin_width1/2,0],[pin_width1/2,pin_width1-pin_width2-pin_neck],[pin_width2/2,-pin_neck],[pin_width2/2,-pin_neck-2.5],[-pin_width2/2,-pin_neck-2.5],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); + polygon([[-pin_width1/2,0],[pin_width1/2,0],[pin_width1/2,pin_width1-pin_width2-pin_neck],[pin_width2/2,-pin_neck],[pin_width2/2,-pin_neck-pin_descent],[-pin_width2/2,-pin_neck-pin_descent],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); } module bent_pin() { @@ -64,8 +64,8 @@ linear_extrude(height=pin_thickness) polygon([[-pin_width1/2,0],[pin_width1/2,0],[pin_width1/2,pin_width1-pin_width2-pin_neck],[pin_width2/2,-pin_neck],[pin_width2/2,-pin_neck-0.25],[-pin_width2/2,-pin_neck-0.25], [-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); - translate([-pin_width2/2,-6.04,2.54]) - cube([pin_width2,(3.55-2.54)+2.695,pin_thickness],false); + translate([-pin_width2/2,-3.54-pin_descent,2.54]) + cube([pin_width2,1.196+pin_descent,pin_thickness],false); } } @@ -126,4 +126,3 @@ } } } - Index: TO220W.scad =================================================================== --- TO220W.scad (revision 37521) +++ TO220W.scad (revision 37522) @@ -31,7 +31,7 @@ // in any way. // -module to220w(pins=3) +module to220w(pins=3,pin_descent=2.5) { pin_thickness = 0.5; pin_width1 = 1.45; @@ -55,7 +55,7 @@ module pin() { linear_extrude(height=pin_thickness) - polygon([[-pin_width1/2,0],[pin_width1/2,0],[pin_width1/2,pin_width1-pin_width2-pin_neck],[pin_width2/2,-pin_neck],[pin_width2/2,-pin_neck-2.5],[-pin_width2/2,-pin_neck-2.5],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); + polygon([[-pin_width1/2,0],[pin_width1/2,0],[pin_width1/2,pin_width1-pin_width2-pin_neck],[pin_width2/2,-pin_neck],[pin_width2/2,-pin_neck-pin_descent],[-pin_width2/2,-pin_neck-pin_descent],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); } module tab() { @@ -117,4 +117,3 @@ } } } - Index: TO39.scad =================================================================== --- TO39.scad (revision 37521) +++ TO39.scad (revision 37522) @@ -30,7 +30,7 @@ // in any way. // -module to39() +module to39(pin_descent=2.5) { height = 6.35; major_diameter = 8.95; @@ -59,12 +59,12 @@ } } color([0.8,0.8,0.8]) { - translate ([-2.54,0,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset +2.5); - translate ([0,2.54,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset + 2.5); - translate ([2.54,0,-2.45]) - cylinder(r = pin_diameter/2, h = pcb_offset + 2.5); + translate ([-2.54,0,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset +pin_descent); + translate ([0,2.54,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset + pin_descent); + translate ([2.54,0,-pin_descent]) + cylinder(r = pin_diameter/2, h = pcb_offset + pin_descent); } } } Index: TO92.scad =================================================================== --- TO92.scad (revision 37521) +++ TO92.scad (revision 37522) @@ -30,7 +30,7 @@ // in any way. // -module to92() +module to92(pin_descent=2.5) { height = 5.0; diameter = 5.0; @@ -39,7 +39,7 @@ module bent_pin(pin_thickness) { translate([0,0,-pin_thickness/2]) linear_extrude(height=pin_thickness) - polygon([[-pin_thickness/2,-2.45],[-pin_thickness/2,2.25],[1.27-pin_thickness/2,3.25],[1.27-pin_thickness/2,5.5],[1.27+pin_thickness/2,5.5],[1.27+pin_thickness/2,3.0],[pin_thickness/2,2.0],[pin_thickness/2,-2.45]]); + polygon([[-pin_thickness/2,-pin_descent],[-pin_thickness/2,2.25],[1.27-pin_thickness/2,3.25],[1.27-pin_thickness/2,5.5],[1.27+pin_thickness/2,5.5],[1.27+pin_thickness/2,3.0],[pin_thickness/2,2.0],[pin_thickness/2,-pin_descent]]); } rotate([0,0,-90]) { @@ -56,8 +56,8 @@ color([0.8,0.8,0.8]) { rotate([90,0,0]) bent_pin(pin_thickness); - translate ([2.54,0,height-2.45]) - cube ([pin_thickness, pin_thickness, height*2], true); + translate ([2.54,0,height-(height+pin_descent)/2]) + cube ([pin_thickness, pin_thickness, height+pin_descent], true); translate ([5.08,0,0]) rotate([90,0,180]) bent_pin(pin_thickness);