Commit Graph

99 Commits

Author SHA1 Message Date
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
Carsten Schoenert 8dff3725ac Typo fix: Correct 'allow to' -> 'allows one to' 2021-04-03 13:39:50 +00:00
qu1ck 3199a88d54 Fix pcbnewshell not showing namespace inspector tools
on msvc build with recent wxpython
2021-03-02 17:12:57 +00:00
Graham Keeth 4bf79f2b90 Remove ddr3_length_match.py
The script is designed to be used with a particular board that does not
exist in the repository.
2020-11-20 08:10:53 +00:00
jean-pierre charras 103dbb9fbd Some fixes in python footprint wizards 2020-11-14 13:38:44 +01:00
Dominik Wernberger 28991ddf58 Rename D_PAD to PAD 2020-11-14 09:37:45 +00:00
Dominik Wernberger 54878b04a5 Rename MODULE to FOOTPRINT 2020-11-14 09:37:45 +00:00
Dominik Wernberger a4650e7269 Rename GetModules to GetFootprints 2020-11-14 09:37:45 +00:00