76 Commits

Author SHA1 Message Date
Jeff Young
a8df4b16e2 Range checking. 2025-08-03 20:32:19 +01:00
Christopher Alexander
f4b1a15cd8 fix for issue 17429 - fixes DRC unconnected items exclusion instability 2025-06-25 17:03:35 +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
Jon Evans
97185ca623 Ratsnest: account for coincident anchors on different layers
When a net happens to have only coincident items on different
layers, the triangulator was not considering the item layers
when optimizing them away.  Add a special case to ensure that
the ratsnest edges will exist in this situation.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18982

(cherry picked from commit 724feccdb8b2779a4cbdeb52da14f433fa955835)
2024-12-08 11:09:40 -05:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
JamesJCode
03e388be80 Hold weak reference to NET_SETTINGS in CONNECTIVITY_DATA 2024-08-04 09:03:03 +01:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
jean-pierre charras
d933a8d6a9 Fix minor compil warnings 2024-07-12 12:43:49 +02:00
Alex Shvartzkop
8532e1f9ec Optimize optimizeZoneToZoneAnchors.
Only do tests between 3 polygon pairs with closest bbox centers.
Only do tests between 5 parts of line chain pairs with closest bbox centers.

Gets OptimizeRNEdges down to 350 ms

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-07-03 16:27:03 +00:00
Alex Shvartzkop
e9ece8266b Checking flags instead of copying is faster in RN_NET::NearestBicoloredPair.
Partially reverts 87171f53c78b16d60f61173a0df2684fad628c90
2024-07-03 16:27:03 +00:00
Jeff Young
694a7db457 Performance improvements.
Don't construct a wxString or a LSEQ when you don't
have to.  They're both more expensive than you might
think.
2024-06-12 11:06:10 +01:00
Seth Hillbrand
8760519a87 Ensure that we are not calculating self-collision
Ratsnest may have connections from a zone to two different items.  This
should be avoided as we never want to draw the ratsnest line with the
same element as start and finish

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17763
2024-04-14 13:50:01 -07:00
Jeff Young
7f8e397dfb Behave (or assert) when source or target are null or dirty. 2023-11-01 17:11:42 +00:00
Jeff Young
fb59f83683 Clean up references in RN_NETs when garbage collecting CN_ITEMs. 2023-11-01 13:53:30 +00:00
jean-pierre charras
c9d6e79d2d Fix minor compil warnings. 2023-10-08 15:04:45 +02:00
Jeff Young
3f0067cbaa Adjust colours in appropriate direction depending on background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15841
2023-10-06 21:27:02 +01:00
Marek Roszko
22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Marek Roszko
7505fd0f37 Profile can live in core 2023-09-07 07:47:01 -04:00
Mike Williams
3cd25f0045 PCB: add ratsnest to search pane
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15338
2023-08-17 10:25:40 -04:00
Jeff Young
5bf257cdf6 Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153
2023-07-08 22:50:22 +01:00
Jeff Young
08a9d4b26f ADDED preference for ratsnest thickness.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14708
2023-05-21 00:07:08 +01:00
Jeff Young
80aef37cc4 Don't consider shorted items when opitmizing ratsnest.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715
2023-05-20 22:54:44 +01:00
Jeff Young
b76ef8c7e2 Multi-threading safety.
(Possible fix for KICAD-74.)
2023-04-16 15:36:21 +01:00
Jeff Young
2793bb1d68 Performance. 2023-04-16 15:36:21 +01:00
Jeff Young
26c14271f2 Formatting and warnings cleanup. (No functional changes.) 2023-04-16 15:36:21 +01:00
Jeff Young
e60837ec95 Defenses in depth for ratsnest drawing. 2023-03-14 11:53:16 +00:00
Alex
e03a91c9c7 Reduce static ratsnest opacity when moving items; tweak colors. 2022-12-07 21:01:56 +03:00
Jeff Young
19eab62516 More safety around ratsnest state.
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
2022-11-30 13:00:21 +00:00
Jeff Young
e62463b52b Don't store optimized anchors in CN_ITEMs.
It appears that multiple RN_NETs can refer to the same CN_ITEMs meaning
that we run into threading problems if we modify the CN_ITEM.

Fixes https://gitlab.com/kicad/code/kicad/issues/12968
2022-11-23 00:46:06 +00:00
Jeff Young
50089ce558 Fix errors in handling of std::shared_ptrs.
We can't reset to a pointer owned by another std::shared_ptr.
2022-11-22 13:14:00 +00:00
Jeff Young
226529235c Mostly const safety, but also performance opt. by avoiding shared_ptr overhead. 2022-11-22 12:21:30 +00:00
Jeff Young
11130bfd88 Backing out earlier fix in favour of fixing std::shared_ptr usage.
Assigning to a reference to a std::shared_ptr does not update the
reference to a different std::shared_ptr; it changes what the
std::shared_ptr points to.

Fixes https://gitlab.com/kicad/code/kicad/issues/12968
2022-11-21 21:56:17 +00:00
Jeff Young
106508f266 Split ratsnest optimization into separate parallel threads.
Fixes https://gitlab.com/kicad/code/kicad/issues/12968
2022-11-21 18:50:44 +00:00
Alex
2577ebb94d Increase dynamic ratsnest opacity for better visibility. 2022-10-07 21:50:12 +00:00
Seth Hillbrand
87171f53c7 Speedup dynamic ratsnest
Removes some unneeded calculations and threads the remaining.

Threading was previously removed to avoid overhead issues with small
boards.  This is no longer needed with the thread pool implementation

Fixes https://gitlab.com/kicad/code/kicad/issues/12131
2022-10-04 17:06:45 -07:00
Jeff Young
f095453d3e Optimize ratsnest line endings for zones. 2022-09-30 19:04:54 +00:00
Jeff Young
d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Alex
dc07ab9df1 Replace PROF_COUNTER with PROF_TIMER in some conditional places. 2022-09-27 14:07:47 +00:00
Jeff Young
c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Tomasz Wlostowski
b6fc96c1d5 pcbnew: check for null SETTINGS in RATSNEST_VIEW_ITEM (prevents crash in the P&S debug tool) 2022-03-03 01:02:00 +01:00
Jeff Young
c4e133fdf7 Auto reduction and std::shared_ptr cover types reduction.
And a performance optimization or two resulting from above.  (Using
const& intead of copying std::shared_ptrs.)
2022-02-13 12:04:03 +00:00
Marek Roszko
c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young
5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young
b4c5e64db2 Exclusions for Unconnected Items; Markers & exclusions for Parity checks
Fixes https://gitlab.com/kicad/code/kicad/issues/5589

Fixes https://gitlab.com/kicad/code/kicad/issues/5504
2021-12-24 21:10:28 +00:00
Jeff Young
9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Seth Hillbrand
fbdb2bd91f Fix broken refactor from 0e65fe5
'auto' here was utilizing a copy constructor to avoid assigning a new
value to the underlying shared pointer
2021-12-07 12:38:05 -08:00
Jeff Young
0e65fe5d8d Coding standards and commenting. 2021-12-01 23:15:37 +00:00
Jeff Young
f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Jeff Young
096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00