Commit Graph

509 Commits

Author SHA1 Message Date
Wayne Stambaugh b109136c5c Fix complex hierarchy instance data when loading legacy schematic. 2022-10-15 14:50:06 -04:00
Wayne Stambaugh f782323960 Fix yet another symbol instance issue when loading legacy schematics. 2022-10-15 14:16:03 -04:00
Jeff Young 254dff2813 Add do_not_autoplace to schematic parser and printer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12657
2022-10-15 19:09:25 +01:00
Seth Hillbrand 5c974f8cd0 Don't arbitrarily close tags that are not open
Fixes https://gitlab.com/kicad/code/kicad/issues/12647
2022-10-14 15:30:51 -07:00
Wayne Stambaugh 148467d2a1 Fix schematic symbol rescue issues.
This fix makes some fundamental changes to the way symbols are rescued:

* The new symbol library file format is used when rescuing symbols defined
  in the symbol library table.
* The original library nickname is appended to the symbol name rather than
  the rescue library nickname when rescuing symbol defined in the symbol
  library table.
* Escaping strings has been removed from legacy library rescues since the
  legacy library file format never supported it.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12624
2022-10-11 16:18:59 -04:00
jean-pierre charras 8c19bf4815 eeschema: fix arc orientation issue when reading old symbol libs (version 20210619).
Fixes #12514
https://gitlab.com/kicad/code/kicad/issues/12514
2022-10-07 16:57:45 +02:00
Wayne Stambaugh 03d847118a Fix crash when copying symbol in schematic editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12574
2022-10-04 17:51:58 -04:00
Wayne Stambaugh a11c40197f Expunge default symbol instance from schematic file format.
Now that importing hierarchical sheets "properly" imports instance data,
the default symbol instance setting doesn't have any meaning.
2022-10-04 15:42:41 -04:00
Seth Hillbrand f5f6d44a48 Correctly increment field IDs
Setting to -1 is no longer valid despite the previous comment as this
will pick out a single non-mandatory field to save

Fixes https://gitlab.com/kicad/code/kicad/issues/12567
2022-10-03 21:50:29 -07:00
Wayne Stambaugh 2b387ae9c3 Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Added project name to instance data to improve the readability of the
schematic file format.  It also creates an opportunity to remove orphaned
instance data by project name rather than cryptic UUIDs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-10-02 15:06:42 -04:00
Jeff Young 27296b5043 Quote all bus members when writing to file.
Fixes https://gitlab.com/kicad/code/kicad/issues/12447
2022-10-02 17:43:47 +01:00
Seth Hillbrand 93239516d9 Remove ID from property fields
ID was not maintained or used other than to ensure unique fields.
Instead of saving, we assign the known IDs to specific field names and
sequentially create new IDs on load

Fixes https://gitlab.com/kicad/code/kicad/issues/12390
2022-09-30 17:19:53 -07:00
Jeff Young c0a666507c Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552
2022-09-30 20:56:25 +01:00
Wayne Stambaugh 979b4a4eb7 Revert "Move schematic symbol instance data back into symbol definition."
This reverts commit 7984e114db.
2022-09-29 15:33:23 -04:00
Wayne Stambaugh a60ed99510 Revert "Add project name to symbol instance data."
This reverts commit 4b276b339a.
2022-09-29 15:33:23 -04:00
Wayne Stambaugh 4b276b339a Add project name to symbol instance data.
This improves the readability of the schematic file format and creates
an opportunity to remove orphaned instance data by project name rather
than cryptic UUIDs.
2022-09-29 17:47:57 +00:00
Wayne Stambaugh 7984e114db Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-09-29 17:47:57 +00:00
Jeff Young 10d8db482e Init intersheet refs field pos to local {0,0}, not global {0,0}
Fixes https://gitlab.com/kicad/code/kicad/issues/12517
2022-09-26 21:00:46 +01:00
Ian McInerney 44c2782d39 Fix more for loops making copies of iterates 2022-09-25 00:48:38 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko ece23d434b Split up Double2Str to a format function to make its use case clear 2022-09-17 00:10:22 -04:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko 7a5829f8d6 Move IU2Mils 2022-09-16 21:09:27 -04:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Marek Roszko e6ed275c25 Repoint IU_PER_MILS 2022-09-16 21:09:26 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Seth Hillbrand 524b129c64 ADDED: Support for explicit DNP field
Dims elements shown as DNP.  Adds property `dnp` to explicitly denote
parts that should not be populated. These parts are not included in X/Y
files
2022-09-16 22:26:16 +00:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
kliment b97f9ea329 Add support for symbol unit display names in eeschema and symbol editor 2022-09-14 22:11:37 +00:00
Marek Roszko e473e71ef8 Restore the original lib property file indentation 2022-09-13 23:39:35 -04:00
Jeff Young 536561f7b3 Move bus aliases to std::set.
This is mostly to output the aliases sorted (for ease of VCS integration),
but also because a btree will be faster than hashing on a small dataset.

Fixes https://gitlab.com/kicad/code/kicad/issues/11890
2022-09-11 19:48:08 +01:00
Seth Hillbrand 09ef7c8f1e Add RPT_SEVERITY_DEBUG for developer-type messages
Move a bunch of importer messages out of the user-visible space as they
are not information that the average user can act on.
2022-09-09 17:21:47 -07:00
Jeff Young d030f03844 Don't allow a SaveAs to overwrite the root sheet.
Also prevents EESchema from loading sheets which recurse.

Fixes https://gitlab.com/kicad/code/kicad/issues/10872
2022-09-08 23:43:07 +01:00
WhiteChairFromIkea 758ba5ab18 Altium sch: Import circle-like ellipses as circles for now 2022-09-08 16:55:32 +00:00
jean-pierre charras 3e257794c0 Legacy symbol library reader: fix incorrect arc angle in some symbols.
Fixes #12346
https://gitlab.com/kicad/code/kicad/issues/12346
2022-09-06 08:29:38 +02:00
Jon Evans e294fe2074 ADDED: Dynamic field columns in symbol chooser
CHANGED: Symbol chooser search now considers custom symbol fields

Visible columns can be controlled in database libraries.
In standard KiCad libraries, we show columns for all custom fields for now.

Customizable column visibility will be added in the future.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11946
2022-09-05 16:38:14 -04:00
WhiteChairFromIkea e155514339 Altium sch: Import non lib shapes line color (ASCH_SHAPE_INTERFACE -> Polygon, Rectangle and Round rect) 2022-09-05 11:22:25 +00:00
WhiteChairFromIkea 2958f66407 Formatting 2022-09-05 11:22:25 +00:00
WhiteChairFromIkea 56e4b3b2c3 Altium sch: Import polyline color 2022-09-05 11:22:25 +00:00
WhiteChairFromIkea 325a6ec8bd Use default Altium colors for Harness ports (there can be no other harness elements to take color from) 2022-09-05 11:22:25 +00:00
Jon Evans a5246a6df7 DbLib: Support showing field names 2022-09-04 13:01:32 -04:00
Jon Evans 04f65c6c5c ADDED: Option to disable autoplacement for particular fields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5767
2022-09-04 13:01:31 -04:00
Jon Evans 4ea0a80df0 CHANGED: Fields may now optionally display their name before their value
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11457
2022-09-03 17:03:37 -04:00
WhiteChairFromIkea 42efaff045 Altium sch - plot backgrounds of textboxes and harness ports 2022-09-01 12:39:30 +00:00
Jeff Young ebe9617e77 More EDA_RECT expungification, and an attempt to fix the python test. 2022-08-31 17:19:48 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jon Evans ae879c8f02 DbLib: Add single-row query cache
Since single-row queries are performed rapid-fire during certain actions like
stepping through the symbol browser, there is high value in caching them for
a small amount of time.  The default cache parameters will keep results for
10 seconds, which errs on the side of getting fresh data from the database
on most user interactions.
2022-08-30 22:18:36 -04:00
Jon Evans 1da0572977 DbLib: Retry connection if first attempt fails 2022-08-30 22:18:36 -04:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00