Commit Graph

8590 Commits

Author SHA1 Message Date
Seth Hillbrand 52bfdb9703 PNS: Assume the current line is a base before optimizing
We use the cost of the current line before trying to improve the pad
breakout cost when optimizing the smart pads

Fixes #3759 | https://gitlab.com/kicad/code/kicad/issues/3759
2020-01-12 11:08:46 -08:00
Ian McInerney 3346f812a9 Cleanup error handling in VRML export (from coverity scan) 2020-01-12 17:18:08 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Seth Hillbrand 76c26d6ae1 Remove unneeded unique_ptr
The unique_ptr was useful when the original function took multiple paths
which could de-scope the pointer.  Current use allowed potential
use-after-free. This is now re-written to pass pointer directly.
2020-01-11 17:29:12 -08:00
Jeff Young 3d8150032f Fix some uninitialized variables found by Coverity. 2020-01-11 21:29:25 +00:00
Jeff Young 2e509480a4 Fix guaranteed divide-by-zero error when called with correction of 0. 2020-01-11 21:29:25 +00:00
Jeff Young 715448611d Fix potential divide-by-zero (from Coverity scan). 2020-01-11 21:29:25 +00:00
Jeff Young 17710c15d3 Fix leak of empty PICKED_ITEMS_LIST. 2020-01-11 21:29:25 +00:00
Jeff Young 9182b3a850 Remove dead code and simplify remaining logic. 2020-01-11 21:29:25 +00:00
Ian McInerney 43abd53b19 Clarify limits of the if statement 2020-01-11 21:28:25 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Jeff Young 254ba1f998 Fix null pointer access (from Coverity scan). 2020-01-11 00:15:47 +00:00
Jeff Young 88eab8134e Fix a couple of uninitialized variables (from Coverity scan). 2020-01-11 00:11:31 +00:00
Jeff Young 7bb9551801 Handle boost exceptions. (From Coverity scan.) 2020-01-11 00:04:01 +00:00
Jeff Young 5e5edd03f6 Implement super- and subscript printing and plotting for eeschema. 2020-01-10 22:32:49 +00:00
Jeff Young e03281a9ae Allow exclusive-or selections on OSX. 2020-01-10 22:32:49 +00:00
Ian McInerney 7c61b83df6 Code cleanup 2020-01-10 20:10:29 +00:00
Ian McInerney 5e6c6e7e22 Fix memory leak in the footprint preview panel
The cached modules were never deleted, so they would
leak whenever the panel was closed.
2020-01-10 20:10:29 +00:00
Seth Hillbrand 77c60d9655 Remove the last vestiges of dlist
It served us (mostly) well for more than a decade.  It helped KiCad grow
before the std:: came into decent shape or speed.  It was a good little
list.

RIP DLIST 2008-2020
2020-01-10 06:37:08 -08:00
Ian McInerney a8d9fcb4e0 Fix event handler type casting
The old methods were very clunky and not recommended (and didn't
properly cast the function types). This changes to useing the
recommended way of declaring events and casting the event handlers.
2020-01-09 18:08:49 +00:00
Seth Hillbrand 16026e75cf pcbnew: Don't compare across containers
std:: defines cross-container comparison as invalid and is not
guaranteed to work.  This breaks the comparison out into separate
steps, each for the separate containers.
2020-01-07 16:03:32 -08:00
Ian McInerney 9dff31c2ac Remove unused DIALOG_FILE_DIR_PICKER
This class was replaced with native dialogs for choosing
the files and directories
2020-01-07 23:40:00 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Simon Richter b114dabbed Convert line endings in three FBP files 2020-01-07 13:32:33 +00:00
jean-pierre charras 86f9ed1dd9 Allows pad property only by the kicad_advanced feature.
pad property is allowed if "UsePadProperty=1" is found in kicad_advanced.
2020-01-06 18:11:01 +01:00
jean-pierre charras f2518a5120 ADDED: pad fabrication property, as required in latest Gerber file specification.
Property is a pad info used mainly for fabrication or test.
Currently, supported properties are:
BGA property (variant of SMD pad)
Fiducial (global to the board or local to the footprint)
Test Point
Heat sink
Castellated.
And are used in Gerber files (copper layers and drill files)

Increment BOARD_FILE_VERSION  to 20200104
2020-01-06 16:37:35 +01:00
Jon Evans 28222d3bd0 Use existing pcb filename for Save As where possible 2020-01-06 14:26:03 +00:00
Simon Richter a5c7d452ce Convert line endings back to Unix
- pcbnew/class_board.h
2020-01-05 00:48:18 +01:00
Fabien Corona 820690d024 pcbnew : fix selection color for the 'hole' part of NPTHs
The inner circles of NPTHs now change color when selected

Fixes #1860
2020-01-04 20:59:49 +00:00
Jon Evans 772835e3e3 Add fifo_map and use it for Gerber job file generation 2020-01-04 11:05:09 -05:00
Jon Evans 21d577e638 Implement Gerber job file writing using nlohmann/json 2020-01-04 10:46:50 -05:00
Ian McInerney 4c1e64628e pcbnew: Modify IDs in panel_fp_lib_table
Move the IDs from the main enum to be local and use
the end of the main enum as the starting point.
2020-01-03 16:10:53 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Mark Roszko 49db816c82 Pcbnew: improve add existing footprint library browser and button
CHANGED: Modify Add Existing Footprint Library button to us OS file/directory browsers
2020-01-03 15:09:26 +00:00
jean-pierre charras ed0a28769a code cleaning: remove useless includes. 2019-12-31 14:58:39 +01:00
Fabien Corona 496f3d49e4 pcbnew: When using '+' and '-' hotkeys, skip non-visible layers
CHANGED: pcbnew: When using '+' and '-' hotkeys, skip non-visible layers

Fixes https://gitlab.com/kicad/code/kicad/issues/3443
2019-12-29 23:37:25 +00:00
jean-pierre charras 7241247fbc Pcbnew: add missing storage of dimension units and dimension precision in pcb files.
https://gitlab.com/kicad/code/kicad/issues/3712
2019-12-28 13:27:31 +01:00
Jeff Young ffe3fdf832 Set m_netNamesOnVias. We currently follow m_netNamesOnPads.
We could also follow m_netNamesOnTracks, or add another set of
options in the GUI.  But for now I suspect this is sufficient.
2019-12-28 11:58:33 +00:00
jean-pierre charras cd1f3acf49 Fix compil warnings 2019-12-28 08:43:29 +01:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Jon Evans 80fb3bde56 Don't try to write fp-info-cache to a read-only directory
Fixes #1890
2019-12-25 18:38:31 -05:00
jean-pierre charras a12b803af5 Add missing option to show footprint texts in fill or sketch (line) mode.
This option is settable in stable version, but not in master.
So, this option set from the stable version could be modified in master version.
2019-12-23 18:11:45 +01:00
Ian McInerney bf5dba847c pcbnew: Fix cmake to work with no wxPython on macOS 2019-12-22 02:04:15 +00:00
Ian McInerney 7fb56cf9a3 Fix compile error due to enum changes
Merge request !23 changed to strongly typed enums,
so we now need to explicitly cast the output in the
Python getters.
2019-12-20 14:47:41 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Ian McInerney 116ac9aa75 Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:41:02 +00:00
Ian McInerney b9d8849b28 Unify unsaved changes detection logic in all frames
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
2019-12-19 15:34:01 +00:00
Mark Roszko 686b768a3d Add shutdown blocking on Windows for pcbnew, eeschema and pleditor
ADDED: Block shutdown/logoff on Windows when contents have been modified
2019-12-19 14:11:11 +00:00
jean-pierre charras a9f9540fa4 Pcbnew: minor cosmetic enhancement:in status panel, for polygon graphic shape:
shows the coordinates of the first polygon point (instead of 0,0 coordinates)
2019-12-19 08:30:20 +01:00
jean-pierre charras cc185e4b8a Pcbnew: fix crash when deleting pads in the board editor
Fixes # |3684 https://gitlab.com/kicad/code/kicad/issues/3684
2019-12-17 13:56:17 +01:00
jean-pierre charras fa200f3d39 Pcbnew: enhancement: graphic polygon: display the points count, instead of length.
Previously, the meaningless length (always 0) was displayed.
2019-12-17 08:40:44 +01:00
jean-pierre charras 6bc8005d60 Pcbnew: fix strange behavior when editing board setup, if a zone is currently selected.
The zone was silently deleted.

Fixes #3673 | https://gitlab.com/kicad/code/kicad/issues/3673
2019-12-16 12:44:53 +01:00
Jeff Young d40019210f Allow undo during a drag. 2019-12-15 21:33:58 +00:00
Jeff Young 1f07505b27 Fix long-standing issue with arrow keys moving in both axes. 2019-12-15 14:29:47 +00:00
jean-pierre charras d14950c3f8 Pcbnew: Add missing options to show graphics in fill or sketch mode.
These options where settable in stable version, but not in master.
So, the options set from the stable version cannot be modified in master version.
2019-12-15 13:56:26 +01:00
Seth Hillbrand dc241df602 pcbnew: Cleanup stale code 2019-12-13 11:22:18 -08:00
jean-pierre charras 02977aacfc Pcbnew: fix incorrect rotation angle unit when building thermal spokes
The new Rotate function uses radians, not deci-degrees.

Fixes #3668 | https://gitlab.com/kicad/code/kicad/issues/3668
2019-12-13 17:41:20 +01:00
Mark Roszko ae785194ce Silence/fix double to float conversion warnings 2019-12-12 21:51:21 +00:00
Seth Hillbrand 0e1a274f0c pcbnew: Clean unused lambda includes 2019-12-12 11:52:50 -08:00
Seth Hillbrand eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +00:00
jean-pierre charras 21dd8db7a9 P&S router: length tuning tool: fix a crash after trying to tune a track.
It happens on Windows, and wxWidgets 3.1.3.
It is created by PNS_TUNE_STATUS_POPUP instance used in tool.
I am pretty sure this crash is created by the stack switching
when managing events, due to some changes in wxWidgets code.
the fix creates the instance on the heap, instead of on the stack.
This is not the first time I see this kind of issue.
2019-12-12 09:39:51 +01:00
Jeff Young 351e249105 Fix full-screen-crosshairs toolbar button.
Fixes #1937 | https://gitlab.com/kicad/code/kicad/issues/1937
2019-12-11 21:04:52 +00:00
jean-pierre charras e57fe9d173 Gerber object attribute: avoid trying to guess if a SMD pad is a BGA pad.
Previously, if a SMD pad was round, itb was seen as BGA pad.
But this is not always true. so use always SMD PAD attribute,
until an explicit BGA pad attribute is added in Pcbnew
2019-12-11 08:52:31 +01:00
Seth Hillbrand 9b7d4e2742 Recleaning DLIST from pcbnew
This was re-introduced by 5d3e6e3d44

The crash happened b/c we have to manage list containers in each element
and minor adjustments cause the rest of the list to be lost.  This
commit re-implements it using std::iterators and deque

Fixes #2623 | https://gitlab.com/kicad/code/kicad/issues/2623
2019-12-10 09:52:07 -08:00
jean-pierre charras c7ce93e10e Pcbnew: fix crash on exit, if a place zone tool is activated. 2019-12-08 18:01:02 +01:00
Seth Hillbrand b6b805548d PNS: Allow snap to temp hidden
The IFACE for kicad refers to the board hidden state, not the
temporarily hidden state used by the router.  We allow snapping to items
that have been removed by the temporary router state to provide snapping
to original track location.

Fixes #1827 | https://gitlab.com/kicad/code/kicad/issues/1827

(cherry picked from commit 1e64524afb)
2019-12-07 09:51:02 -08:00
Seth Hillbrand 9f896312ee Add missing include 2019-12-06 06:47:03 -08:00
Seth Hillbrand 4aa9552f1f Adding missing include 2019-12-06 06:26:59 -08:00
Fabien Corona 36fba5bd7f PCBnew: placing a blind/buried via sometimes incorrectly place a through via.
Fixes #1819
https://gitlab.com/kicad/code/kicad/issues/1819
2019-12-06 13:11:33 +01:00
Seth Hillbrand ac92afcf13 Clean up compile warnings
Ratsnest did not need a reserve and then iterative emplace.  Instead, we
use resize().  Stroke font gets private vars initialized and kiway
variables that are only used in debug builds are properly scoped for
releases as well
2019-12-05 20:05:21 -08:00
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Seth Hillbrand a2edf9c442 Unified update to C++14 std::make_unique
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
2019-12-05 10:43:55 -08:00
jean-pierre charras 4a75cc586c Zone filler: do not create stubs in thermal reliefs when not possible.
pad size is sometimes smaller than the zone minimal width.
So, to avoid strange and incorrect results, do not create the stubs in
thermal relief when the pad size is smaller than the zone minimal width.
2019-12-04 13:23:09 +01:00
Jeff Young 089ce90de3 Fix some issues with the previous commit. 2019-12-02 23:35:19 +00:00
Jeff Young 9b36489270 Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:52:50 +00:00
Jeff Young a9da0c6ecf Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726
* https://bugs.launchpad.net/kicad/+bug/1853726
2019-12-02 20:01:44 +00:00
jean-pierre charras 5cd7f3fdee DIALOG_DRC_CONTROL: fix a crash on wxWidgets 3.1.3, Windows,
Happens when right clicking on an item in displayed lists.
The crash was due to a bug in wxWidgets, and the fix is only a workaround

Also remove duplicate code.
2019-12-02 11:27:40 +01:00
Jeff Young 342c8941b5 More cleanup of dialog_find-base.fbp 2019-11-30 01:00:16 +00:00
Jeff Young 1e4437c6df Some cleanup for the Pcbnew search changes. 2019-11-29 21:38:18 +00:00
Fabien Corona 7297822423 pcbnew: search options
-Users can now search DRC markers with string filtering
-GUI changes for consistency with Eeschema

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:58:05 +00:00
Fabien Corona 5d3e6e3d44 pcbnew: search options
-Add a "wrap" option->Search results implemented as a nested list.
-Allow to go back with a "Find previous" button
-Remove the marker search option
-Fix a DLIST issue
-Add a result counter ("eg: hit(s): 1/3")
-Search history limited to 10
-Fix the search history order
-User can include or exclude references/values/texts from results

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:55:01 +00:00
Jeff Young 102b530162 Fix library tree updating bug present at least on OSX. 2019-11-29 17:55:01 +00:00
Ian McInerney 9f9b48739c pcbnew: Adjust dimension display after updating units
Fixes: lp:1854167
* https://bugs.launchpad.net/kicad/+bug/1854167
2019-11-27 16:39:13 +00:00
jean-pierre charras c186e7d391 Cosmetic and usability enhancements.
- Better menu texts
- do not show pad edit options in board editor,
when they are used only in the footprint editor.
2019-11-26 19:53:00 +01:00
jean-pierre charras 2cd60cdfaf Layer stack manager: remove dielectric layer: fix incorrect sub-layer selection. 2019-11-25 13:30:48 +01:00
jean-pierre charras ce7857b715 Layer stack manager: fix crash due to a double deletion on unix.
Did not happen on Windows.

Fixes: lp:1853764
https://bugs.launchpad.net/kicad/+bug/1853764
2019-11-25 10:51:59 +01:00
John Beard eb61c1bbc4 Reset Windows file endings to Unix
Commit 71cd8c57b changed pcbnew/kicad_plugin.cpp to Windows
file endings. This means that any patches on this file no longer
apply.
2019-11-25 15:07:38 +08:00
Ian McInerney f7ded3040c pcbnew: Modify new file to have a better prompt when closing old board
CHANGED: The new file prompt now asks to save the board if needed

Fixes: lp:1853338
* https://bugs.launchpad.net/kicad/+bug/1853338
2019-11-24 14:51:29 +00:00
Ian McInerney 610964b59c modedit: Disable editing tools when no footprint is loaded 2019-11-24 11:55:30 +00:00
Ian McInerney 82f55d300b pcbnew: Fix flicker in layer widget when toggling grid 2019-11-24 00:51:54 +00:00
Ian McInerney e82795ba58 Fix grid settings in pcbnew/modedit/cvpcb
* Make the grid display settings separate from the board object
* Ensure that the grid is initialized on creation in all the frames

Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
2019-11-23 23:35:21 +00:00
Ian McInerney 99b9354a51 Add clear recent files action to the menus
ADDED: Menu item to allow the recent file lists in each program to be
cleared

Fixes: lp:1821685
* https://bugs.launchpad.net/kicad/+bug/1821685
2019-11-23 23:35:21 +00:00
jean-pierre charras c34dfc4230 fix a minor compil warning 2019-11-23 18:36:40 +01:00
jean-pierre charras 2dc81b0b8a Update SEXPR_BOARD_FILE_VERSION to 20191123 to support pin function in pads 2019-11-23 10:07:56 +01:00
jean-pierre charras f7159e4692 Make pin function in pads an advanced feature.
Mainly because it creates a new keyword a new keyword in *.kicad_pcb files,
and needs some tests, this is currently a advanced feature.
Enable it by adding "UsePinFunction=1" in "kicad_advanced" config file.

Note also "UsePinFunction=1" only enable saving this info in *.kicad_pcb
and kicad_mod files.
2019-11-23 09:12:44 +01:00
jean-pierre charras 71cd8c57bf ADDED: Pcbnew, add "pin function" (pin name in eeschema) to pads.
The pin name defined in Eeschema is now available as pad info.
Useful for the board designer (the pin function is displayed in the message panel).
Needed for the Gerber P&P files.
2019-11-23 09:12:43 +01:00
Jeff Young 13df645af9 Fold down select/expand connection/copper to a single action.
Fixes: lp:1832902
* https://bugs.launchpad.net/kicad/+bug/1832902
2019-11-22 19:30:36 +00:00
Jeff Young 523de87b45 Re-implement copper selection algorithms.
Fixes: lp:1832902
* https://bugs.launchpad.net/kicad/+bug/1832902
2019-11-22 19:30:36 +00:00
jean-pierre charras 3be1862b0f Fix minor wxWidgets alert (with wxWidgets 3.1.3) 2019-11-20 17:53:38 +01:00
Ian McInerney 0eee21e450 pcbnew: Fixup formatting and comments in pcb_painter.cpp 2019-11-18 23:42:39 +00:00
Fabien Corona 6b477a96d6 Outlined buried vias
Fixes: lp:1851929
* https://bugs.launchpad.net/kicad/+bug/1851929
2019-11-18 22:47:56 +00:00
jean-pierre charras eadcb5de5e DIALOG_PAD_PROPERTIES: fix incorrect pad type for Aperture option.
The aperture option created a Connector pad only on the paste layer.
This is incorrect: the SMD type only is acceptable.
5connector is *only* for edge card connectors.
Moreover, The dialog did not even accept the setting defined by this dialog...
2019-11-17 18:20:19 +01:00
jean-pierre charras a4c9f961f7 Fix overzealous detection "Warning: No net for component".
- Previously a warning was generated even for not connectable pads
(pads not on copper layers or without pad name).
- The test is now optional and is disabled by default.
(pads without corresponding pin is schematics are a frequent case)

Fixes: lp:1852444
https://bugs.launchpad.net/kicad/+bug/1852444
2019-11-17 16:55:22 +01:00
jean-pierre charras 6f2cbe5982 Pcbnew: housekeeping: move netlist code to netlist_reader sub directory. 2019-11-17 13:58:38 +01:00
Jeff Young 9a82bc396c Use lazy-mode update for the reporter when updating footprints. 2019-11-16 23:03:46 +00:00
Jeff Young 490bc2874f Clean up board commit a bit.
This change makes it so that we don't run the event loop inside
the commit.  It's not clear this is an issue, but it seems safer
not to.

Fixes: lp:1852589
* https://bugs.launchpad.net/kicad/+bug/1852589
2019-11-16 22:32:52 +00:00
jean-pierre charras 00bbb4bc15 DIALOG_FOOTPRINT_BOARD_EDITOR: minor cosmetic enhancement
Make footprint lib id copyable.
2019-11-16 20:00:32 +01:00
jean-pierre charras 577fbc6156 PCBNew: fix issue with keepout area in board editor.
Not able to draw a keepout-area on bottom or internal layers.
This was due to a behavior specific to the footprint editor,
not disabled in board editor.

Fixes: lp:1852847
https://bugs.launchpad.net/kicad/+bug/1852847
2019-11-16 13:01:48 +01:00
jean-pierre charras c5290de6ec housekeeping:
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
2019-11-16 09:39:36 +01:00
Fabien Corona 04edc6ceff High contrast color for holes in microvias and buried bias
In high contrast mode, the holes of buried vias and microvias were no darkened when not on the active layer.
In high contrast mode, the outer circle of buried vias and microvias were alway darkened.

In high contrast mode, when the selected layer is non visible through-vias are now darkend.

Fixes: lp:1844982
* https://bugs.launchpad.net/kicad/+bug/1844982
2019-11-15 12:02:19 -08:00
jean-pierre charras 544867cf2a ADD: layer stack manager: support of multilayer dielectric between 2 copper layers
This feature is useful for advanced microwave applications.
This is the last missing feature in the board stackup management.
2019-11-15 14:33:10 +01:00
jean-pierre charras a6b94b37ec Minor fixes in board_stackup_reporter. 2019-11-12 14:44:10 +01:00
jean-pierre charras 6ad3e4a565 Board stackup manager: Fix missing initialization of dielectric type. 2019-11-12 14:43:48 +01:00
jean-pierre charras 2b201487e1 Board stackup manager: prepare code to allow multiple dielectric material by layer.
For advanced microwave applications, sometime a dielectric between 2 copper layers
must be itself created by a stack of different materials.
2019-11-12 14:43:47 +01:00
jean-pierre charras f333d1b974 fix typo creating compil issue 2019-11-12 14:15:03 +01:00
jean-pierre charras de2818c113 Fix a few I18n minor issues. 2019-11-12 13:47:35 +01:00
Seth Hillbrand 33ff828411 Minor change to casting
C++ casting preferred
2019-11-11 20:09:19 -08:00
Ian McInerney 69e20c73ad fpeditor: Fix initial grid display setting
The footprint editor didn't respect the display setting showing/hiding
the grid on startup.

Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
2019-11-11 22:56:06 +00:00
Wayne Stambaugh bf8bb17f42 Fix missing symbol and footprint viewer about dialog names. 2019-11-11 08:25:58 -05:00
Ian McInerney 9f0c131ba4 Fix build error in DIALOG_BOARD_STATISTICS
When passing the functions into the wxEventHandler setup functions
they must be fully qualified with the class name.
2019-11-11 10:48:03 +00:00
jean-pierre charras a3b0f9deba DIALOG_BOARD_STATISTICS_BASE: fix a wxWidgets alert.
Add a small margin around texts in drill grid.
2019-11-11 09:28:41 +01:00
Mikołaj Wielgus 4b92c516e1 Pcbnew: Add drill holes table to board statistics
NEW: Add drill holes table to board statistics as a separate tab in the board
statistics dialog. Print the drill holes table in the generated statistics file.
NEW: Make the generated statistics file Markdown compatible.
2019-11-11 07:46:18 +01:00
Ian McInerney 1b14a38b01 pcbnew: Fix hotkeys during routing
CHANGED: Fix hotkeys for actions during routing

Previously hotkeys on shifted characters would not be
passed through the router and processed.
2019-11-10 17:47:51 +00:00
Ian McInerney d8c80623ce pcbnew: Fix cursor position after via layer select
CHANGED: Move cursor to event position instead of the
dialog position when selecting the via layer
2019-11-10 17:34:16 +00:00
Jeff Young 10abc6097f Cleanup, commenting, etc. 2019-11-10 14:52:01 +00:00
Jeff Young c29a0b1966 Fix geometry error in connectivity algorithm.
For custom pad shapes were were calculating cardinal points off
of the bounding box.  However, the bounding box must be rotated
around the pad's position, rather than its shapePos -- which is
an issue since any thermal spokes will be rotated around the
shapePos.

Of course we don't really need to sort that out because we're
doing an intersection of the pad's boundary polygon with a vector
from the shapePos out to the cardianl point -- so we really just
need the cardinal point to be "out there".  So I've changed it
to use use INT_MAX / 2.

Fixes: lp:1851703
* https://bugs.launchpad.net/kicad/+bug/1851703
2019-11-10 14:52:01 +00:00
jean-pierre charras 80df7a7443 Gerber job file: remove info "core/prepreg" in "Notes" and "Name".
They were intended to be just a comment.
However they can generate not wanted constraints for board fabrication.
2019-11-10 13:46:58 +01:00
jean-pierre charras 4de6ed6206 Fix issues created by Adds Save As... to the Kicad manger.
Mainly replacing std::string by wxString to manage filenames.
On Windows, a sdt::string cannot manage a filename, unless using
in many places TO_UTF8 and FROM_UTF8.
So the best way is to use a wxString for filenames and error messages.
2019-11-10 09:37:39 +01:00
Jeff Young b5904b0401 Installment one of project Save As... feature.
ADD: Adds Save As... to the File menu for the project window.

Fixes: lp:594051
* https://bugs.launchpad.net/kicad/+bug/594051
2019-11-09 20:22:44 +00:00
jean-pierre charras 062e7273b7 footprint viewer: fix a minor issue:
New settings from footprint viewer dialog settings were never updated.
2019-11-09 20:07:19 +01:00
jean-pierre charras 01553a6bd1 FIX: add parameter to GAL::DrawCurve to control the curve to polyline conversion. Cairo supports curves, but not Opengl, that needs a conversion to polyline. This control allows optimization in conversion 2019-11-09 11:41:29 +01:00
jean-pierre charras c4023637df FIX: footprint viewer: avoid display a empty footprint list when a library is selected.
When invoking the viewer the fp list was sometime blank until a new lib is selected.

Fixes: lp:1851799
https://bugs.launchpad.net/kicad/+bug/1851799
2019-11-08 17:41:39 +01:00
jean-pierre charras 0a018f514b Fix crash when saving config in Pcbnew.
Due do latest changes, a local copy of m_DisplayOptions was used instead of m_DisplayOptions itself.
But saving config use references to save params, so a non existing reference was used.
2019-11-08 09:42:33 +01:00
Philipp d788a5d99e Warn for excessive pads
Fixes: lp:1849664
* https://bugs.launchpad.net/kicad/+bug/1849664
2019-11-07 19:26:04 -08:00
Seth Hillbrand 7f507a4e6b Explicitly delete ctor/copy constr
This will throw the error when compiling instead of when running if a
developer accidentally instantiates the BOARD() ctor or copy
constructor.
2019-11-07 18:07:12 -08:00
Fabien Corona 6182133a4e Ratsnest default value for tracks and vias
Fixes: lp:1851611
* https://bugs.launchpad.net/kicad/+bug/1851611
2019-11-07 08:41:56 -08:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Fabien Corona 29ce76b4e4 Pad ratsnest settings initial value
Pad ratsnest settings set to global settings during initilization.

Fixes: lp:1848488
* https://bugs.launchpad.net/kicad/+bug/1848488
2019-11-07 08:26:44 -08:00
jean-pierre charras 81020e8824 minor fix in dialog gen place file. 2019-11-07 16:55:05 +01:00
jean-pierre charras a60fb9a4b8 Pad properties dialog: minor change: in pad type list; change "Connector" to more explicit "Edge Connector".
Reason: this type "Connector" is used in Gerber files, and is specific to edge cards connectors.
2019-11-06 18:11:37 +01:00
jean-pierre charras 22c11d1092 Footprint editor: remove not selectable layers from the layer box selector.
3 layers shown (but not selectable) in layer manager are removed from layer box
(inner_layers is a pseudo layer, Edge_Cuts and Margin are not yet managed in Fp)
2019-11-06 11:35:02 +01:00
jean-pierre charras 85156300d6 Gerber plot: fix a minor issue: TF attribute "Drawing" is now "OtherDrawing,Comment"
Also use "AssemblyDrawing" attribute for fabrication layers in Pcbnew (actually assembly layers)
This is due some changes in recent Gerber file format.
2019-11-06 10:05:23 +01:00
Seth Hillbrand 19c643b29a pcbnew: Prevent extra selection
We want to avoid selecting items that are disabled in the item list.
Our standard method is in the GetViewLOD() that performs both size and
visibility.  This extends the check to module text and via.

Fixes: lp:1851133
* https://bugs.launchpad.net/kicad/+bug/1851133
2019-11-05 12:24:29 -08:00
Jeff Young 383adaa6f4 Remember update footprint checkbox values.
Fixes: lp:1851365
* https://bugs.launchpad.net/kicad/+bug/1851365
2019-11-05 18:03:45 +00:00
Jeff Young dc8c396c4f Cleanup. 2019-11-05 18:03:45 +00:00
Jeff Young ddf887d24a Add layer selector to Footprint Editor for consistency.
Fixes: lp:1850858
* https://bugs.launchpad.net/kicad/+bug/1850858
2019-11-05 17:22:51 +00:00
Jeff Young fae86d4dd0 When copying an item it's no longer at the original location and so can't be "locked".
Fixes: lp:1851038
* https://bugs.launchpad.net/kicad/+bug/1851038
2019-11-05 17:22:51 +00:00
Jeff Young 1c153c55c0 Add default units and precision for new dimension objects.
Fixes: lp:1846376
* https://bugs.launchpad.net/kicad/+bug/1846376
2019-11-05 17:22:51 +00:00
Jeff Young a6a4973324 Handle rotation for N/S/E/W pad cardinal points.
Fixes: lp:1844727
* https://bugs.launchpad.net/kicad/+bug/1844727
2019-11-05 17:22:51 +00:00
Jeff Young 872826085a Filter PCBNew contents when pasting into Footprint Editor.
Fixes: lp:1850724
* https://bugs.launchpad.net/kicad/+bug/1850724
2019-11-05 17:22:51 +00:00
Jeff Young 48c8ac9663 Added new action for "Change Track Width".
Default out-of-the-box is no hotkey. Removed all the preference stuff.

Note that the new implementation is a little different: the old one only
operated on a selection with a single item where the new one operates on
all selected items. So if you want the whole track do a 'U' before the 'W'
(or whatever you have Change Track Width assigned to).

Fixes: lp:1844023
* https://bugs.launchpad.net/kicad/+bug/1844023
2019-11-05 17:22:51 +00:00
jean-pierre charras 52fcbeab44 Fix incorrect HitTest in DRAWSEGMENT (bezier curve) 2019-11-05 16:17:56 +01:00
jean-pierre charras 5f3353cad1 Add native Bezier curve plot in SVG plotter. 2019-11-05 14:27:07 +01:00
jean-pierre charras bb9b226744 Pcbnew, plot function: add missing plot for bezier curves in footprints.
It was existing for pcb graphics, but not for footprint graphics.
2019-11-05 11:07:07 +01:00
jean-pierre charras c34a584289 Fix a bug in ZONE_CONTAINER copy constructor.
I fixed it in commit 26ebf3c96, and broke it in commit 04bae776.

Fixes: lp:1850758
https://bugs.launchpad.net/kicad/+bug/1850758
2019-11-05 09:13:43 +01:00
Seth Hillbrand 42daf172fd router: Keep meander placer world in base
m_world overloaded in pns_meander_placer and didn't get the correct
pointer in certain tune modes.

Fixes: lp:1851251
* https://bugs.launchpad.net/kicad/+bug/1851251
2019-11-04 09:11:19 -08:00
jean-pierre charras 51ed01d765 GERBER_PLOTTER: small change in code to manage the current selected aperture.
Avoid using an iterator to store this aperture because iterators can be invalided
when modifying a list.
Enhancements in gerber_placefile_writer.
2019-11-04 14:33:10 +01:00
jean-pierre charras 11f0acefe2 Footprint wizard frame: rebuild the parameter grid list after any parameter change.
The python footprint wizard can modify other parameters than the one that was changed by user.
So the parameter grid list must be updated after every parameter change.

Fixes: lp:1846404
https://bugs.launchpad.net/kicad/+bug/1846404
2019-11-02 10:17:35 +01:00
Seth Hillbrand 9bccbaf497 qrcode: Handle Python3 integer promotion
In Python3, all division operators promote integers to floats.  We need
to downcast back to integer for the polygon vertices.

There was also an unhandled overflow in the QR generation that allowed
more than 512 bits to be loaded.  This overflows the type of QR we
generate, so this truncates the input string to 62 bytes ( leaving 12
bits for the checksum )

Fixes: lp:1850223
* https://bugs.launchpad.net/kicad/+bug/1850223
2019-11-01 13:32:50 -07:00
jean-pierre charras 65bf669387 Refinements in gerber placefile writer: allows adding board edge cuts in file.
Use a pad bounding box for footprints having no valid courtyard defined.
Refinement also in Gerber files when plotting oval pads.
2019-11-01 18:12:26 +01:00
Seth Hillbrand dc5e8aa609 pcbnew: Performance improvement on moving items
This adjusts the fix for 1813038 to focus on the duplicate ghost,
preventing the need to unselect/reselect in every cycle.  This improves
large move speeds substantially
2019-11-01 10:00:38 -07:00
jean-pierre charras 4a0bd46ed6 More work on Gerber pick and place files
In P&P files, user strings are now quoted, and use UTF8 encoding
2019-11-01 08:34:24 +01:00
Seth Hillbrand 4178cf7f36 pcbnew: Add PadToDie length for tuning actions
This adds the pad to die parameter from each pad to the total line
length of the tuned line for comparison with desired.

Fixes: lp:1711541
* https://bugs.launchpad.net/kicad/+bug/1711541
2019-10-31 16:00:19 -07:00
Seth Hillbrand 4135f0c0e7 pcbnew: Don't duplicate tracks
Dragging in freeangle mode can be forced, in which case, we don't want
the extra line from the SHOVE element.

Fixes: lp:1845844
* https://bugs.launchpad.net/kicad/+bug/1845844
2019-10-30 10:44:33 -07:00
Seth Hillbrand 868ff5bb2c Right click gets a new object if the mouse has moved
Right click is a pointing operation combined with a request for the
context menu.  We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.

However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click.  In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
2019-10-29 16:11:06 -07:00
Seth Hillbrand 43768b71c0 Unify string lists of forbidden footprint chars
We have forbidden lists maintained in 3 separate locations.  This causes
a bit of confusion as to which is correct.

This makes the list uniform but remains to place the character set in a
single location.
2019-10-29 13:31:11 -07:00
jean-pierre charras 04bae776a7 Keepout in footprints: fix issues related to netclass management. Keepout do not actually use netclasses, but the netclass info must be valid. Especially when editing a fp in the fp editor, the netclass info is related to the dummy board managed by the fp editor. But when saved to the board editor the netclass info must be related to the main board 2019-10-29 11:24:57 +01:00
jean-pierre charras 1c2891e6d4 Fp editor: allow internal layers in footprint keep-out zones Especially: Enable one internal layer to manage keep-out areas only on internal layers Allowing one internal layer is a trick to manage these keep-out areas (visibility and selection) In fact this internal layer groups all internal layers enabled is these keep-out areas. 2019-10-29 11:24:57 +01:00
jean-pierre charras bc5dcf182f keepout in footprint: fix some crashes and issues. Create a specific type (PCB_MODULE_ZONE_AREA_T) for zones in footprint. The new class (MODULE_ZONE_CONTAINER) is the same as ZONE_CONTAINER, but the type ID is PCB_MODULE_ZONE_AREA_T instead of PCB_ZONE_AREA_T.
This is mandatory because these zones must be handled differently in many functions.
2019-10-29 11:24:57 +01:00
Ross Schlaikjer 64a42ffa35 Add keepout in footprints: Starting point. 2019-10-29 11:24:30 +01:00
Seth Hillbrand 39241dc0ff Footprint browser: Handle frame calls
The frame() call requires an edit frame but the browser is derived from
PCB_BASE_FRAME.

Fixes: lp:1849962
* https://bugs.launchpad.net/kicad/+bug/1849962
2019-10-26 08:27:27 -07:00
jean-pierre charras d5e982897c Fix comment. 2019-10-26 10:07:43 +02:00
Seth Hillbrand 133772e964 pcbnew: Correct optimizer breakout calculation
The previous fix for optimizer breakout length calculation was providing
better scores to longer traces rather than longer breakouts as intended.

This limits the length scoring to breakout only.
2019-10-25 11:18:16 -07:00
Seth Hillbrand 9c8ae217a6 pcbnew: Treat circular ovals as circles
The oval clearance adds an edge on the 0-length side of a circular oval.
This is not needed and can affect the fill algorithm.  Instead, we treat
round ovals as circles for pad polygons

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

(cherry picked from commit 57f0f88552)
2019-10-25 09:37:43 -07:00
jean-pierre charras 08169afbee PCB_BASE_FRAME::SelectFootprintFromLibTree(): fix annoying issue:
the progress reporter was displayed after loading libraries, because it was destroyed too late.
2019-10-25 17:55:18 +02:00
jean-pierre charras bfe2fbf991 Fix uninitialized variables.
especially BOARD_DESIGN_SETTINGS::m_HoleToHoleMin was not initialized, but used in pcbnew when creating a new board
2019-10-25 09:15:19 +02:00
Seth Hillbrand bae50fab9f pcbnew: Fix 45° snapping polygons
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.

This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.
2019-10-24 16:01:14 -07:00
Seth Hillbrand df3fabfa21 pcbnew: Fix DXF Import with blocks
BLOCK elements in DXF are re-usable bits that are useful when editing
the file but should not be shown when importing the model.  This skips
all references except those that exist in the default "*Model_Space".
This block is required in each DXF file and cannot be renamed.

Fixes: lp:1790821
* https://bugs.launchpad.net/kicad/+bug/1790821
2019-10-23 11:28:26 -07:00
Ian McInerney 3b1817ee32 pcbnew: Fix deletion of vias in global delete window
Fixes: lp:1847580
* https://bugs.launchpad.net/kicad/+bug/1847580
2019-10-23 12:04:42 -04:00
jean-pierre charras e621ae7538 Minor fix in ZONE_CONTAINER code. 2019-10-22 14:13:16 +02:00
jean-pierre charras 4813eb12e6 DIALOG_POSITION_RELATIVE: fix some issues: wxWidgets alerts and unit selection not taken in account after the first run.
Fixes: lp:1849231
https://bugs.launchpad.net/kicad/+bug/1849231
2019-10-22 14:09:11 +02:00
jean-pierre charras da28426617 Gerber P&P file: fix a syntax error. 2019-10-21 15:15:46 +02:00
jean-pierre charras 3fffd042de Use wxASSERT instead of assert (assert creates issues when debugging on Windows) 2019-10-20 21:19:35 +02:00
Seth Hillbrand 8f1c1cf298 pcbnew: Don't limit editing of the polygons
45 deg contraints are not saved per polygon, so don't limit per polygon.
The constraint is only enforced during creation.

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

Fixes: lp:1846029
* https://bugs.launchpad.net/kicad/+bug/1846029
2019-10-20 09:29:42 -07:00
Seth Hillbrand 2e1af66a2b pcbnew: Commit polygon points to new constrained zone
Adds leader points if they are not already existing in the zone

Fixes: lp:1846028
* https://bugs.launchpad.net/kicad/+bug/1846028
2019-10-20 09:29:35 -07:00
jean-pierre charras 11cf260b7d DIALOG_GENDRILL: modify an option: Gerber format is not experimental now. 2019-10-19 13:45:17 +02:00
jean-pierre charras f892ebbb49 Fix issues in Gerber attributes 2019-10-19 11:26:29 +02:00
jean-pierre charras 47f9c505c5 Gerber plot: better handling of polygonal pad shapes plotting
update GBR_CMP_PNP_METADATA.
2019-10-19 11:26:29 +02:00
jean-pierre charras 36253450e7 Pcbnew: Add experimental place file (P&P) export in Gerber format. 2019-10-19 11:26:28 +02:00
Jeff Young e73e7bdc23 Process via size inc/dec commands while running via tool.
Fixes: lp:1846320
* https://bugs.launchpad.net/kicad/+bug/1846320
2019-10-17 20:17:26 +01:00
Jeff Young 0995433601 Map nets (if possible) from clipboard to destination.
Fixes: lp:1795057
* https://bugs.launchpad.net/kicad/+bug/1795057
2019-10-17 18:04:07 +01:00
Seth Hillbrand 07c8596084 pcbnew: Check all layers for routing snaps
Flipped footprint pads may report their "primary" layer as not the front
layer in high contrast.  We need to check whether the board item for
snaps is visible on the active layers.

Fixes: lp:1847877
* https://bugs.launchpad.net/kicad/+bug/1847877
2019-10-15 09:44:16 -07:00
jean-pierre charras 26ebf3c961 Fix ZONE_CONTAINER ctor issue: incorrect net info setting.
In ZONE_CONTAINER( ZONE_CONTAINER& aOther ), the net info was set before zone type and layer were set.
So the net info was always set to ORPHAN net, instead of set to aOther net info.
Especially, it broke undo/redo function.

Fixes: lp:1840727
https://bugs.launchpad.net/kicad/+bug/1840727
2019-10-15 13:41:49 +02:00
Seth Hillbrand e291576c38 plotting: When aggregating areas, heal first
The fracture routine introduces degenerate points that are healed by the
Clipper Polygon simplify command.  This is normally fine but in the case
of hatched areas, there are thousands of degenerate points, which is
very slow in Clipper.  Healing the degenerate points first before
simplifying and fracturing is much faster.

Fixes: lp:1847764
* https://bugs.launchpad.net/kicad/+bug/1847764
2019-10-12 20:14:57 -07:00
jean-pierre charras a18d3cca6e Pcbnew, zone filler: Ensure hatch pattern thickness bigger than zone minimal width (one micron bigger).
This margin is mandatory to avoid incorrect polygons in Gerber files:
due to the fact Gerber units can be 10 nm (and Gerbview internal unit is also 10nm), valid polygons
can be converted to non valid (self intersecting for instance) by coordinates truncation.
This is a known problem in Gerber files (not specific to Gerber format)

Fixes: lp:1847737
https://bugs.launchpad.net/kicad/+bug/1847737
2019-10-12 11:12:27 +02:00
Seth Hillbrand 0f8a1c22ad pcbnew: Snap during routing needs active parent
The router items may not yet have a board item parent.  In this case,
the reference to the parent needs to be guarded before dereferencing.

Fixes: lp:1847717
* https://bugs.launchpad.net/kicad/+bug/1847717
2019-10-11 09:16:26 -07:00
jean-pierre charras a43b00b666 Gerber job file Fix incorrect .gbrjob file format when the board stackup is not yet initialized.
Fixes: lp:1847636
https://bugs.launchpad.net/kicad/+bug/1847636
2019-10-10 21:16:45 +02:00
jean-pierre charras 967b9d4a97 Gencad export: fix an issue in hash_eda calculation, that can generate the same hash for 2 different footprints.
Therefore, for some footprints, the right footprint was not associated to the component.
The hash calculation was using a XOR to combine 2 sub hash values.
This is not a strong way to combine these hash values.
They are now added. Looks better to identify similar and different footprints.

Fixes: lp:1847575
https://bugs.launchpad.net/kicad/+bug/1847575
2019-10-10 20:18:48 +02:00
Seth Hillbrand cecfeea947 pcbnew: Remove snapping to hidden items
Items and layers that are hidden in the view should not be used as snap
points.  This happens in multiple locations:
1) Grid Helper for normal tools
2) TOOL_BASE::snapToItem for router

Resolves KiPro Issue #116

Fixes: lp:1833128
* https://bugs.launchpad.net/kicad/+bug/1833128
2019-10-10 09:37:25 -07:00
jean-pierre charras 89e9857f3d Fp editor, DIALOG_FOOTPRINT_FP_EDITOR: fix a very annoying issue: the value field was copuled to the fp name.
Unlike schematic symbols, the value field and the footprint name are 2 different fields.
So coupling these fields in the DIALOG_FOOTPRINT_FP_EDITOR dialog created serious issues.

Fixes: lp:1846533
https://bugs.launchpad.net/kicad/+bug/1846533
2019-10-09 18:57:40 +02:00
jean-pierre charras c7d636d560 Gerber file generation: fix incorrect aperFunction attribute for graphic items on edge cut layer.
Was NonConductor. Must be Profile.
2019-10-09 15:46:35 +02:00
Ian McInerney 58d4a8bb4a pcbnew: Don't reinitialize the router tool in an action
Calling Init() in an action routine will reset the router
settings to the state they were in when first starting pcbnew.
The Init() function is automatically called when the tool is created.

Fixes: lp:1843810
* https://bugs.launchpad.net/kicad/+bug/1843810
2019-10-07 16:07:05 -04:00
Jeff Young 890e1c9ea0 Be more careful about EOF processing when reading netlist.
Fixes: lp:1845848
* https://bugs.launchpad.net/kicad/+bug/1845848
2019-10-07 12:53:32 +01:00
jean-pierre charras 0a829c328e Python scripting: fix a crash with some pythons scripts calling BOARD::ComputeBoundingBox()
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
2019-10-05 10:39:33 +02:00
Ian McInerney b33c3a5ad8 pcbnew: Clean up extension handling in graphics plugins
* Fix wildcard display in the file selector dialog (on GTK
  it would show the regex to the user)
* Move the file extension comparison into a common function
2019-10-04 15:43:29 -04:00
Jeff Young 429c7055e9 Some performance enhancements contributed by Oleg Endo.
Fixes: lp:1846438
* https://bugs.launchpad.net/kicad/+bug/1846438
2019-10-04 19:41:40 +01:00
Jeff Young 0ad9ddb3a6 Use cached bounding boxes for performance.
Fixes: lp:1846438
* https://bugs.launchpad.net/kicad/+bug/1846438
2019-10-04 11:45:08 +01:00
Ian McInerney 0aa5424511 pcbnew: Switch over some drawing tools to use PrimeTool
Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
2019-10-03 19:04:36 +01:00
Ian McInerney 5862b1559f Cleanup position handling for TOOL_EVENTs
* Make the events generated by the selection of context menu items
  have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
  be the cursor position where the event originated
2019-10-03 19:04:33 +01:00
jean-pierre charras 9d617502d5 Gerbview: fix missing grid initialization at starting. 2019-10-03 18:33:16 +02:00
Jeff Young 6179dfde37 Default keep upright to false in design settings.
The board file only writes out a token if it's true, so the value
must default to false.

Fixes: lp:1845883
* https://bugs.launchpad.net/kicad/+bug/1845883
2019-10-02 10:56:13 +01:00
Jeff Young 2679e80469 Fix bug saving last netlist filepath.
Fixes: lp:1845883
* https://bugs.launchpad.net/kicad/+bug/1845883
2019-10-01 17:43:26 +01:00
Jeff Young 9a349065db Better error messages for router. 2019-10-01 15:02:41 +01:00
Jeff Young b58df5e777 Flip Start0 etc. when in ModEdit.
ModEdit and PCBNew use Start0/End0/etc. differently so care must
be taken when flipping.

Fixes: lp:1845402
* https://bugs.launchpad.net/kicad/+bug/1845402
2019-10-01 11:02:52 +01:00
jean-pierre charras 31e38f2fd4 Fix an issue in DIALOG_NETLIST: if the netlist does not exist, one cannot always modify the entered name.
Fix also a wxWidgets alert
2019-09-30 19:41:19 +02:00
Jeff Young 4bf2b6a9f7 Performance enhancements for cross-probing.
While found when profiling cross-probing, many of these will also
improve other things.
2019-09-27 19:58:16 +01:00
jean-pierre charras d3982d0cb2 board stackup manager: a few enhancements in code and make some strings translatable 2019-09-27 17:12:24 +02:00
jean-pierre charras 2e3d781bf2 layer stack manager: fix a crash due to a recent change in code. 2019-09-26 20:48:28 +02:00
jean-pierre charras 3cd12088a3 PANEL_SETUP_BOARD_STACKUP: minor cosmetic enhancement. 2019-09-25 09:27:36 +02:00
Seth Hillbrand 7f54617dab pcbnew: Clear view prior to terminating
On complex boards, the view holds a very large vector of all objects.
The dtor will remove each one, searching for the pointer before
removing.  When removing all items, this process is not needed, so we
clear the view when exiting.  This also prevents lock-up when closing
the full application as KiCad waits for the dtor to finish
(non-interactively).  This will cause Windows to crash and Linux to
offer an option for terminating the non-responsive application.

Fixes: lp:1843092
* https://bugs.launchpad.net/kicad/+bug/1843092
2019-09-24 11:44:33 -07:00
jean-pierre charras cd6c1c48a4 Board stackup manager: add material selector to solder mask and silkscreen layers. 2019-09-24 16:30:25 +02:00
jean-pierre charras 840c77fa9c pcbnew/swig/pcbnew_action_plugins.cpp: fix crash due to broken detection of deleted items after running a script.
the old way was not compatible with the current management if board item lists.
The crash was probably due to double deletions.
Note also the management of undo command in pcbnew_action_plugins needs serious optimization.

Fixes: lp:1844880
https://bugs.launchpad.net/kicad/+bug/1844880
2019-09-23 14:07:45 +02:00
Seth Hillbrand bba949c04d pcbnew: properly close tags when handling bad poly
The parenthesis depth is 2 when the polygon isn't closed.  This
shouldn't happen but we have the fall-through to handle odd cases

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

(cherry picked from commit d862cdaa72)
2019-09-21 09:27:01 -07:00
jean-pierre charras 8be9aeac9f Fix typo 2019-09-21 09:50:01 +02:00
jean-pierre charras 7355ed3bda Fix Typo 2019-09-20 13:15:06 +02:00
jean-pierre charras badd0bfa54 Minot fixes in GERBER_JOBFILE_WRITER, due to recent changes in .gbrjob file format. 2019-09-20 13:13:19 +02:00
Seth Hillbrand 4d8949371f conn: Connect pads to anchor points not geo center
Pads may include offsets that allow the user to shift the connection
point of the pad.  This is captured by the pad m_Pos but not by
ShapePos().  When testing connectivity, we need to get the offset
position.
2019-09-19 13:49:12 -07:00
Seth Hillbrand b7128639f8 connectivity: Check all anchors for connection
With pads, we should check available anchor points for each connection,
increasing probability of finding connection to match fill algorithm

Fixes: lp:1844661
* https://bugs.launchpad.net/kicad/+bug/1844661
2019-09-19 12:44:40 -07:00
jean-pierre charras fc6dc81878 Pcbnew, gerber job file: add "name" field in stackup section 2019-09-19 20:29:39 +02:00
jean-pierre charras 115e1e33da dialog edit footprint: display fp orientation between -180 and + 180 instead of 0 ... 360 deg.
Previously, the wxTextCtrl was using 0 ... 360 but the predefined values are -90 to 180 deg.
2019-09-19 20:29:39 +02:00
jean-pierre charras 16f4958430 Pcbnew: avoid crash when closing pcbnew if the DRC dialog is open.
Cvpcb: change from commit 9ceca583:
the root class close event that save settings is now seeing the close event.
2019-09-19 09:16:12 +02:00
jean-pierre charras a1fe8cfa5a Minor changes: cleanup code and prepare code to add more attributes to Object Attributes (.TO) 2019-09-18 11:48:49 +02:00
jean-pierre charras a52dc57887 Pcbnew: Fix incorrect footprint angle rotation after flipping around Y axis (left to right)
The angle rotation was always negated. But this is incorrect:
The angle rotation must be negated when flipping around X axis
The angle rotation must be 180 - initial rotation when flipping around Y axis

This bug can break position files and footprint updates,
especially when mixing flipping around Y axis and flipping around X axis.
2019-09-17 18:51:27 +02:00
jean-pierre charras 072ea9a33e Pcbnew: flip command: when flipping only one item, flip it around its anchor instead of its bounding box.
This is the behavior of previous 5.1 version.
Using the bounding box has advantages, but unfortunately in many cases the footprint position is moved.
If a lot of flip commands are made on the same footprint, it is moved far from its initial position.
2019-09-17 10:06:39 +02:00
jean-pierre charras 64b5e8bee2 Minor fix and enhancement code. 2019-09-15 11:10:53 +02:00
jean-pierre charras 91c66a05ae DIALOG_DIELECTRIC_MATERIAL_BASE: Minor fix 2019-09-13 11:35:27 +02:00
jean-pierre charras c10d30c1c8 PANEL_SETUP_NETCLASSES: fix not working (immediately closed) wxChoice widgets to select a filter
This happens with wxWidgets 3.0.4 on Windows and is a side effect of a call to Layout().
The fix just calls Layout() only when needed.

Fixes: lp:1843594
https://bugs.launchpad.net/kicad/+bug/1843594
2019-09-13 11:29:51 +02:00
Jeff Young f1790c24e5 Fix issue with Arc pad primitive dialog having center and start swapped.
Fixes: lp:1842199
* https://bugs.launchpad.net/kicad/+bug/1842199
2019-09-12 21:22:47 +01:00
Jeff Young aeedbf87dd Tighten up the Pad Properties dialog a bit.
Fixes: lp:1843580
* https://bugs.launchpad.net/kicad/+bug/1843580
2019-09-12 14:45:01 +01:00
Wayne Stambaugh 4bfb8ef457 Pcbnew: fix Eagle footprint library polygon pad sizes.
Eagle includes the width of the polygon line when generating polygon pad
sizes where KiCad does not.  This simple fix inflates polygon pads half
of the Eagle polygon line width.

Fixes lp:1833687

https://bugs.launchpad.net/kicad/+bug/1833687
2019-09-12 07:35:48 -04:00
jean-pierre charras f5692584f2 cleanup 2019-09-12 13:25:15 +02:00
jean-pierre charras 271465a644 Stackup manager: Add a dielectric manager to handle more easily user defined dielectric substrates
panel_board_stackup.cpp: material selection:
 replace wxChoice by a better widget (wxTextCtrl+wxButton) to call the dielectric manager dialog
Move dielectric material class to a specific file
2019-09-12 10:37:05 +02:00
Jeff Young 95ec2fba02 Fix tabbing in Text Properties dialog. 2019-09-10 12:40:28 +01:00