Commit Graph

39 Commits

Author SHA1 Message Date
Jeff Young 2ad69fc56b Move importers from wxLog to REPORTER.
Fixes https://gitlab.com/kicad/code/kicad/issues/6389
2021-03-31 22:54:30 +01:00
Wayne Stambaugh a85898f904 Eeschema header housekeeping round 1. 2021-03-25 10:08:06 -04:00
Roberto Fernandez Bautista 2d99703e28 CADSTAR Schematic Archive Importer: Load all Sheets and Hierarchical Blocks 2020-09-27 18:13:58 +01:00
Roberto Fernandez Bautista 721cba32d5 ADDED: CADSTAR Schematic Archive Importer
Initial commit to trigger the importer
2020-09-27 18:13:57 +01:00
Thomas Pointhuber a03fb7a9a8 Altium: Refactor and add initial structure for schematic importer
altium: move pcbnew/altium2kicadpcb_plugin -> pcbnew/plugins/altium

See: https://gitlab.com/kicad/code/kicad/-/issues/4412
2020-08-23 19:01:08 +00:00
Wayne Stambaugh b624c7090a Deprecate saving legacy schematic and symbol library file formats.
REMOVED: The ability to save schematics in the legacy file format.
2020-05-29 12:43:00 +00:00
Jon Evans 2499a1d640 Remove KIWAY dependence from SCH_PLUGINs 2020-05-20 23:00:23 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Wayne Stambaugh 169f63a6c0 Eeschema: make schematic sharing truly safe across all designs.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects.  It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic).  This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet.  This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references.  It also allows the root schematic from one project
to be uses as a sub-sheet in another project.

When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs.  This is done to ensure there
are no sheet path instance clashes between projects.  That being said,
there are no checks for this.  It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
2020-05-04 12:40:03 +00:00
Jeff Young c663965498 Fix some issues with sheet border color handling. 2020-04-05 16:17:04 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
Wayne Stambaugh 7dc64f08b7 Eeschema: implement s-expression schematic file formatter.
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format.  Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
2020-03-16 09:05:16 -04:00
Wayne Stambaugh 9d6f64da9a Implement symbol library s-expression parser.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
2020-03-03 08:06:23 -05:00
Wayne Stambaugh e1900161a7 Eeschema: implement new symbol library file s-expression formatter.
CHANGES: Symbol library file format has been converted to s-expressions.

Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries.  For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
2020-03-03 08:06:22 -05:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Jeff Young 5c43924338 Display all "File couldn't be found" messages at the end.
Fixes: lp:1810161
* https://bugs.launchpad.net/kicad/+bug/1810161
2019-07-10 23:17:50 +01:00
Wayne Stambaugh 8af9aa7574 Eeschema: allow for partial schematic loading.
With the implementation of the legacy schematic plugin, any I/O error
when parsing the schematics would prevent the entire schematic from
being loaded.  This change restores (somewhat) the previous behavior
where as long as the root schematic is loaded properly, then all of
the remaining sub-sheet will attempt to load.

Add GetError() method the SCH_PLUGIN object to allow for partial
schematic loading.

Check the error message contents when no exception was caught to warn
the user of any accumulated errors.

Fixes lp:1690644

https://bugs.launchpad.net/kicad/+bug/1690644
2017-12-06 19:11:09 -05:00
Wayne Stambaugh 8b2b1381c4 Fix symbol library table editor plugin type selection bug.
Remove the placeholders for the upcoming s-expression schematic and
symbol library file format plugin type.  The lack of a valid plugin
implementation was causing an undefined plugin type string in the
plugin type selection cell when new rows were added to the table.

Fixes lp:1733116

https://bugs.launchpad.net/kicad/+bug/1733116
2017-11-19 16:53:31 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Russell Oliver 3b0855d204 Eagle Project Import: Code cleanup and documentation.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
2017-10-20 08:58:40 +02:00
Maciej Suminski d6383893a2 eeschema: Iterate through plugins when determining file format. 2017-10-20 08:38:38 +02:00
Russell Oliver 4e69acbb49 Eeschema: Add CheckHeader function to SCH_PLUGIN and cycle through plugins when loading files. 2017-10-20 08:38:38 +02:00
Maciej Suminski c727423979 Work in progress
- !! Eeschema uses Eagle plugin for loading schematics (i.e. it does not
use KiCad format anymore)
- Fixed build errors
- Fixed a few crashes
- Code formatting
2017-10-20 08:38:37 +02:00
Alejandro García Montoro 2403f2b558 Adds necessary structure to implement and test Eagle schematich plugin 2017-10-20 08:38:37 +02:00
jean-pierre charras e5137f4eb4 Fix a few doxygen warnings 2017-06-21 10:01:39 +02:00
Wayne Stambaugh dab73e172b Doxygen warning fixes and coding policy comment changes. 2017-06-16 10:08:28 -04:00
Chris Pavlina 9effcb80e7 Optimize SCH_PLUGIN enumeration for populating the component chooser 2017-02-24 11:47:27 -05:00
Wayne Stambaugh 73bbc35c3e Make the schematic I/O plugin the only option.
Add SCH_PLUGIN object to PART_LIB object.

Convert all PART_LIB I/O to use SCH_PLUGIN.

Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.

Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.

Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library.  This is to prevent the cache library from being
written every time a new symbol is added.

Add option to not save library document file when saving library.  This is
primarily used by the cache library write code.

Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.

Add exception handling where LIB_PART caught the exception and returned
an error status.

Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
2017-02-10 08:36:57 -05:00
Wayne Stambaugh 4ee0b3827e Eeschema: more schematic I/O plugin prep work.
Add code to schematic I/O plugin for updating library modification
hashes.

Remove unused RemoveLibrary() method from PART_LIBS object.

Purge wxT() macros from modified files.
2016-10-25 18:45:33 -04:00
Wayne Stambaugh 213ceaa280 Eeschema: add delete symbol library code to schematic legacy plugin. 2016-10-09 08:29:44 -04:00
Wayne Stambaugh 4f0c2ad083 Eeschema: add create symbol library to legacy schematic I/O plugin. 2016-10-07 09:18:15 -04:00
Wayne Stambaugh aa5e979b8a Eeschema: add delete symbol method to schematic I/O plugin. 2016-09-29 18:34:31 -04:00
Wayne Stambaugh 58abb29827 Eeschema: add delete alias from library to I/O manager.
Modify base I/O manager class to delete alias from a symbol library.

Add delete alias from legacy symbol library plugin.
2016-09-23 13:29:17 -04:00
Wayne Stambaugh 3ae240ea46 Eeschema: add save code to legacy symbol library plugin.
Make LIB_PART copy constructor take a const LIB_PART reference.

Add SaveSymbol to legacy symbol library plugin.

Add removeAlias to legacy symbol library cache.

Add AddSymbol to legacy symbol library cache.
2016-09-17 14:45:01 -04:00
Wayne Stambaugh 24f6c4be21 Eeschema: add code to plugin manager to load a symbol from a library. 2016-09-03 14:28:17 -04:00
Wayne Stambaugh eaa7f3f114 Eeschema: implement schematic I/O plugin symbol library parser.
* Write SCH_LEGACY_PLUGIN_CACHE object for handling the legacy symbol library
  file format.

* Write legacy symbol library file parser.

* Write code to transfer cache to PART_LIB object so existing library save
  code can be used for round trip testing.  This is temporary until Eeschema
  is updated to use the plugin for library management rather than PART_LIB.

* Add LIB_XXXX object helper functions where there was no way to set the member
  variables of an object.

* Give the cache object friend status to some object where there are incredibly
  byzantine ways of setting text in LIB_XXXX objects.
2016-08-18 19:23:10 -04:00
Wayne Stambaugh 98ad5096b0 Eeschema: add saving schematic files to schematic plugin.
* Add SCH_PLUGIN::Save() for current file format and code for saving all
  SCH_XXX objects.

* Add function to SCH_FIELD to get the position of the field in the component
  not the position added to the component position which is what GetPosition()
  does.  This was required because saving the component field expects position
  of the field sans the position of the component.

* Remove public members from BITMAP_BASE object and fix all associated
  code.

* Fix the never ending coding policy violations found making these changes.
2016-07-11 15:48:46 -04:00
Wayne Stambaugh 4ed346ea64 Eeschema: initial schematic I/O plugin.
* Factor out PROPERTIES object from the PCB plugin code and move it into
  common so it can be used by both the Pcbnew and Eeschema plugins.

* Add schematic I/O plugin manager for loading and saving schematic and
  component library files.

* Add initial attempt at a parser for current schematic file format.  This
  parser will be infinitely more strict than the current parser which is very
  forgiving in what it parses.

* Make minor changes to the base bitmap class to support the new parser.

* Add find root sheet support to sheet object to allow fetching the root
  sheet from any sheet in the stack.
2016-07-06 05:22:56 -04:00