Commit Graph

16 Commits

Author SHA1 Message Date
Jeff Young aedc624340 Add DRC checks for dangling vias and tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/1999
2020-05-14 22:02:47 +01:00
Oleg Endo 4c7471eb79 add more constness to connecivity algo
also make ForEachAnchor inlineable, like ForEachItem.
remove some unused function declarations.
2020-04-21 13:23:56 +00:00
Oleg Endo 3de5b98316 improve performance of CONNECTIVITY_DATA::GetNetItems
- CN_CONNECTIVITY_ALGO::ForEachItem
move implementation to header, so that a lambda can be inlined by the
compiler.  improves iteration performance x2

- CN_ITEM::Net
move implementation to header, so that it can be inlined by the
compiler.

- CONNECTIVITY_DATA::GetNetItems
don't use std::set to filter out duplicates.  use std::unique on sorted
vector.  use a bitset to perform type check.
2020-04-21 13:23:56 +00:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Jon Evans 52a9e68093 Store items changed by connectivity algorithm in undo list
Fixes: lp:1828442
* https://bugs.launchpad.net/kicad/+bug/1828442

(cherry picked from commit fb80ee5a0e)
2019-05-24 21:56:37 -04:00
Seth Hillbrand 5182fe15d3 Minor code formatting 2019-01-17 19:17:34 -08:00
Tomasz Włostowski 9657039af2 pcbnew: multiple fixes concerning track->pad net propagation used by Track/Via properties dialog:
- Added ignore netcode option to CONNECTIVITY_DATA::GetConnectedItems()
- PlaceModule() now ensures the module added to the board (and thus to the connectivity database) has correct bounding box necessary for R-trees to work
- Use recursive connected pad search so that the new net is propagated to all pads

Fixes: lp:1787961
* https://bugs.launchpad.net/kicad/+bug/1787961
2019-01-18 02:53:29 +01:00
Seth Hillbrand ed1c8eee9e async: Ensure threads are started async
It is possible for an async thread to simply be deferred if not
specifically set to async.  In which case, until the return value is
requested, the loop may simply wait.
2018-10-26 22:30:06 -07:00
Seth Hillbrand 2d8f1df293 Threading: Minimize thread usage
This minimizes the thread usage, particularly during online actions such
as moving items and routing.

UpdateRatsnest:  Minimized the number of atomics by utilizing future
promise.  Avoided updating node-less nets.  Node-less nets are common in
the dynamic ratsnest because the net vector is created from the board
nets by value but only populated with a subset.  So the dynamic ratsnest
calculation always saw every net as dirty and spun up extra threads.

searchConnections: ParallelThreadCount is no longer lower bounded.
Small item counts are handled inline rather than with a separate thread.
2018-10-25 14:19:43 -07:00
Seth Hillbrand a0e4e23c14 Ratsnest: Keep connectivity data local
The dynamic ratsnest did not need to have a smart pointer to the
temporary connectivity data.
2018-10-24 13:43:09 -07:00
Seth Hillbrand ec38a5cd10 Threading: Replacing sleep with yield for active wait
Some windows machines seem prone to sleeping for excessive times.  When
called in the main thread, this may prevent the system from responding
to Windows 'Are you alive?' calls.
2018-10-24 10:37:25 -07:00
jean-pierre charras 0f247264f8 Pcbnew: DRC ignores first net of list of nets to test.
Fixes: lp:1798985
https://bugs.launchpad.net/kicad/+bug/1798985
2018-10-21 17:01:58 +02:00
Seth Hillbrand e1f30a3b38 pcbnew: Fix single-net connectivity
Ensure that changes affecting fewer than 4 nets still get updates in the
ratsnest.
2018-10-18 17:11:58 -07:00
Seth Hillbrand 38c5b025c8 Ratsnest: iterate only over dirty nets
Rather than forcing each thread to iterate over the full nets list to
find the dirty items, we collect the dirty items first before asking the
threads to address them.  This prevents thread spinning.  We also
amortize the cost of calculating on an 8-net per thread basis rather
than 2.
2018-10-17 17:07:29 -07:00
Seth Hillbrand 4460313104 pcbnew: Separating connectivity to subdir 2018-10-12 16:31:09 -07:00
Renamed from pcbnew/connectivity_data.cpp (Browse further)