The basic problem is that the DRC engine does length testing and skew
testing by collecting all the diff pair constituent parts and pairing them
itself. Since each part is collected on its own, we need to ignore the
'B' unit when evaluating any conditional expressions. However, doing this
in general means that when evaluating "OwnClearance()" we also ignore the
'B' unit and return the diff pair CLEARANCE_CONSTRAINT when we shouldn't.
This implements a more discerning test which know what the current requested
constraint is when evaluating expressions.
See also https://forum.kicad.info/t/solved-custom-differencing-rule-not-working-drc/34034/6
Fixes https://gitlab.com/kicad/code/kicad/issues/11314
(cherry picked from commit f7cdc7af75)
This avoids a warning about its non-virtual destructor during deletion, as
polymorphic classes are expected to be deleteable through any pointer.
Possibly not entirely correct -- might be problematic if UCODE objects are
deleted through a base pointer.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables