Commit Graph

70 Commits

Author SHA1 Message Date
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
Jon Evans cf15a1c493 Cache SCH_SHEET_PATH recursion test results 2020-04-30 19:53:25 +00:00
Jeff Young 49c46dc796 Fix typo. 2020-04-24 23:22:11 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
Jeff Young c68b554c8e Promote PathsAndReferences from wxArrayString to first-class-citizen.
Keeping the data in an un-serialized format greatly simplifies usage,
and should make it more robust.
2020-02-24 23:19:17 +00:00
Jeff Young 490f39a671 Remove obsolete code requiring unique sheet names. 2020-02-20 22:56:11 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
jean-pierre charras 710a82bc51 Eeschema: fix an issue in netlists when using "<root sheet>" as root sheet path name.
Netlists do not accept any char in netnames (especially spice).
They must use only "/" as root sheet path name.

Especially _( "<root sheet>" ) breaks netlists because:
- there is a space in name, and special chars (< and >)
- it is a translatable name. so the actual name cannot be managed.
- most of netlist code in Kicad expects a "/" as root path.
2019-06-23 19:37:41 +02:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Jon Evans 541c2fdb29 Performance: Move vector inside SCH_SHEET_PATH so hash can be cached 2019-04-09 21:09:48 -04:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04:00
Carsten Schoenert 1f32f7c55b fix misspelled 'allows to' -> 'allows one to' 2018-04-08 13:24:18 -04:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
jean-pierre charras 656d4d0dff dialog_edit_components_libid: shows orphan components (components with no symbol found in library) 2017-11-21 18:06:37 +01:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
jean-pierre charras 58c32367ee filter useless autosave tests, and optimization of autosave test in Eechema 2017-07-26 18:06:04 +02:00
jean-pierre charras f042fcddd0 Change the way power symbols are annotated before creating a netlist or running ERC.
Now only not annotated symbols (or duplicate references) are modified.
2017-07-21 18:41:04 +02:00
Simon Richter 96ec9db5d6 Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
Wayne Stambaugh 92f5ab8589 Eeschema: SCH_SHEET_LIST improvements.
* Derive SCH_SHEET_LIST from std::vector rather than using internal array
  management.  Change all internal code to use iterators or array operator
  in loops.
* Allow creation of empty SCH_SHEET_LIST for external population for plotting
  and printing.
* Clean up print an plot code to take advantage of new SCH_SHEET_LIST behavior.
* Make BuildSheetList() public so list can be populated after creation.
* Update all instances of SCH_SHEET_LIST with the appropriate SCH_SHEET
  object on initialization.
* Create const and non-const version of SCH_SHEET_PATH::GetSheet().
2016-03-06 16:22:01 -05:00
Wayne Stambaugh b7e56ae1cb Eeschema: SCH_SHEET_PATH refactor.
* Derive SCH_SHEET_PATH from std::vector< SCH_SHEET* > and remove unnecessary
  assignment operator and list management functions.
* Remove function BuildSheetPathInfoFromSheetPathValue() since it was
  effectively an assignment operation.
* Replace all calls to BuildSheetPathInfoFromSheetPathValue() with assignment
  operator.
* Replace list management functions with vector management functions.
* Fix a error message that wasn't translatable.
2016-02-27 14:35:45 -05:00
Wayne Stambaugh af2e19d7d9 Undo commit -r 6380. 2016-02-15 15:21:18 -05:00
Wayne Stambaugh 3d963166c7 Undo commit -r 6389. 2016-02-15 15:19:22 -05:00
Wayne Stambaugh 73dc53dc35 Undo commit -r 6413. 2016-02-15 15:18:32 -05:00
Wayne Stambaugh 4007317606 Undo commit -r 6428. 2016-02-15 15:17:51 -05:00
Wayne Stambaugh 1866b61a56 Undo commit -r 6457. 2016-02-15 15:16:54 -05:00
Wayne Stambaugh 27b587025d Undo commit -r 6506. 2016-02-15 15:14:48 -05:00
Wayne Stambaugh 5a5fffb349 Undo commit -r6509. 2016-02-15 15:14:07 -05:00
Wayne Stambaugh 7b5823185a Undo commit -r 6535. 2016-02-15 15:12:42 -05:00
Wayne Stambaugh 9eda45a97e Undo commit -r 6539 2016-02-15 15:11:50 -05:00
Wayne Stambaugh cb13e57973 Eeschema: move find sheet by name from SCH_SHEET_PATH to SCH_SHEET.
* Move FindSheetByName() function from SCH_SHEEET_PATH to SCH_SHEET object
  and update calls to FindSheetByName() accordingly.
* Remove SCH_SHEET_PATH::FindSheet() which was unused.
* Add sorting option to SCH_SHEET::GetSheets().
2016-02-05 08:33:28 -05:00
Wayne Stambaugh 0ef1eee2c6 Eeschema: move recursion check from SCH_SHEET_PATH to SCH_SHEET.
* Add const and non-const version of GetRootSheet() to SCH_SHEET.
* Add GetSheetPaths() function to SCH_SHEET which behaves the same way
  as SCH_SHEET_LIST except it uses standard C++ containers and is a much
  simpler design.
2016-02-02 19:45:43 -05:00
Wayne Stambaugh 2aac71700b Eeschema: move is complex hierarchy and find next item from SCH_SHEET_PATH to SCH_SHEET.
* Add function to get a list pointers to this sheet and all of it's  sub-sheets
  to SCH_SHEET.
* Remove unused function SetFootprintField() from SCH_SHEET_PATH.
2016-01-24 15:46:14 -05:00
Wayne Stambaugh ac30be332f Eeschema: move get multi-unit components from SCH_SHEET_PATH to SCH_SHEET. 2016-01-21 19:01:34 -05:00
Wayne Stambaugh cdba425bad Eeschema: move get components from SCH_SHEET_PATH to SCH_SHEET.
* Add sheet number that is set by schematic file load order.  This duplicates
  the previous SCH_SHEET_PATH behavior.
* Uncouple SCH_REFERENCE and SCH_REFERENCE_LIST from SCH_SHEET_PATH.
* Add - operator to SCH_SHEET for comparison purposes.  This duplicates the
  behavior of SCH_SHEET_PATH::Cmp().
2016-01-12 21:31:34 -05:00
Wayne Stambaugh e8e0a75b8c Eeschema: move update all screen references from SCH_SHEET_PATH to SCH_SHEET.
* Uncouple SCH_COMPONENT::GetRef() from  SCH_SHEET_PATH and use SCH_SHEET
  instead.
* Uncouple SCH_COMPONENT::GetUnitSelection() from  SCH_SHEET_PATH and use
  SCH_SHEET instead.
* Fix all calls to GetRef() and GetUnitSelection() to pass a pointer to the
  appropriate SCH_SHEET object instead of an SCH_SHEET_PATH object.
2016-01-06 19:07:30 -05:00
Wayne Stambaugh 133b8f6b96 Eeschema: move annotate power symbols from SCH_SHEET_PATH to SCH_SHEET.
1
* Uncouple SCH_COMPONENT::SetRef() from  SCH_SHEET_PATH and use SCH_SHEET  instead.
2016-01-03 08:58:27 -05:00
Wayne Stambaugh 81e6af6c81 Eeschema: move auto-save test from SCH_SHEET_PATH to SCH_SHEET. 2015-12-20 15:58:18 -05:00
Wayne Stambaugh 1bd860d1aa Eeschema: move modification state code from SCH_SHEET_LIST to SCH_SHEET. 2015-12-16 19:27:53 -05:00
Cirilo Bernardo 2128594a85 Coding policy fixes: remove trailing white space. 2015-12-14 16:20:54 -05:00
unknown 5fe527242f eeschema: fix documentation on SCH_SHEET_PATH::Cmp to match actual behavior 2015-08-31 13:13:26 +02:00
Chris Pavlina 859435cabe Fix clang build error due to ambiguous function GetSheet() in SCH_SHEET_PATH. 2015-06-08 10:37:45 -04:00
Wayne Stambaugh 54bad8b5e8 Fix Eeschema sheet recursion bugs.
* Add code to test for sheet path recursion to SCH_SHEET_PATH and SCH_SHEET_LIST.
* Add recursion tests to edit sheet code in Eeschema.
* Add recursion tests to block paste code in Eeschema.
2015-06-07 16:31:55 -04:00
unknown 74154480de Eeschema enhancements: Option to annotate keeping multi-unit parts grouped and friendlier warning for modifying power values. 2015-03-23 12:45:31 +01:00
Ronald Sousa 7392f04b75 - Added sheet information to the net file. i.e. sheet number, human path name and timestamp
- update bom_with_title_block_2_csv.xsl
2015-02-11 11:11:05 +00:00
jean-pierre charras 24f516f6ae Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. 2014-11-02 17:25:04 +01:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00