460 Commits

Author SHA1 Message Date
Seth Hillbrand
361f61a023 Move thread pool to singleton class
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started.  Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.

The singleton class can be extended to provide single instance
guarantee for any element across kifaces
2025-01-03 13:51:11 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Eric Zhuang
b3259a1c42 ODB++:Support choice compress format and specify output filename. 2024-12-29 17:01:27 +00:00
Jon Evans
f504a07556 ODB++: Add to CLI and jobs system 2024-12-02 10:53:01 -05:00
Jon Evans
687dc71e1d ODB++: Use more friendly progress phase names 2024-11-20 19:03:15 -05:00
Jon Evans
387a544da3 Promote ODB++ export out of advanced config
At this point it is more useful to get wider testing
2024-11-20 18:51:24 -05:00
Jon Evans
0045538512 ODB++: file handling improvements
- Use board filename in compressed output
- Don't generate uncompressed output next to compressed
- Make clear that the path in the dialog is a folder, not a file
- Handle existing output files gracefully
2024-11-20 18:40:51 -05:00
Jon Evans
6a83d7bc76 ODB++: Handle existing output directory gracefully 2024-11-20 18:14:18 -05:00
Eric
1506beecbc Implement ODB++ export
ADDED: Add support in Pcbnew for exporting ODB++ files under Fabrication
       Outputs, base on ODB++Design Format Specification (Release v8.1
       Update 3 February 2021).

Note: There is still a lot of work to do if we will make the feature as
      complete as the ODB++ spec.  However, the current functionality's
      completeness is already sufficient to cover general production
      scenarios. I have compared the output results with Gerber files by
      DFM tool and the accuracy at the graphic level should be able to
      cover most usage scenarios.  Additionally, I am very grateful to
      the great open-source project Horizon EDA for giving me a lot of
      inspiration in terms of ideas.

The feature can be enabled by adding "EnableODB=1" to the kicad_advanced
configuration file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2019
2024-09-14 15:34:51 +00:00
Alex Shvartzkop
36019314e9 Make simulation reporter warnings non-fatal.
Adds REPORTER::HasMessageOfSeverity for WX_STRING_REPORTER,
which allows us to show simulation warnings and fail only if there's errors.

Also fixes a crash when SPICE_GENERATOR_KIBIS throws an IO_ERROR.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18143
2024-09-05 05:59:35 +03:00
Seth Hillbrand
7214ef1f14 Remove basic masking class map_string_utf8
This is just std::map<std::string, UTF8>, using the class just masks
what it is and adds unclear functions.
2024-08-19 11:51:13 -07:00
Jeff Young
8cc9f766d6 Report when we don't know what a file is.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18467
2024-08-14 15:03:18 -06:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Jeff Young
a2f7edde2e Import PCB into existing project.
Or, to be more direct: don't pull the project rug
out from under EESchema when importing in non-
stand-alone mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18241
2024-06-25 11:49:02 +01:00
Jeff Young
14a55facf2 Clearer naming and commenting.
Also some const& hygiene and some formatting.
2024-06-25 11:07:14 +01:00
Jeff Young
b0dddb6d95 Formatting. 2024-05-25 22:06:38 +01:00
Jon Evans
6b145b2830 Add optional reporting of non-KiCad design issues
Also add HTML reporter to PCB side to match schematic


(cherry picked from commit b8fa10ab2b3685309639e14ad1cd6e37a6b497dd)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-04 15:27:52 +00:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Seth Hillbrand
ef62b01dd1 Make import/export flags explicit
IO plugins can import/export or both.  This sets an explicit boolean for
controlling which options are available.
2024-04-25 09:21:15 -07:00
Alex Shvartzkop
2babd574be Refactor autosave prefix into FILEEXT. 2024-04-22 04:06:04 +03:00
Wayne Stambaugh
34ec57958d Fix Eagle board import when footprint library versions exist.
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.

The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12897
2024-03-14 09:45:05 -04:00
Alex Shvartzkop
85b1978408 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.
2024-03-03 21:40:26 +03:00
Jon Evans
4ec390838b Re-enable non-KiCad board import when non-standalone
Partial revert of ec2cd99405

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16978
2024-02-15 12:14:32 -05:00
Jon Evans
ec2cd99405 Guard actions that change project against running in non-standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16942
2024-02-11 09:36:17 -05:00
Ian McInerney
f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Ian McInerney
d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Ian McInerney
f8688a922d Unify IO library descriptors 2023-12-27 16:34:59 +00:00
Ian McInerney
e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney
d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Seth Hillbrand
5e9b56b431 Don't set the dirty flag when saving 2023-11-27 11:57:31 -08:00
Seth Hillbrand
75c6b0ab28 Added IPC2581 support
IPC2581 is a modern production file exchange system.  It provides
single-file data output for an entire board including BOM and netlist
information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1954
2023-11-26 15:30:58 -08:00
Jeff Young
f83d60a48f Clean up autosave files when reverting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15998
2023-11-05 12:20:31 +00:00
Alex Shvartzkop
847ab093c8 ADDED: Project chooser dialog for EasyEDA Pro import. 2023-10-30 09:35:27 +03:00
Jeff Young
d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Jeff Young
e242f54816 Fix crash trying to create a new board. 2023-10-02 22:12:07 +01:00
Marek Roszko
f1c5581802 Don't continue with a null board in board import
Some plugin is failing and returning a null-board when the usual convention was exceptions

Fixes KICAD-3ZJ
2023-10-01 09:38:44 -04:00
Marek Roszko
6b12a12b3e On second thought rename PROJECT_PCBNEW to PROJECT_PCB 2023-09-27 23:15:54 -04:00
Marek Roszko
7e8b18035f Eliminate the conditional pcbnew/cvpcb definition of PROJECT 2023-09-27 20:53:46 -04:00
Alex Shvartzkop
21ee65aa9c ADDED: Importers for EasyEDA (JLCEDA) Standard / Professional. 2023-09-07 11:02:40 +03:00
Alex Shvartzkop
e128896ba6 Schematic plugins refactoring, fixes for PCB plugins.
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03:00
Seth Hillbrand
db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Thomas Pointhuber
f7f8bf5418 fix coding policy violations 2023-08-18 14:51:33 +02:00
Thomas Pointhuber
94c732409b Fix nullptr SEGFAULT for the case PLUGIN::CanReadBoard() returns false, as no supported PLUGIN was found for the given file. 2023-08-18 14:08:06 +02:00
Alex Shvartzkop
d02e4f3254 Fix PLUGIN_FILE_DESC copy warning, remove a leftover comment. 2023-08-17 14:43:59 +03:00
Alex Shvartzkop
953cf0d680 Fix KiCad-only board file dialog filter. 2023-08-17 09:36:47 +03:00
Roberto Fernandez Bautista
dbfb7880b5 Add IO_MGR::FindPluginTypeFromBoardPath (+QA tests) 2023-08-15 05:26:12 +03:00
Alex Shvartzkop
76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
Alex Shvartzkop
a0d96cea9f Rename Save -> SaveBoard, Load -> LoadBoard in PLUGIN. 2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista
30a63b7b32 Fix loading of legacy zone fills in .brd files + Don't refill after board import 2023-08-03 15:36:19 +02:00