Index: MPAK.fp =================================================================== --- MPAK.fp (revision 37452) +++ MPAK.fp (revision 37453) @@ -2,6 +2,7 @@ ha:subc.5 { ha:attributes { footprint = MPAK + openscad = MPAK.scad } ha:data { li:padstack_prototypes { Index: MPAK.scad =================================================================== --- MPAK.scad (nonexistent) +++ MPAK.scad (revision 37453) @@ -0,0 +1,72 @@ +// Model for MPAK package +// +// Copyright (C) 2017,2020 Tibor 'Igor2' Palinkas +// 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 mpak() +{ + module mpak_() + { + // pin prototype + module pin(length, height, thick) + { + linear_extrude(height=thick) + scale([length, -2*height, 1]) + polygon([[0.3400,0.0000],[0.3900,0.0100],[0.4300,0.0300],[0.4600,0.0600],[0.4789,0.0908],[0.6279,0.8307],[0.6500,0.8600],[0.6900,0.8900],[0.7300,0.9000],[1.0000,0.9000],[1.0000,1.0000],[0.6700,1.0012],[0.6100,0.9900],[0.5600,0.9600],[0.5300,0.9200],[0.5200,0.9000],[0.3721,0.1693],[0.3500,0.1400],[0.3100,0.1100],[0.2700,0.1000],[0.0000,0.1000],[0.0000,0.0000]]); + } + + rotate([90,0,-90]) scale([1.0,1.0,1.0])translate([-5.6, 0.4, - 6.35 + 1.25]) { + // body + color([0.1,0.1,0.1]) + linear_extrude(height=6.35) + polygon([[-4.2,0.25],[-4.2,4.0],[4.2,4.0],[4.2,0.25]]); + + // 3 pins + color([0.9, 0.9, 0.9]) { + translate([3.6,1.96,1.27-0.45/2]) + pin(2.6, 1.2, 0.45); + translate([3.6,1.96,2.54-0.45/2]) + pin(2.6, 1.2, 0.45); + translate([3.6,1.96,3.81-0.45/2]) + pin(2.6, 1.2, 0.45); + translate([3.6,1.96,5.08-0.45/2]) + pin(2.6, 1.2, 0.45); + + translate([-3.6,1.96,3.17-3.18/2]) + pin(-2.6, 1.2, 3.18); + } + } + } + + // match rotation with stock footprint's + rotate([0,0,90]) + mpak_(); +}