Commit Graph

444 Commits

Author SHA1 Message Date
Simon Richter b4ad8ec560 Order source file names alphabetically 2017-12-27 14:01:05 -05:00
Tomasz Włostowski eed924fe45 Fixed zone filling crash & thermal stubs inconsistency
Fixes: lp:1737557
* https://bugs.launchpad.net/kicad/+bug/1737557
Fixes: lp:1737542
* https://bugs.launchpad.net/kicad/+bug/1737542
Fixes: lp:1737541
* https://bugs.launchpad.net/kicad/+bug/1737541
2017-12-14 01:29:08 +01:00
Tomasz Włostowski f34b86d39e pcbnew: made zone filling algorithm thread-safe.
- moved zone filling algo outside ZONE_CONTAINER class
- const'ified methods that don't need to modify zone's properties
- cleanup: m_FillMode -> enum
2017-12-05 14:54:57 +01:00
Tomasz Włostowski d1d9e57b86 pcbnew: removed unused files 2017-12-05 14:54:57 +01:00
Tomasz Włostowski fdd5023aee pcbnew: factored out ZONE_FILLER to a separate file 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Nick ?stergaard c74437a44e Remove unused custom cmake target
This target seems to only create empty makefiles, tested on linux. And I
can not find any references to it in any of the current CMakeLists. Lets
remove it.
2017-12-03 18:21:40 -05: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
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Tomasz Włostowski c9817df9db refactoring: implemented BOARD-specific view Add()/Remove()/Update() methods in PCB_VIEW, moved to libpcbcommon 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 0245912c34 refactoring: split BOARD_ITEM::SwapData to use polymorphic per-item methods 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 06f3b35255 refactoring: moved BOARD_COMMIT, PCB_GENERAL_SETTINGS and TransformShapeWithClearanceToPolygon() to libpcbcommon 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 8a09a1d329 refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there 2017-11-03 20:02:06 +01:00
Maciej Suminski c3c5205393 GenCAD exporter: settings dialog 2017-10-24 23:10:40 +02:00
jean-pierre charras e504746fa3 Rename muonde.cpp to microwave.cpp 2017-09-19 15:51:45 +02:00
jean-pierre charras e2d3fcec02 Add support for custom pad shape. Full support in DRC and PnS.
add option to use shape or convex hull as clearance area in zones.
simplify code to handle clearance area
2017-09-19 09:02:53 +02:00
Jon Evans eec1366ead Move ZOOM_TOOL to common; add RMB-drag to zoom out 2017-08-31 10:04:00 +02:00
jean-pierre charras 50164e9968 Add Gerber job file writer in Pcbnew, and a basic reader in Gerbview. Currently disabled
Fix also very minor issues in Gerbview
2017-08-30 11:04:33 +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
Tomasz Włostowski de7f4d7aa4 fixed unresolved symbols while running cvpcb 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 94a80acb36 DLIST_ITERATOR improvements 2017-06-23 11:12:36 +02:00
Russell Oliver aeb23188f1 Add Position Relative tool 2017-06-12 16:24:52 +02:00
jean-pierre charras afe92c7bfc Pcbnew: Add creation of Drill Files in Gerber X2 format.
Gerbview: add support of drill files in Gerber format.
Fix also an issue in drill dialog: Axis choice is now common to plot a drill files.
2017-05-01 12:43:40 +02:00
Collin Anderson 9b876d9d98 Fix build of Python plugin for macOS 2017-03-31 08:49:48 -04:00
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
John Beard 9fe780f1b3 Rework zone creation in GAL
The zone creation in DRAWING_TOOL was a complex event loop whici
simultaneously managed the event handling, construction of the preview
polygon and the creation and commiting of the zone, all in the same
scope. This has been broken into several pieces:

* POLYGON_ITEM preview item, used to preview the polygon in progress
* POLYGON_GEOM_MANAGER is a class that collects points from user input
  and used them to describe a polygon's geometry, including calculation
  of 45-degree constrained leader lines
* ZONE_CREATE_HELPER is a class which deals with creating zones based on
  geometry from a geometry manager and parameters from the DRAWING_TOOL
* The (much simpler) event loop in DRAWING_TOOL drives the
  POLYGON_GEOM_MANAGER. With a minor refactor, this loop can be reused
  in future for other polygonal tools if wanted.

The polygon preview now has a translucent fill which makes it easier to
visualise the zone.

This also adds the Close Zone Outline and Delete Last Corner actions as
part of the new event loop.

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

Fixes: lp:1667885
* https://bugs.launchpad.net/kicad/+bug/1667885
2017-03-22 17:18:12 +01:00
jean-pierre charras 230980fc9d Compile specctra file with pcbnew files, not with pcbcommon files (they are now used only by pcbnew) 2017-03-20 19:49:10 +01:00
John Beard ce731f8b62 Add GAL microwave tools
This adds the microwave tools to GAL in Pcbnew as a new tool:
MICROWAVE_TOOL.

Some new preview items are introduced to support this:

* TWO_POINT_GEOM_MANAGER for managing construction of two-point
  geometries, such as that used to construct the inductor.
* CENTRELINE_RECT_ITEM a preview item to draw ractangle with a given
  aspect ratio along a line (specified using a TWO_POINT_GEOM_MANAGER)

PCB_TOOL gets a generic event loops which should be useful for more
than just microwave tools:

* doInteractiveItemPlacement() - handles event loops that wait for a
  click, create an item on click and then allow moving it
  around/flipping, etc.

Fixes: lp:1531323
* https://bugs.launchpad.net/kicad/+bug/1531323
2017-03-20 16:10:51 +01:00
John Beard 3994e9a268 Allow calling of MW inductor function externally
This makes it possible to access the creation functions
for the microwave inductor externally, so that it can be
used from GAL.

Unlike the Gap/Stub tools, the inductor tool is more interactive, and
doesn't just return a MODULE*.

Introduces a new directory in pcbnew called 'microwave' to better
isolate generic (i.e. canvas-agnostic) functions, and a namespace MWAVE
to avoid polluting the global namespace.
2017-03-20 16:10:51 +01:00
John Beard bdc9ae75f5 Add a display settings dialog to Modedit
For a start, this contains the GAL display settings (AA settings and
grid styling).

In future, other modedit-specific settings could go here too.

Fixes: lp:1672150
* https://bugs.launchpad.net/kicad/+bug/1672150
2017-03-16 08:01:33 -04:00
Jon Evans 082b8dd2a9 Refactor BRIGHT_BOX to common so it can be used by other programs 2017-03-11 21:38:01 +01:00
John Beard 9c08873210 Make SELECTION_AREA a generic overlay item
This simplifies the (already simple) SELECTION_AREA class. It is also
moved into KIGFX::PREVIEW and put in the common library, where it can be
reused by other GAL-aware tools (not just in Pcbnew) in future.
2017-03-10 16:21:44 +01:00
Jon Evans fd4e2b042c Refactor SELECTION, SELECTION_CONDITIONS, and context menus to common
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.

Fixed compilation warnings on clang (Tom)
2017-02-28 14:47:20 +01:00
Simon Richter 3bf0b9534c Fix incorrect parameter if the compiler doesn't support -Wshadow option 2017-02-23 17:55:55 +01:00
jean-pierre charras 11dcb76fc9 Add -Wshadow compil option, if exists to warn about shadowed variables.
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
John Beard 6ba9a512b6 Factor DIALOG_BLOCK_OPTIONS into separate compilation unit
This means the dialog can be accessed from both GAL and legacy modes.

This also removes the use of static bools for passing the selection
states and instead used a struct of values passed in by the calling
code.
2017-02-23 10:50:38 +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
Jon Evans 167f45ca2b Refactor COMMON_ACTIONS into a base and derived class
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
2017-02-22 10:32:48 +01:00
Dick Hollenbeck 45cf772833 Make the python pcbnew native module from the _pcbnew.kiface, phase 1 of a 2 part plan. 2017-02-21 07:56:17 -05:00
Chris Pavlina 2632b1d1a0 Revamp component chooser and add footprint preview
This commit brings several changes:

- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
  patches a column size bug
- Linkify datasheet URL in info pane
2017-02-18 21:39:55 -05:00
John Beard 7045ed92fb Add CCW rotation to GAL canvas
This makes "rotate" into two separate TOOL_EVENTs, which each have a
"multiplier" parameter.

Also added is a namespace for 'free functions' that use TOOL_EVENT
public interfaces (perhaps with other inputs too) to centralise some
decision-making and calculations.

Fixes: lp:1660731
* https://bugs.launchpad.net/kicad/+bug/1660731
2017-02-09 12:50:47 +01:00
John Beard 32ddd72038 Move DIALOG_EXCHANGE_MODULE to dialogs dir
DIALOG_EXCHANGE_MODULE class now has its own header file in the
pcbnew/dialogs directory, and the xchgmod.cpp files was moved along with
it. This has two aims:

* (minor) Standardise the location of "base dialog" derived classes,
  like most other dialogs in KiCad.
* (major) Allow inclusion of this dialog class into both legacy-mode
  pcbframe.cpp and into GAL tools.
2017-02-01 09:19:48 +01:00
Maciej Suminski 750eed7ff5 Renamed MODULE_TOOLS to MODULE_EDITOR_TOOLS 2017-01-27 15:39:41 +01:00
John Beard beed72ffbb Add pad import/export/push to GAL canvas
This implements the pad import/export to the board's master pad setting
in the GAL canvases.

Implemented as a new GAL tool: PAD_TOOL.

It uses the same dialog, which has been split out into its own files in
pcbnew/dialogs, rather than along with frame methods in
pcbnew/globaleditpad.cpp.

Fixes: lp:1619304
* https://bugs.launchpad.net/kicad/+bug/1619304
2017-01-25 20:17:28 +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
John Beard d7db84e282 Break out tools' common menu functions and ownership
Add a class TOOL_MENU, which provides a management class for a
CONDITIONAL_MENU and a set of CONTEXT_MENUs. The aim of this is to
provide a central place where all TOOL_INTERACTIVEs can get a "basic"
context menu that either they or other tools can register new items and
sub-menus against.

This means that "top-level" tools no longer need to manage the lifetimes
of any CONTEXT_MENUs that they add, and can also delegate simple menu
display functions.
2017-01-12 14:33:57 +01:00
Jean-Pierre Charras e0fb7f89f4 Pcbnew: additional scripting build warning fixes.
Add pcbnewPYTHON_wrap.cxx to the list of files to apply -Wno-suggest-override
compiler flag to prevent compiler warnings on file that is generated by SWIG.
2016-10-06 09:06:42 -04:00
John Beard 6504b7b55c Disable -Wsuggest-override for scripting files, but not other files
This allows the warning to be active for code which would benefit from
it, but not spew hundreds of warnings for code over which KiCad does not
have control of the override specifiers.
2016-10-05 10:43:56 -04:00