Added Distance(VECTOR2) function that returns a double. Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints
Also extended the size for arc calculations that get distances to center
points to avoid overflow
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped. The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
This does 3 things:
1) Removes unused zone layers on load
2) Does not save unused zone layers
3) Removes unused zone layers from connectivity calculation
(1) Prevents existing boards from using unused zone layers for any
connectivity or rendering. (2) Updates the contents of boards with
removed zone layers to prevent them from propagating. (3) updates the
connectivity while running pcbnew and removing a zone layer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17288
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.
Also reverts part of the change to always use polygons for PNS::SOLIDs. A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.
Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14781
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
When adding new data, we may have differing sizes of the dynamic
ratsnest and our local copy, so ensure that we are only referencing
elements that exist in both
This makes it clearer that the overrides are not inverses of each
other -- one overrides the flashing state and the other overrides
the connection state (to other zones, not to everything).
Also fixes a bug where we were failing to check the force-no-connect
for pads.
Internal routines have no need for locking the mutex they already own.
While external routines that want to recalculate the Ratsnest do need an
exclusive lock before being allowed access
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
We call 'RecalculateRatsnest' in multiple locations, this will
invalidate various pointers needed by VIEW::Redraw(). When this is
called through the normal connectivity routines, we have the mutex
locked to prevent conflict but we've added more locations that update
just the Ratsnest. The std::adopt_lock should take over the existing
lock when needed
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
Make sure that the connectivity has successfully completed before
attempting to merge segments. Also avoids reaching into the shared_ptr
if we don't need to
Fixes https://gitlab.com/kicad/code/kicad/issues/13639
(And doing so randomly as if the closer endpoint to the zone center
was the one without a pad then it would get marked as good, while if
it was the other way around we'd notch 2 connections for the pad end
and none for the other end.)
Fixes https://gitlab.com/kicad/code/kicad/issues/13420
Fixes an issue with `wait_for_tasks()` and adds a lower-overhead
`push_loop` helper. We replace our usage of `parallelize_loop` with
`push_loop` as we didn't use the multi-future vector return and don't
need the extra overhead.
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) The highest priority zone that a via/pad collides with "owns" its
connectivity state. Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.
2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.
3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.
4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).
Fixes https://gitlab.com/kicad/code/kicad/issues/11299