Commit Graph

80 Commits

Author SHA1 Message Date
Wayne Stambaugh f7084afb72 Eeschema: fix annotation bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6154
2020-10-26 13:01:36 -04:00
Jeff Young 51dff1c822 Live update sheetpath.
Also makes it a static text to get rid of the spacing/clipping
problems it has been having.

Fixes https://gitlab.com/kicad/code/kicad/issues/6152
2020-10-25 13:37:40 +00:00
Wayne Stambaugh 8ff51d8899 Eeschema: add schematic sheet page number.
The groundwork has now been laid for per sheet instance data.  Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.

ADDED: Support for user defined schematic page numbers.
2020-10-19 14:05:45 -04:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
Jeff Young 63a0f537d8 Performance enhancement: check hierarchy validity only when necessary. 2020-10-05 13:49:29 +01:00
Jeff Young be15053745 Allow back-annotation of differing values and footprints.
Also fixes a couple of bugs where resolving a textVar reference
to the refDes or unit wouldn't get the correct value in a
hierarchical schematic. (Unlogged.)

Fixes https://gitlab.com/kicad/code/kicad/issues/5397
2020-09-04 15:21:56 +00:00
Jon Evans 282fcd5f3c Connectivity optimizations
Don't copy the recursion test cache when copy-constructing
SCH_SHEET_PATHs as it's not needed in connectivity

Fix a few places that were copying unnecessarily
2020-07-08 17:42:12 -04:00
Jon Evans f7578eb038 Implement new native netlist QA test 2020-05-23 21:04:11 -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
Jeff Young 06dea92bcb Fix issues with Kicad Manager frame and new kicad_sch files.
Fixes https://gitlab.com/kicad/code/kicad/issues/4410
2020-05-12 15:20:17 +01: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
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