Index: TO126.scad =================================================================== --- TO126.scad (revision 37518) +++ TO126.scad (revision 37519) @@ -31,7 +31,7 @@ // in any way. // -module to126(pins=3, S=0) +module to126(pins=3,S=0,pin_descent=2.5) { pin_thickness = 0.5; pin_width1 = 1.2; @@ -55,7 +55,7 @@ body_offset = body_thickness/2; module downbent_pin(S=0) { - pin_descent = 2.5 + body_offset-1.02; + pin_descent2 = pin_descent + body_offset-1.02; union() { 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.01-S*2.54],[-pin_width2/2,-pin_neck-0.01-S*2.54],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); @@ -63,8 +63,8 @@ rotate([0,-90,0]) rotate_extrude(angle=-90) polygon([[1.02-pin_thickness/2,pin_width2/2],[1.02-pin_thickness/2,-pin_width2/2],[1.02+pin_thickness/2,-pin_width2/2],[1.02+pin_thickness/2,pin_width2/2]]); - translate([0,-pin_neck-1.02-pin_thickness/2-S*2.54,pin_thickness/2-1.02-pin_descent]) - linear_extrude(height=pin_descent) + translate([0,-pin_neck-1.02-pin_thickness/2-S*2.54,pin_thickness/2-1.02-pin_descent2]) + linear_extrude(height=pin_descent2) polygon([[-pin_width2/2, pin_thickness],[pin_width2/2,pin_thickness],[pin_width2/2, 0],[-pin_width2/2, 0]]); } } Index: TO126W.scad =================================================================== --- TO126W.scad (revision 37518) +++ TO126W.scad (revision 37519) @@ -31,7 +31,7 @@ // in any way. // -module to126w(pins=3, S=0) +module to126w(pins=3, S=0, pin_descent=2.5) { pin_thickness = 0.5; pin_width1 = 1.2; @@ -55,11 +55,11 @@ body_offset = body_thickness/2; module pin(S=0) { - pin_descent = (1-S)*2.5 + S*1.717; + pin_descent2 = (1-S)*pin_descent + S*1.717; rotate([S*(-45),0,0]) { union() { 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.01-pin_descent ],[-pin_width2/2,-pin_neck-0.01-pin_descent],[-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-0.01-pin_descent2],[-pin_width2/2,-pin_neck-0.01-pin_descent2],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); } } if (S==1) { Index: TO220.scad =================================================================== --- TO220.scad (revision 37518) +++ TO220.scad (revision 37519) @@ -31,7 +31,7 @@ // in any way. // -module to220(pins=3, S=0) +module to220(pins=3, S=0, pin_descent=2.5) { pin_thickness = 0.5; pin_width1 = 1.45; @@ -54,7 +54,7 @@ body_offset = 2.76; module downbent_pin(S=0) { - pin_descent = 4.5; + pin_descent2 = pin_descent+2.0; union() { 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.01-S*2.54],[-pin_width2/2,-pin_neck-0.01-S*2.54],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); @@ -62,8 +62,8 @@ rotate([0,-90,0]) rotate_extrude(angle=-90) polygon([[1.02-pin_thickness/2,pin_width2/2],[1.02-pin_thickness/2,-pin_width2/2],[1.02+pin_thickness/2,-pin_width2/2],[1.02+pin_thickness/2,pin_width2/2]]); - translate([0,-pin_neck-1.02-pin_thickness/2-S*2.54,pin_thickness/2-1.02-pin_descent]) - linear_extrude(height=pin_descent) + translate([0,-pin_neck-1.02-pin_thickness/2-S*2.54,pin_thickness/2-1.02-pin_descent2]) + linear_extrude(height=pin_descent2) polygon([[-pin_width2/2, pin_thickness],[pin_width2/2,pin_thickness],[pin_width2/2, 0],[-pin_width2/2, 0]]); } } Index: TO264.scad =================================================================== --- TO264.scad (revision 37518) +++ TO264.scad (revision 37519) @@ -31,7 +31,7 @@ // in any way. // -module to264(pins=3) +module to264(pins=3,pin_descent=2.5) { pin_thickness = 0.6; pin_width1 = 2.9; @@ -57,7 +57,6 @@ notch2_height = 15.0; module pin() { - pin_descent = 2.5; 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.01-pin_descent ],[-pin_width2/2,-pin_neck-0.01-pin_descent],[-pin_width2/2,-pin_neck],[-pin_width1/2,pin_width1-pin_width2-pin_neck]]); }