Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.
Add updating of teardrops on BOARD_COMMIT::Push().
Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
In particular, when a CN_ITEM is freed set all its anchor's
item pointers to NULL. (The anchors have a separate
lifecycle due to being std::shared_ptrs.)
Hopefully fixes Sentry KICAD-KV.
When drawing the ratsnest, we need to be careful to avoid accessing
CONN_ITEMs that have been changed by the underlying model. Checking for
dirty items instead of valid items will prevent us looking at data that
are out of date
Fixes https://gitlab.com/kicad/code/kicad/issues/14265
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
1) Drop tiny islands which might cause connection problems.
2) Cleanup some dead code in filler
3) Don't estabilish a connection to an island that is fully covered
by whatever its connecting to.
Fixes https://gitlab.com/kicad/code/kicad/issues/11036
1) Generate SHAPE_POLY_SET triangulation by outline so they can be
shared between connectivity system and other clients.
2) Don't add items to connectivity when reading board; we're going
to do a total rebuild anyway.
3) Use multithreading when caching triangulation.
CHANGED: when pad net assignments are changed in a conflicting way (i.e.,
tracks exist that short out more than one net after the change,
track nets will be updated to the net with the most pads).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7929
The last remaining threaded operation in dynamic ratsnest was the
recalculation of the dynamic connectivity map. Because we do not
require any of the extra features of the connectivity map, we can get
away with a lightweight move of the anchors to update the ratsnest. The
resulting connectivity tree is not valid but it is not needed for the
ratsnest, which only needs a list of nets/anchors.
Connecting zone-to-zone, we need to allow for the stroke-width in
old-style polygons.
Also, speed up the calculation by skipping zone points that do not fall
inside the matching BBox
Fixes https://gitlab.com/kicad/code/kicad/issues/5043
Intrusive lists made the connectivity search not thread-safe. Using
iterators for item deletion provides the same order performance while
keeping the container thread-localized
- 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.
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
The no-connect net (0) should never drive the net of a cluster.
Otherwise, tracks connecting between unconnected pads and connected pads
can acquire net 0 incorrectly.
Rather than duplicating the connectivity calculations in determining
whether a track is dangling, we utilize the current database to find the
number of connected items for an anchor item when feasible.
Multiple anchors such as tracks still need additional logic.
Fixes: lp:1805479
* https://bugs.launchpad.net/kicad/+bug/1805479
Locks protect the std::set in each item. Devolving the mutex to the
CN_ITEM allows multiple threads to make simultaneous connections to
different items where they do not conflict.