Commit Graph

551 Commits

Author SHA1 Message Date
Jon Evans 21d577e638 Implement Gerber job file writing using nlohmann/json 2020-01-04 10:46:50 -05: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
Ian McInerney bf5dba847c pcbnew: Fix cmake to work with no wxPython on macOS 2019-12-22 02:04:15 +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
jean-pierre charras 6f2cbe5982 Pcbnew: housekeeping: move netlist code to netlist_reader sub directory. 2019-11-17 13:58:38 +01:00
jean-pierre charras 36253450e7 Pcbnew: Add experimental place file (P&P) export in Gerber format. 2019-10-19 11:26:28 +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 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
jean-pierre charras e0c82fb003 Board stack manager: add a basic reporter to copy the current stackup to the clipboard. 2019-09-06 11:26:27 +02:00
jean-pierre charras f3f0e20a67 Pcbnew: add a board layer stack manager
This is a new feature.
2019-09-05 18:51:18 +02:00
Alexander bb290abe91 added board statistics dialog, which shows info for production and assembly 2019-07-20 14:39:08 -06:00
Jeff Young 183687c69e Cleanup and a big hack to prevent keyboard focus loss.
Fixes: lp:1810993
* https://bugs.launchpad.net/kicad/+bug/1810993
2019-07-08 20:45:42 +01:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

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

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

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
jean-pierre charras 978c4fd7d3 Pcbnew, export_footprints_placefile.cpp: code refactor.
Make the data generation code separate from the dialog code.
The dialog itself does not include anymore the data generation code.

Non SMD footprints forced in list are now displayed in the dialog.
The attribute MOD_CMS is no longer silently modified (without undo command) by the dialog.
2019-06-30 18:27:12 +02:00
jean-pierre charras c1eee56785 Prepare changes to support a better board stack management in .gbrjob file.
In .gbrjob file, one can specify the thickness and color of some layers.
Currently, there is no way to enter these parameters.
This commit prepare a better support of .gbrjob files.
2019-06-25 18:39:11 +02:00
Seth Hillbrand 51511eda85 CMake adjust Linux build
Instead of linking the same target name and re-building, we can install
the file to a new name.  This speeds the build process and keeps linking
routines from stepping on each other.  Available now that we are at
CMake 3.0.2

Fixes: lp:1789468
* https://bugs.launchpad.net/kicad/+bug/1789468
2019-06-14 11:01:17 -07:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Seppe Stas 455ee4c08c Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
2019-06-12 04:40:03 -07:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
John Beard 7ebda0247f Common: Remove legacy_gal library, fold into common
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.

This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +01:00
Seth Hillbrand c6af38477d CMake: Handle custom_target indirection
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-05 13:05:43 -07:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Seth Hillbrand 6a45446496 pcbnew: Remove the last dlist from modules/pcbnew 2019-06-01 20:55:32 -07:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young a27e4246e0 Move some more menu commands to ACTIONs. 2019-05-29 00:26:29 +01:00
Jeff Young c0909611d3 Remove a bunch more legacy editing code. 2019-05-29 00:26:29 +01:00
Jeff Young 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Jeff Young b90b454ada Remove legacy block operations. 2019-05-18 00:21:49 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young a12d769074 Code clarification and commenting.
Also renames toolbar files to reduce confusion with the modern toolset
tool files.
2019-05-06 15:31:23 +01:00
Jeff Young b63fab92cf Move Eeschema net highlighting to modern toolset. 2019-04-14 12:10:48 +01:00
Tomasz Włostowski e5753b79d4 pcbnew: Hyperlynx Exporter - initial version 2019-04-08 02:56:02 +02:00
Jeff Young 87f303319c Implement a dry run for Cleanup Tracks and Vias.
Uses the DRC architecture to support inspection of the changes to
be made (right click on items, hover over them in the menu to
highlight them on the board).

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

Fixes: lp:1809474
* https://bugs.launchpad.net/kicad/+bug/1809474
2019-04-05 18:52:51 +01:00
Seth Hillbrand f96d16eba3 Restore LINK_MAP linker options
Removing invalid TO_LINKER missed a few segments where it was used.
This fixes the ability to enable link maps
2019-03-16 20:37:14 -07:00
John Beard e6a6266f3d Build: libpolygon provides its own includes
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
2019-02-04 19:29:31 -08:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08:00
John Beard 453a91f661 Pcbnew: arrays skip existing names
The current module cannot be queried for existing pads as we
add them (because we never commit, until we finish the whole array).

Instead, pre-gather the names and check as we add, skipping any existing
names.

Note: this will not prevent arrays becoming "mis-ordered", but there
is not a lot we can do to prevent all possible errors.

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

The same principle could be used to skip existing ref-des'es on PCBs.
2019-01-30 15:41:35 -08:00
John Beard 8297ab24e4 DRC: Break out courtyard overlap function
Introduce the concept of a DRC_PROVIDER which allows
to separate the various DRC functions to their own
areas. This allows, amongst other things, a slimmer core
DRC class, and allows DRC functions to be separately testable.

The courtyard DRCs (overlap, missing and malformed)
are the first victims, so instrumentation can be added to this function.

Add some unit tests on this DRC function, as well a few re-usable PCB-based
utility functions in a library (qa_pcbnew_utils) that could be shared between
unit tests and other utilities.
2019-01-23 13:27:52 -05:00
John Beard e6edc1b670 DRC: Make the marker factory a separate class
This separates the "newMarker" functions from the DRC class. These
are moved to a new class, DRC_MARKER_FACTORY, which is now responsible for
constructing suitable markers from BOARD_ITEMS.

The reasons for this are:

1) Allow DRC related functions to access theese functions without having
   to bake these functions into the main DRC class.
2) Thereby simplify the DRC class interface
3) As DRC_MARKER is now a small class with public interfaces, it's
   possible to put unit tests on these functions.

The motivation here is to allow to start to split out pieces of DRC
into separate classes.
2019-01-23 13:27:52 -05:00
Wayne Stambaugh b13efdb0f2 Initial global footprint library table fixes.
Fix bug when pcbnew is launched from a folder containing an existing
fp-lib-table file by using same method as setting the initial global
symbol library table.

Fixes lp:1810169

https://bugs.launchpad.net/kicad/+bug/1810169

Fixes lp:1738871

https://bugs.launchpad.net/kicad/+bug/1738871
2019-01-20 13:51:07 -05:00
John Beard ec91329da0 Pcbnew: Array tool should not number NPTHs
Devolve the logic as to whether a pad should be numbered or not
to a pad utility function. Add a very simplistic test for this
function (demonstrating how to test BOARD_ITEMs in general).

Fixes: lp:1804787
* https://bugs.launchpad.net/kicad/+bug/1804787
2019-01-06 07:55:49 -08:00
John Beard 892f7cf8ff Make SVG import an advanced config, not a compile option.
This demos the advanced config and allows no-recompile switching
of the SVG importer. It also allows the import manager to be
tested more completely.
2018-12-28 11:36:09 -05:00