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
Jeff Young
baab2e6119
Attempt to fix SWIG issue.
2021-08-23 22:04:31 +01:00
Wayne Stambaugh
46b959c3e3
Move plotter headers into include folder.
2021-08-18 16:38:31 -04:00
Jon Evans
8eba0b356b
Fix issues calling SaveBoard on board loaded from PcbNew frame
...
KiCad cannot have more than one board/project open, so disallow
the Python APIs for loading additional boards when the frame is
present. Inherit the SETTINGS_MANAGER from the frame when present
instead of creating a new one that won't have the loaded project.
2021-08-14 09:18:21 -04:00
qu1ck
7b4dcb6e10
Refactor ExportSpecctraFile to be usable in API
...
Currently there is pcbnew.ExportSpecctraDSN() but it needs a pcbnew
frame set which makes it unusable outside of the scripting window or a
plugin.
This refactors actual exporting logic into separate helper and adds an
overload to ExportSpecctraDSN(board, filename) that doesn't need pcbnew
window.
2021-07-31 09:55:48 +00:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
f221220fe2
Rename layer ids file.
...
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
37b200cb3e
Pass wxString objects by reference instead of on the stack.
2021-07-27 08:41:27 -04:00
qu1ck
c946070005
Fix TRACKs not being cast correctly in API
2021-07-26 22:37:22 +00:00
jean-pierre charras
31d2b2df8b
QA test: fix a wx assert about Locale when running qa_python tests.
...
Probably happens only when the system locale uses a comma as fp separator.
2021-07-23 11:45:45 +02:00
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
2021-07-21 20:58:59 +01:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00
jean-pierre charras
6a886e7085
Wizard qrcode_footprint_wizard.py: fix a minor issue and update code.
2021-07-19 18:36:58 +02:00
luz paz
8bacc9fccb
Fix python 'testing for equality' syntax
...
'Testing whether an object is 'None' using the == operator is inefficient and potentially incorrect.'
Per https://lgtm.com/projects/g/KiCad/kicad-source-mirror/?mode=tree&ruleFocus=7900090
2021-07-19 15:42:30 +00:00
jean-pierre charras
4eafd2664a
FootprintWizardBase.py: fix use of cmp(), non existing in python3
...
Fixes #8677
https://gitlab.com/kicad/code/kicad/issues/8677
2021-06-25 09:04:49 +02:00
jean-pierre charras
5b8f32acd2
Python script sample: fix compatibility with recent changes in code.
2021-06-15 18:19:58 +02:00
jean-pierre charras
142dd48c99
SCRIPTING_TOOL::showPluginFolder(): fix wxWidgets3.14 compatibility (Linux mainly)
2021-06-15 18:19:58 +02:00
jean-pierre charras
fbbe723811
Fix board_item.i after recent changes in Pcbnew code.
...
(some class names changed)
2021-06-15 10:59:52 +02:00
jean-pierre charras
30f3d11355
fix possible incompatibilities of python scripts due to recent code cleaning
2021-06-14 18:57:05 +02:00
Jon Evans
82f3df4086
Attempt to fix Python qa code after renames
2021-06-13 11:20:19 -04:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
Jeff Young
16b0147af8
Prefix DIMENSION types.
2021-06-11 17:59:44 +01:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
d946d6e68f
Cleanup some pgm_base.h includes
2021-06-08 21:56:00 -04:00
Seth Hillbrand
891e200fc8
Use Python to test for modules (not CPython)
...
CPython call requires Python 3.8+, so we work around to keep the 3.6
users happy
Fixes https://gitlab.com/kicad/code/kicad/issues/8554
2021-06-07 13:56:31 -07:00
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
2021-06-06 15:03:42 -04:00
Marek Roszko
4712d7a918
Remove a leaky wx/msgdlg.h include
2021-06-06 08:45:38 -04:00
Ian McInerney
2533fb22b3
Add the new pcb item container header to the SWIG wrapper
2021-06-04 12:49:11 +01:00
Ian McInerney
23f8851409
Remove pcb_group include from board header
2021-06-03 20:03:31 +01:00
Ian McInerney
7bbf1b07b7
Fixup to expose PCB_GROUP in Python
2021-06-03 20:00:45 +01:00
Jean-Samuel Reynaud
e2e963d14a
Adding PCB_GROUP to python interface
2021-06-03 18:55:46 +00:00
Seth Hillbrand
68a5d5dc01
Fix issue reloading plugins
2021-06-01 20:18:24 +00:00
Seth Hillbrand
bbcc840989
Cleanup rebase fns
2021-06-01 20:18:24 +00:00
Seth Hillbrand
adf885b667
Move pcbnew swig
...
Separates the python scripts into those using swig and those needed for
other scripting
2021-06-01 20:18:24 +00:00
Seth Hillbrand
81d58bcea9
Working python window
2021-06-01 20:18:24 +00:00
jean-pierre charras
4d9829ec8b
Fix some issues related to python scripts:
...
- make PadArray.py compatible python2/3
- fix a wxWidgets warning in pcbnew_scripting_helpers.cpp shown in some cases
2021-04-28 14:02:47 +02:00
jean-pierre charras
524ca442f3
Old python scripts: fix issues due to code change, and make them Python3/3 compatible
2021-04-27 11:55:56 +02:00