7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 00:29:10 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
JamesJCode
a5be581b1b Add char_traits<T> specialisations for wxUniChar and NANODBC_SQLCHAR
when building on Apple with Clang >= 17.

These specialisations are not strictly required by the C++ standard,
and have been removed from LLVM.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20631
2025-04-15 20:57:23 +01:00
Tomasz Wlostowski
6a0efe6883 IO_BASE: don't try to modify the case of a temporary string in-place, work on a copy 2025-03-05 00:23:04 +01:00
Daniel Treffenstädt
3768221d9c ADDED: Support for IPC-4761 Via protection features
Fixes https://gitlab.com/kicad/code/kicad/-/work_items/18837
2025-03-01 18:02:54 +00:00
Jon Evans
b6aac9369e Fix creation of Altium compound files from IntLibs
A previous change introduced an invalid cast from
base to derived class.  To clean this up, changed
DecodeIntLibStream to have an out param and allow
two-step initialization of ALTIUM_COMPOUND_FILE

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20099
2025-02-25 22:34:26 -05:00
Jeff Young
34db9ed245 Better namespacing.
Also fixes a bug with calculating eagle annular
ring sizes.
2025-02-24 11:08:29 +00:00
Alex Shvartzkop
b5c6361a05 Fix build error on Windows. 2025-02-15 13:40:07 +03:00
Seth Hillbrand
b8b7c59a50 Better protect against long Eagle values
Long strings may overflow our integer receptacle, so use 64-bit instead
and don't allow negative signes in the fraction part of the number.  if
the number of fraction digits is bigger than our pre-calculated array
(this in and of itself smacks of premature optimization), don't use the
same array to trim it, instead calculate the actual denominator

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19958
2025-02-14 12:55:36 -08:00
John Beard
636c6c4efb Eeschema/pcbnew: fix pasted image saving
The m_imageData buffer in the BITMAP_BASE is an
internal implementation - the public API to persist the
data to a stream appears to be SaveImageData - so use that,
which hides the implementation (and generates the image data
"live" when needed).

Remove the public access to the m_imageData buffer as it isn't
needed for public use, and also is misleading.

Also break out the formatting of the data into KICAD_FORMAT,
as it's currently replicated in eeschema/pcb/pagelayout
formatting code.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19772
2025-01-31 23:01:07 +08:00
Jon Evans
42b9a9604b Fix several data races triggered by parallel library loading 2025-01-25 11:44:15 -05:00
Wayne Stambaugh
db877e6a00 Fix Eagle schematic import issue.
Handle duplicate symbol library names with Eagle URN notation.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19666
2025-01-20 07:28:25 -05:00
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 6b199c52a1)
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 81855aaaa6
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 0dab086f0c)
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 
https://gitlab.com/kicad/code/kicad/-/issues/16777
2024-01-28 16:07:52 +01:00