Commit Graph

14959 Commits

Author SHA1 Message Date
Jeff Young 577bb73320 Revert 7d06651a10. 2019-01-28 20:10:13 +00:00
Seth Hillbrand 9d99fd188f Revert "Change top selection drop-down to combobox"
This reverts commit 7d06651a10.
2019-01-28 10:15:32 -08:00
Seth Hillbrand 9742062712 Revert "Fix missing Choice->Combobox change"
This reverts commit 0fa374cce5.
2019-01-28 10:15:25 -08:00
Seth Hillbrand 4901481e12 eeschema: Rotate bus wire entry components
These components were rotatable as a block but not individually.

Fixes: lp:1809448
* https://bugs.launchpad.net/kicad/+bug/1809448
2019-01-28 09:55:56 -08:00
Seth Hillbrand e2b3a1118d Eeschema: Filled labels
Fill label bg for clearer schematic view
2019-01-28 08:58:10 -08:00
Tomasz Włostowski 6afb082a08 eeschema: fix disappearing graphics when block move is aborted after rotation/flipping
Fixes: lp:1809444
* https://bugs.launchpad.net/kicad/+bug/1809444
2019-01-28 14:46:21 +01:00
Tomasz Włostowski ef2af9145e eeschema: implement left click emulation with Enter/Return key in library editor
Fixes: lp:1788075
* https://bugs.launchpad.net/kicad/+bug/1788075
2019-01-28 14:17:59 +01:00
Tomasz Włostowski 4a0fba309a geometry: revert SHAPE_LINE_CHAIN::PointInside/PointOnEdge() optimizations so that it's consistent with other collision checking methods (i.e. SEG::Distance() )
Fixes: lp:1810935
* https://bugs.launchpad.net/kicad/+bug/1810935
2019-01-28 13:24:41 +01:00
Tomasz Włostowski fd0381ea09 router: fix dragging when dragged segment has adjacent segment(s) at 180 degree angle
Fixes: lp:1812535
* https://bugs.launchpad.net/kicad/+bug/1812535
2019-01-28 10:31:50 +01:00
jean-pierre charras e850a482d1 Gerber output: fix a potential minor issue in a G04 line comment.
In gbr files only ASCII7 chars are allowed.
However, in a comment line a UTF8 string is used. It should not create issues, but it is incorrect.
2019-01-27 10:14:16 +01:00
Wayne Stambaugh a55d9819bc Do not use project path when searching for default library tables.
When no default library tables are found, set the default wxFilePickerCtrl
to the users configuration path instead of the current project path to
prevent any project library tables from being used as the default.

Fixes lp:1809769

https://bugs.launchpad.net/kicad/+bug/1809769
2019-01-26 16:19:02 -05:00
Seth Hillbrand 594d5c3e34 pcbnew: overwrite hotkeys cleanly
If user hotkeys do not map all available actions, we still want the most
recent change to be the primary value.  This can happen if the defaults
load a set of hotkeys that are not completely overwritten by the updated
hotkey preferences file.  We assume that the most recent hotkey is what
the user want to map.

Fixes: lp:1778408
* https://bugs.launchpad.net/kicad/+bug/1778408
2019-01-26 12:19:35 -08:00
Thomas Pointhuber 4fc692f04b fix handling of filled circle and default layer width 2019-01-26 07:42:35 -08:00
jean-pierre charras 90178eb681 Optimize DRC calculation for copper texts. fix also a bug in SHAPE_POLY_SET::Distance( const SEG& aSegment, int aSegmentWidth ).
This bug calculate incorrectly the distance between aSegment and the SHAPE_POLY_SET for the first segment of the SHAPE_POLY_SET.
2019-01-26 13:01:48 +01:00
jean-pierre charras b8cfabd22e Fix some issues in I10n strings
Fix typo and missing I10n identifier for 2 strings
2019-01-26 09:25:12 +01:00
Seth Hillbrand 8d777dd5c3 eeschema: Take stroke thickness into account
Spacing text for plotters uses the thickness of text for two separate
classes.  This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set

Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
2019-01-25 14:22:19 -08:00
Seth Hillbrand b63cdcf225 Type cleanup 2019-01-25 13:03:36 -08:00
jean-pierre charras 4cd41e3941 Eeschema: avoid using a incorrect background color the first time a SCH_DRAW_PANEL is displayed
When starting Eeschema, or a frame/dialog using a SCH_DRAW_PANEL, the bg color was initialized too late,
thus creating a flicker or an annoying draw artifact (in SYMBOL_PREVIEW_WIDGET for instance) if a Paint event
is fired before the right bg color is initialized.
Initializing the bg color earlier fix this issue.

Fixes: lp:1797203
https://bugs.launchpad.net/kicad/+bug/1797203
2019-01-25 20:32:46 +01:00
Seth Hillbrand 4fbd5e8e0f pcbnew: UTF8 strings for MSW display
Some MSW seem to have issues with the UTF-8 characters in const
wxString.  This explictly casts to wxString from UTF-8 handling the
platform differences

Fixes: lp:1813329
* https://bugs.launchpad.net/kicad/+bug/1813329
2019-01-25 10:06:26 -08:00
Seth Hillbrand 184711beb4 pcbnew: Fix via snapping to multiple tracks
Rather than selecting an arbitrary track to snap, we select the closest
track to our point, allowing the via to be placed along the full track
length.

Fixes: lp:1813324
* https://bugs.launchpad.net/kicad/+bug/1813324
2019-01-25 09:13:18 -08:00
Seth Hillbrand ff9d814fbd Fix unused vars in wxpython3 2019-01-24 21:25:39 -08:00
John Beard d39cdb5565 Pcbnew: Disallow invalid mwwave inductor lengths
Some microwave inductor lengths cause invalid outputs
for the calculations, which causes jagged outputs.

* If the request length is such that four arcs and no straight
  segments is too long
* If the length is such that an N-turn coil is too short, but
  an N+1-turn coil is too long. This can happen when the coil
  count is small.

This patch doesn't fix the underlying geometric issue here - fixing
the first requires a numerical method, and fixing the second probably
needs an iterative approach. Both of these could benefit from
a refactor.

However, this patch does prevent the tools producing invalid outputs,
which can sometimes be quite subtle mistakes if the "jags" are small.

Fixes: lp:1792119
* https://bugs.launchpad.net/kicad/+bug/1792119
2019-01-24 21:23:43 -08:00
Seth Hillbrand 8b060799eb python: Fix Phoenix app setting
Phoenix doesn't have the same initialization as wxpython3 and so the
namespace doesn't get the wxApp() initialized to the existing instance.
In python, this is worked around by starting a new wxApp.
Unfortunately, this appears to overwrite the existing global instance
variable.  The issue _appears_ to be in Phoenix but for now we work
around it by saving and resetting the instance pointer in the main app.
The downside is that Python likely won't be able to respond to events
from C++

Fixes: lp:1809913
* https://bugs.launchpad.net/kicad/+bug/1809913
2019-01-24 19:41:07 -08:00
Seth Hillbrand 3ea766154b eeschema: Allow tree expand/collapse with +/- 2019-01-24 17:24:28 -08:00
John Beard b690658972 QA: Add coroutine unit test
This adds a simple unit test to qa_common to check coroutines
produce expected events in the right order.

This is an automated analogue to the user-facing tool in
qa/common_tools.
2019-01-24 13:01:44 -05:00
John Beard 6729842441 QA: Reinstate polygon_generator as a sub-util of qa_pcbnew_tools
This program has been disabled for some time, but it's not
broken (even if the CMake was!).

Merging into the pcbnew_tools QA program reduces the CMake burden
and puts this tool in the same place as the others.
2019-01-24 13:01:44 -05:00
jean-pierre charras 70c2380fc2 Minor fixes in code: remove dead code. 2019-01-24 18:23:57 +01:00
jean-pierre charras ebdc383cc3 QA test: add missing boost library (boost system).
This missing lib created link issues on some systems.
2019-01-24 09:03:58 +01:00
John Beard b1a2c5d7c5 Zones: wxPoint/VECTOR2I warnings no longer needed
In the past, the ZONE_CONTAINER::GetPosition() member
returned a reference to a wxPoint, in accordance with the
BOARD_ITEM interface. This meant that ZONE_CONTAINER had
to reinterpret_cast a VECTOR2I (its internal position data) to wxPoint,
which was possible only due to fortunate memory layout.

This interface was changed to return wxPoints by value in
commit a4528988ca, and the normal (wxPoint) cast was used instead.

Thus, we can now also remove the dire warnings and static_asserts
used to ensure the now-unused old method was correct.
2019-01-23 10:39:03 -08:00
John Beard e8afb14046 QA: Move PCB parse util to combined tools exec
This means all the current Pcbnew utilities are all in a single
executable.

The tool is now run by:

$ qa/pcbnew_tools/qa_pcbnew_tools pcb_parser <same arguments as before>
2019-01-23 13:27:52 -05:00
John Beard d7563c55c4 QA: Pcbnew utility tools: DRC tool
Add a tool that allows a user to run DRC functions
on a given KiCad PCB file.

The first available functions are the courtyard functions.

Also move most of the utility program logic into qa_util for
better reusability.
2019-01-23 13:27:52 -05:00
John Beard 8297ab24e4 DRC: Break out courtyard overlap function
Introduce the concept of a DRC_PROVIDER which allows
to separate the various DRC functions to their own
areas. This allows, amongst other things, a slimmer core
DRC class, and allows DRC functions to be separately testable.

The courtyard DRCs (overlap, missing and malformed)
are the first victims, so instrumentation can be added to this function.

Add some unit tests on this DRC function, as well a few re-usable PCB-based
utility functions in a library (qa_pcbnew_utils) that could be shared between
unit tests and other utilities.
2019-01-23 13:27:52 -05:00
John Beard e6edc1b670 DRC: Make the marker factory a separate class
This separates the "newMarker" functions from the DRC class. These
are moved to a new class, DRC_MARKER_FACTORY, which is now responsible for
constructing suitable markers from BOARD_ITEMS.

The reasons for this are:

1) Allow DRC related functions to access theese functions without having
   to bake these functions into the main DRC class.
2) Thereby simplify the DRC class interface
3) As DRC_MARKER is now a small class with public interfaces, it's
   possible to put unit tests on these functions.

The motivation here is to allow to start to split out pieces of DRC
into separate classes.
2019-01-23 13:27:52 -05:00
Seth Hillbrand 4247e32cd6 pcbnew: Disallow new via where DRC is violated
Prior to placing the via, we check if the resulting via will pass too
close to different nets on different layers.

Fixes: lp:1718827
* https://bugs.launchpad.net/kicad/+bug/1718827
2019-01-23 10:20:59 -08:00
jean-pierre charras 86263d6bb3 Pcbnew: Do not immediately refresh the 3D view after each board edition.
Previously, when the 3D viewer is opened, each board edition creates a 3D view refresh, that usually takes a bit of time.
Now the refresh is postponed until the 3D viewer has the focus.
2019-01-23 17:47:17 +01:00
Seth Hillbrand efe880bb79 pcbnew: Fix zone cutout duplication
When creating the zone cutout, we delete the old zone and add a new one
with each cutout.  This requires resetting the source zone and clearing
our previous selection if we would like to continue using the cutout
tool on the new zone.

Fixes: lp:1812339
* https://bugs.launchpad.net/kicad/+bug/1812339
2019-01-23 06:42:07 -08:00
jean-pierre charras 56879a964b Fix cross-probing issue when a net or pin name contains a space.
Fixes: lp:1812902
https://bugs.launchpad.net/kicad/+bug/1812902
2019-01-23 11:30:10 +01:00
Seth Hillbrand 6421b15b83 pcbnew: Allow an epsilon in the inflate before join
Plotting mask layers, we expand by a minimum width before performing a
boolean add of the separate regions.  The boolean add has a separation
condition that includes equality.  Since we are looking for the
complement of the mask, we would like the equality applied to the other
side.  Removing a unit value provides the separation.

Fixes: lp:1698457
* https://bugs.launchpad.net/kicad/+bug/1698457
2019-01-22 19:54:03 -08:00
Seth Hillbrand 0c723778f0 pcbnew: Set default missing soldermask min width
When loading an existing file, a missing value in the soldermask min
width value should not be interpreted as a default value but rather as a
0 value.  This corrects an issue introduced by 4d709d2392
2019-01-22 17:01:32 -08:00
Seth Hillbrand 823dce1a50 modedit: Allow name input for new footprint library
When prompting for a new footprint library, we need to treat the input
as a file for creation rather than a directory for selection.
Otherwise, users cannot specify the name of their new footprint library
independently of the existing directory names.

Fixes: lp:1812135
* https://bugs.launchpad.net/kicad/+bug/1812135
2019-01-22 15:40:10 -08:00
jean-pierre charras b0ab53ac26 Dxf importer: fix some issues, especially the rotation angle of texts. 2019-01-22 19:59:43 +01:00
jean-pierre charras c56d6ad2dd Fix issues in DXF import and GFX import dialog
Fixes: lp:1812840
https://bugs.launchpad.net/kicad/+bug/1812840
2019-01-22 18:01:04 +01:00
jean-pierre charras d93b694327 Fix a compil warning 2019-01-22 18:01:04 +01:00
Seth Hillbrand 7551613826 pcbnew: Don't duplicate TOOL_EVENT
There is some odd interaction in the default copy constructor for
TOOL_EVENT using boost::optional under gcc.  Avoid this by explicitly
constructing the event needed for cut

Fixes: lp:1812848
* https://bugs.launchpad.net/kicad/+bug/1812848
2019-01-22 08:36:56 -08:00
John Beard bb2e402bc7 QA: Move io_benchmark into common_tools 2019-01-22 09:04:38 -05:00
John Beard 267e17d539 QA: Add a generic utility tool executable.
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.

This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.

The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.
2019-01-22 09:04:38 -05:00
jean-pierre charras a1d1354bcc footprint_editor_tools.cpp: Better code in Placepad. 2019-01-21 21:33:37 +01:00
jean-pierre charras 4d88cd3a0a Footprint editor: add missing local coordinate initialization in Add Pad. 2019-01-21 21:03:36 +01:00
Seth Hillbrand b9483ae66f Adding additional archive extensions
These include standard protel extensions and 3d-model extensions

Fixes: lp:1812639
* https://bugs.launchpad.net/kicad/+bug/1812639
2019-01-21 07:27:20 -08:00
Seth Hillbrand 3a1e66dba3 kicad: URI-encode zip names to handle unicode
Workaround for wx not handling unicode strings in the archive file
system handler.

Fixes: lp:1812516
* https://bugs.launchpad.net/kicad/+bug/1812516
2019-01-20 16:41:55 -08:00