Commit Graph

6881 Commits

Author SHA1 Message Date
Jeff Young 9a5334478b Careful of net[0]; it's "No Net", not a real net.
Fixes: lp:1792235
* https://bugs.launchpad.net/kicad/+bug/1792235
2018-09-21 20:40:04 +01:00
jean-pierre charras 0be52a68fe Update PCB from schematic or Read netlist doesn't add new footprints when the board has no existing footprints (empty board)
Fixes: lp:1793396
https://bugs.launchpad.net/kicad/+bug/1793396
2018-09-21 10:14:10 +02:00
Seth Hillbrand 8c3a82e526 Code cleanup: Fixing assignment operators 2018-09-20 20:15:47 -07:00
Seth Hillbrand c0f067bf90 pcbnew: Remove OpenMP
OpenMP is not available for macos, so moving to a std::threads
implementation brings platforms into shared code.

This also reduces the OpenMP overhead when computing connectivity and
ratsnests.

Fixes: lp:1780130
* https://bugs.launchpad.net/kicad/+bug/1780130
2018-09-20 15:40:02 -07:00
Jeff Young 3e45483798 Separate edge.cuts and courtyards in ModEdit default values.
Fixes: lp:1788876
* https://bugs.launchpad.net/kicad/+bug/1788876
2018-09-20 23:30:13 +01:00
Jeff Young 04534c83e0 Allow marker selection in high-contrast mode.
Fixes: lp:1793357
* https://bugs.launchpad.net/kicad/+bug/1793357
2018-09-20 21:54:47 +01:00
Seth Hillbrand 47fac8a259 Removing some unused code 2018-09-20 12:52:53 -07:00
Martin Aberg 27d57d9191 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

(cherry picked from commit dd3c24faf8)
2018-09-20 12:04:04 -07:00
Jeff Young 6be2733285 Fix a few more no-long-necessary non-copper layer restrictions. 2018-09-19 22:23:18 +01:00
Jeff Young 2f2cfe423e A bit of added safety regarding edit vs. display flags. 2018-09-19 22:23:18 +01:00
Wayne Stambaugh ed94f2c5e0 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:31:17 -04:00
Jeff Young ebb74fcc2b Honour diff-pair dimension changes while routing. 2018-09-18 20:37:00 +01:00
Jeff Young e485cee384 Honour ModEdit layer colors in browser and previews.
Fixes: lp:1793141
* https://bugs.launchpad.net/kicad/+bug/1793141
2018-09-18 19:14:35 +01:00
Jeff Young 9f068d66a8 Don't use diff-pair gap as a clearance.
Fixes: lp:1789690
* https://bugs.launchpad.net/kicad/+bug/1789690
2018-09-18 17:44:53 +01:00
Jeff Young 9c708c6177 Use DP netclass values when custom or predefined are not selected.
Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670
2018-09-18 17:44:53 +01:00
Seth Hillbrand adb89afe6c Allow SELECTED for single edits
We like to allow items that are marked SELECTED to remain so during
editing but this does not indicate that there are multiple edits queued,
so do not prevent pushing this into the undo queue.
2018-09-18 03:52:15 -07:00
Seth Hillbrand 9cafe65e84 pcbnew: Allow user-setting rounded rectangle radius
When designing pads, it can be helpful to not only see the resulting
rounded rectangle radius from a given percentage but also to set it,
constraining the related percentage.  This adjusts the dialog to allow
editing the rounded rectangle corner radius.  It does not change the
file format as the resulting ratio is saved.  Further updates of the pad
size or ratio will modify the radius.

Fixes: lp:1668020
* https://bugs.launchpad.net/kicad/+bug/1668020
2018-09-17 15:59:53 -07:00
Seth Hillbrand 49735c219b 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.

( cherry-picked from 3d0915a33 )

Fixes: lp:1695761
* https://bugs.launchpad.net/kicad/+bug/1695761
2018-09-17 12:17:22 -07:00
Seth Hillbrand 44b4f8a104 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.

( cherry-picked from a67bfa620 )
Fixes: lp:1789062
* https://bugs.launchpad.net/kicad/+bug/1789062
2018-09-17 11:54:27 -07:00
Seth Hillbrand 7470d5ba98 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.

( cherry-picked from 2c6d0ffe2 )
Fixes: lp:1765774
* https://bugs.launchpad.net/kicad/+bug/1765774

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:58:42 -07:00
Jeff Young 99cb1471c3 Added safety for POINT_EDITOR.
Fixes: lp:1786349
* https://bugs.launchpad.net/kicad/+bug/1786349
2018-09-17 18:01:08 +01:00
Jeff Young cd7ebaf9ee Generate duplicate footprint errors when reading netlist.
Fixes: lp:1682970
* https://bugs.launchpad.net/kicad/+bug/1682970
2018-09-17 18:01:08 +01:00
Jeff Young a53b163456 Use resize() instead of reserve()/fill() so hardeners don't choke.
Fixes: lp:1789283
* https://bugs.launchpad.net/kicad/+bug/1789283
2018-09-17 18:01:08 +01:00
Jeff Young a40ab768fc Allow deletion of non-Reference/non-Value module text items.
Fixes: lp:1781226
* https://bugs.launchpad.net/kicad/+bug/1781226
2018-09-17 18:01:08 +01:00
Seth Hillbrand dd228b60a7 pcbnew: Allow removing corners from graphical polygons
( cherry-picked from 22df4e301 )

Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:27:07 -07:00
jean-pierre charras d4e4359289 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:21:18 +02:00
Seth Hillbrand 9523b26472 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.

( cherry-picked from 219695953 )
2018-09-15 20:22:34 -07:00
Jeff Young 2b634004ee Track widths and via sizes are in mils.
Fixes: lp:1792748
* https://bugs.launchpad.net/kicad/+bug/1792748
2018-09-15 22:46:04 +01:00
Jeff Young ae5183f614 Add test for duplicate footprints to Update from PCB. 2018-09-15 20:06:42 +01:00
Jeff Young 02a3f83040 Implement poor-man's RTTI for use over KiWAY.
Fixes: lp:1777883
* https://bugs.launchpad.net/kicad/+bug/1777883
2018-09-15 20:06:42 +01:00
Jeff Young 3e61a32fbe Attempt to use envVars when adding new libraries.
Fixes: lp:1785441
* https://bugs.launchpad.net/kicad/+bug/1785441
2018-09-15 20:06:42 +01:00
Jeff Young 4854d92c73 Subtract out unconnected net when reporting number of nets.
Fixes: lp:1792235
* https://bugs.launchpad.net/kicad/+bug/1792235
2018-09-15 20:06:42 +01:00
Seth Hillbrand cf2980e1b2 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

( cherry-picked from 06ac172c2 )
2018-09-15 10:02:58 -07:00
Seth Hillbrand efdbc91e42 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

( cherry-picked from e7c51a6a6 )
2018-09-15 09:53:52 -07:00
jean-pierre charras b60c368b3c DXF import: fix incorrect import of arcs.
The new dxflib uses degrees, not radians for angles.

Fixes: lp:1792413
https://bugs.launchpad.net/kicad/+bug/1792413
2018-09-15 18:18:33 +02:00
Jeff Young e3f74646b9 Allow measure tool to survive zoom and pan.
Fixes: lp:1792232
* https://bugs.launchpad.net/kicad/+bug/1792232
2018-09-14 11:00:13 +01:00
Jeff Young a5e2ddd65a Don't save footprint when it's renamed; wait for the user to save.
Fixes: lp:1792243
* https://bugs.launchpad.net/kicad/+bug/1792243
2018-09-14 10:21:45 +01:00
Jeff Young 0f9ded9563 Space out placed footprints with some padding.
Fixes: lp:1788917
* https://bugs.launchpad.net/kicad/+bug/1788917
2018-09-14 10:21:45 +01:00
Jeff Young 4d6cd52ffc Fix some tooltips.
Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-09-14 10:21:45 +01:00
Jeff Young e5e1a315f1 Keep name & value in sync for library items.
Also fixes library reference highlighting from board footprints.

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

Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-09-13 16:41:23 +01:00
Seth Hillbrand a04ef37d67 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.
2018-09-12 15:28:13 -07:00
Jeff Young ba8647f676 Fix compiler warning. 2018-09-12 21:39:41 +01:00
Jeff Young b43d0a0ed5 Add file missing from last commit. 2018-09-12 21:39:26 +01:00
Jeff Young cbc83c98bc Make sure Save As and Export use board footprint when selected.
Fixes: lp:1792207
* https://bugs.launchpad.net/kicad/+bug/1792207
2018-09-12 21:27:03 +01:00
Jeff Young a46133d64b Replace SetValue() with ChangeValue() to prevent unwanted events.
Fixes: lp:1792070
* https://bugs.launchpad.net/kicad/+bug/1792070
2018-09-12 19:34:55 +01:00
Seth Hillbrand ded64aef3d 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:11:48 -07:00
Jeff Young 806b1fc63d Fix bugs to enable read-only grid cells to be copied.
Fixes: lp:1791129
* https://bugs.launchpad.net/kicad/+bug/1791129
2018-09-12 14:01:36 +01:00
Jeff Young 8b064e1ee2 Use zone outline for instersection when it isn't filled.
Keepout zones, in particular, are never filled.

Fixes: lp:1791965
* https://bugs.launchpad.net/kicad/+bug/1791965
2018-09-12 14:01:35 +01:00
Jeff Young cbb3492d98 Standardize Footprint Viewer and Footprint Browser.
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.

Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667
2018-09-12 14:01:35 +01:00
Seth Hillbrand 29b4ac7cb8 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:42:23 -07:00