48 Commits

Author SHA1 Message Date
Wayne Stambaugh
f161d94521 Common folder housekeeping part 2. 2025-01-14 15:25:05 -05: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
Alex Shvartzkop
ceefbea34a Eagle: Make pad drill optional to support some DipTrace-exported boards. 2024-12-29 02:44:35 +03:00
Jeff Young
756f0c5027 Fix parsing of Altium overbar notation.
Use the AltiumPinNamesToKiCad() algorithm for all conversions,
but don't do any conversions on plain text (RECORD=4).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19080
2024-12-20 18:32:08 +00:00
Jeff Young
6686ade45b Remove (somewhat atrophied) manual pretty printing.
Also fixes a bug where the pretty printer didn't insert
linebreaks for a forest (it assumed a single tree root).

Also further regularises bool and quote formatting.
2024-11-28 11:08:16 +00:00
Jeff Young
fa52d68268 Fix pretty-printing of UUIDs and bools. 2024-11-25 19:10:13 +00:00
Alex Shvartzkop
840b9aebba Fix compatibility with LCEDA/EasyEDA v2.2.32
Now device attributes can contain numbers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18994
2024-10-27 04:15:59 +03:00
Marek Roszko
aceca713d8 Fix kicommon exports 2024-09-08 08:00:47 -04:00
Alex Shvartzkop
e0291133f2 Import POURED items as zone fills from EasyEDA/LCEDA Pro v2.2+ PCBs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18664

(cherry picked from commit 6b199c52a16f2b69f6563757d2fc789771f8367d)
2024-09-07 12:24:53 +03:00
Alex Shvartzkop
16d9fa7f25 Fix compatibility with EasyEDA/LCEDA Pro v2.2.26
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18620
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
Seth Hillbrand
69849ba3ca Replace custom Clamp with std::clamp
Fixes bug in parser that had the elements in the wrong order due to our
custom version not matching the standard order
2024-07-25 19:17:17 +02:00
Seth Hillbrand
ae458d0421 Decrease error severity for Altium imports
These are not errors that end users can do anything about.  Keep them
around for developer debugging if we want to see more imformation but
don't pop up error messages on the user's screen
2024-07-17 10:32:09 -07: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
14a55facf2 Clearer naming and commenting.
Also some const& hygiene and some formatting.
2024-06-25 11:07:14 +01:00
Alex Shvartzkop
1613816e77 Fix EasyEDA/JLCEDA Pro 2.2 footprint/symbol library import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18250
2024-06-21 22:20:54 +03:00
Alex Shvartzkop
84091b163e Fix warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 2024-06-21 21:31:14 +03:00
Wayne Stambaugh
b494166b10 Fix empty label names when importing Eagle schematic. 2024-06-21 12:07:06 -04:00
Wayne Stambaugh
8df28d4f5f Fix crash in symbol editor when importing Eagle symbol library.
https://gitlab.com/kicad/code/kicad/-/issues/18221
2024-06-21 01:07:01 -04:00
Wayne Stambaugh
3df2109c43 Fix issues with the new Eagle schematic parser. 2024-06-20 23:07:59 -04:00
Seth Hillbrand
bcf6b620a8 Large rework of BEZIER_POLY
Add direct handling of quadratic beziers to save compute time and number
of points.  Update cubic interpolation to reduce number of points
generated for a given smoothness

Cache data on open and used cached data to avoid multiple re-calcs

Remove minimum line length and number of segments and replace with
standard max error level.  Allows us to specify the tolerance of bezier
interpolation
2024-06-18 17:55:41 -07:00
Seth Hillbrand
439c25fca9 Altium schematic parser: Add fraction pin placement
In the schematic libaries, pin positions that are off 10mil spacing need
fractional elements stored in a different location
2024-06-10 15:02:18 -07:00
Wayne Stambaugh
5e048bc64c Fix several Eagle schematic import issues.
Fix broken arc angle polarity due to library symbol changes.

Fix broken wire and text Y axis coordinate polarity due to library symbol
changes.

Fix broken field visibility and position on library symbols with multiple
units that have fields with different visibility and positions.  Because
KiCad does not support this, when parsing the Eagle schematic file, the
last library symbol unit parsed ends up being the field visibility and
position for all units in the symbol.
2024-06-10 11:28:20 -04:00
Wayne Stambaugh
889931505b Eagle schematic importer improvements.
Change Eagle file importer to use a two pass import.  The first pass
parses the entire Eagle file into an associated E* object.  The second
pass converts the parsed E* objects into the appropriate KiCad objects.

Improve handling of Eagle versioned libraries.

Add helpers to IO_BASE to ease handling of PROGRESS_REPORTER and REPORTER
objects.

ADDED: Support for importing Eagle schematic modules.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1813
2024-06-10 11:28:20 -04:00
Alex Shvartzkop
2a889f03fc EasyEDA Std/Pro: import (some) component metadata for symbols.
Also fixes Reference numbering.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17806
2024-05-03 00:37:59 +03:00
Jeff Young
c59ed0bbb7 Flip symbol editor's Y axis to match other editors. 2024-04-27 13:47:56 +01:00
Jeff Young
d77eae3e7e Collapse LIB_FIELD into SCH_FIELD. 2024-04-13 15:42:13 +01:00
Marek Roszko
0ce227fa92 Can't use forward declare with std::vector
Not allowed per C++ standard

See https://github.com/llvm/llvm-project/issues/57700
2024-04-13 08:22:20 -04:00
Marek Roszko
e32b26ebeb Move JSON_SETTINGS and PARAMS to kicommon 2024-03-20 23:29:42 -04:00
Mike Williams
5318001726 prettifier: add newline to end of file
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17480
2024-03-18 15:29:43 -04:00
Mark Roszko
72d83cd5de Revert "Move JSON_SETTINGS and PARAMS to kicommon"
This reverts commit 81855aaaa6bd2fd1bb2d812f9e64664fc1e7c18e
2024-03-18 00:08:46 +00:00
Marek Roszko
81855aaaa6 Move JSON_SETTINGS and PARAMS to kicommon 2024-03-17 18:11:49 -04: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
Jon Evans
4ffbef5e42 Fix mismatched new[] vs free() in Altium parser 2024-03-05 23:09:38 -05:00
Alex Shvartzkop
c056ef407a EasyEDA Std: support multiple schematic sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17219
2024-03-04 15:09:31 +03:00
Alex Shvartzkop
219d0c399d EasyEDA Pro import: make sure to use UTF-8 for project.json and device.json.
Also catch exceptions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17248
2024-03-03 21:20:47 +03:00
Alex Shvartzkop
defcb49ac8 Support Altium Schematic ASCII import 2024-02-29 20:49:20 +00:00
Alex Shvartzkop
39a0a81832 EasyEDA Std import: support multiline text on PCB.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17171


(cherry picked from commit 0dab086f0cd0de34eea110165c23f2ba36278646)
2024-02-29 00:54:46 +00:00
Alex
b5982f7319 EasyEDA import: force close some line chains. 2024-02-11 23:52:56 +03:00
jean-pierre charras
a5ffcd0a55 void Prettify(): fix a bug in a corner case, when a string ends with '\'
A '\' in a string is encoded as \\.
A '"' in a string is encoded as \".
But prettify parser did not take in account a string encoded as "xx\\" (for xx\)
So we need to verify if a sequence is xx\" or xx\\", i.e. if there are a odd
count of backslashes before a '"'
Fixes #16777
https://gitlab.com/kicad/code/kicad/-/issues/16777
2024-01-28 16:07:52 +01:00
Alex Shvartzkop
b7460f29b4 Altium schematic: fix properties parsing in old formats.
Leading "|" can be missing before "RECORD=28" in old formats.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16513
2024-01-14 13:12:47 +03:00
Jeff Young
d05675f673 Minor performance wins. 2024-01-04 16:26:32 +00:00
Ian McInerney
4a67761d29 Push library reading check to IO_BASE 2023-12-27 16:44:45 +00:00
Ian McInerney
f8688a922d Unify IO library descriptors 2023-12-27 16:34:59 +00:00
Alex Shvartzkop
e636913178 EasyEDA Std: import dimensions. 2023-12-27 12:48:37 +05:00
Ian McInerney
743e9d669a Push library management into IO_BASE 2023-12-27 01:21:53 +00:00
Alex Shvartzkop
5bbe01b570 EasyEDA Pro: support .elibz format (device libraries) 2023-12-25 07:00:24 +03:00
Ian McInerney
d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00