Commit Graph

6633 Commits

Author SHA1 Message Date
Seth Hillbrand a4564db082 Removing some unused code
(cherry picked from commit 47fac8a259)
2018-09-20 16:47:59 -07:00
Martin Aberg dd3c24faf8 Generate PYTHONPATH from CMake information
The CMake scripts calculate the install path for python scripts by
  distutils.sysconfig.get_python_lib(
    plat_specific=0,
    standard_lib=0,
    prefix=''
  )
which generates a string in line with
  lib/python2.7/site-packages

This string ends up in the CMake variable PYTHON_DEST and is used by the
install step as destination directory for pcbnew.py.

There has been a hard-coded assumption on the content of that string in
PcbNew which is not compatible with FreeBSD 11.1.

This commit eliminates the hard-coded assumption in PcbNew and reuses
the install path as known by CMake.

Fixes: lp:1777921
* https://bugs.launchpad.net/kicad/+bug/1777921
2018-09-20 12:03:25 -07:00
Seth Hillbrand b4fc7575a5 pcbnew: Parallelize initial board triangulation
Triangulation of zones can be time consuming for large boards.  This
adds a std::thread implementation of parallel zone loading to speed this
process on multi-core machines.

(cherry picked from commit a04ef37d67)
2018-09-20 10:12:30 -07:00
Seth Hillbrand fca0785754 pcbnew: remove duplicate rebuild in GAL
When running GAL, the connectivity is built when the board loads, so the
extra call to rebuild connectivity is not needed.

(cherry picked from commit 13b96799ea)
2018-09-20 09:32:15 -07:00
Seth Hillbrand 30d398b108 pcbnew: Unify connected lists between items/zones
Keep the zoneitems in the same list as the rest of the items.

(cherry picked from commit 284c39acac)
2018-09-20 09:32:14 -07:00
Seth Hillbrand dd7ce9f00a pcbnew: Ensure connectivity layers are respected
This prevents non-copper layers from being included in the connectivity
search.  It also limits the layer search in the connectivity RTree to
just the copper layer range.

(cherry picked from commit f87cb64d65)
2018-09-20 09:32:14 -07:00
Seth Hillbrand c7e511c919 Remove connectivity debug statements
(cherry picked from commit 589e5b9ad7)
2018-09-20 09:32:14 -07:00
Seth Hillbrand d769d1649a pcbnew: Split Layers in connectivity
Splits the connectivity search RTree by layers to avoid large penalty on
zone searches.

(cherry picked from commit dc1736eb87)
2018-09-20 09:32:14 -07:00
Jeff Young 5c600e992a Don't allow SELECTED flag to make us think item is already edited.
Fixes: lp:1793289
* https://bugs.launchpad.net/kicad/+bug/1793289
2018-09-19 19:37:28 +01:00
Wayne Stambaugh a055916f92 Pcbnew: fix minor bug in find dialog.
Repeating find with the same search string would result in a not found
error for absolute search strings.  Don't clear the found item if the
search string did not change from the previous search..

Fix another minor bug where the do not warp mouse pointer option was
always checked when the find dialog was called from one of the gal
canvases.

Fixes lp:1793300

https://bugs.launchpad.net/kicad/+bug/1793300
2018-09-19 12:44:25 -04:00
Jeff Young e3d5734f76 Don't use diff-pair gap as a clearance.
Fixes: lp:1789690
* https://bugs.launchpad.net/kicad/+bug/1789690

(cherry picked from commit 9f068d66a8)
2018-09-18 20:40:44 +01:00
Seth Hillbrand 3d0915a33e pcbnew: Don't merge zones with different params
Zones can be explicitly merged even if they do not have the same
parameters.  Automatic merging should only occur when all of the zone
parameters are exactly identical to allow for area-specific zone
parameters.

Fixes: lp:1695761
* https://bugs.launchpad.net/kicad/+bug/1695761
2018-09-17 12:15:48 -07:00
Seth Hillbrand a67bfa6207 pcbnew: prevent different keepout zones from merging
Keepout zones can have different layer sets and different restrictions
that should not be combined unless they are identical.

Fixes: lp:1789062
* https://bugs.launchpad.net/kicad/+bug/1789062
2018-09-17 11:53:12 -07:00
Seth Hillbrand 2c6d0ffe27 pcbnew: retain selection between edits
We had been deselecting items after calling edits to be safe in case the
item was deleted/exchanged by the edit.  The item pointer itself remains
valid even when deleting as it is assigned to the undo stack.  But it
should not remain visible or selected on the schematic if it is removed.

This tests for removed items by checking whether it (in the case of
first-level BOARD_ITEMS) or its parent (in the case of footprint item
components) remain in the view list after editing.  If they are still in
the view list, then we re-select them.

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

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:39:31 -07:00
jean-pierre charras 36746a0941 Grid settings do not accept "." and "," as decimal separator unlike many other dialogs.
Fixes: lp:1792871
https://bugs.launchpad.net/kicad/+bug/1792871
2018-09-17 17:04:42 +02:00
Seth Hillbrand 22df4e301b pcbnew: Allow removing corners from graphical polygons
Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:26:00 -07:00
jean-pierre charras ac0c7441b4 pcb_parser.cpp: allows 0 width line thickness for circles in custom shaped pads.
the commit 1100ccb032 broke DRAWSEGMENT filled circles (line width = 0) used only in custom pads.

Fixes: lp:1792791
https://bugs.launchpad.net/kicad/+bug/1792791
2018-09-16 15:22:59 +02:00
Seth Hillbrand 2196959539 pcbnew: Fix dragging snap to items
Snapping while dragging depends on the current net being assigned during
dragging.  This initializes the placer to hold the current net while
performing inline dragging.  The placer is reset along with the dragger
in StopRouting().  This fixes the difference in snap between drag and
create new route.
2018-09-15 20:21:38 -07:00
Seth Hillbrand 06ac172c27 pcbnew: Add corners in polygons
Allow corner adding to polygons in both module editor and board editor.
The board editor was already allowed but only through special types.
The module editor is now sychronized to the same process and both
recognize standard context menus

Fixes: lp:1782966
* https://bugs.launchpad.net/kicad/+bug/1782966
2018-09-15 09:53:31 -07:00
Seth Hillbrand e7c51a6a6c pcbnew: snap final points to grid
When constraining moves, the cursor snaps to grid but does not
represent the position of the final edited point.  The point is rotated
to the nearest snap angle, while the vector length remains unchanged
resulting in a line longer than intended and off-grid.

This adds a grid-snap after the constraint is applied.

Fixes: lp:1792655
* https://bugs.launchpad.net/kicad/+bug/1792655
2018-09-15 07:52:17 -07:00
Jeff Young a7d7ab32c6 Fix 5.0 regression on typing units into some dialog fields.
Fixes: lp:1792066
* https://bugs.launchpad.net/kicad/+bug/1792066
2018-09-13 19:14:32 +01:00
Seth Hillbrand 61715a8df5 pcbnew: Control cursor capture in microwave tool
Turns off cursor capture when the microwave tool is not actively drawing
a new inductor.

Fixes: lp:1792128
* https://bugs.launchpad.net/kicad/+bug/1792128
2018-09-12 09:10:58 -07:00
Maciej Suminski 280573e9af Relax selection discard rules for footprints with area larger than the viewport
Normally working at a zoom level when a footprint is not fully displayed
indicates that the user modifies other components. Selection Tool used
to discard footprints that had area larger than the viewport area, but
it may make sense to select them if there are no other candidates.

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

(cherry-picked from commit 5993b330)
2018-09-10 14:21:27 +02:00
Seth Hillbrand e29e7ff95d pcbnew: Fix Eagle import hole offset
Unplated holes in Ealge can either be free floating or part of a larger
footprint.  We handle both in the same packageHole routine by either
offsetting the hole in a centered footprint or offsetting the footprint
in a centered hole.

Fixes: lp:1791287
* https://bugs.launchpad.net/kicad/+bug/1791287
2018-09-08 20:41:53 -07:00
Seth Hillbrand fb580d3694 pcbnew: center the zone fill confirmation dialog
The zone fill confirmation should follow the parent dialog.  In the case
of plotting, this is the plot window.
2018-09-08 20:18:14 -07:00
Seth Hillbrand 3919345003 pcbnew: Allow selection of back pads
Pads should be selectable when the respective copper layer is enabled.

Fixes: lp:1789084
* https://bugs.launchpad.net/kicad/+bug/1789084
2018-09-08 17:24:44 -07:00
Seth Hillbrand 1df99c264f pcbnew: Add Eagle milling layer to edge_cuts
The Eagle milling layer (46) is valid for cutouts on the board.

Fixes: lp:1791284
* https://bugs.launchpad.net/kicad/+bug/1791284
2018-09-08 06:59:36 -07:00
Seth Hillbrand 7012226284 pcbnew: Set soldermask on NPTH imported from Eagle
Fixes: lp:1773253
* https://bugs.launchpad.net/kicad/+bug/1773253
2018-09-06 08:57:40 -07:00
Seth Hillbrand 48bbde65b3 pcbnew: Set default line width for invalids
Invalid graphical items that cannot be created in pcbnew may still be
created by external tools.  This synchronizes the pcbnew view display
with the gerber output and 3d viewer line widths for these types of
lines.  Only filled polygons are permitted 0-width lines.

Fixes: lp:1790534
* https://bugs.launchpad.net/kicad/+bug/1790534
2018-09-05 16:43:15 -07:00
Seth Hillbrand 9eec296b0a pcbnew: Select copper through THT connections
This allows full copper connections even when THT changes a trace layer.
It avoides selecting the actual pad to prevent actions on the copper
connections from affecting the footprints as well.

Fixes: lp:1789807
* https://bugs.launchpad.net/kicad/+bug/1789807
2018-09-03 07:43:59 -07:00
Seth Hillbrand ec81f3267f pcbnew: Only regenerate BBox if the item is valid
Items removed from the connectivity list will not have valid parents, so
we cannot update the BBox, thus we will only use the cached value.

Fixes: lp:1785605
* https://bugs.launchpad.net/kicad/+bug/1785605
2018-08-31 18:45:26 -07:00
Seth Hillbrand ee12fe6eff modview: Re-instate the try/catch block when loading
Setting up the footprint viewer will attempt to load the current
footprint.  If the library does not exist, the loader will throw an
IO_ERROR that needs to be caught.

Fixes: lp:1789626
* https://bugs.launchpad.net/kicad/+bug/1789626
2018-08-31 08:45:34 -07:00
Seth Hillbrand d6b95236a4 gal: correct layer ordering
Net labels need to be rendered under the selected item.

Fixes: lp:1790016
* https://bugs.launchpad.net/kicad/+bug/1790016
2018-08-30 16:55:00 -07:00
Seth Hillbrand fbe677e46e pcbnew: Correcting commit f84bd0d83 for 5.0/release
Previous commit only functioned correctly in debug mode.  Also cleanup a
left-over debug printf() and revert a changed translated string.
2018-08-30 13:25:18 -07:00
Seth Hillbrand f84bd0d836 pcbnew: Fix Eagle UTF8 import error
Implicit convertion from wxString to std::string will use narrow strings
and drop UTF-8.

Fixes: lp:1789311
* https://bugs.launchpad.net/kicad/+bug/1789311
2018-08-30 13:07:33 -07:00
Seth Hillbrand 25b6604fc5 pcbnew: Swap all types of zones when swapping layers
This is a 5.0-only commit to implement correct layer swapping.

Fixes: lp:1789390
* https://bugs.launchpad.net/kicad/+bug/1789390
2018-08-30 09:45:39 -07:00
Ronnie Gaensli fbd6654f9a pcbnew: fix pan while moving mouse after cancelling selection box
Fixes: lp:1776648
* https://bugs.launchpad.net/kicad/+bug/1776648
2018-08-29 16:48:55 -07:00
Seth Hillbrand b8ae4e0195 pcbnew: Only dp clearance matrix when routing dp
Fixes: lp:1787766
* https://bugs.launchpad.net/kicad/+bug/1787766
2018-08-29 10:25:51 -07:00
Seth Hillbrand 20ea486378 GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 14:58:37 -07:00
Seth Hillbrand 0c94b3239d pcbnew: keep selected zone highlighted when moding
When adding a cutout to a zone, it helps to have the zone highlighted so
that you can see when zone you are operating on.
2018-08-28 14:49:48 -07:00
Seth Hillbrand d8e276bc4f pcbnew: Adding some missing TypeOf() functions
Missing types were handled by the superclass (in the case of zones)
PCB_CONNECTED_ITEM, which incorrectly returned "true" when testing lines
against zones.

Fixes: lp:1789195
* https://bugs.launchpad.net/kicad/+bug/1789195
2018-08-28 13:16:34 -07:00
Seth Hillbrand b7a321d143 modedit: clear the pcb when closing the window
Before closing the window in the footprint editor, we clear the existing
pcb, undo/redo stack and associated memory to prevent callbacks
double-freeing on destruction.

Fixes: lp:1784504
* https://bugs.launchpad.net/kicad/+bug/1784504
2018-08-28 12:35:17 -07:00
Seth Hillbrand f6d9c3a733 pcbnew: set default soldermask clearance for footprint viewer
The default board soldermask clearance should not be used in the
footprint viewer.  Setting the board's solder mask margin to 0 will
leave the footprint displayed with only the soldermask defined by
the pads or the footprint.

Thanks to Fabian Inostroza for pointing out the missing line.

Fixes: lp:1779979
* https://bugs.launchpad.net/kicad/+bug/1779979
2018-08-28 10:03:25 -07:00
jean-pierre charras 7ed07cae70 Pcbnew, Plot: fix incorrect plot of custom shapes, when the shape has holes (missing holes).
Fixes: lp:1789404
https://bugs.launchpad.net/kicad/+bug/1789404
2018-08-28 17:51:52 +02:00
jean-pierre charras da4d9ee392 Footprint viewer: ensure all panes are always visible, regardless m_auimgr.LoadPerspective() has read.
Perspective is overzealous: it stores everything, so we need to be sure these panes are not hidden,
regardless what the perspective has stored.

Fixes: lp:1789254
https://bugs.launchpad.net/kicad/+bug/1789254
2018-08-27 20:32:45 +02:00
Jeff Young 3c87ab94a2 Fix fast grid switching for OSX and Footprint Editor.
Fixes: lp:1787066
* https://bugs.launchpad.net/kicad/+bug/1787066
2018-08-26 19:01:40 +01:00
Jeff Young 3587789ae2 Update canvas after changing netclass settings.
Fixes: lp:1786937
* https://bugs.launchpad.net/kicad/+bug/1786937
2018-08-25 23:20:46 +01:00
Jeff Young 7e2e39ce30 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

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

Fixes: lp:1786819
* https://bugs.launchpad.net/kicad/+bug/1786819
2018-08-24 23:57:19 +01:00
Jeff Young a45a8e8797 Warn before replacing edited footprint in footprint editor.
Fixes: lp:1786570
* https://bugs.launchpad.net/kicad/+bug/1786570
2018-08-11 20:36:51 +01:00
jean-pierre charras c7d39d22db FOOTPRINT_WIZARD_FRAME: ensure the draw panel is always visible, even if the config file is incorrect. 2018-08-10 13:44:21 +02:00