Commit Graph

6571 Commits

Author SHA1 Message Date
Jeff Young d90d4ff682 Fix bugs in Export to SVG.
We were trying to handle aOnlyOneFile at two different levels
which was preventing the Silk layer from going through the
right routine (and preventing board outlines from getting
drawn if selected).

We were also overwriting the references color local variable
before using it, meaning the reference was always rendered in
the value's color.

Fixes: lp:1774171
* https://bugs.launchpad.net/kicad/+bug/1774171
2018-05-30 20:49:05 +01:00
jean-pierre charras ce9cc4ea38 plot board: fix a stupid bug created by commit dfa91752 2018-05-29 19:51:50 +02:00
Maciej Suminski c5f56ef573 Eagle PCB import: made warning strings translatable 2018-05-29 15:02:26 +02:00
Maciej Suminski d2436e7478 Corrected "Add footprint library" dialog file filters
Fixes: lp:1773969
* https://bugs.launchpad.net/kicad/+bug/1773969
2018-05-29 15:02:26 +02:00
jean-pierre charras dfa9175209 Fix incorrect mask size for rectangular and trapezoid pads.
Fixes: lp:1773926
https://bugs.launchpad.net/kicad/+bug/1773926

Fixes: lp:1773961
https://bugs.launchpad.net/kicad/+bug/1773961
2018-05-29 13:45:45 +02:00
Jeff Young a12b9db584 Map Eagle values to fab layers.
Fixes: lp:1773256
* https://bugs.launchpad.net/kicad/+bug/1773256
2018-05-28 20:37:52 +01:00
jean-pierre charras da66005254 Pcbnew, plot dialog: avoid slightly change in hpgl pen diameter (due to inch/mm conversion error) when the hpgl format is not selected 2018-05-26 17:36:07 +02:00
jean-pierre charras 7db88126c5 hpgl plot parameters: use double instead of int to store the pen diameter to avoid truncation.
This parameter, always in mm in a hpgl file, is for historical reasons stored in mils,
and using a int to store it created annoying rounding errors.
2018-05-26 09:37:42 +02:00
Seth Hillbrand da061718e5 Remove constraint on circle
Allows circle radius to snap to arbitrary points while editing

Fixes: lp:1773436
* https://bugs.launchpad.net/kicad/+bug/1773436
2018-05-25 12:30:47 -07:00
jean-pierre charras 250d958ebb Plot dialog: fix broken dialog management.
Previously, the dialog was created only once, with the current board setup and the current units selection.
Therefore, after changes in board or units, the dialog was really broken.

Now, the dialog is recreated when the plot command is run.
2018-05-25 19:48:07 +02:00
Jeff Young cd5f727880 Fix off-by-1 errors in zoom menus & use zoom steps in GAL canvas.
Also bumps the maximums a bit (at user request).

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-25 13:01:58 +01:00
Jeff Young b89f6d4af3 Decrease allowed coverage ration when zones are involved.
A perfect solution would create holes in the coverage map
for the zone edges and handles, but that's a lot more
work.

Fixes: lp:1773204
* https://bugs.launchpad.net/kicad/+bug/1773204
2018-05-25 13:01:58 +01:00
Maciej Suminski 145835661b Replaced footprint library wizard with a common file browser
As of v5 footprint library reorganization (one repo per library concept
is replaced with a common repo for all libraries), the Footprint Library
Wizard may handle only the old libraries. It has been replaced with
a file browser to select only local files.

Fixes: lp:1772209
* https://bugs.launchpad.net/kicad/+bug/1772209
2018-05-25 08:51:46 +02:00
jean-pierre charras 6090f9001e netinfo.i: fix incorrect position of a declaration, that was not taken in account.
Fixes: lp:1544750
https://bugs.launchpad.net/kicad/+bug/1544750
2018-05-24 09:43:04 +02:00
Seth Hillbrand cf2a07559d Safely release thread memory
When starting async processes, we need to have a way to stop the process
before releasing memory.  Descoping FOOTPRINT_ASYNC_LOADER while the
threads were still running could cause crashes depending on the memory
structure.  To avoid this we define clear procedures for exiting a
running async processes and call these when exiting.

Fixes: lp:1772909
* https://bugs.launchpad.net/kicad/+bug/1772909
2018-05-23 08:55:55 -07:00
Maciej Suminski 190d4d6f55 Eagle PCB import: disable copper pour for imported *Restrict layer polygons
Fixes: lp:1772245
* https://bugs.launchpad.net/kicad/+bug/1772245
2018-05-23 17:51:49 +02:00
Seth Hillbrand 8506cdf3ae Avoid numerical dereference of selections
The SELECTION is a std::set.  Numerical dereference of item n is O(n) as
the iterator is not random access.  Therefore, a for loop using
numerical dereference is O(n!) and quickly slows.

We avoid this by storing items to remove separately while iterating and
then removing the items after we complete.

Fixes: lp:1692081
* https://bugs.launchpad.net/kicad/+bug/1692081
2018-05-22 16:37:45 -07:00
Seth Hillbrand 8d52dc9451 Avoid re-checking items already selected
If you select a track with many segments (e.g. a length-tuned track) and
then select all connected items again ('U' -> 'U'), we would iterate
over all items in the selection and mark connections for each of the n
segments n separate times.

We avoid this by using the marked flag to show when the segment has
already been visited by the routine.  This means that if the segment has
been checked for connections because it was connected to the previous
item, it won't be checked for connections again.  However, a selection
that interleaves items from multiple connection segments will still
(potentially) be multiply checked as the BUSY flag is cleared each time
there is one not-BUSY track in the selection.
2018-05-22 16:26:52 -07:00
Seth Hillbrand b625d29151 Only search pads when the position hits module
On large boards with high pad-count modules, searching each pad for hits
becomes expensive.  We eliminate many of the pad searches by first
checking the module's bounding box before iterating over pads to look
for hits.
2018-05-22 15:37:24 -07:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Seth Hillbrand b8f960ea09 Correct message panel sizing
Message panel in update PCB needs size hints from the dialog to
correctly choose the size.
2018-05-22 13:54:48 -07:00
jean-pierre charras 6f249e5eb6 Add missing icons in lock/unlock context submenu 2018-05-22 14:36:35 +02:00
Seth Hillbrand 2d812c2827 Remove FreeRouting icon and menu option
Freerouting-specialized menus are removed as FreeRouting is not
maintained or packaged for most OSes.  Users can still import/export
SPECCTRA files in KiCad allowing them to interface with a custom
FreeRouting installation.
2018-05-21 10:44:32 -07:00
Seth Hillbrand 5d8dd38664 Standardize graphical edit window
The graphical editor window for pcbnew and modedit have slight
differences, so different classes.  But they should appear the same to
the user.  This merges the differences into a dialog that looks the same
to the user.

Fixes: lp:1772389
* https://bugs.launchpad.net/kicad/+bug/1772389
2018-05-21 09:37:04 -07:00
Jeff Young cdde4c4b40 Fix a bug in how we check for differential pair tuning.
Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-21 13:49:40 +01:00
Jeff Young 0fd0e84162 Keep OK/Cancel buttons at bottom of Track/Via Properties.
Fixes: lp:1772260
* https://bugs.launchpad.net/kicad/+bug/1772260
2018-05-21 13:18:41 +01:00
Seth Hillbrand 0c2f9b1827 Keep circles controlled by radius
Circles are defined by center and a point on their edge.  This requires
the user to do extra math to figure out the size of the circle.  The
patch allows the user to edit and draw circles using radial coordinates.
2018-05-20 17:16:44 -07:00
Jeff Young 8badfea17a Fix the build messages fall-behind problem...
... by getting rid of the separate window.  It makes more sense
to put the messages into the wizard anyway.

Fixes: lp:1492836
* https://bugs.launchpad.net/kicad/+bug/1492836
2018-05-20 23:48:29 +01:00
Jeff Young e27d31d51d Fix minor dialog layout issue. 2018-05-20 23:48:29 +01:00
Jeff Young 052ca08546 Switch footprint-locked-can't-remove msg to warning.
Fixes: lp:1689898
* https://bugs.launchpad.net/kicad/+bug/1689898
2018-05-20 23:48:29 +01:00
Jeff Young 62a5ee8c21 Layout Track / Via Properties dialog.
It's sizing is dependent on the selection.

Fixes: lp:1772260
* https://bugs.launchpad.net/kicad/+bug/1772260
2018-05-20 23:48:29 +01:00
Jeff Young 63c9e11aae Bug fixes in Length Tuning UI.
1) hide the status popup when the dialog is brought up
2) forward events from the popup to the canvas so hotkeys work
3) make sure diff pair radius is always 100%
4) fix greyed-out Miter style label
5) make L a hotkey so it works before you start dragging

Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-20 23:48:29 +01:00
Maciej Suminski dcf60f8e6f Eagle PCB import: handle keepout zones
Fixes: lp:1755886
* https://bugs.launchpad.net/kicad/+bug/1755886
2018-05-19 18:43:04 +02:00
Jeff Young 2bd0a027a2 Improved error messages for diff-pair routing.
Fixes: lp:1542592
* https://bugs.launchpad.net/kicad/+bug/1542592
2018-05-19 01:52:22 +01:00
Seth Hillbrand 6b1df2e992 Remove extraneous PROFILE
Accidentally committed in b2d063137
2018-05-18 17:08:52 -07:00
Seth Hillbrand 0c1172b17d Garbage collection optimization
We only need to iterate over the anchors when there are items that are
marked invalid.  We check once in the item list and only if there are
invalid items to remove do we trim the anchor lists.

However, the connected items might still need to be trimmed, so we leave
this final step outside of the conditional.
2018-05-18 16:59:36 -07:00
Seth Hillbrand b2d0631370 Split anchor vectors by layer
This is a speed commit for large boards.  Tracks and pads cannot connect
to elements that are not on the same layer.  Rather than checking for
this at the last step, this commit splits the anchor vectors by layer,
limiting the initial search space.
2018-05-18 16:59:36 -07:00
Seth Hillbrand 019ada0a92 Move some connectivity search to std::algs
Previously, binary search was hand-coded.  This moves the search to a
std::algorithm variant.  Also searches bbox by limits rather than
directly iterating.
2018-05-18 16:59:36 -07:00
Jeff Young 0bcfb2c7df Don't write library name to footprint files.
Fixes: lp:1772095
* https://bugs.launchpad.net/kicad/+bug/1772095
2018-05-19 00:57:15 +01:00
Jeff Young c5696738d2 Use diff-pair-via clearance when checking against vias.
Fixes: lp:1742275
* https://bugs.launchpad.net/kicad/+bug/1742275
2018-05-18 23:42:38 +01:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

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

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
jean-pierre charras bbc01e0c2b Add a tooltip in DIALOG_POSITION_RELATIVE. 2018-05-18 20:42:24 +02:00
Jeff Young 149f4f68c9 Leave decorations on LAYER_GP_OVERLAY.
In particular, don't reset them to 0, which happens to be F_Cu.

Fixes: lp:1658775
* https://bugs.launchpad.net/kicad/+bug/1658775
2018-05-18 18:18:40 +01:00
jean-pierre charras 45dad4ded5 DIALOG_POSITION_RELATIVE: make dialog more understandable.
Better texts, and add a helper comment.
2018-05-18 13:53:31 +02:00
Jeff Young 5010a461e1 Make polar coordinates consistent.
Use theta instead of phi (which normally describes the azimuth
angle).

Fixes: lp:1545107
* https://bugs.launchpad.net/kicad/+bug/1545107
2018-05-18 12:22:14 +01:00
jean-pierre charras 2363f36033 Fix compil issue in dialog_select_net_from_list.cpp with wxWidgets 3.1 2018-05-18 10:16:30 +02:00
jean-pierre charras 689db4f038 Pcbnew, D_PAD::buildCustomPadPolygon(): use PM_STRICTLY_SIMPLE instead of PM_FAST in polygon calculation.
It is slightly slower, but avoid any issue in polygon generation.
2018-05-18 08:38:03 +02:00
Seth Hillbrand 85921535b3 Cleaning SelectNet window display
Select net has two columns, so we should limit the column width to the
size of the grid.  The size should adjust with the window, so we take
the size of the first column as fixed and assign the rest of the grid
width to the second column.
2018-05-17 16:44:30 -07:00
Jeff Young 8cb68a3585 Wire up return in combobox to accept dialog.
(I've fixed a few of these now.  If memory serves, it's an OSX-
specific problem.)

Fixes: lp:1771515
* https://bugs.launchpad.net/kicad/+bug/1771515
2018-05-17 23:58:49 +01:00
jean-pierre charras 93e75af388 Rename plot_auxiliary_data.h file to gbr_metadata.h, according to the class names defined by this file 2018-05-17 08:07:29 +02:00
jean-pierre charras 144549ebca Pcbnew, plot: Fix: masks derived from custom pad shape have incorrect margin.
Fixes: lp:1771526
https://bugs.launchpad.net/kicad/+bug/1771526
2018-05-16 18:26:43 +02:00
jean-pierre charras 904eb82368 Fix a DRC crash on some installs.
It looks like D_GLIBCXX_ASSERTIONS=ON activated on some Linux versions creates too zealous tests at run time.
This patch just calculate the same pointer value using a slightly different formula.

Fix also a hard-to-understand comment

Fixes: lp:1770414
https://bugs.launchpad.net/kicad/+bug/1770414
2018-05-16 09:20:04 +02:00
Maciej Suminski 23a9fcd91d Fixed a typo in the STEP generator message 2018-05-14 10:59:48 +02:00
jean-pierre charras 2832f997c5 PcbNew; fix crash on copy/paste
Due to a bug introduced by commit ba1e0efda that tried to fix an other bug.

Fixes: lp:1771003
https://bugs.launchpad.net/kicad/+bug/1771003
2018-05-13 21:50:59 +02:00
Jeff Young a9dc417319 Fix bug in pruning of selection.
Fixes: lp:1770939
* https://bugs.launchpad.net/kicad/+bug/1770939
2018-05-13 15:23:41 +01:00
jean-pierre charras b94e0a2031 Fix forgotten change (m_Zone to m_SegZoneDeprecated) 2018-05-13 09:19:44 +02:00
jean-pierre charras e57cd291ff class BOARD: rename m_Zone to m_SegZoneDeprecated to avoid mistakes in code.
m_Zone is a fully deprecated list of SEG_ZONE items (similar to TRACK), used to fill copper zones in *very old* boards.
it is even unlikely there are still boards that use them.
So it should be removed one day.
2018-05-13 08:39:36 +02:00
jean-pierre charras ba1e0efdad Pcbnew, GAL mode: Fix incorrect management of zones in append board and copy from Paste from clipboard.
Fixes: lp:1770855
https://bugs.launchpad.net/kicad/+bug/1770855
2018-05-12 20:48:50 +02:00
jean-pierre charras 6e5131be5a Minor fix in fp editor and fp viewer: display the fp info instead of the useless board info.
board info makes sense only in board editor, not in fp editor and fp viewer.
2018-05-12 10:44:31 +02:00
Jeff Young dffdf04cd9 Update footprint value when it's a proxy for FPID.
Fixes: lp:1769207
* https://bugs.launchpad.net/kicad/+bug/1769207
2018-05-10 12:16:00 +01:00
Jeff Young a65088419e More forgiving keyword search.
In particular, allow comma separators in footprint filters without
making users type them in when searching.

Fixes: lp:1391533
* https://bugs.launchpad.net/kicad/+bug/1391533
2018-05-10 12:16:00 +01:00
Jeff Young 933ff189ad Remember the last directory in FPLib Wizard.
Fixes: lp:1577965
* https://bugs.launchpad.net/kicad/+bug/1577965
2018-05-10 12:16:00 +01:00
jean-pierre charras e339007d22 3D viewer: fix some issues when opened from a frame and changes are made in a other frame:
* Refresh the view only when changes are made in the caller frame.
* Allows recreate a new instances when try to open the 3D view from a frame taht is not the initial caller
* Remove duplicate code in kicad frames.
2018-05-10 12:49:20 +02:00
Wayne Stambaugh d41e64b0ff Fix dialog grid sizer padding issue on GTK builds. 2018-05-09 17:38:06 -04:00
Wayne Stambaugh 7bd9fc9235 Fix footprint editor options dialog layout.
Add padding to standard dialog button sizer.  On windows, the buttons are
slammed against the bottom of the dialog with no border which looks awful.

Fix alignment and padding in grid sizers.
2018-05-09 14:12:26 -04:00
Wayne Stambaugh 7b887c4844 Fix static text iss in board editor footprint properties dialog.
Replace degree symbol with the word degrees.  On windows, this does not
translate to the degree symbol.
2018-05-09 14:01:50 -04:00
Wayne Stambaugh b67bab2f98 Fix layout issues in footprint editor footprint properties dialog.
Add padding to standard dialog button sizer.  On windows, the buttons are
slammed against the bottom of the dialog with no border which looks awful.

Replace degree symbol with the word degrees.  On windows, this does not
translate to the degree symbol.
2018-05-09 13:52:04 -04:00
Wayne Stambaugh 1f898b1e80 Fix control padding in choose footprint dialog. 2018-05-09 13:23:45 -04:00
Wayne Stambaugh 03b85c7544 Fix control alignment and padding in footprint properties dialog. 2018-05-09 13:11:36 -04:00
jean-pierre charras b9808da0a8 Use wxStdDialogButtonSizer in dialog.
Use .step instead of .stp as step file extension.
2018-05-09 18:14:49 +02:00
Wayne Stambaugh 787ee62db3 Fix inconsistent padding in Pcbnew plot dialog. 2018-05-09 11:33:26 -04:00
Jeff Young 31b026c70f Another attempt to fix the initial button layout on GTK. 2018-05-08 20:01:29 +01:00
Jeff Young e5374981aa Improve spacing of Plot button on GTK. 2018-05-08 18:48:23 +01:00
Jeff Young 36850a539b Make layers manager terminology consistent.
Fixes: lp:1769788
* https://bugs.launchpad.net/kicad/+bug/1769788
2018-05-08 18:48:23 +01:00
Jeff Young a997aad144 Fix issue on re-titling sdbSizer button on GTK.
While "fixes" isn't quite the right word, we do want this commit
associated with the following bug, and "fixes" is the easiest
way to do that:

Fixes: lp:1712579
* https://bugs.launchpad.net/kicad/+bug/1712579
2018-05-08 17:11:48 +01:00
Tomasz Włostowski dcf4d7caa7 router: allow placing via without track in shove mode
Fixes: lp:1769782
* https://bugs.launchpad.net/kicad/+bug/1769782
2018-05-08 15:18:10 +02:00
Maciej Suminski 2b46bda2f2 PNS router: apply the last stable state after dragging
Previously, dragging changes were applied only if the last cursor move
finished with a successful drag operation. It made items squeezing
difficult, as it required accurate cursor movement to apply the changes.
2018-05-08 11:50:37 +02:00
Maciej Suminski 471e3de5a7 Fixed board append function, broken in 046e73ec
The previous implementation cleared all DLISTs, but has not added
everything back on append.
2018-05-08 11:21:55 +02:00
Maciej Suminski 8cb3aa79f2 pcbnew_control.cpp code formatting 2018-05-08 10:40:33 +02:00
Maciej Suminski 046e73ecac Clear the source DLIST when pasting items to a BOARD
Fixes the assert triggering when items already belonging to a list are
added to another one.
2018-05-08 10:40:33 +02:00
Jeff Young ad6956b05d Move zone fill check for plot to a checkbox option.
Fixes: lp:1712579
* https://bugs.launchpad.net/kicad/+bug/1712579
2018-05-08 00:22:45 +01:00
Seth Hillbrand dbc2eea3db Optimize itemset
When counting items, many cases exist where we want to count all items
without checking flags.  This short-circuits the loop to provide the
immediate count.
2018-05-07 13:59:12 -07:00
Seth Hillbrand 4c7f5f2a2f Allow disabling snap-to when placing vias
This allows the user to selectively disable the snap-to behavior when
placing stand-alone vias.  Full solution will require an update to the
segment distance calculation that takes into account the rounded line
caps.

Fixes: lp:1769523
* https://bugs.launchpad.net/kicad/+bug/1769523
2018-05-07 13:58:26 -07:00
Maciej Suminski ef698384a7 Eagle PCB importer: changed m_Track.Insert() to m_Track.PushBack()
The latter better reflects the intention.
2018-05-07 16:51:06 +02:00
jean-pierre charras d35a6f1e6d Gerber job file, update to the latest file specification: add a change forgotten in the first commit. 2018-05-07 08:50:17 +02:00
Jeff Young 07e7340a96 Make sure doc gets refreshed when zone check results in refill. 2018-05-06 14:05:50 +01:00
jean-pierre charras b29550de5d Gerber job file: minor update to the latest file specification. 2018-05-06 12:03:46 +02:00
Jeff Young aa7da5dfcd Treat ${...} and $(...) envvar references uniformly.
Fixes: lp:1769282
* https://bugs.launchpad.net/kicad/+bug/1769282
2018-05-05 23:40:40 +01:00
Jeff Young a31017bc9c Check zone fills before plotting.
Also adds a "Draft Plot" button for those who wish to sidestep
zone checking (which can be slow).

Fixes: lp:1712579
* https://bugs.launchpad.net/kicad/+bug/1712579
2018-05-05 23:40:40 +01:00
Jeff Young 1f5b575eaf Pretty-up new pad clearance UI. 2018-05-04 23:55:03 +01:00
Jeff Young c23b263e39 Fix display issues in Layers list in Keepout Zone Properties. 2018-05-04 23:55:03 +01:00
Seth Hillbrand bfe636d327 Query user to create library on save
Revising 5ca6864a4, this prompts the user to create the missing library
directory when attempting to save to a non-existent library.
2018-05-04 09:59:35 -07:00
Seth Hillbrand 5ca6864a40 Improve error message granularity
When saving a library, check and report on libraries that do not exist
as well as those that exist but are read-only.

Fixes: lp:1769190
* https://bugs.launchpad.net/kicad/+bug/1769190
2018-05-04 09:12:08 -07:00
Seth Hillbrand 9648584827 Adjusting the breakout optimizer for custom pads
Rather than using the center of the bounding box, we keep the start
track on the custom pad's connection pad when optimizing the breakout.
2018-05-04 08:23:20 -07:00
Seth Hillbrand b2c4519c2c Setting custom pad shape to be outline for PNS
Changes SHAPE_CONVEX to SHAPE_SIMPLE to better reflect the limitations.
Changes SHAPE_LINE_CHAIN::PointInside calculation to allow points
strictly inside a line chain

Fixes: lp:1768862
* https://bugs.launchpad.net/kicad/+bug/1768862
2018-05-04 08:23:20 -07:00
jean-pierre charras 93c7f65d96 mask clearance parameters: use clearances only for pads on copper layers, and never for pads on technical layers only. 2018-05-04 14:55:38 +02:00
Maciej Suminski 684f085ac5 Coverity fixes
CIDs:
dereference before null check:
175439 @ drc.cpp

uninitalized field:
175435 @ point_editor.cpp
174162 @ zone_filler.cpp
163188 @ footprint_info_impl.cpp

logically dead code:
155146 @ pcb_editor_control.cpp
2018-05-04 14:06:08 +02:00
Seth Hillbrand 1ac905d3ee Allow PNS to select nearest pad when two overlap
Usually pads do not overlap.  However custom pads are represented as
their convex hull, so they may enclose other pads.  This change allows the
router to select the closest pad to the cursor position.
2018-05-03 09:48:15 -07:00
Seth Hillbrand 296ada95a3 Remove unused private vars 2018-05-03 09:48:15 -07:00
jean-pierre charras 5b44e80355 Fix incorrect gerber job file syntax, when a board has inner layers. 2018-05-03 18:27:02 +02:00
Wayne Stambaugh 7c7a6ea979 Fix board file formatting bug.
The roundrect_rratio token was missing a leading space which made the
file formatting different from all other formatting when using rounded
rectangle pads.

Fixes lp:1768355

https://bugs.launchpad.net/kicad/+bug/1768355
2018-05-03 10:21:40 -04:00
Jeff Young a2448cf4a5 Add missing settings to ModEdit's preferences.
Fixes: lp:1768477
* https://bugs.launchpad.net/kicad/+bug/1768477
2018-05-03 15:07:24 +01:00
Tomasz Włostowski 2eddf1d8db router: prevent a very unlikely infinite loop in PNS::LINE::Walkaround() causing an OOM&segfault
Fixes: lp:1767587
* https://bugs.launchpad.net/kicad/+bug/1767587
2018-05-02 15:06:08 -07:00
Jeff Young af739f5b00 Check for duplicates when adding libraries.
This is particularly important when bulk adding (by director, etc.)
as otherwise the user might end up having to click OK to many
many error dialogs.

Fixes: lp:1764057
* https://bugs.launchpad.net/kicad/+bug/1764057
2018-05-02 21:49:57 +01:00
Jeff Young 106dd60e45 Only adjust LAYER_WIDGET font size if larger than indicator.
Also moves adjustment into LAYER_WIDGET so all the callers don't
have to deal with it individually.

Fixes: lp:1767965
* https://bugs.launchpad.net/kicad/+bug/1767965
2018-05-02 21:49:57 +01:00
Jeff Young 2f157f9b23 Enable magnetic pads in Modedit.
Also fixes a bug where a FOOTPRINT_EDIT_FRAME was being passed
in to a PCB_EDIT_FRAME.

Also tidies up Modedit settings handling for settings which can't
be edited in Modedit's preferences dialog.  They're now copied
from Pcbnew.

Fixes: lp:1768477
* https://bugs.launchpad.net/kicad/+bug/1768477
2018-05-02 21:49:57 +01:00
jean-pierre charras 037f7a1698 Cosmetic enhancement: Add missing icons in GAL Select submenu (context submenu). 2018-05-02 21:42:41 +02:00
Seth Hillbrand 6b973f42eb Re-enabling lock/unlock context menus in legacy
This partially reverts 36d36de and 3bac100, moving the legacy footprint
lock/unlock code from the autorouter (which remains disabled) to
pcb_edit_frame.
2018-05-02 09:06:10 -07:00
Seth Hillbrand 76d3b6f04a Adding locking to the context menu for modules
Locking submenu was activated only for tracks and via but it makes sense
(and is probably expected) when right-clicking on modules as well.
2018-05-02 08:35:53 -07:00
Maciej Suminski 73eab29802 Removed 2 unused variables from PNS::LINE::Walkaround() 2018-05-02 17:06:13 +02:00
Jeff Young 69a31242b9 Change status bar Unconnected to Unrouted.
This should help make it clear that this is not the same as the
more authoratative DRC unconnected count.
2018-05-02 10:34:33 +01:00
Seth Hillbrand 2836d36de8 Removing legacy autorouter menu options
The autorouter was removed in 3bac100 but a few items were left in
place but mostly unconnected to functions.

Fixes: lp:1768357
* https://bugs.launchpad.net/kicad/+bug/1768357
2018-05-01 16:36:43 -07:00
Jeff Young aec490e3ac Handle single- and double-click in Place Footprint history list.
Old code failed to set the wxEventType during acceptance, and
failed to set the default button during initialization.

Fixes: lp:1768253
* https://bugs.launchpad.net/kicad/+bug/1768253
2018-05-01 23:28:01 +01:00
Jeff Young 75e91f4cfd Make sure Cvpcb doesn't use its own FP_LIB_TABLE.
It's just a vestige of when Cvpcb was a separate app.

Fixes: lp:1768251
* https://bugs.launchpad.net/kicad/+bug/1768251
2018-05-01 21:49:03 +01:00
Jeff Young 295941c14d Don't leave Zones with "dead" nets.
When reading netlist or updating board from schematic, if the
changes leave a zone with a net with no pads then change the
zone's net to the new net of one of it's connections.

Also improves update-board-from-schematic's dry run reporting
to include zone nets and single-pad nets.

Fixes: lp:1609401
* https://bugs.launchpad.net/kicad/+bug/1609401
2018-05-01 13:54:31 +01:00
Jeff Young 6b3410974d Fix "same layers" test when duplicating zones. 2018-05-01 13:54:31 +01:00
Seth Hillbrand b2b70ed7e3 Fix minor signed/unsigned comparison 2018-04-30 11:15:29 -07:00
Seth Hillbrand 12487e14ab Reduce extra loop comparison 2018-04-30 09:14:23 -07:00
Andrzej Wolski 5ac4dbe641 Fix window/crossed selection mode recognition in flipped view
Fixes: lp:1767233
2018-04-30 14:57:38 +02:00
Jeff Young c8a784058e Allow duplicating a zone onto the same layer in a GAL canvas.
Duplicate already works, so there's little reason to disallow
using the zone dialog to do it.

The legacy canvas can't be fixed because we'll immediately
union the two zones, resulting in a no-op.

Fixes: lp:1464677
* https://bugs.launchpad.net/kicad/+bug/1464677
2018-04-29 20:28:45 +01:00
Jeff Young ae711d9994 Separate clearance axes when plotting pads to DXF (among other things). 2018-04-29 18:51:18 +01:00
Jeff Young 41b92b6d0f Don't discard footprint's library ID when saving.
Fixes: lp:1767736
* https://bugs.launchpad.net/kicad/+bug/1767736
2018-04-29 09:45:05 +01:00
Seth Hillbrand 2a87117edc Speed load/unload of complex boards
Corrects an error in polyline estimation

Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.

Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.

Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
2018-04-28 16:11:07 +02:00
Jeff Young cfd2f1d001 Missed some menu items in the earlier clean-up. 2018-04-27 15:26:00 +01:00
Jeff Young 942d4e7658 Check footprint history list for validity.
Fixes: lp:1767108
* https://bugs.launchpad.net/kicad/+bug/1767108
2018-04-27 15:26:00 +01:00
jean-pierre charras ccce376e33 Refinements for commit 986b904
(Add comments and a minor fix)
2018-04-27 16:01:59 +02:00
jean-pierre charras 986b90424b Fix an issue in LoadPlugins(bundlepath=None) python method (Windows specific).
For some obscure (for me) reason, the path separators in bundlepath are seen as escape seq, and the path can be incorrectly handled
(when \n or \r are found in this string).
it happens only for this path, not for other paths in LoadPlugins.
For bundlepath parameter, unix separator is now used.

Fixes: lp:1766879
https://bugs.launchpad.net/kicad/+bug/1766879
2018-04-27 14:04:24 +02:00
jean-pierre charras 641c8bb548 PCBNew: Fix crash while routing in Legacy canvas
it was due to a incorrect behavior of TRACK::GetBestInsertPoint( BOARD* aPcb )
Also: update comment for this method.

Fixes: lp:1767061
https://bugs.launchpad.net/kicad/+bug/1767061
2018-04-26 19:42:55 +02:00
jean-pierre charras 7a923ab969 vrml export: fix line min width to 0.05mm (instead of 0.12mm) 2018-04-26 19:42:54 +02:00
Jeff Young 5342aacf97 Implement magnetic pads & tracks for measurement tool.
This really needs to get put into the VIEW_CONTROLS for all the
tools, but that's probably a bit too risky for 5.0 at this
point.

Fixes: lp:1766547
* https://bugs.launchpad.net/kicad/+bug/1766547
2018-04-25 23:36:17 +01:00
Jeff Young 7a7da560bc Keep unknown nets at 0 while routing.
Previous algorithm used a static variable which it decremented
for each new unconnected track, but this resulted in the router
marking earlier fixed segments as collisions (because they
would get set to netcode = 0 when "fixed").

Fixes: lp:1762043
* https://bugs.launchpad.net/kicad/+bug/1762043
2018-04-25 10:54:32 +01:00
Seth Hillbrand 8d017c9261 Re-enabling global spread and place
This had been removed along with autorouter but its functionality is
still desired.  If/when the autorouter is resurrected, these IDs will
need to be deconflicted.

Fixes: lp:1766550
* https://bugs.launchpad.net/kicad/+bug/1766550
2018-04-24 11:44:08 -07:00
Seth Hillbrand d0ffff3b88 Prevent deletion while actively routing
Fixes: lp:1766280
* https://bugs.launchpad.net/kicad/+bug/1766280
2018-04-24 10:44:49 -07:00
Seth Hillbrand 345f7d0732 Fix VRML export bugs
Corrected polygon export missing vertex.

Set pads to export on copper layer when not masked, keeping visual
output similar to physical.

Fixes: lp:1766634
* https://bugs.launchpad.net/kicad/+bug/1766634
2018-04-24 09:20:40 -07:00
jean-pierre charras bfc70c8208 Fix an issue in footprint editor, "Create Pad from Selected Shapes" command.
If the initial pad was a custom pad converted in a usual pad + graphic items by the command:
"Explode Pad to Graphic Shapes"
the "old" primitives were not cleaned, and the new created pad contained these old primitives, regardless the new selected shapes.
(Usual case when a user want to edit a custom shape)
2018-04-24 17:00:29 +02:00
Maciej Suminski 143d580596 Fixed relative coordinates reset when a tool forces the cursor position
Fixes: lp:1759044
* https://bugs.launchpad.net/kicad/+bug/1759044
2018-04-24 12:56:19 +02:00
Seth Hillbrand 482fd866b3 Correct minor error in SPECTRA rounded-rect 2018-04-23 16:43:13 -07:00
Seth Hillbrand bd5eee50f4 Unify correction factor calculations 2018-04-23 16:43:13 -07:00
Seth Hillbrand 3693e3b1e0 Standardize colons in track-via properties dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand b2a9df33ea Standardize colons in set grid dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 6f6b65821a Standardize colons in select pretty lib dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 0cbc611135 Standardize colons in select net dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 938f8b1a9a Standardize colons in Print using printer dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 006bfabbdf Standardize colon and remove abbr. in Print dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 0e79538601 Standardize caps in position relative dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand e219ff0c2f Standardize colons pns settings dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 3d2e103374 Standardize colons pns length tune dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 3c00b2a2a8 Standardize colons plot dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand fbb8ccb9ad Standardize colons in pad properties dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 30d1db6b1f Standardize colons non-copper zones dialog 2018-04-23 11:53:18 -07:00