Commit Graph

145 Commits

Author SHA1 Message Date
Seth Hillbrand 11c6164934 Silence font replace warnings for libs
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive
2024-06-24 09:55:10 -07:00
Wayne Stambaugh 4ee1415164 Fix Eagle schematic importer incorrect symbol value field and visibility.
Also fix a crash if an XML_PARSER_ERROR exception is thrown when importing
Eagle symbol libraries.

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

(cherry picked from commit 566fefafc5)
2024-06-22 12:32:47 -04:00
Alex Shvartzkop 4e3488c2e0 Altium schematic import: fix power port styles.
Need to use the symbol name with style, like "VCC_CIRCLE", not "VCC".

Issue was introduced in d939004bbd

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18209
2024-06-22 06:45:26 +03:00
Wayne Stambaugh 0ed72fb47a Fix broken rectangles in Eagle schematic importer. 2024-06-21 16:18:42 -04: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
Wayne Stambaugh b494166b10 Fix empty label names when importing Eagle schematic. 2024-06-21 12:07:06 -04:00
Alex Shvartzkop 904055912b Fix attribute display comparison in EAGLE schematic import. 2024-06-21 16:16:24 +03: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
jean-pierre charras 16e708a0e7 Fix minor compil and Coverity warnings. 2024-06-15 11:20:21 +02:00
Mike Williams a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e7122.
2024-06-12 13:30:29 -04:00
Wayne Stambaugh 74070afbc6 Fix a bunch of GCC build warnings compiling the schematic editor.
Apparently GCC does not like competing definitions of the == operator.
The recent refactoring away of all LIB_ITEM objects created a conflict
with the SCH_ITEM == operator definition.  This change required some
rather ugly comparison changes.  There were no unit test failures but
that doesn't mean something didn't get broken.
2024-06-11 08:07:32 -04: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
Alex Shvartzkop 35d60598d5 Fix build error on MSVC. 2024-06-11 00:06:32 +03:00
Seth Hillbrand 1325701956 Altium SCH Lib updates
- Use pin-compatible line widths for symbols
- Handle circular arcs as circles, not elliptical arcs
2024-06-10 12:40:01 -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
Mike Williams 0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Jeff Young 8e855156c8 Import child sheets relative to project, not parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17785
2024-06-04 17:47:55 +01:00
Jeff Young aee7680a6c ADDED: support for DNP & friends at the sheet level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14387
2024-06-02 22:41:22 +01:00
Jeff Young bab97f91cc Tidy up string find API usages. 2024-05-28 15:30:29 +01:00
Wayne Stambaugh 795a9eea60 Coding policy fixes.
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped.  The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
2024-05-23 07:59:45 -04:00
Wayne Stambaugh c3360d8c43 Fix Eagle schematic arc orientation and field visibility issues.
This does not fix all field visibility and position issues.  This is due
to LIB_SYMBOL objects not supporting per unit field properties.  The
current Eagle importer sets multiple unit symbol field properties to the
last unit parsed in the Eagle schematic file.  The upcoming two pass
importer will resolve this issue.
2024-05-14 10:13:08 -04:00
jean-pierre charras cae3be6bac Fix minor compil warnings 2024-05-13 11:50:35 +02:00
jean-pierre charras 814e54af9b Fix minor compil warnings 2024-05-11 08:07:11 +02:00
Wayne Stambaugh 7acd057c86 Fix broken library symbol links when importing CADSTAR schematics.
Under certain circumstances, the library symbol links were missing
the library nickname causing the schematic symbols to appear as if
the library symbol was missing.

Added a helper function to create the symbol library name to avoid
code duplication.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17143
2024-05-09 10:23:28 -04:00
Alex Shvartzkop 0f06d9c9e8 Fix arcs in legacy symbol libs. 2024-05-08 19:39:02 +03:00
Alex Shvartzkop 8d13e0ea78 Fix arcs in legacy symbol libs. 2024-05-08 18:25:54 +03:00
Alex Shvartzkop 1bde100ff7 Fix symbol field positions in legacy schematics. 2024-05-08 18:06:05 +03:00
Alex Shvartzkop d22d32697f Some fixes for legacy schematic/symbol import after symbol Y inversion. 2024-05-08 15:57:58 +03:00
Alex Shvartzkop 546b2e3b91 Fix text justification in Altium schematic importer. 2024-05-08 15:13:15 +03:00
Maciej Suminski 67f717b56a Fix pin rotation parsing in the legacy symbol library plugin
Commit 352463df removes char values for PIN_ORIENTATION, so
magic_enum::enum_cast can no longer do its magic.
2024-05-07 15:39:43 +00:00
Mike Williams 1db236c7fd Legacy Libraries: fix Description field clobbering user field
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17943
2024-05-06 12:54:31 -04:00
Alex Shvartzkop 5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Seth Hillbrand 5bd94f118d ADDED: Handle PIECHART in Altium import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16895
2024-05-05 08:39:30 -07:00
Jeff Young afcdfd85a7 Fix power symbol value field placement. 2024-05-04 23:49:43 +01:00
Jeff Young c2fae3768c Fix knock-on effects from b7f035964f.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17924
2024-05-04 23:49:43 +01:00
Jeff Young 2d1bcbd222 Repair import of Altium arcs. 2024-05-04 15:47:43 +01:00
Jeff Young 8ec1016ccf Repair Altium importer for coord system change. 2024-05-04 14:19:12 +01:00
Jeff Young 691c492d1e Revert attempted Altium import fix.
(Like Eagle, Altium's coord system is "upside down" to
start with.)
2024-05-04 11:16:44 +01:00
Jeff Young 053a764cf2 Adjust LTSPICE parser for inverted coords. 2024-05-03 17:48:22 +01:00
Jeff Young fd44ee6aa6 Adjust CADSTAR importer for coord system flip. 2024-05-03 17:43:11 +01:00
Jeff Young 893d178439 Formatting and minor const& performance enhancements. 2024-05-03 17:43:11 +01:00
Jeff Young 09c5b9df1d Fix some breakage in Altium parser due to Symbol Editor Y-axis inversion. 2024-05-03 14:52:50 +01:00
Jeff Young e7f4e29dd1 Eagle's coord system matched the old Symbol Editor.
So now we need to invert the Y axis for symbol items
(as well as all the schematic items which we have always done).
2024-05-03 14:48:06 +01:00
Jeff Young ce1404df79 Formatting and performance.
(wxString construction is surprisingly expensive.)
2024-05-03 13:31:15 +01:00
Alex Shvartzkop b5b65d0846 Fix some breakage due to symbol Y axis inversion in EasyEDA parsers. 2024-05-03 01:44:50 +03: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
Jon Evans a95a3fa5c9 Altium: apply power filter to symbol libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17922
2024-05-01 22:47:45 -04:00
Rosy 17891f7a1d HTTP Libraries: Add support for descriptions of sublibraries 2024-04-30 11:57:00 +00:00