Index: 01005.scad =================================================================== --- 01005.scad (revision 37523) +++ 01005.scad (revision 37524) @@ -1,5 +1,48 @@ -module part_01005(len=0.4, width=0.2, height=0.13, pad_len=0.1) +module part_01005(len=0.4, width=0.2, height=0.13, pad_len=0.1, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,13 +50,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } Index: 0201.scad =================================================================== --- 0201.scad (revision 37523) +++ 0201.scad (revision 37524) @@ -1,5 +1,48 @@ -module part_0201(len=0.6, width=0.3, height=0.23, pad_len=0.15) +module part_0201(len=0.6, width=0.3, height=0.23, pad_len=0.15, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,14 +50,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } - Index: 0402.scad =================================================================== --- 0402.scad (revision 37523) +++ 0402.scad (revision 37524) @@ -1,5 +1,79 @@ -module part_0402(len=1.0, width=0.5, height=0.35, pad_len=0.25) +// Model for 0402 package +// +// Copyright (C) 2023 Erich Heinzle +// +// File distribution license: +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// +// The above distribution license applies when the file is distributed as a +// stand alone model file or as part of a library, in both cases intended +// for reuse combined by the user with other openscad scripts. +// +// Use license: +// as a special exception, the content of the file may be +// embedded in an openscad script that represents a printed circuit board, +// for example when a board is exported by pcb-rnd. In such use case, +// the content of this file may be copied into the resulting board file +// with or without modifications, without affecting the board file's license +// in any way. +// +module part_0402(len=1.0, width=0.5, height=0.35, pad_len=0.25, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,14 +81,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } - Index: 0603.scad =================================================================== --- 0603.scad (revision 37523) +++ 0603.scad (revision 37524) @@ -1,5 +1,80 @@ -module part_0603(len=1.6, width=0.8, height=0.45, pad_len=0.3) +// Model for 0603 package +// +// Copyright (C) 2023 Erich Heinzle +// +// File distribution license: +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// +// The above distribution license applies when the file is distributed as a +// stand alone model file or as part of a library, in both cases intended +// for reuse combined by the user with other openscad scripts. +// +// Use license: +// as a special exception, the content of the file may be +// embedded in an openscad script that represents a printed circuit board, +// for example when a board is exported by pcb-rnd. In such use case, +// the content of this file may be copied into the resulting board file +// with or without modifications, without affecting the board file's license +// in any way. +// + +module part_0603(len=1.6, width=0.8, height=0.45, pad_len=0.3, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,14 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } - Index: 0805.scad =================================================================== --- 0805.scad (revision 37523) +++ 0805.scad (revision 37524) @@ -1,5 +1,80 @@ -module part_0805(len=2, width=1.2, height=0.5, pad_len=0.4) +// Model for 0805 package +// +// Copyright (C) 2023 Erich Heinzle +// +// File distribution license: +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// +// The above distribution license applies when the file is distributed as a +// stand alone model file or as part of a library, in both cases intended +// for reuse combined by the user with other openscad scripts. +// +// Use license: +// as a special exception, the content of the file may be +// embedded in an openscad script that represents a printed circuit board, +// for example when a board is exported by pcb-rnd. In such use case, +// the content of this file may be copied into the resulting board file +// with or without modifications, without affecting the board file's license +// in any way. +// + +module part_0805(len=2, width=1.2, height=0.5, pad_len=0.4, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,13 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } Index: 1008.scad =================================================================== --- 1008.scad (revision 37523) +++ 1008.scad (revision 37524) @@ -30,24 +30,83 @@ // in any way. // -module part_1008(body_len=2.5, width=2.0, height=2.0, pad_len=0.5, pad_width=1.4, pad_height=1.8) +module part_1008(body_len=2.5, width=2.0, height=2.0, pad_len=0.5, pad_width=1.4, pad_height=1.8, fillet=0) { + module fillet() { + fillet_height = pad_height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + pad_width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-pad_height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,pad_width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,pad_width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-pad_width/2-fillet_width/2,fillet_height/3], // 6 + [0,-pad_width/2-fillet_width/2,fillet_height/3], // 7 + [0,pad_width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,pad_width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-pad_width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-pad_width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,pad_width/2,fillet_height], // 12 + [pad_len,pad_width/2,fillet_height], // 13 + [pad_len,-pad_width/2,fillet_height], // 14 + [0,-pad_width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { - translate([0,0,height/2+(height-pad_height)]) { - // body - color([0.1,0.1,0.1]) - cube([body_len-pad_len,width,height], center=true); - } + translate([0,0,height/2+(height-pad_height)]) { + // body + color([0.1,0.1,0.1]) + cube([body_len-pad_len,width,height], center=true); + } + + translate([0,0,pad_height/2]) { + // terminals + color([0.8,0.8,0.8]) { + translate([+body_len/2-pad_len/2, 0, 0]) + cube([pad_len, pad_width, pad_height], center=true); + translate([-body_len/2+pad_len/2, 0, 0]) + cube([pad_len, pad_width, pad_height], center=true); + } + } + translate([0,0,pad_height/2]) { // terminals color([0.8,0.8,0.8]) { - translate([+body_len/2-pad_len/2, 0, 0]) + translate([+body_len/2-pad_len/2, 0, 0]) { cube([pad_len, pad_width, pad_height], center=true); + if (fillet) + fillet(); + } + translate([-body_len/2+pad_len/2, 0, 0]) { + cube([pad_len, pad_width, pad_height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-body_len/2+pad_len/2, 0, 0]) - cube([pad_len, pad_width, pad_height], center=true); - } } } } Index: 1206.scad =================================================================== --- 1206.scad (revision 37523) +++ 1206.scad (revision 37524) @@ -1,5 +1,80 @@ -module part_1206(len=3.2, width=1.6, height=0.6, pad_len=0.5) +// Model for 1206 package +// +// Copyright (C) 2023 Erich Heinzle +// +// File distribution license: +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// +// The above distribution license applies when the file is distributed as a +// stand alone model file or as part of a library, in both cases intended +// for reuse combined by the user with other openscad scripts. +// +// Use license: +// as a special exception, the content of the file may be +// embedded in an openscad script that represents a printed circuit board, +// for example when a board is exported by pcb-rnd. In such use case, +// the content of this file may be copied into the resulting board file +// with or without modifications, without affecting the board file's license +// in any way. +// + +module part_1206(len=3.2, width=1.6, height=0.6, pad_len=0.5,fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -7,14 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } - Index: 1210.scad =================================================================== --- 1210.scad (revision 37523) +++ 1210.scad (revision 37524) @@ -30,8 +30,51 @@ // in any way. // -module part_1210(len=3.2, width=2.55, height=1.3, pad_len=0.5) +module part_1210(len=3.2, width=2.55, height=1.3, pad_len=0.5, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -39,13 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } Index: 1806.scad =================================================================== --- 1806.scad (revision 37523) +++ 1806.scad (revision 37524) @@ -30,8 +30,51 @@ // in any way. // -module part_1806(len=4.5, width=1.6, height=1.6, pad_len=0.5) +module part_1806(len=4.5, width=1.6, height=1.6, pad_len=0.5, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -39,13 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } Index: 1825.scad =================================================================== --- 1825.scad (revision 37523) +++ 1825.scad (revision 37524) @@ -30,8 +30,51 @@ // in any way. // -module part_1825(len=4.5, width=6.4, height=1.6, pad_len=0.6) +module part_1825(len=4.5, width=6.4, height=1.6, pad_len=0.6, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -39,13 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } Index: 2706.scad =================================================================== --- 2706.scad (revision 37523) +++ 2706.scad (revision 37524) @@ -30,8 +30,51 @@ // in any way. // -module part_2706(len=6.8, width=1.6, height=1.6, pad_len=0.7) +module part_2706(len=6.8, width=1.6, height=1.6, pad_len=0.7, fillet=0) { + module fillet() { + fillet_height = height/3; + fillet_width = pad_len/3; + overall_width = fillet_width + width; + overall_length = pad_len + fillet_width; + + translate([-pad_len/2,0,-height/2]) { + fillet_points = [ + [0,overall_width/2,0], // 0 + [overall_length,overall_width/2,0], // 1 + [overall_length,-overall_width/2,0], // 2 + [0,-overall_width/2,0], // 3 + [0,width/2+fillet_width/2,fillet_height/3], // 4 + [pad_len+fillet_width/2,width/2+fillet_width/2,fillet_height/3], // 5 + [pad_len+fillet_width/2,-width/2-fillet_width/2,fillet_height/3], // 6 + [0,-width/2-fillet_width/2,fillet_height/3], // 7 + [0,width/2+fillet_width/6,2*fillet_height/3], // 8 + [pad_len+fillet_width/6,width/2+fillet_width/6,2*fillet_height/3], // 9 + [pad_len+fillet_width/6,-width/2-fillet_width/6,2*fillet_height/3], // 10 + [0,-width/2-fillet_width/6,2*fillet_height/3], // 11 + [0,width/2,fillet_height], // 12 + [pad_len,width/2,fillet_height], // 13 + [pad_len,-width/2,fillet_height], // 14 + [0,-width/2,fillet_height]]; // 15 + + fillet_faces = [ + [0,4,8,12,15,11,7,3], // 0 + [0,1,5,4], // 1 + [1,2,6,5], // 2 + [7,6,2,3], // 3 + [4,5,9,8], // 4 + [5,6,10,9],// 5 + [10,6,7,11],// 6 + [8,9,13,12],// 7 + [9,10,14,13],// 8 + [15,14,10,11],// 9 + [12,13,14,15],// 10 + [3,2,1,0]];// 11 + + polyhedron(fillet_points, fillet_faces); + } + } + union() { translate([0,0,height/2]) { // body @@ -39,14 +82,18 @@ cube([len-2*pad_len,width,height], center=true); // terminals color([0.8,0.8,0.8]) { - translate([+len/2-pad_len/2, 0, 0]) + translate([+len/2-pad_len/2, 0, 0]) { cube([pad_len, width, height], center=true); + if (fillet) + fillet(); + } + translate([-len/2+pad_len/2, 0, 0]) { + cube([pad_len, width, height], center=true); + if (fillet) + rotate([0,0,180]) + fillet(); + } } - color([0.8,0.8,0.8]) { - translate([-len/2+pad_len/2, 0, 0]) - cube([pad_len, width, height], center=true); - } } } } -