Commit Graph

51 Commits

Author SHA1 Message Date
jean-pierre charras 30e3f2e781 fix forgotten change after renaming files 2018-01-29 17:34:12 +01:00
jean-pierre charras ac0dd118fd fix compil issue in swig interface. 2018-01-28 20:03:46 +01:00
Miles McCoo 5cc1cda29f BuildConnectivity and re-DisplayBoard in python Refresh function
Refresh is used in the python domain to refresh the display with the current
design. If something has changed, board connectivity likely needs rebuilding.
If using GAL canvas, update its display db.
2017-12-22 08:59:19 -05:00
Maciej Suminski d205366da7 Add support for wchar_t to SWIG 2017-12-08 18:04:51 +01:00
Miles McCoo d16a5c1d6c Changes to python interface enabling net->pads access.
Added new file connectivity.i to expose CONNECTIVITY_DATA to
python. enables access to d_pads from nets.

Added typemap to board_connected_item.i. since board_connected_item
doesn't use virtual inheritance, when returning a std::list of these
items, the typemap populates the return list with the child
types. This enables python scripts to use the full interface of those
classes (pad, track, zone)

Added typeinfo.i to enable passing a list of KICAD_T values to methods
GetNetItems. This list acts as a query filter. typeinfo.i is included
from pcbnew.i right after kicad.i (instead of in board.i like the
others) typeinfo.h is already being included kicad.i so to ensure the
typemap(s) are properly applied I put them next to each other.

The two new files (typeinfo.i and connectivity.i) were added to
pcbnew's CMakeLists.txt as dependencies.
2017-11-23 17:35:39 +01:00
Henner Zeller ff5ee05def Fix Python scripting bug when saving board to file. 2017-11-18 11:00:24 -05:00
jean-pierre charras 00bb00016b Fix a forgotten change. 2017-11-16 16:22:12 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Russell Oliver 3b0855d204 Eagle Project Import: Code cleanup and documentation.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
2017-10-20 08:58:40 +02:00
jean-pierre charras cb3d28f11b define SetPadName() and GetPadName() (old name of D_PAD::SetName() and GetName()) for compatibility with existing python scripts 2017-10-09 09:58:15 +02:00
Maciej Suminski cca63801bf Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name() 2017-09-19 18:23:50 +02:00
jean-pierre charras a557838c61 Fix incorrect refresh of User Interface after running an action plugin, and add comments 2017-08-27 08:13:35 +02:00
jean-pierre charras 4d0c1577d2 Fix Pcbnew Python: LoadBoard does not rebuild connectivity database, and later, SaveBoard does not save net class memberships
Fixes: lp:1711268
https://bugs.launchpad.net/kicad/+bug/1711268
2017-08-17 18:00:34 +02:00
jean-pierre charras bafb8c3688 Add old python method FootprintEnumerate which did not word after changes in C++ code 2017-06-29 20:43:39 +02:00
Maciej Suminski 37f8c83c5b Fix the BOARD & MODULE classes SWIG interface 2017-06-26 18:28:23 +02:00
Maciej Suminski 3aaf26da2e Fixes for pcbnew_scripting_helpers.cpp 2017-06-23 19:22:27 +02:00
Tomasz Włostowski d8018ded0b fix build with Python 2017-06-23 11:12:37 +02:00
jean-pierre charras 1951ee924c Very minor change in some sources: replace in comments CHANGE_LOG.TXT AUTHORS.txt 2017-05-25 09:05:35 +02:00
jean-pierre charras 38c8470cdc add comments in pcbnew_scripting_helpers.h 2017-05-24 21:34:56 +02:00
jean-pierre charras 9c7b0c2ee5 Fix a compil issue created by may commit 413a3d828a
.
2017-05-24 21:14:24 +02:00
jean-pierre charras 413a3d828a remove dead code in swig 2017-05-24 18:08:15 +02:00
jean-pierre charras c8706e9c15 Fix compil issue in Python support. 2017-05-01 14:19:38 +02:00
Miles McCoo 11c42cdff7 Minor Pcbnew Python scripting improvement.
Added NETCLASSPTR constructor to swig interface. This enables scripts to
generate new net classes.
2017-04-14 08:49:51 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Miles McCoo db174862c8 Minor Pcbnew Python scripting improvements.
Add typedef for wxCoord to wx.i to enable usage of methods like
EDA_RECT.Inflate.

Added id.h to pcbnew.i to expose window toolbar identifier names.

Added Refresh() and WindowZoom() to pcbnew_scripting_helper.
2017-03-17 10:41:00 -04:00
John Beard c523ba45e1 Fix shadowed variable in python_scripting.cpp 2017-03-10 09:08:45 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Jean-Samuel Reynaud 13395d34dd Action plugins: handle undo/redo feature when running an action plugin. 2017-02-06 08:39:32 +01:00
jean-pierre charras 7bda89cdf6 Rework on plugins reload code: avoid duplicate code. 2017-01-29 12:25:19 +01:00
jean-pierre charras a7c4c8c7f2 Pcbnew: Fix a crash when reloading python scripts, when Kicad uses wxPython.
also, refresh the board editor action plugins menu, when reloading python scripts from the footprint wizard selector.
2017-01-28 18:47:11 +01:00
jean-pierre charras 2b5769c0a8 Action plugins: simplify code, and fix an issue: the menubar was not correctly rebuilt after closing and reopening pcbnew from kicad.
It was also not correctly rebuilt after language change.
2017-01-23 13:27:49 +01:00
Jean-Samuel Reynaud 5ef3e5a15d Pcbnew: Add ACTION_PLUGINS class. It allows loading python scripts in footprint editor and run them from the Tools/External Plugins menu
This plugin mechanism is enabled only if option -DKICAD_SCRIPTING_ACTION_MENU=ON (it is off by default)
It imply -DKICAD_SCRIPTING=0N
This is currently for testing purposes only for developers, not yet for users.
2017-01-23 13:27:49 +01:00
jean-pierre charras 4f46f79cf0 dialog_footprint_wizard_list.cpp: allows updating (on request) python modules from this dialog.
This option reloads modules which are more recent than already loaded modules, and load new modules.
2017-01-09 14:44:24 +01:00
jean-pierre charras e6a8294c56 dialog_footprint_wizard_list: add button to show the trace of errors when python scripts wizards failed to load. 2017-01-07 20:43:39 +01:00
jean-pierre charras 44cc728b25 enforce a control to avoid crash if pcbnew.py is an incorrect version (bad install). 2017-01-07 16:25:11 +01:00
jean-pierre charras 76a82dcd3b Dialog footprint wizard selector: better dialog (displays the wizard search path list) and allows double click to select a wizard 2017-01-07 13:39:47 +01:00
jean-pierre charras 56f8e10eb4 Footprint wizards management: Now display the list of not loadable footprint wizards in footprint wizard dialog.
Not loadable wizards are Python scripts having a syntax error or are not compatible scripts due to changes in API.
2017-01-06 20:15:23 +01:00
jean-pierre charras 1a464ab8c8 Coding style fixes 2017-01-03 18:04:35 +01:00
Oliver Walters 66ee44cb1f Footprint Wizards Update 2017-01-03 16:01:47 +01:00
Oliver 636e060c99 A few enhancements from a larger patch, not yet committed, for footprint wizards 2016-12-28 10:26:01 +01:00
Wayne Stambaugh 64c892ee23 Make footprint ID into a generic library ID.
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.

Remove all mention of footprint from the new LIB_ID doxygen comments and
code.

Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.

Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.

Update all source files effected by the code and file name changes.

Update .gitignore for file name changes.
2016-11-20 18:35:08 -05:00
jean-pierre charras 41735b6563 Add missing override keywords. 2016-09-26 19:58:33 +02:00
Dick Hollenbeck 374808ac5b Cleanup SWIG's board.i, remove scrap *.{ref,orig} files, and add .pyc to .gitignore 2016-09-23 08:04:12 -04:00
Dick Hollenbeck b8dc6af706 fix swig warning 2016-09-22 15:42:42 -04:00
Dick Hollenbeck 29be200843 Add SWIG support for NETCLASSPTR. Reduce SWIG visibility from C++ headers. 2016-09-21 19:52:04 -04:00
Dick Hollenbeck 85ef7ee467 Remove BOARD::Add() from board.i, since it is inherited from board_item_container.i 2016-09-21 19:12:45 -04:00
Dick Hollenbeck 1edaa773d3 Fix minor SWIG issues due to git rebase issues. 2016-09-20 21:52:48 -04:00
Dick Hollenbeck 1718ac1083 More SWIG improvements.
SWIG support for BOARD_ITEM_CONTAINER.
Split board.i into smaller included *.i files.
Add depencies on these smaller *.i files to CMakeLists.txt
2016-09-20 21:48:44 -04:00
Dick Hollenbeck d957670034 Add more HANDLE_EXCEPTIONS(), board.i refactoring. 2016-09-20 12:00:17 -04:00