Commit Graph

8414 Commits

Author SHA1 Message Date
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