Frank Zeeman
b3a319b77e
Append True to Python 3 AddPrimitivePoly() call
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11012
2022-03-18 20:00:32 +00:00
jean-pierre charras
54c9e36556
Python, board.i: fix incorrect order of an include.
...
The result was ignoring PCB_SHAPE in pcb_text.i.
2022-03-18 14:19:14 +01:00
jean-pierre charras
e37bb2e0c3
swig: disable a few warnings generated by pcb_shape.i, math.i and version.i
2022-03-09 17:29:29 +01:00
Jon Evans
cb6d6d7ef4
Settings: allow multiple project access from Python standalone
...
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
(cherry picked from commit 1394509734
)
2022-03-05 13:04:19 -05:00
jean-pierre charras
69453964b4
pcbnew_scripting_helpers: fix a potential crash when running a script outside kicad.
...
BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ) crashes if a
old project file (*.pro) exists and the *.kicad_pro file doses not exists.
The crash happens when trying to convert the old config outside kicad.
2022-03-05 18:26:33 +01:00
Jeff Young
bc51c89c90
Reconcile zone-auto-fill with undo.
2022-02-25 13:05:49 +00:00
Greg Davill
429c311ec3
action_plugin: Remove duplicated entry in UndoList
2022-02-24 18:31:16 +00:00
qu1ck
b53b68c686
Fix double loading plugins and sys.path entires multiplying
2022-02-17 17:41:52 +00:00
qu1ck
a041492736
SWIG mappings for all shapes
2022-02-16 20:58:52 +00:00
木 王
261b1df47f
fix-npth
2022-02-10 10:06:59 +00:00
Jeff Young
b2e3f03222
More wide-string declarations.
2022-02-05 22:03:04 +00:00
Seth Hillbrand
917845cf00
Ensure we can version scripting properly
...
Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window
Fixes https://gitlab.com/kicad/code/kicad/issues/10079
(cherry picked from commit 0a13f15a9d
)
2022-02-03 15:59:10 -08:00
jean-pierre charras
a970acd0bc
Fix some issues related to new textboxes and python:
...
- Fix duplicate class names returned by GetClass().
- replace MTEXT name (in GetClass) by better name (FP_TEXT, FP_TEXTBOX...)
- Add missing Cast_to_PCB_TEXTBOX and Cast_to_FP_TEXTBOX
2022-02-03 13:55:37 +01:00
jean-pierre charras
901a9387e9
Fix python fp wizards according to last kicad code changes, especially EDA_ANGLE
2022-01-28 19:33:51 +01:00
Jeff Young
9b661aea10
EDA_ANGLE for plotters.
...
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
qu1ck
33a4c9b08e
FOOTPRINT::GetProperty() swig extension
2022-01-13 21:08:52 +00:00
Seth Hillbrand
4f874057ab
DRC scripting: load project from board if possible
...
s_SettingsManager is not always initialized when the WriteDRCReport is
run. We should first attempt to extract the project from the actual
board being checked. Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.
Fixes https://gitlab.com/kicad/code/kicad/issues/10221
(cherry picked from commit 78e737b9d8
)
2022-01-06 11:51:05 -08:00
Marek Roszko
cc5003a919
Update python for the pad wxSize switch
2022-01-04 23:28:06 -05:00
Seth Hillbrand
e6b5cb3a5c
Fix missing FOOTPRINT cast in swig
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10236
(cherry picked from commit ca8cf14dff
)
2022-01-04 11:09:51 -08:00
jean-pierre charras
5879227ee2
Update footprint wizards after changes wxPoint->VECTOR2I
2022-01-03 11:43:15 +01:00
qu1ck
356cddd474
Template for vector<VECTOR2I> in swig
2022-01-02 21:33:58 +00:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05:00
Jacob Mealey
987a6e125b
fix in pcbnew/python/swig/units.i ... added error handling
...
Added error handling in unit conversions for the pcbnew python bindings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10081
2021-12-28 07:09:27 +00:00
Jeff Young
ab583a32f9
Better layer handling for DRC markers.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10126
2021-12-26 15:06:12 +00:00
Jeff Young
5f37c2b247
Custom rule severities.
...
ADDED severity token to custom rule syntax. Each rule can now define
its own severity.
Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Jeff Young
d28714167c
All the preferences, all the time.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7877
Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jon Evans
63f67b7e5b
Fix loading netclasses from legacy boards via Python
2021-12-07 18:55:08 -05:00
jean-pierre charras
c186d1f319
Force refresh AUI manager after reloading python scripts.
...
Because the tools in the Htoolbar can have changed, the AUI manager need refresh.
2021-12-03 09:30:24 +01:00
jean-pierre charras
01eebd0b9d
Do not call callLoadPlugins() every time a SCRIPTING_TOOL is created.
...
(i.e. from board editor and from fp editor)
Once is enough.
Once plugins are loaded, calling LoadPlugins() from fpeditor disable plugins
in board editor
Fixes #9846
https://gitlab.com/kicad/code/kicad/issues/9846
2021-12-03 08:12:06 +01:00
Jeff Young
ba6ae4fa9b
Kicad has many plugins. This one is for the pcb.
2021-11-25 12:56:46 +00:00
Seth Hillbrand
7529eb1812
SWIG out connected item vector for use
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8566
2021-11-19 13:39:06 -08:00
Jon Evans
d76c6bc884
Add NewBoard API to allow standalone BOARD creation
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9687
2021-11-18 21:43:05 -05:00
Jon Evans
c5ddb8de26
Hide confusing lowercase version of GetCenter from SWIG
2021-11-18 21:21:22 -05:00
Jeff Young
f6c160eb50
Apply a big hammer for python script refreshing.
...
While not ideal, this should tide us over until we have a commit
architecture for python scripts.
Fixes https://gitlab.com/kicad/code/kicad/issues/7065
2021-11-09 18:47:47 -05:00
Jon Evans
0234ae3003
Add CloneFrom API for BOARD_DESIGN_SETTINGS in SWIG
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6885
2021-11-08 23:01:24 -05:00
Seth Hillbrand
cf6b18ec7e
Remove escaped double-quotes
...
For some reason, escaped double quotes in wxString::Format cause issues
on Mac. We can replace them with single quotes in most places without
loss of clarity
2021-11-03 17:03:14 -07:00
Asuki Kono
762cd5a32f
Add PLACE_FILE_EXPORTER to swig to call in python
2021-11-03 16:32:05 +00:00
Jon Evans
5475303ec2
Allow loading secondary boards from Python
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9271
2021-10-24 14:06:38 -04:00
jean-pierre charras
0bdb424215
FootprintWizardBase.py: fix Arc building due to recent code changes.
...
Add a arc_test wizard (only to test arcs in fp).
2021-10-22 10:07:31 +02:00
qu1ck
09a2701136
Fix arc angle calculation and python API for it
...
1. It's impossible to use methods that modify parameters in swig so
I extend it in wrapper
2. Simplify GetArcAngle() and fix the bug where it lies about 360
degree arc to be 0 degrees.
2021-10-20 10:38:42 +00:00
qu1ck
6db0216dd4
Bring back python compatibility constants for SHAPE_T
...
They were removed in a41944020d
and that broke a lot of stuff.
2021-10-17 03:21:47 -07:00
Seth Hillbrand
57d0cbcefa
Fix python QA
2021-10-15 13:50:36 -07:00
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
2021-10-15 12:45:43 +01:00
Seth Hillbrand
9a8d1246cc
We don't keep a CHANGELOG.TXT
...
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Seth Hillbrand
548e5f49bd
Clean up unused variable usage
...
Unused variables in function calls can be commented out. Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Mike Williams
1b0c274e22
Python: Copy board iterables to prevent segfaults
...
Python code like:
for track in board.GetTracks():
board.Remove(track)
Would delete tracks in the the underlying m_tracks while iterating over
it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5192
2021-09-24 19:40:46 +00:00
Mike Williams
16ec6fbec4
Plugins: Fix QR code generator shape exception
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9079
2021-09-22 11:15:26 -04:00
qu1ck
0f7c0e3872
PCM implementation
2021-08-27 21:11:47 +00:00
qu1ck
78ab69027d
Add 3rdparty/plugins to plugin search
2021-08-27 21:11:47 +00:00
Jeff Young
e6ca9837a2
Clear numbers from non-numberable pads and don't run DRC on them.
...
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().
Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00