Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
32c67654
Commit
32c67654
authored
May 02, 2014
by
john.j.
Committed by
jean-pierre charras
May 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue in bga footprint wizard.
parent
fca1ba67
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
PadArray.py
pcbnew/scripting/plugins/PadArray.py
+5
-4
bga_wizard.py
pcbnew/scripting/plugins/bga_wizard.py
+4
-4
No files found.
pcbnew/scripting/plugins/PadArray.py
View file @
32c67654
...
...
@@ -75,13 +75,14 @@ class PadGridArray(PadArray):
# handy utility function 1 - A, 2 - B, 26 - AA, etc
# aIndex = 0 for 0 - A
def
AlphaNameFromNumber
(
self
,
n
,
aIndex
=
1
):
# alphabet = set of allowable chars if not A-Z, eg ABCDEFGHJKLMNPRTUVWY for BGA
def
AlphaNameFromNumber
(
self
,
n
,
aIndex
=
1
,
alphabet
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
):
div
,
mod
=
divmod
(
n
-
aIndex
,
26
)
alpha
=
chr
(
65
+
mod
)
div
,
mod
=
divmod
(
n
-
aIndex
,
len
(
alphabet
)
)
alpha
=
alphabet
[
mod
]
if
div
>
0
:
return
self
.
AlphaNameFromNumber
(
div
)
+
alpha
;
return
self
.
AlphaNameFromNumber
(
div
,
aIndex
,
alphabet
)
+
alpha
;
return
alpha
;
...
...
pcbnew/scripting/plugins/bga_wizard.py
View file @
32c67654
...
...
@@ -24,7 +24,7 @@ import PadArray as PA
class
BGAPadGridArray
(
PA
.
PadGridArray
):
def
NamingFunction
(
self
,
x
,
y
):
return
"
%
s
%
d"
%
(
self
.
AlphaNameFromNumber
(
y
+
1
),
x
+
1
)
return
"
%
s
%
d"
%
(
self
.
AlphaNameFromNumber
(
y
+
1
,
alphabet
=
"ABCDEFGHJKLMNPRTUVWY"
),
x
+
1
)
class
BGAWizard
(
HFPW
.
HelpfulFootprintWizardPlugin
):
...
...
@@ -76,10 +76,10 @@ class BGAWizard(HFPW.HelpfulFootprintWizardPlugin):
# add in the pads
pad
=
PA
.
PadMaker
(
self
.
module
)
.
SMTRoundPad
(
pads
[
"pad size"
])
pin1Pos
=
pcbnew
.
wxPoint
(
-
((
row
s
-
1
)
*
pad_pitch
)
/
2
,
-
((
col
s
-
1
)
*
pad_pitch
)
/
2
)
pin1Pos
=
pcbnew
.
wxPoint
(
-
((
col
s
-
1
)
*
pad_pitch
)
/
2
,
-
((
row
s
-
1
)
*
pad_pitch
)
/
2
)
array
=
BGAPadGridArray
(
pad
,
rows
,
col
s
,
pad_pitch
,
pad_pitch
,
pin1Pos
)
array
=
BGAPadGridArray
(
pad
,
cols
,
row
s
,
pad_pitch
,
pad_pitch
,
pin1Pos
)
array
.
AddPadsToModule
()
#box
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment