338 Commits

Author SHA1 Message Date
Seth Hillbrand
4f6a73d83c Prevent ERC error with NC pin+NC marker
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-07 15:24:30 -08:00
Seth Hillbrand
2b557c5497 Revert "Allow a no-connect to connect to a single pin (but not multiple pins)."
This reverts commit ee4a6127c6bed91f0d153983b8dc88da1e3375f1.
2025-03-07 08:10:04 -08:00
Jeff Young
ee4a6127c6 Allow a no-connect to connect to a single pin (but not multiple pins).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-06 10:27:11 +00:00
Jon Evans
32b5cf6221 Fix broken build 2025-03-04 21:32:42 -05:00
Seth Hillbrand
49a4699d5a ADDED: Local power symbol option
Local power symbols work like regular power symbols except that they are
scoped only the the sheet in which they are instantiated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2075
2025-03-04 17:07:46 -08:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Wayne Stambaugh
f45915ba93 Eeschema folder housekeeping. 2025-02-06 09:47:00 -05:00
Seth Hillbrand
452e69de85 Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
2025-01-09 09:03:08 -08:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a02380881efb59b1cebfdc3e73322b3d3c.
2025-01-03 21:22:44 -08:00
Seth Hillbrand
361f61a023 Move thread pool to singleton class
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started.  Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.

The singleton class can be extended to provide single instance
guarantee for any element across kifaces
2025-01-03 13:51:11 -08:00
Ian McInerney
e845db1977 Implement dnagling wire to bus entry ERC
Also, rename the dangling flag/getter to match the flag in SCH_LINE for
consistency.
2025-01-03 14:58:57 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
6e09649a70 Fix crash on net highlighting
When navigating to a sheet without the highlighted net, there was a
chance for an uninitialized pointer deref.  This also gathers the
highlighted nets into the navigator as well as their subsuming buses

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18419
2024-12-24 14:46:47 -08:00
Seth Hillbrand
ad985aff9d Check secondary driver names when merging
If two nets are joined by a global power pin but both have global labels
that override the net name, we still want them to be merged.  This
checks for all net names in the drivers when looking for subgraph
merging candidates

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18092
2024-12-10 15:54:47 -08:00
Jan Wichmann
30cebd17e0 Added ERC check for directive labels
Checks to see if directive labels are connected in the same manner that other labels are

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19075
2024-11-20 18:11:05 +00:00
jean-pierre charras
16d389a488 ERC: fix "label not connected anywhere" ERC does not have configurable severity
Fix also the right message if the label is a global label.
Rename ERCE_GLOBLABEL to a better name ERCE_GLOBLABEL_DANGLING

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19119
2024-11-12 13:35:05 +01:00
Alex Shvartzkop
371a1b711f Fix some warnings. 2024-08-07 00:51:24 +03:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
JamesJCode
559854ec0f Add ERC check for dangling wire endpoints 2024-07-22 23:16:08 +01:00
JamesJCode
90304e0639 Remove unnecessary erase of netclasses from netclass map
We start from an empty map now, so no need to delete entries
individually
2024-07-16 18:43:49 +01:00
JamesJCode
924b027503 Resolve netclasses on vector buses embedded in buses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16545
2024-07-15 20:40:46 +01:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Mike Williams
a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e71227d2129d271f24fb92ae0b99b6f93bd.
2024-06-12 13:30:29 -04:00
JamesJCode
0826c10a20 Don't re-add deleted netclass assignments in incremental connectivity
Ensures that if moving or deleting a netclass directive label, the
netclass on the previously-assigned net doesn't have the stale
netclass re-applied.
2024-06-10 20:19:07 +01:00
Mike Williams
0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young
edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Jeff Young
a6e8cfe35f Performance for large hierarchies: avoid sorting
Don't sort SCH_SHEET_LISTs if we're just scanning the doc.
2024-06-06 11:53:01 +01:00
Jeff Young
e5bad195b6 Fix a bunch of failures to resolve text variables. 2024-06-04 12:46:34 +01:00
Jeff Young
26fc2bd071 Reduce compiler warnings. 2024-06-04 11:18:45 +01:00
Jeff Young
a74e834b33 Formatting. 2024-06-04 11:16:11 +01:00
JamesJCode
76cb7cf54a Clear all dirty connectivity flags on symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17984

When moving / deleting a power symbol, in some instances the
symbol is marked dirty, and sometimes the pin (depending on
whether the symbol is the primary edited item, or whether
the pin is identified through an edited item subgraph). If
the pin and the symbol are marked dirty, the pin dirty flag
was not being cleared.

Additionally, not all extracted items were being deleted
from subgraphs correctly.

Both resulted in dirty state and duplicated items in the
subgraphs during incremental connectivity, which resulted
in essentially corrupted subgraph states.
2024-05-22 21:51:02 +01:00
JamesJCode
9e1a5eb1bd Eeschema: Only assign nets with resolved netclasses to the label map
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.
2024-05-07 20:16:17 +01:00
Seth Hillbrand
2139789c4c Move ERC items to their own directory 2024-05-03 12:06:24 -07:00
James J
be8744176c Add SCH_RULE_AREA shapes to eeschema
Includes:
 - Fix GAL to draw closed polygons in eeschema
 - Add functionality to eeschema to draw arbitary polygons
 - Update polygon item previews to have customisable edge colour
 - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
 - Add SCH_RULE_AREA to paint and plot methods
 - Add new rule area color preference to themes
2024-04-25 14:24:46 +00:00
Seth Hillbrand
315ad0e071 Replace stale pin references with UNDO copy
When we replace a symbol with one that has fewer pins, the old pins
are released, which leaves points to them in the connection graph
dangling.  This updates the pointer to use the cloned copy in the undo
stack until the connection graph is rebuilt with the new data

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17851
2024-04-24 12:55:02 -07:00
Jeff Young
95136494b3 RIP LIB_PIN. 2024-04-20 12:10:31 +01:00
Seth Hillbrand
5f16c5892c Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17797
2024-04-18 21:18:27 -07:00
Seth Hillbrand
e538b98286 Incremental updates should not clear globals
Netclass assignments are stored in the project level but
CONNECTION_GRAPH updates would clear the assignments.  This keeps
existing netname->netclass assignments but updates any netnames that
were changed by the incremental updates.  Absolute updates are not
affected and fully recreate the net name to netclass map

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17720
2024-04-11 15:57:49 -07:00
Seth Hillbrand
a9f35ba42e Fix incremental connectivity
The connectivity routine would consider symbols, overwriting unused
subgraphs for pins that were not in the change list.  This is resolved
by updating the full connectivity to only use pins in the graph since
symbols are not connected independently.

In the process of adding QA tests for this change, additional issues
with the schematic QA were discovered.  Specifically, we were not
properly setting the root sheet UUID.  This was partially masked by a
const_cast setting of the RefDes in sch_symbol when called the RefDes
getter.  This exposed the fact that our QA ERC numbers did not match the
schematic editor stand alone ERC numbers.  So the test value for one
check needed to be updated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17528
2024-04-10 17:25:58 -07:00
Jon Evans
ce846f5c22 Check for bus no-connects in ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13285
2024-04-07 08:50:28 -04:00
Jeff Young
1028a76e4a Harmonize print/plot APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
92910d5d0f Factor common parts of SCH_ & LIB_SYMBOL into SYMBOL. 2024-04-04 13:18:55 +01:00
JamesJ
2311eed08a Add new ERC rule to check for global labels with only one entry in the schematic
By default this rule is set to ignore to provide continuity for those using
single global labels to name nets (e.g. in simulation)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13212
2024-03-17 23:24:43 +00:00
Jeff Young
383dbd983a Don't skip transitions from netclass to empty. 2024-03-16 19:46:48 +00:00
Jon Evans
ef0204a44b Remove debug output 2024-02-11 09:04:10 -05:00
Jon Evans
4eba781013 Try harder to remove stale pins from connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16846
2024-02-10 23:26:37 -05:00
Seth Hillbrand
7664c345e2 Revert "Schematic performance enhancements"
This reverts commit df654ac12f3491cb18a59cebc2de3805279c23e0.
2024-02-01 09:00:13 +01:00
Yon Uriarte
df654ac12f Schematic performance enhancements 2024-02-01 02:28:09 +00:00
Marek Roszko
059b043935 Try and walk from a real component pin rather than power symbol that will fail our later check 2024-01-21 21:12:14 -05:00
Marek Roszko
fb8dc75108 Fix broken conditional check while walking global power connected items
Per the if statement and logic, we want to walk into looking up connections if we are a pin on a chip.
IsGlobalPower is a test for it's in a power symbol, so we want it false not true.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16699
2024-01-21 19:54:09 -05:00