Commit 172527bf authored by nats's avatar nats

Merge branch 'master' of code.electrolab.fr:nats/kicad-components

parents 7728ed18 28e4382a
This diff is collapsed.
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# SKY66292-11
#
DEF SKY66292-11 U 0 40 Y Y 1 F N
F0 "U" 650 -250 39 H V C CNN
F1 "SKY66292-11" 650 -150 39 H V C CNN
F2 "QFN:SKY66292-11_QFN-4x4_EP_5x5_Pitch0.8mm" 550 -350 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
S -300 200 350 -150 0 1 0 N
X GND 1 -250 -250 100 U 25 25 1 1 W
X GND 10 0 -250 100 U 25 25 1 1 W
X GND 11 50 -250 100 U 25 25 1 1 W
X Vcc3 12 -50 300 100 D 25 25 1 1 W
X GND 13 100 -250 100 U 25 25 1 1 W
X Vcc2 14 -150 300 100 D 25 25 1 1 W
X GND 15 150 -250 100 U 25 25 1 1 W
X Vcc1 16 -250 300 100 D 25 25 1 1 W
X PAD 17 250 -250 100 U 25 25 1 1 W
X RFin 2 -400 0 100 R 25 25 1 1 I
X GND 3 -200 -250 100 U 25 25 1 1 W
X GND 4 -150 -250 100 U 25 25 1 1 W
X Vbias 5 150 300 100 D 25 25 1 1 I
X PAen 6 250 300 100 D 25 25 1 1 I
X GND 7 -100 -250 100 U 25 25 1 1 W
X GND 8 -50 -250 100 U 25 25 1 1 W
X RFout 9 450 0 100 L 25 25 1 1 O
ENDDRAW
ENDDEF
#
#End Library
......@@ -83,4 +83,45 @@ X 9 9 -200 -200 100 U 25 25 1 1 P
ENDDRAW
ENDDEF
#
# QTE-014-02-F-D-DP-A_0
#
DEF QTE-014-02-F-D-DP-A_0 J 0 40 Y Y 1 F N
F0 "J" 550 -50 25 H V C CNN
F1 "QTE-014-02-F-D-DP-A_0" -600 50 25 V V C CNN
F2 "Connectors_SAMTEC:QTE-014-02-F-D-DP-A" 0 -400 50 H I C CNN
F3 "" 0 100 50 H I C CNN
DRAW
S -550 250 500 -100 0 1 0 N
X 1 1 -500 -200 100 U 25 25 1 1 P
X 10 10 -200 350 100 D 25 25 1 1 P
X 11 11 -150 -200 100 U 25 25 1 1 P
X 12 12 -150 350 100 D 25 25 1 1 P
X 13 13 -50 -200 100 U 25 25 1 1 P
X 14 14 -50 350 100 D 25 25 1 1 P
X 15 15 0 -200 100 U 25 25 1 1 P
X 16 16 0 350 100 D 25 25 1 1 P
X 17 17 100 -200 100 U 25 25 1 1 P
X 18 18 100 350 100 D 25 25 1 1 P
X 19 19 150 -200 100 U 25 25 1 1 P
X 2 2 -500 350 100 D 25 25 1 1 P
X 20 20 150 350 100 D 25 25 1 1 P
X 21 21 250 -200 100 U 25 25 1 1 P
X 22 22 250 350 100 D 25 25 1 1 P
X 23 23 300 -200 100 U 25 25 1 1 P
X 24 24 300 350 100 D 25 25 1 1 P
X 25 25 400 -200 100 U 25 25 1 1 P
X 26 26 400 350 100 D 25 25 1 1 P
X 27 27 450 -200 100 U 25 25 1 1 P
X 28 28 450 350 100 D 25 25 1 1 P
X 29 29 600 100 100 L 25 25 1 1 P
X 3 3 -450 -200 100 U 25 25 1 1 P
X 4 4 -450 350 100 D 25 25 1 1 P
X 5 5 -350 -200 100 U 25 25 1 1 P
X 6 6 -350 350 100 D 25 25 1 1 P
X 7 7 -300 -200 100 U 25 25 1 1 P
X 8 8 -300 350 100 D 25 25 1 1 P
X 9 9 -200 -200 100 U 25 25 1 1 P
ENDDRAW
ENDDEF
#
#End Library
......@@ -480,6 +480,20 @@ X Vadj 1 0 0 0 U 30 30 0 0 W N
ENDDRAW
ENDDEF
#
# Vbias
#
DEF Vbias #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -40 30 H I C CNN
F1 "Vbias" 0 110 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
C 0 60 20 0 1 0 N
P 3 0 1 0 0 0 0 40 0 40 N
X Vbias 1 0 0 0 U 30 30 0 0 W N
ENDDRAW
ENDDEF
#
# Vext
#
DEF Vext #PWR 0 0 Y Y 1 F P
......
(module QTE-014-02-F-D-DP-A (layer F.Cu) (tedit 5D6E6FFF)
(fp_text reference REF** (at 0 -6.25) (layer F.SilkS)
(effects (font (size 0.635 0.635) (thickness 0.15)))
)
(fp_text value QTE-014-02-F-D-DP-A (at 0 -6.3) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -10 -3) (end 10 -3) (layer F.SilkS) (width 0.15))
(fp_line (start 10 -3) (end 10 3) (layer F.SilkS) (width 0.15))
(fp_line (start 10 3) (end -10 3) (layer F.SilkS) (width 0.15))
(fp_line (start -10 3) (end -10 -3) (layer F.SilkS) (width 0.15))
(fp_line (start 10 2) (end 9 3) (layer F.SilkS) (width 0.15))
(fp_line (start -10 2) (end -9 3) (layer F.SilkS) (width 0.15))
(fp_line (start -10 -4) (end 10 -4) (layer F.CrtYd) (width 0.15))
(fp_line (start 10 -4) (end 10 4) (layer F.CrtYd) (width 0.15))
(fp_line (start 10 4) (end -10 4) (layer F.CrtYd) (width 0.15))
(fp_line (start -10 4) (end -10 -4) (layer F.CrtYd) (width 0.15))
(pad 1 smd rect (at -7.6 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 2 smd rect (at -7.6 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 4 smd rect (at -6.8 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 6 smd rect (at -5.2 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 8 smd rect (at -4.4 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 10 smd rect (at -2.8 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 12 smd rect (at -2 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 14 smd rect (at -0.4 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 16 smd rect (at 0.4 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 18 smd rect (at 2 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 20 smd rect (at 2.8 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 22 smd rect (at 4.4 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 24 smd rect (at 5.2 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 26 smd rect (at 6.8 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 28 smd rect (at 7.6 3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 3 smd rect (at -6.8 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 5 smd rect (at -5.2 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 7 smd rect (at -4.4 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 9 smd rect (at -2.8 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 11 smd rect (at -2 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 13 smd rect (at -0.4 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 15 smd rect (at 0.4 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 17 smd rect (at 2 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 19 smd rect (at 2.8 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 21 smd rect (at 4.4 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 23 smd rect (at 5.2 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 25 smd rect (at 6.8 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad 27 smd rect (at 7.6 -3.09) (size 0.46 1.45) (layers F.Cu F.Paste F.Mask))
(pad "" np_thru_hole circle (at -9.24 -2.04) (size 1.02 1.02) (drill 1.02) (layers *.Cu *.Mask))
(pad "" np_thru_hole circle (at 9.24 -2.04) (size 1.02 1.02) (drill 1.02) (layers *.Cu *.Mask))
(pad 29 smd rect (at -3.175 0) (size 4.7 0.64) (layers F.Cu F.Paste F.Mask))
(pad 29 smd rect (at 3.175 0) (size 4.7 0.64) (layers F.Cu F.Paste F.Mask))
(pad 29 smd rect (at 8.445 0) (size 2.54 0.64) (layers F.Cu F.Paste F.Mask))
(pad 29 smd rect (at -8.445 0) (size 2.54 0.64) (layers F.Cu F.Paste F.Mask))
(model ${CUSTLIB}/3D_Models/Connector_0.8mm/QTE-014-02-F-D-DP-A.stp
(offset (xyz 0 0 0.17))
(scale (xyz 1 1 1))
(rotate (xyz -90 0 180))
)
)
(module SKY66292-11_QFN-4x4_EP_5x5_Pitch0.8mm (layer F.Cu) (tedit 5D67A9A2)
(attr smd)
(fp_text reference REF** (at 0 -2.3925) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value SKY66292-11_QFN-4x4_EP_5x5_Pitch0.8mm (at 0 2.3925) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1.5 -2.5) (end -2.5 -1.5) (layer F.Fab) (width 0.15))
(fp_line (start -2.5 -1.5) (end -2.5 2.5) (layer F.Fab) (width 0.15))
(fp_line (start -2.5 2.5) (end 2.5 2.5) (layer F.Fab) (width 0.15))
(fp_line (start 2.5 2.5) (end 2.5 -2.5) (layer F.Fab) (width 0.15))
(fp_line (start 2.5 -2.5) (end -1.5 -2.5) (layer F.Fab) (width 0.15))
(fp_line (start 2 -2.65) (end 2.65 -2.65) (layer F.SilkS) (width 0.15))
(fp_line (start 2.65 -2.65) (end 2.65 -2) (layer F.SilkS) (width 0.15))
(fp_line (start 2 2.65) (end 2.65 2.65) (layer F.SilkS) (width 0.15))
(fp_line (start 2.65 2.65) (end 2.65 2) (layer F.SilkS) (width 0.15))
(fp_line (start -2 2.65) (end -2.65 2.65) (layer F.SilkS) (width 0.15))
(fp_line (start -2.65 2.65) (end -2.65 2) (layer F.SilkS) (width 0.15))
(fp_line (start -2 -2.65) (end -2.71 -2.65) (layer F.SilkS) (width 0.15))
(fp_line (start -3.1 -3.1) (end 3.1 -3.1) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.1 -3.1) (end 3.1 3.1) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.1 3.1) (end -3.1 3.1) (layer F.CrtYd) (width 0.05))
(fp_line (start -3.1 3.1) (end -3.1 -3.1) (layer F.CrtYd) (width 0.05))
(pad 1 smd rect (at -2.365 -1.2 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 2 smd rect (at -2.365 -0.4 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 3 smd rect (at -2.365 0.4 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 4 smd rect (at -2.365 1.2 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 5 smd rect (at -1.2 2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 6 smd rect (at -0.4 2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 7 smd rect (at 0.4 2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 8 smd rect (at 1.2 2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 9 smd rect (at 2.365 1.2 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 10 smd rect (at 2.365 0.4 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 11 smd rect (at 2.365 -0.4 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 12 smd rect (at 2.365 -1.2 90) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 13 smd rect (at 1.2 -2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 14 smd rect (at 0.4 -2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 15 smd rect (at -0.4 -2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 16 smd rect (at -1.2 -2.365) (size 0.5 0.57) (layers F.Cu F.Paste F.Mask))
(pad 17 smd rect (at -0.956666 -0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at -0.956666 0) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at -0.956666 0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0 -0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0 0) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0 0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0.956666 -0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0.956666 0) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 smd rect (at 0.956666 0.956666) (size 0.956666 0.956666) (layers F.Cu F.Paste F.Mask)
(solder_paste_margin -0.1))
(pad 17 thru_hole circle (at -0.956666 -0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at -0.956666 0) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at -0.956666 0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0 -0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0 0) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0 0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0.956666 -0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0.956666 0) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 0.956666 0.956666) (size 0.478333 0.478333) (drill 0.25) (layers *.Cu *.Mask))
)
EESchema-LIBRARY Version 2.3
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# TCM1-83X-1+
......@@ -6,7 +6,7 @@ EESchema-LIBRARY Version 2.3
DEF TCM1-83X-1+ K 0 40 Y Y 1 F N
F0 "K" 0 -125 25 H V C CNN
F1 "TCM1-83X-1+" 0 125 25 H V C CNN
F2 "" 0 0 25 H I C CNN
F2 "MiniCircuits:DB1627" -100 -225 25 H I C CNN
F3 "" 0 0 25 H I C CNN
DRAW
S -150 75 150 -75 0 1 0 N
......
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
from __future__ import division
import pcbnew
import pcbnew
import FootprintWizardBase
import PadArray as PA
class QFNWizard(FootprintWizardBase.FootprintWizard):
def GetName(self):
return "QFNNats"
def GetDescription(self):
return "Nats Quad Flat No-lead (QFN) footprint wizard"
def GenerateParameterList(self):
self.AddParam("Pads", "nrow", self.uInteger, 10)
self.AddParam("Pads", "ncol", self.uInteger, 5)
self.AddParam("Pads", "pitch", self.uMM, 0.5, designator='e')
self.AddParam("Pads", "width", self.uMM, 0.25, designator='X1')
self.AddParam("Pads", "length", self.uMM, 1.5, designator='Y1')
self.AddParam("Pads", "fillet", self.uMM, 0.3)
self.AddParam("Pads", "oval", self.uBool, True)
self.AddParam("EPad", "epad", self.uBool, True)
self.AddParam("EPad", "width", self.uMM, 10, designator="E2")
self.AddParam("EPad", "length", self.uMM, 10, designator="D2")
self.AddParam("EPad", "thermal vias", self.uBool, False)
self.AddParam("EPad", "ignore drill autosize", self.uBool, False)
self.AddParam("EPad", "thermal vias drill", self.uMM, 1, min_value=0.1)
self.AddParam("EPad", "x divisions", self.uInteger, 2, min_value=1)
self.AddParam("EPad", "y divisions", self.uInteger, 2, min_value=1)
self.AddParam("EPad", "paste margin", self.uMM, 0.1)
self.AddParam("Package", "width", self.uMM, 14, designator='E')
self.AddParam("Package", "height", self.uMM, 14, designator='D')
self.AddParam("Package", "margin", self.uMM, 0.25, minValue=0.2)
self.AddParam("Package", "mark1", self.uBool, False)
self.AddParam("Package", "radmark1", self.uMM, 0.5)
@property
def pads(self):
return self.parameters['Pads']
@property
def epad(self):
return self.parameters['EPad']
@property
def package(self):
return self.parameters['Package']
def CheckParameters(self):
pass
def GetValue(self):
return "QFN-{r}x{c}_{ep}{x:g}x{y:g}_Pitch{p:g}mm".format(
r = self.pads['nrow'],
c = self.pads['ncol'],
ep = "EP_" if self.epad['epad'] else '',
x = pcbnew.ToMM(self.package['width']),
y = pcbnew.ToMM(self.package['height']),
p = pcbnew.ToMM(self.pads['pitch'])
)
def BuildThisFootprint(self):
pad_pitch = self.pads["pitch"]
pad_length = self.pads["length"]
# Fillet allows to define how much of the pad is outside of the package
pad_fillet = self.pads["fillet"]
pad_width = self.pads["width"]
v_pitch = self.package["height"]
h_pitch = self.package["width"]
pads_per_row = int(self.pads["nrow"])
pads_per_col = int(self.pads["ncol"])
row_len = (pads_per_row - 1) * pad_pitch
col_len = (pads_per_col - 1) * pad_pitch
pad_shape = pcbnew.PAD_SHAPE_OVAL if self.pads["oval"] else pcbnew.PAD_SHAPE_RECT
h_pad = PA.PadMaker(self.module).SMDPad( pad_length + pad_fillet, pad_width,
shape=pad_shape, rot_degree=90.0)
v_pad = PA.PadMaker(self.module).SMDPad( pad_length + pad_fillet, pad_width, shape=pad_shape)
h_pitch = h_pitch / 2 - pad_length + (pad_length+pad_fillet)/2
v_pitch = v_pitch / 2 - pad_length + (pad_length+pad_fillet)/2
#left row
pin1Pos = pcbnew.wxPoint(-h_pitch, 0)
array = PA.PadLineArray(h_pad, pads_per_col, pad_pitch, True, pin1Pos)
array.SetFirstPadInArray(1)
array.AddPadsToModule(self.draw)
#bottom row
pin1Pos = pcbnew.wxPoint(0, v_pitch)
array = PA.PadLineArray(v_pad, pads_per_row, pad_pitch, False, pin1Pos)
array.SetFirstPadInArray(pads_per_col + 1)
array.AddPadsToModule(self.draw)
#right row
pin1Pos = pcbnew.wxPoint(h_pitch, 0)
array = PA.PadLineArray(h_pad, pads_per_col, -pad_pitch, True,
pin1Pos)
array.SetFirstPadInArray(pads_per_col+pads_per_row + 1)
array.AddPadsToModule(self.draw)
#top row
pin1Pos = pcbnew.wxPoint(0, -v_pitch)
array = PA.PadLineArray(v_pad, pads_per_row, -pad_pitch, False,
pin1Pos)
array.SetFirstPadInArray(2*pads_per_col+pads_per_row + 1)
array.AddPadsToModule(self.draw)
lim_x = self.package["width"] / 2
lim_y = self.package["height"] / 2
inner = (row_len / 2) + pad_pitch
# epad
epad_width = self.epad["width"]
epad_length = self.epad["length"]
epad_ny = self.epad["x divisions"]
epad_nx = self.epad["y divisions"]
epad_via_drill = self.epad["thermal vias drill"]
# Create a central exposed pad?
if self.epad['epad'] == True:
epad_num = pads_per_row * 2 + pads_per_col * 2 + 1
epad_w = epad_length / epad_nx
epad_l = epad_width / epad_ny
# Create the epad
epad = PA.PadMaker(self.module).SMDPad( epad_w, epad_l, shape=pcbnew.PAD_SHAPE_RECT )
epad.SetLocalSolderPasteMargin( -1 * self.epad['paste margin'] )
# set pad layers
layers = pcbnew.LSET(pcbnew.F_Mask)
layers.AddLayer(pcbnew.F_Cu)
layers.AddLayer(pcbnew.F_Paste)
epad.SetName(epad_num)
array = PA.EPADGridArray( epad, epad_ny, epad_nx, epad_l, epad_w, pcbnew.wxPoint(0,0) )
array.SetFirstPadInArray(epad_num)
array.AddPadsToModule(self.draw)
if self.epad['thermal vias']:
# create the thermal via
via_diam = min(epad_w, epad_l) / 2
via_drill = min(via_diam / 2, epad_via_drill)
if(self.epad["ignore drill autosize"]):
via_drill = epad_via_drill
via = PA.PadMaker(self.module).THRoundPad(via_diam, via_drill)
layers = pcbnew.LSET.AllCuMask()
layers.AddLayer(pcbnew.B_Mask)
layers.AddLayer(pcbnew.F_Mask)
via.SetLayerSet(layers)
via_array = PA.EPADGridArray(via, epad_ny, epad_nx, epad_l, epad_w, pcbnew.wxPoint(0,0) )
via_array.SetFirstPadInArray(epad_num)
via_array.AddPadsToModule(self.draw)
# Draw the package outline on the F.Fab layer
bevel = min( pcbnew.FromMM(1.0), self.package['width']/2, self.package['height']/2 )
self.draw.SetLayer(pcbnew.F_Fab)
w = self.package['width']
h = self.package['height']
self.draw.BoxWithDiagonalAtCorner(0, 0, w, h, bevel)
# Silkscreen
self.draw.SetLayer(pcbnew.F_SilkS)
offset = self.draw.GetLineThickness()
cliph = row_len / 2 + self.pads['pitch']
clipv = col_len / 2 + self.pads['pitch']
self.draw.Polyline( [ [ cliph, -h/2-offset], [ w/2+offset,-h/2-offset], [ w/2+offset, -clipv] ] ) # top right
self.draw.Polyline( [ [ cliph, h/2+offset], [ w/2+offset, h/2+offset], [ w/2+offset, clipv] ] ) # bottom right
self.draw.Polyline( [ [-cliph, h/2+offset], [-w/2-offset, h/2+offset], [-w/2-offset, clipv] ] ) # bottom left
# Add pin-1 indication as per IPC-7351C
self.draw.Line(-cliph, -h/2-offset, -w/2-pad_length/2, -h/2-offset)
# Add round marking for pin-1
if(self.package["mark1"] == True):
cmargin = self.package["margin"]
centerx = lim_x + cmargin + self.package["radmark1"] + offset*2 + pad_fillet
centery = lim_y + cmargin - offset - self.package["radmark1"]
self.draw.Circle(-centerx, -centery, self.package["radmark1"])
# Courtyard
cmargin = self.package["margin"]
self.draw.SetLayer(pcbnew.F_CrtYd)
sizex = (lim_x + cmargin) * 2 + pad_length + pad_fillet*2
sizey = (lim_y + cmargin) * 2 + pad_length + pad_fillet*2
# round size to nearest 0.1mm, rectangle will thus land on a 0.05mm grid
sizex = pcbnew.PutOnGridMM(sizex, 0.1)
sizey = pcbnew.PutOnGridMM(sizey, 0.1)
# set courtyard line thickness to the one defined in KLC
thick = self.draw.GetLineThickness()
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
self.draw.Box(0, 0, sizex, sizey)
# restore line thickness to previous value
self.draw.SetLineThickness(pcbnew.FromMM(thick))
#reference and value
text_size = self.GetTextSize() # IPC nominal
text_offset = v_pitch / 2 + text_size + pad_length / 2
self.draw.Value(0, text_offset, text_size)
self.draw.Reference(0, -text_offset, text_size)
# set SMD attribute
self.module.SetAttributes(pcbnew.MOD_CMS)
QFNWizard().register()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment