This change allows for infinite inheritance depth so internally there is
no limit to deriving library symbols from other derived symbols. Please
note that the Flatten() method now recurses until a symbol with no parent
is found. The user interface is not hooked up at this time.
Aliases in bus resolution were being resolved without a path, making
them effectively global nets. This applies the corrected path to the
bus members and adds a QA to catch this error
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
The propagation is currently (maybe not needed) limited to the global
name that is the source of the change. We also need to propagate the
global name that is changed in case the global is set in a tree leaf and
not the root
Fixes https://gitlab.com/kicad/code/kicad/issues/14657
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.
There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.
Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
Adds QA checks to copper sliver tests. Adds the following checks:
- Dot product between two arms (quickly avoids checks for >90°)
- Checks the sliver is convex (area test)
- Eliminates minor slivers with angles that are approximately 0 and ones
with the opposite side width beneath a configurable level
- Updates Clipper2 to fix a couple of jagged edges on inflate
- Adds simplify during zone fill inflation to limit jaggies
Fixes https://gitlab.com/kicad/code/kicad/issues/14549
Settings loading needs to account for potential chaining, so each
instance should be created before being Load()ed. Additionally, add the
settings loading to QA
This method shadows the C++ method, and doesn't properly handle updating
the duplicated object's KIID to be unique.
Also add tests to ensure the KIIDs are unique after duplication.
Fixes https://gitlab.com/kicad/code/kicad/issues/14460
About 1/3 of callers to Parent() don't care if they get the immediate
parent or not, about 1/3 want only the immediate parent, and about 1/3
want the hole parent's Parent().
I had earlier changed PNS::ITEM::HOLE to override Parent() and return
the hole parent's Parent(), but since the callers are pretty evenly
split I've reverted that and added BoardItem() for callers who want the
eventual BOARD_ITEM (whether a direct parent or a grandparent).
(Also removes a dead routine so I didn't have to figure out which of
the two it wanted....)
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace
Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
Previously, bus elements that were not instantiated as individual nets
could not connect to each other. This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names. Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
this patch or by individually instantiating each bus element as a
local label
Fixes https://gitlab.com/kicad/code/kicad/issues/14300
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
Substantial elements following a divot should be at least as far in each
cardinal direction from the origin point in order to be considered
substantial. This catches cases where the "substantial" element is
actually a straight segment away from the divot
Fixes https://gitlab.com/kicad/code/kicad/issues/14130
Also fixes a bug where all VDMOS instance parameters weren't marked as
instance parameters.
Also fixes a bug where VDMOS thermal models weren't supported (they
have two extra pins: Tj and Tcase).
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
* Add Boost::locale explicetly to the CMake since nanoodbc requires it
* Don't let nanoodbc add all Boost libraries to the link line, since it
is used in common, and it was pulling the unit test framework into
common then.
It fixes a link issue on W10/msys2 when building some .exe files
not related to QA tests, but have the unit_test_framework library linked
without this change..
Our minimum C++ version is C++17, which has std::filesystem, so ditch
the boost dependency and use the standard library instead. (this only
affects temp file creation in the QA suite anyway).
Fractured polygons are always fractured along the x-axis, so when
checking to see if a segment is a fracture point, we check if the y
coordinate is equal. This avoids situations where there are multiple
fracture points between two inflection points
Additionally, we add a second check to ensure we don't hit spurious
blobs (all kinks should be symmetric and therefore be substantial in
each direction)
Fixes https://gitlab.com/kicad/code/kicad/issues/14130
While convoluted, this model matches as best we have found so far, the
alignment with scintilla. The spacing is character size for N-1 of the
characters in the 4-space tab stops. The final character is sized for
the actual space character in the stroke font (0.761905)
Fixes https://gitlab.com/kicad/code/kicad/issues/13791
Fixes#12580
Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.
Adds testing of pin types to netlist QA unit tests.
Some classes had been originally designed to be usable separate from wx,
but over time our uses of the classes have become entertwined with wx
features (e.g. colors), and various changes have also leaked wx into the
classes unguarded. So just remove the option to hide wx in those classes
to simplify the code.
Fixes#10926
Contains the following changes:
- Adds a new ERC_SCH_PIN_CONTEXT class which is used to provide deterministic
comparison between items causing ERC violations (e.g. pins) when associated
with a SCH_SHEET_PATH context.
- Adds association of SCH_SHEET_PATHs for ERC_ITEMs and the sub-schematic items
which caused an ERC violation. This allows correct display of markers on the
sheets of interest only, and allows correct naming resolution and cross-probing
from the ERC dialog.
- Adds a new ERC_TREE_MODEL class, derived from RC_TREE_MODEL, which correctly
resolves component references across heirarchical sheets using the associated
SCH_SHEET_PATHs. This allows sheet-specific component references to be displayed
correctly in the ERC results tree.
- Updates SCH_MARKER to only draw sheet-specific markers on the sheet causing
an ERC violation.
- Increments the schematic file version.
- When loading a schematic with legacy ERC exclusions, discards those of type
ERCE_PIN_TO_PIN_WARNING, ERCE_PIN_TO_PIN_ERROR, ERCE_HIERACHICAL_LABEL, and
ERCE_DIFFERENT_UNIT_NET as there is no safe way to automatically infer the
information which is now stored with these exclusions (sheet paths for error
location and related items). Requiring users to (once) re-add exclusions is
preferable to silently incorrectly matching new ERC issues to legacy exclusions.
When the designer asks to reset annotations, we reset all annotations
including power symbols. This may create additional churn in the files
but only when requested and is useful to fix schematic errors
Fixes https://gitlab.com/kicad/code/kicad/issues/13138
This iterated over all pins to find the pin after a given item. Because
out pattern is consistently to iterate in the outer loop, this means
that we were an O(n^2) loop for the pins just to find their names. This
affected very large parts (e.g. FPGAs) when switching sheets to display
Same pin name != same net name unless the pins are explicitly connected
Also add pin number to all unconnected pads ensuring they have unique
nets
Fixes https://gitlab.com/kicad/code/kicad/issues/13236
This moves some stuff to REPORTER APIs. Moving more stuff would be good,
but it probably too high-risk at present. We'll wait for 8.0 for that....
Fixes https://gitlab.com/kicad/code/kicad/issues/13359
1) if a legacy model references a library then we need to see if said
libraray exists and read model from it if so
2) legacy node ordering is by index, not pin name
3) we can't auto-generate a pin map when we don't know the pin names,
so don't try
Also moves passive RLC inference out from migration to just-in-time
creation for the simulator or netlisting.
Also fixes a version guard mismatch because the spice migration was
done inside UpdateSymbolInstances (which has its own version guard).
Also changed UpdateSymbolInstances to UpdateSymbolInstanceData so
someone else in the future doesn't think it's a general-purpose symbol
instance updater.
Other changes:
- store all router settings (ROUTING_SETTINGS) in the debug dump in a separate JSON file
- store router mode (single/diff/tune) in the event log file
- factor out the regression test player and the graphical log/debug tool into separate main files
- bring CONSOLE_LOG and CONSOLE_MSG_REPORTER to the common test headers