Commit Graph

13185 Commits

Author SHA1 Message Date
Seth Hillbrand e2122db587 pcbnew: Clear unused code 2018-06-21 09:20:48 -07:00
Seth Hillbrand cf04d341ec pcbnew: standardize itemlist/zonelist connectivity
The itemlist and zonelist in connectivity can both contain many items,
so both use the same OpenMP routine.  However, we can only clear the
dirty flag when we conduct a full search, including zones.  Otherwise we
missing connections to zones when propogating changed items that are
then marked as not dirty.

Fixes: lp:1777993
* https://bugs.launchpad.net/kicad/+bug/1777993
2018-06-21 09:19:26 -07:00
jean-pierre charras f634b75652 Pcbnew, plot parameters: fix an issue for the "outputdirectory" parameter.
When the outputdirectory string was similar to a number, the .kicad_pcb file was no longer loadable.

Fixes: lp:1777957
https://bugs.launchpad.net/kicad/+bug/1777957
2018-06-21 12:33:51 +02:00
Seth Hillbrand a552b4ccca box2: fix bug in SetMaximum()
When setting the maximum represented box, std::numerical_limits::min
returns the most negative number only for integers.  For floating point,
it returns the smallest positive number.  std::numerical_limits::lowest
is the same as min for integers but returns the most negative number for
floating point as well.
2018-06-20 20:21:03 -07:00
Seth Hillbrand a1ef441dd9 origin viewitem needs to account for size zoom
The origin item doesn't have a fixed size.  It is constant on the screen but
changes the effective BBox size based on the zoom level.
But we can't simply set it to the maximum size as this causes a splitting degeneracy
when compiling for Debian i386.  By modestly adjusting the bbox, we avoid the degeneracy
while keeping the origin visible at all zoom levels

Fixes: lp:1777379
* https://bugs.launchpad.net/kicad/+bug/1777379
2018-06-20 12:08:57 -07:00
Wayne Stambaugh 8394e2b71e Fix broken LIB_ID library nickname illegal character tests.
During the symbol library table implementation, the legal character
tests for the footprint library table were changed and the forward
slash '/' character became illegal.  This change broke editing some
users footprint library tables that already had '/' in library table
nicknames.  This change split the library nickname and library item
name illegal character tests.
2018-06-20 14:36:40 -04:00
Jeff Young 79e0bb08d0 Architecturally-simpler fix for grid context menu unit changes.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-20 16:54:24 +01:00
Wayne Stambaugh 77217b2089 Fix resizing issues of global track and via properties dialog. 2018-06-20 11:39:11 -04:00
Maciej Suminski 44337dec56 pcbnew GAL: Fix bouncing zoom on mouse wheel scroll in Windows
Handling wxEVT_SCROLLWIN_LINE{UP,DOWN} executes the scroll event handler
too many times causing zoom bounces.

Fixes: lp:1562173
* https://bugs.launchpad.net/kicad/+bug/1562173
2018-06-20 16:55:14 +02:00
Seth Hillbrand 147c1e6088 pcbnew: Allow clearing local ratsnest
The local ratsnest needs to be able to hide as well as show visibility.
Clicking a module will toggle the visibility while clicking off all
modules clears the local ratsnest display.

Fixes: lp:1531332
* https://bugs.launchpad.net/kicad/+bug/1531332
2018-06-19 15:12:20 -07:00
Seth Hillbrand 6990824597 pcbnew: Hide routing options that are not available
Options that do not have code implementing them are now hidden from the
user so that they are not searching for ways to enable the greyed out
options.  Similarly, when selecting a routing option that disables
free-mode, we show the effect of disabling the mode in the dialog.
2018-06-19 11:11:18 -07:00
jean-pierre charras f52763f22b Legacy canvas: fix issue when zooming in/out using mousewheel: slightly shifts screen up/down.
It happens only when the 'warp and center cursor on zoom' option is disabled.

Was created after modifying the code in EDA_DRAW_FRAME::AdjustScrollBars(),
making EDA_DRAW_FRAME::RedrawScreen2() not working very well.

(partial fix of bug 1562173)
2018-06-19 19:53:00 +02:00
Tomasz Wlostowski f6f726acab router: allow placing tracks/diff pairs without continuing routing by Shift+L-Click
Fixes: lp:1777688
* https://bugs.launchpad.net/kicad/+bug/1777688
2018-06-19 19:30:03 +02:00
Seth Hillbrand 462549fc84 modedit: Add hotkey to switch arc posture
Allows switching arc clockwise/counterclockwise orientation while
drawing in module editor.

Fixes: lp:1777524
* https://bugs.launchpad.net/kicad/+bug/1777524
2018-06-19 09:42:04 -07:00
Jeff Young 3c7b91b96a Always create grid menu so units are up-to-date.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-19 10:52:36 +01:00
Maciej Suminski 81a5c0e3bf GAL: Show ratsnest lines when dragging
GAL is strict regarding which layers are rendered, therefore to show
ratsnest lines when an item is dragged - the ratsnest layer must be kept
enabled. Ratsnest line visibility is enabled per item and this is the
way to show/hide the lines.

Fixes: lp:1666473
* https://bugs.launchpad.net/kicad/+bug/1666473
2018-06-19 11:29:36 +02:00
Maciej Suminski a08c0ac08c kicad2step: Added minimum distance parameter 2018-06-19 10:37:07 +02:00
Maciej Suminski 7ef97e0bca kicad2step: Simplified unit conversion
Instead of using 'm_inch' flag, dimensions are converted in place.
2018-06-19 10:37:07 +02:00
Maciej Suminski 04a462e48f kicad2step: Converted #defines to constexprs 2018-06-19 10:37:07 +02:00
Maciej Suminski f0b3cf8077 STEP export: Stricter contiguity check
Stricter contiguity check points the user to gaps in the outline.

Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
2018-06-19 10:36:21 +02:00
Maciej Suminski 1541cbdf04 kicad2step: Add short segments to fix outline contiguity for arcs
STEP exporter keeps outline contiguous by storing the last point
coordinates and using them as the starting point for the next segment. It
might create a problem for arcs, as one of the arc end points may become
translated (changed to the last outline point), while the remaining
points (center and the other endpoint) are kept original. For large
deltas it renders an arc invalid, as it cannot pass through a modified
endpoint anymore.

To fix this, short segments are added to link the last outline point
with an arc endpoint, but only if the distance between the two is below
a certain threshold. This way the outline is kept contiguous and the arc
end point is unmodified, warranting its correctness.

Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
2018-06-19 10:29:18 +02:00
Seth Hillbrand 44c1f5785b pcbnew: Set dp clearance based on netclass
Minimum differential pair clearance should be limited to the netclass
differential pair spacing.  This also cleans up some unused code that
was left over from previous work on differential pair clearances.

Fixes: lp:1673632
* https://bugs.launchpad.net/kicad/+bug/1673632
2018-06-18 14:23:25 -07:00
Jeff Young feebb3a36c Don't double-move module text when parent is also selected.
Fixes: lp:1776871
* https://bugs.launchpad.net/kicad/+bug/1776871
2018-06-18 22:03:39 +01:00
Wayne Stambaugh 11c248a463 Fix a typo made in commit 52734058. 2018-06-18 14:57:01 -04:00
Wayne Stambaugh 52734058a7 Remove string translation wrappers used in commit 94891b75.
Translating internal file name and path strings will almost certainly
result in a bug on MacOS.
2018-06-18 12:14:48 -04:00
Maciej Suminski ba3f2b30ee kicad2step: More diagnostic messages to determine export issues 2018-06-18 17:51:22 +02:00
jean-pierre charras 03fa645743 pic_programmer demo: fix a typo in a symbol name. 2018-06-18 08:12:17 +02:00
Adam Wolf 94891b75f9 Handle STEP export properly on MacOS when launched from standalone pcbnew. 2018-06-17 13:09:33 -04:00
Andrzej Wolski a99eeb44d3 Do not allow setting zero Y size for oval holes 2018-06-17 16:30:14 +02:00
Andrzej Wolski 834d9335dd Do not plot zero width oval holes in Gerber X2 drill files
In case there are zero width oval holes on the PCB,
it is safer to not plot them at all, rather than plotting
with width arbitrarily increased to 10 mils.
This also makes Gerber outputs consistent with Excellon outputs.
2018-06-17 16:26:23 +02:00
jean-pierre charras ae02039ed4 Update pic_programmer demo 2018-06-17 09:28:36 +02:00
Seth Hillbrand 4959f91dac pcbnew: Ensure Connectivity RTree gets updated
When removing items, we perform a two-pass removal, checking first
for the cached rectangle collision.  Then, if we do not find the item
being removed, we perform a second, more expensive pass over the full
tree.  This second pass is required as we cannot be certain that an
item's bbox has not been modified between insertion and deletion.  In
which case, keeping stale pointers in the tree will lead to segfaults.

Fixes: lp:1777246
* https://bugs.launchpad.net/kicad/+bug/1777246
2018-06-16 21:45:55 -07:00
Maciej Suminski 7b7355772e Do not display Interactive Routing Settings dialog twice
The dialog was displayed due to a global TOOL_ACTION and a hotkey
assigned to a top menubar entry. Removing the hotkey from the menubar entry
is not ideal, but less irritating than a dialog showing up twice.
2018-06-15 17:32:00 +02:00
Maciej Suminski 583a9c08c0 Remove duplicated PNS TOOL_ACTIONs to display routing settings 2018-06-15 17:12:15 +02:00
Maciej Suminski 94b6f848bb pcbnew_control.cpp: change C-style asserts to wxCHECK/wxFAIL 2018-06-15 17:11:32 +02:00
Maciej Suminski eb97634bdf Enable 'Delete Item' toolbar icon in the Footprint Editor when the tool is active 2018-06-15 17:10:12 +02:00
Maciej Suminski 7d66dc0cc3 Fixed an assert on pasting items in the Footprint Library Editor
The assert in the title line verifies that an item does not belong to
any DLIST when it is being added to one. Items in clipboard are already
owned by DLISTs, therefore they need to be removed from the original
DLISTs before being added to new ones.
2018-06-15 14:35:55 +02:00
Andrzej Wolski 316ff2898d Fix footprint selection
Commit 72b49acc changed behavior of MODULE::ViewBBox(),
which now includes text fields area. This caused problems
with selecting footprints with relatively large text fields.
This patch fixes this problem by using MODULE::GetBoundingBox instead.

Fixes: lp:1776942
* https://bugs.launchpad.net/kicad/+bug/1776942
2018-06-14 19:32:09 -07:00
Wayne Stambaugh b82bf7c449 Fix minor layout issue in keepout area properties dialog. 2018-06-14 11:12:34 -04:00
Jeff Young b37969f584 Reset tools before switching footprints.
Fixes: lp:1776777
* https://bugs.launchpad.net/kicad/+bug/1776777
2018-06-14 09:55:29 +01:00
jean-pierre charras 0d4d24ed22 Update demos. 2018-06-14 09:52:23 +02:00
Seth Hillbrand 11ab8f6dc1 pcbnew: Fix a couple of duplicate hotkeys 2018-06-13 22:53:06 -07:00
Alexis Lockwood 860a95ca30 Correct my name in AUTHORS.txt and About dialog 2018-06-13 23:10:27 -06:00
Seth Hillbrand f6bd6b1360 3d: Replace glFinish with glFlush
glFinish is meant to ensure every aspect of the screen is fully-drawn
before continuing.  This causes issues with certain chipsets (Intel
4-8k)

glFlush is more of a suggestion that CPU work is complete and the GPU
should complete its work in a "timely" fashion.

We add an additional glFinish call before getting a screenshot as this
will copy the actual data from the card buffer.

Fixes: lp:1775976
* https://bugs.launchpad.net/kicad/+bug/1775976
2018-06-13 15:32:18 -07:00
Seth Hillbrand 4dd2de9057 pcbnew: Prevent mouse capture after actions
After an action is completed that required the screen to pan when the
cursor reaches the edge of the screen, we should release the cursor to
allow the user to move their mouse without panning.

Fixes: lp:1763860
* https://bugs.launchpad.net/kicad/+bug/1763860
2018-06-13 14:05:32 -07:00
John Beard 34c6393b71 Pcbnew Python docs: remove obsolete Doxygen parameters
These two parameters were unused and were producing warings:

* XML_SCHEMA
* XML_DTD
2018-06-13 11:12:24 -04:00
John Beard 41d6fc648d Pcbnew Python: use python super for inherited classes 2018-06-13 11:12:15 -04:00
John Beard 1f04b5fc7d Pcbnew Python: Add PadArray module documentation 2018-06-13 11:12:08 -04:00
John Beard 468d26d9d1 Pcbnew Python: Add plugin documentation
This adds the Python plugin helper classes to the generated
documentation.
2018-06-13 11:12:02 -04:00
John Beard 939450856a Pcbnew FP wizard: add rounded and chamfered box aids
These functions are fairly common drawing operations that otherwise
require fairly complex calculations, which would be better not to
have to repeat.
2018-06-13 11:11:55 -04:00