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
8caef8f8
Commit
8caef8f8
authored
Nov 01, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make footprint wizards compatible with FPID changes (MODULE::SetLibRef changed to MODULE::SetFPID)
parent
a7c553b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
FPC_(SMD_type)_footprintwizard.py
pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py
+2
-1
qfp_wizard.py
pcbnew/scripting/plugins/qfp_wizard.py
+4
-3
touch_slider_wizard.py
pcbnew/scripting/plugins/touch_slider_wizard.py
+2
-2
kicad.i
scripting/kicad.i
+4
-3
No files found.
pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py
View file @
8caef8f8
...
@@ -94,7 +94,8 @@ class FPCFootprintWizard(FootprintWizardPlugin):
...
@@ -94,7 +94,8 @@ class FPCFootprintWizard(FootprintWizardPlugin):
module
.
Value
()
.
SetTextPosition
(
module
.
Value
()
.
GetPos0
())
module
.
Value
()
.
SetTextPosition
(
module
.
Value
()
.
GetPos0
())
module
.
Value
()
.
SetSize
(
size_text
)
module
.
Value
()
.
SetSize
(
size_text
)
module
.
SetLibRef
(
"FPC"
+
str
(
pads
))
#the name in library
fpid
=
pcbnew
.
FPID
(
self
.
module
.
GetReference
())
#the name in library
module
.
SetFPID
(
fpid
)
# create a pad array and add it to the module
# create a pad array and add it to the module
for
n
in
range
(
0
,
pads
):
for
n
in
range
(
0
,
pads
):
...
...
pcbnew/scripting/plugins/qfp_wizard.py
View file @
8caef8f8
...
@@ -96,7 +96,8 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
...
@@ -96,7 +96,8 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
self
.
module
.
Value
()
.
SetTextPosition
(
self
.
module
.
Value
()
.
GetPos0
())
self
.
module
.
Value
()
.
SetTextPosition
(
self
.
module
.
Value
()
.
GetPos0
())
self
.
module
.
Value
()
.
SetSize
(
text_size
)
self
.
module
.
Value
()
.
SetSize
(
text_size
)
self
.
module
.
SetLibRef
(
"QFP-
%
d"
%
int
(
num_pads
))
fpid
=
pcbnew
.
FPID
(
self
.
module
.
GetReference
())
#the name in library
self
.
module
.
SetFPID
(
fpid
)
pad_size_left_right
=
pcbnew
.
wxSize
(
pad_length
,
pad_width
)
pad_size_left_right
=
pcbnew
.
wxSize
(
pad_length
,
pad_width
)
pad_size_bottom_top
=
pcbnew
.
wxSize
(
pad_width
,
pad_length
)
pad_size_bottom_top
=
pcbnew
.
wxSize
(
pad_width
,
pad_length
)
...
@@ -106,7 +107,7 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
...
@@ -106,7 +107,7 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
if
side
==
0
or
side
==
2
:
if
side
==
0
or
side
==
2
:
pad_size
=
pad_size_left_right
pad_size
=
pad_size_left_right
pad_pos_x
=
-
(
pad_horizontal_pitch
/
2
)
pad_pos_x
=
-
(
pad_horizontal_pitch
/
2
)
if
side
==
2
:
if
side
==
2
:
pad_pos_x
=
-
pad_pos_x
pad_pos_x
=
-
pad_pos_x
...
@@ -227,4 +228,4 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
...
@@ -227,4 +228,4 @@ class QFPWizard(pcbnew.FootprintWizardPlugin):
return
False
return
False
QFPWizard
()
.
register
()
QFPWizard
()
.
register
()
\ No newline at end of file
pcbnew/scripting/plugins/touch_slider_wizard.py
View file @
8caef8f8
...
@@ -184,8 +184,8 @@ class TouchSliderWizard(FootprintWizardPlugin):
...
@@ -184,8 +184,8 @@ class TouchSliderWizard(FootprintWizardPlugin):
self
.
AddStrip
(
pos
,
steps
,
band_width
,
step_length
,
touch_clearance
)
self
.
AddStrip
(
pos
,
steps
,
band_width
,
step_length
,
touch_clearance
)
pos
+=
wxPoint
(
0
,
band_width
)
pos
+=
wxPoint
(
0
,
band_width
)
fpid
=
pcbnew
.
FPID
(
self
.
module
.
GetReference
())
#the name in library
module
.
Set
LibRef
(
"S"
+
str
(
steps
)
)
module
.
Set
FPID
(
fpid
)
def
register
():
def
register
():
# create our footprint wizard
# create our footprint wizard
...
...
scripting/kicad.i
View file @
8caef8f8
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
%ignore InitKiCadAbout;
%ignore InitKiCadAbout;
%ignore GetCommandOptions;
%ignore GetCommandOptions;
%rename(getWxRect) operator wxRect;
%rename(getWxRect) operator wxRect;
%ignore operator <<;
%ignore operator <<;
%ignore operator=;
%ignore operator=;
...
@@ -62,9 +62,9 @@
...
@@ -62,9 +62,9 @@
#include <wx_python_helpers.h>
#include <wx_python_helpers.h>
#include <cstddef>
#include <cstddef>
#include <vector>
#include <vector>
using namespace std;
using namespace std;
#include <class_title_block.h>
#include <class_title_block.h>
#include <class_colors_design_settings.h>
#include <class_colors_design_settings.h>
#include <class_marker_base.h>
#include <class_marker_base.h>
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
%include <eda_text.h>
%include <eda_text.h>
%include <convert_from_iu.h>
%include <convert_from_iu.h>
%include <convert_to_biu.h>
%include <convert_to_biu.h>
%include <fpid.h>
/* special iteration wrapper for DLIST objects */
/* special iteration wrapper for DLIST objects */
%include "dlist.i"
%include "dlist.i"
...
...
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