Commit Graph

230 Commits

Author SHA1 Message Date
Tomasz Włostowski a4528988ca pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449

Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Maciej Suminski 9b5dc5c215 GAL show markers for zone outlines gap test
Moved a DRC function (BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines)
from BOARD class to DRC (DRC::TestZoneToZoneOutline). Added BOARD_COMMITs
to handle marker visibility updates.

Fixes: lp:1619124
* https://bugs.launchpad.net/kicad/+bug/1619124
2017-12-08 11:33:32 +01:00
jean-pierre charras 1164eaab72 Make the "No Net" mark color editable (mark for pads having no net name)
Note: this mark is currently drawn only in legacy canvas.
2017-10-05 20:11:55 +02:00
Tomasz Włostowski c6a0ad895b pcbnew: code formatting, removed previous module editor copy/paste functions 2017-09-30 14:28:54 +02:00
Tomasz Włostowski f573a2e685 wip 2017-09-30 14:28:54 +02:00
Kristoffer Ödmark aaa1e35b6a Heirarchical sheet selection includes more.
Now the heirarchical sheet selection feature includes tracks that belong
to a net spanning multiple sheets, but only by doing a logical connection
from the pads of the modules. This is to be able to select connections
between components on the same sheet. For example if the sheet contains a
star power connection or something similar, then most of the sheet local
connections will now also be included.
2017-09-18 11:16:13 +02:00
Maciej Suminski 450f006d7d Keep the default net class object per board, not static
Fixes: lp:1711491
* https://bugs.launchpad.net/kicad/+bug/1711491
2017-08-31 17:46:17 +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
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
Maciej Suminski f1d650d5be Use node & unconnected count from CONNECTIVITY object 2017-06-23 18:51:00 +02:00
Maciej Suminski f3fbce9560 Code formatting and clean-up 2017-06-23 15:43:13 +02:00
Tomasz Włostowski 3b7b0603b6 pcbnew: via placement tool, initial version 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 3cba1007eb Removed legacy connectivity/ratsnest algorithm, replaced with the new one. No legacy autorouting for the moment 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 9ad886344b New connectivity algorithm. 2017-06-23 11:12:36 +02:00
Tomasz Włostowski 08314082db Hide DLISTs behind iterators, first step towards refactoring the storage model 2017-06-23 11:12:36 +02:00
jean-pierre charras 6a63d4fbff pcbnew crash while opening old .brd file
Fixes: lp:1698697
https://bugs.launchpad.net/kicad/+bug/1698697

The incorrect method ZONE_CONTAINER::AppendCorner() is also fixed:
It was expecting the corner must be added to the main outline, but this is a false expectation:
it can be added to a hole inside the zone outline.
2017-06-19 13:29:57 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
jean-pierre charras 05220a86f1 BOARD::GetBoardPolygonOutlines(): do not generate a separate SHAPE_POLY_SET for holes.
They are already managed by SHAPE_POLY_SET board outline.
2017-03-22 11:47:03 +01:00
Maciej Suminski 2483dab72f Do not cache board bounding box 2017-03-03 13:28:19 +01:00
Maciej Suminski a073a90c45 Remove BOARD::SetBoundingBox()
Bounding box should be computed basing on the items belonging to the
board.
2017-03-03 13:28:19 +01:00
Jon Evans 88f7c55d95 Move ZoomFitScreen and ZoomPreset from PCBNEW_CONTROL to COMMON_TOOLS
BOARD::GetBoundingBox() now directly calls BOARD::ComputeBoundingBox()
and there is a new method BOARD::GetBoardEdgesBoundingBox() used for
call sites that needed to use ComputeBoundingBox( true ) in the past.

This allows COMMON_TOOLS to implement ZoomFitScreen without knowledge
of the BOARD class.
2017-03-03 13:28:19 +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
John Beard bbf8a0fa06 Tidy consts in class BOARD
Add some consts to "getters" in this class.

Remove const from return type of static return-by-value getter - this
has no effect on the caller except disabling move operations and forcing
copy operations.
2017-01-29 23:46:41 +01:00
jean-pierre charras 038f8713ce Pcbnew: trace length calculations:
fix incorrect calculation when a small segment at the end of the track was inside a pad: it was not taken in account.
Fix also the len die values not always taken in account (references to pads at end of track not always stored)
This is a partial fix of bug 1628585.
2016-10-14 10:35:08 +02:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Dick Hollenbeck 7311f07eaf SWIG Improvements
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
   for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
   common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
   libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
   which is to be applied to any function which needs C++ to python
   exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
   in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
   which rebuilds the swig generated *.cxx file when one of its dependencies
   change.
*) Re-architect the board.i file so that it can be split into multiple *.i
   files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
   phase III.
2016-09-20 11:59:43 -04:00
Maciej Suminski 0cc2c87ef8 Removed BOARD::AppendNet()
It is handled by BOARD::Add() now.
2016-09-12 13:45:57 +02:00
Maciej Suminski 5c0605f6dc Mute a few warnings 2016-09-12 11:50:06 +02:00
Tomasz Wlostowski a5b7a7ca0a Changed DuplicateAndAddItem() to parametrized Duplicate(). 2016-09-12 11:50:06 +02:00
Maciej Suminski b897c5f290 BOARD_ITEM_CONTAINER class. 2016-09-12 11:50:06 +02:00
Maciej Suminski 2c08ff1d59 Switched to default copy ctor and/or operator= for BOARD, BOARD_CONNECTED_ITEM, DRAWSEGMENT & EDGE_MODULE. 2016-09-12 11:50:06 +02:00
Dick Hollenbeck 7434e68876 Pcbnew: improved track scripting support. 2016-07-19 16:34:09 -04:00
Dick Hollenbeck e24990146d Pcbnew: major swig fix.
* Switched hashtables.h over to std::undordered_map from boost version.

* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
  These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
  and C++ so that the resultant type name is common in both languages, and
  the types AGREE.

* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.

* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
  NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
  comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.

* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
  Having the name consistent between like types is helpful, and between
  languages.  std::map<> ends up as SOMETHING_MAP.

* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
  instead of hashtables, because swig does not yet support std::unordered_map.

* You can now get to any netclass or net info.   NETNAMES_MAP and NETCODES_MAP
  are traversable basically the same as a python dictionary using a python
  string (not wsString) as the key!  The wxString typemap converts python
  string to wxString before the lookup happens.  Iteration also works.
2016-07-18 13:23:09 -04:00
Dick Hollenbeck c2b8a4ee43 Move from class INSPECTOR as the EDA_ITEM::Visit() callback interface to a std::function
callback.  This improves conciseness and encourages use of Visit() due to the lower cost
of entry in C++.
2016-07-12 15:05:54 -04:00
jean-pierre charras e2cc78b2b5 Code cleanup: remove dead code (some removed methods were broken), and update or add comments. 2016-06-01 11:28:07 +02:00
Tomasz Wlostowski 9e609acae3 made netlist entries and netlist update undoable 2016-01-29 11:21:13 +01:00
jean-pierre charras 74b629fa19 Fix issues I created in rev 6442 (no issue on msys2/gcc5.3, but issues on Kubuntu 14.04/ gcc 4.8). I'll find a better fix later. 2016-01-11 10:13:13 +01:00
jean-pierre charras 41db57c5f0 pcbnew.py: fix error "NameError: name 'UNDEFINED_LAYER' is not defined" when running pcbnew/wxPython, which prevents from openning the Python console.
CMakeLists.txt: remove no more used boost libs, and add missing coroutine lib in list.
Fix 2 minor compil warnings.
2016-01-11 09:26:55 +01:00
Jon Neal f309eaab00 Pcbnew: spread and pick up new footprints when loaded. 2016-01-10 16:24:13 -05:00
Dick Hollenbeck b27176f230 Pcbnew: fix segfault after deleting a pad from a footprint then performing a DRC action such as a via drag. 2015-09-23 19:02:40 -04:00
Tomasz Wlostowski 63b35f40a7 Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET. 2015-07-27 21:45:57 +02:00
Maciej Suminski d2ebf688f9 Reverted commits that remove boost::polygon dependency (need more testing). 2015-07-14 22:23:13 +02:00
Tomasz Wlostowski 41c753b05d Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET. 2015-07-14 13:36:24 +02:00
unknown be42bd163b BOARD::chainMarkedSegments() : fix coding style, bad comments, and better debug messages. 2015-07-10 18:43:25 +02:00
Maciej Suminski 3cb095b7c2 GAL canvases update status bar, message panel & zoom widget. 2015-07-03 20:58:12 +02:00
Maciej Suminski 28a270a328 Refactored grid origin point drawing (GAL). 2015-06-18 17:51:53 +02:00
Maciej Suminski 42215f2388 Moved GetLayerSet() to BOARD_ITEM. 2015-06-04 14:54:07 +02:00
Maciej Suminski f06690c8d3 Merged lp:~john-j-beard/kicad/moveexact. 2015-02-18 20:27:00 +01:00
Miguel Angel Ajo 1e2af7fed1 Add GetLayerID method to BOARD.
This method is added for scripting purposes, to be able to query
specific board layer names thru a board object.

If no board specific layer name is found, it will fallback to
standard layer names.
2015-02-15 14:31:47 +01:00