Commit Graph

63 Commits

Author SHA1 Message Date
Wayne Stambaugh 24b04795fd Add net navigator panel to schematic editor.
[ADDED]: A panel to the schematic editor  that allows quick access to all
         of the items connected to the currently highlighted net.

This is an initial swag at implementing a full net navigator feature.  For
now it only shows the currently highlighted net nodes.  The incremental
net list advanced setting must be enabled in order to use this feature due
to performance reasons.  There are still some issues with saving the panel
position which will be addressed in the future.

Initial code for serializing wxAuiPaneInfo settings to and from JSON have
be implemented.
2023-05-20 13:48:03 -04:00
Seth Hillbrand a154571438 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

Fixes https://gitlab.com/kicad/code/kicad/issues/10846

Fixes https://gitlab.com/kicad/code/kicad/issues/1794
2023-04-19 16:14:35 -07:00
Seth Hillbrand 16b4ec3c7e Allow bus elements to connect
Previously, bus elements that were not instantiated as individual nets
could not connect to each other.  This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names.  Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
  this patch or by individually instantiating each bus element as a
local label

Fixes https://gitlab.com/kicad/code/kicad/issues/14300
2023-04-04 15:23:29 -07:00
Seth Hillbrand 48740dd3f8 Clean exposure of CONNECTION_SUBGRAPH
Removes internals from public consumption.
2023-03-03 14:07:17 -08:00
Mike Williams dd461d6ad6 Power Symbols: drop requirement for invisible pins 2023-02-22 18:01:47 +00:00
Seth Hillbrand 420eceecbb Simplify name caching
We don't need two functions to get driver names.  The map should be
mutable to allow updates when needed.  C++17 gives some extra syntactic
sugar for map manipulation
2023-01-24 10:30:52 -08:00
Seth Hillbrand e6dbca051c Force realtime connectivity on
The pressure relief valve was not useful for common work patterns as it
forced the recalculation on many common actions such as bus expansion.
This caused it to actually feel slower than with the pressure relief
valve off.

For most schematics, realtime is now fast enough to not need the valve
and for those that are extremely complex, removing the valve helps this
run more predictably
2023-01-20 15:17:57 -08:00
Seth Hillbrand bd6d0b6cb6 Ensure that all subgraphs are processed
Don't skip subgraphs just because they do not have off-sheet connections
on their hierarchical ports
2023-01-12 17:01:09 -08:00
Seth Hillbrand 9a5df73060 ERC: don't flag hierarchically connected NCs
NCs require no more than one pin on the full net.  They may also have
multiple labels connecting them.
2022-12-07 13:48:25 -08:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young 96f01d33c8 Performance improvements.
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference

Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00
Seth Hillbrand 5b5c7d41b4 Break up buildConnectionGraph for debugging
Needed to find bottlenecks in fns, so break out individual sections of
the massive function for easier understanding.

buildItemSubgraphs (one section of the previous function) would build
millions of connections that were never used as stacked pins created X!
connections.  Also tested using sets instead of lists and keeping unique
lists to avoid flagging but none of these were as performant as using
flags to remember which items had already been processed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10974

(cherry picked from commit 17b1b68ac7)
2022-03-11 16:58:38 -08:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Wayne Stambaugh a85898f904 Eeschema header housekeeping round 1. 2021-03-25 10:08:06 -04:00
Jon Evans ede500f117 Don't create multiple markers for the same issue
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7016
2021-01-12 23:24:13 -05:00
Jeff Young ad281f7538 Remove duplicated TestDanglingEnds routines.
Also adds a changedItemHandler so that the single remaining version
can update the view.

Fixes https://gitlab.com/kicad/code/kicad/issues/6581
2020-12-06 21:24:16 +00:00
Jeff Young c85ef8eb69 Make updating netnames in backannotate more discrete.
Trying to be too smart was producing unexpected results.

Fixes https://gitlab.com/kicad/code/kicad/issues/6480
2020-11-25 22:16:56 +00:00
Marek Roszko 1984581c46 Remove common.h from more headers 2020-10-25 22:29:53 -04:00
Jeff Young fbb20d08cd Don't allow netclass assignment to auto-generated net-names.
They can change the next time they're generated so it's just asking
for heartache.

Fixes https://gitlab.com/kicad/code/kicad/issues/5972
2020-10-12 00:30:18 +01:00
Jon Evans d40ae3de46 ADDED: ERC check for missing hier labels for sheet ports
A subsheet may have more than one instance of a hier label,
but it's generally a mistake if there is no matching hier label
for a port on the parent sheet.

This is harder to do today now that we don't have manual tool
for placing hier ports, but it's still possible if you place
ports but then rename the label on the subsheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3468
2020-08-25 21:52:52 -04:00
Jon Evans 45cae6405d Improve no-connect ERC and check for floating wires
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2393
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2038
2020-08-25 18:00:16 -04:00
Jon Evans 66bdd37637 Connectivity optimizations
Cache names of potential driving items
Change a few data structures based on profiling
2020-07-09 18:14:37 -04: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 1e69f592f6 Rework net highlighting to use connections instead of strings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1933
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3921
2020-05-24 10:46:05 -04:00
Jon Evans de9520d65e Finish porting netlisters to use CONNECTION_GRAPH 2020-05-23 12:45:24 -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 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Jon Evans fe375b4419 Allow sheet pins to be strong drivers if they don't conflict with anything
Also try harder to match bus members in case one was renamed by a higher
priority label.

Fixes https://gitlab.com/kicad/code/kicad/issues/3797
2020-02-05 14:23:55 +00:00
Jon Evans 41725e6b07 Sort nets in netlist by name; generate ordered net codes 2020-01-22 14:59:02 +00:00
Jeff Young 836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Jon Evans b4cc28a5b6 Fix memory leaks in CONNECTION_GRAPH
Fixes #3692
2020-01-07 00:13:19 -05:00
Jon Evans 1bffe7f48b Ensure power pins win over bus member renaming
Also switch to a scoped enum for PRIORITY

Fixes https://gitlab.com/kicad/code/kicad/issues/3728
2020-01-02 22:09:15 -05:00
Jon Evans 8b87dc7e0f A slightly better ERC check for hierarchical labels
Fixes: lp:1839822
* https://bugs.launchpad.net/kicad/+bug/1839822
2019-11-29 21:11:44 -05:00
Jeff Young a568e70b99 Follow naming conventions. 2019-06-10 23:46:01 +01:00
Jon Evans 607650be22 Connectivity: don't consider neighbor propagation when types don't match
Fixes: lp:1831608
* https://bugs.launchpad.net/kicad/+bug/1831608
2019-06-05 22:26:44 -04:00
Jon Evans 8d8c743f97 Connectivity: remove unused method 2019-06-05 21:27:56 -04:00
Jeff Young 792c4328aa Cleanup. 2019-05-10 21:40:08 +01:00
Jon Evans 316be464ab Handle higher-priority connection drivers located in subsheets
Fixes: lp:1827850
* https://bugs.launchpad.net/kicad/+bug/1827850
2019-05-06 22:09:05 -04:00
Jon Evans 09c9db472e Properly handle buses that have been linked by net wires only
Fixes: lp:1825532
* https://bugs.launchpad.net/kicad/+bug/1825532
2019-05-05 19:48:55 -04:00
Jon Evans 6d918ea1f1 A few fixes and refactors to connectivity propagation 2019-05-05 00:03:58 -04:00
Jon Evans a5a2152ff4 Cache subgraphs by sheet path 2019-04-29 19:58:02 -04:00
Jon Evans c054944d67 Set real-time connectivity to on by default with a safety valve 2019-04-29 18:59:32 -04:00
Jon Evans f0376f1379 Improve ERC checking of labels
Fixes: lp:1824629
* https://bugs.launchpad.net/kicad/+bug/1824629
2019-04-25 15:10:39 -04:00
Jon Evans e06d37090a A few connectivity performance tweaks 2019-04-25 00:37:10 -04:00
Jon Evans ed27c50692 Improve handling of non-unique connections 2019-04-24 23:47:57 -04:00
Jon Evans e2c12d8c25 Overhaul connectivity neighbor and global connection processing 2019-04-21 19:10:44 -04:00
Jon Evans df600fc1a2 Fix a few ERC issues with no-connects and power pins
Fixes: lp:1824359
* https://bugs.launchpad.net/kicad/+bug/1824359
2019-04-11 21:24:39 -04:00