Frank Zeeman
b3a319b77e
Append True to Python 3 AddPrimitivePoly() call
Fixes https://gitlab.com/kicad/code/kicad/issues/11012
4 years ago
jean-pierre charras
54c9e36556
Python, board.i: fix incorrect order of an include.
The result was ignoring PCB_SHAPE in pcb_text.i.
4 years ago
jean-pierre charras
e37bb2e0c3
swig: disable a few warnings generated by pcb_shape.i, math.i and version.i
4 years ago
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 )
4 years ago
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.
4 years ago
Jeff Young
bc51c89c90
Reconcile zone-auto-fill with undo.
4 years ago
Greg Davill
429c311ec3
action_plugin: Remove duplicated entry in UndoList
4 years ago
qu1ck
b53b68c686
Fix double loading plugins and sys.path entires multiplying
4 years ago
qu1ck
a041492736
SWIG mappings for all shapes
4 years ago
木 王
261b1df47f
fix-npth
4 years ago
Jeff Young
b2e3f03222
More wide-string declarations.
4 years ago
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 )
4 years ago
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
4 years ago
jean-pierre charras
901a9387e9
Fix python fp wizards according to last kicad code changes, especially EDA_ANGLE
4 years ago
Jeff Young
9b661aea10
EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
4 years ago
qu1ck
33a4c9b08e
FOOTPRINT::GetProperty() swig extension
4 years ago
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 )
4 years ago
Marek Roszko
cc5003a919
Update python for the pad wxSize switch
4 years ago
Seth Hillbrand
e6b5cb3a5c
Fix missing FOOTPRINT cast in swig
Fixes https://gitlab.com/kicad/code/kicad/issues/10236
(cherry picked from commit ca8cf14dff )
4 years ago
jean-pierre charras
5879227ee2
Update footprint wizards after changes wxPoint->VECTOR2I
4 years ago
qu1ck
356cddd474
Template for vector<VECTOR2I> in swig
4 years ago
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
4 years ago
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
4 years ago
Jeff Young
ab583a32f9
Better layer handling for DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/10126
4 years ago
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
4 years ago
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
4 years ago
Jon Evans
63f67b7e5b
Fix loading netclasses from legacy boards via Python
4 years ago
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.
4 years ago
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
4 years ago
Jeff Young
ba6ae4fa9b
Kicad has many plugins. This one is for the pcb.
4 years ago
Seth Hillbrand
7529eb1812
SWIG out connected item vector for use
Fixes https://gitlab.com/kicad/code/kicad/issues/8566
4 years ago
Jon Evans
d76c6bc884
Add NewBoard API to allow standalone BOARD creation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9687
4 years ago
Jon Evans
c5ddb8de26
Hide confusing lowercase version of GetCenter from SWIG
4 years ago
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
4 years ago
Jon Evans
0234ae3003
Add CloneFrom API for BOARD_DESIGN_SETTINGS in SWIG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6885
4 years ago
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
4 years ago
Asuki Kono
762cd5a32f
Add PLACE_FILE_EXPORTER to swig to call in python
4 years ago
Jon Evans
5475303ec2
Allow loading secondary boards from Python
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9271
4 years ago
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).
4 years ago
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.
4 years ago
qu1ck
6db0216dd4
Bring back python compatibility constants for SHAPE_T
They were removed in a41944020d
and that broke a lot of stuff.
4 years ago
Seth Hillbrand
57d0cbcefa
Fix python QA
4 years ago
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
4 years ago
Seth Hillbrand
9a8d1246cc
We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
4 years ago
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.
4 years ago
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
4 years ago
Mike Williams
16ec6fbec4
Plugins: Fix QR code generator shape exception
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9079
4 years ago
qu1ck
0f7c0e3872
PCM implementation
5 years ago
qu1ck
78ab69027d
Add 3rdparty/plugins to plugin search
5 years ago
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
4 years ago