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
Follow-up after the KIBIS and KIBIS GUI merge requests.
- Move KIBIS from Pcbnew to Eeschema space,
- Make KIBIS obtain the Ku/Kd coefficients via the `SPICE_SIMULATOR` class instead of calling the `ngspice` executable via `system()`,
- Allow to toggle between differential and single-ended model in the GUI,
- Various GUI fixes and improvements.
Currently this lives behind the advanced config flag `UseClipper2`.
Enabling this flag will route all Clipper-based calls through the
Clipper2 library instead of the older Clipper. The changes should be
mostly transparent.
Of note, Clipper2 does not utilize the `STRICTLY_SIMPLE` flag because
clipper1 did not actually guarantee a strictly simple polygon.
Currently we ignore this flag but we may decide to run strictly-simple
operations through a second NULL union to simplify the results as much
as possible.
Additionally, the inflation options are slightly different. We cannot
choose the fallback miter. The fallback miter is always square. This
only affects the CHAMFER_ACUTE_CORNERS option in inflate, which does not
appear to be used.
Lastly, we currently utilize the 64-bit integer coordinates for
calculations. This appears to still be faster than 32-bit calculations
in Clipper1 on a modern x86 system. This may not be the case for older
systems, particularly 32-bit systems.
Parallel builds sometimes fail with the following error:
eeschema/sch_plugins/kicad/sch_sexpr_parser.h:36:10: fatal error: schematic_lexer.h: No such file or directory
This can be reproduced by running the following in an empty build
subdirectory:
cmake .. -G Ninja -DWHATEVER_IS_NEEDED...
ninja qa/schematic_utils/libqa_schematic_utils.a
We fix this by adding explicit dependency between qa_schematic_utils
and eeschema_kiface_objects, which builds schematic_lexer.h.
pad of a given number.
Also improves other DRC logic to tighten up the net-tie rules now that
we know which pads are allowed to short with which other pads.
Also removes the "Overlapping pads" DRC violation now that we know
whether or not overlapping pads in a net-tie footprint constitute a
short.
Fixes https://gitlab.com/kicad/code/kicad/issues/12506
turtlemocks doesn't seem to provide a way to annotate that these methods
override a base class method, so it triggers a lot of warnings about
missing override when the classes are instantiated.
When the via is first and not second in our ordering, the hole-copper
clearance was not checked as the track did not have a hole.
We also calculated the NPTH-via clearance incorrectly in the inspector
All labels need to be attached to a net that has at least 2 pins in
order for this to be a valid net. To check for the existing pins, we
need to interate over all subgraphs in the net, counting pins
- Fix parsing .model lines with model names containingnon-alphanumeric
characters like - and _,
- Fix parsing libraries in which EOF is not preceded by a newline.
Fixes https://gitlab.com/kicad/code/kicad/issues/12394
Allows placing parts from an external database that reference symbols from another loaded library.
Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436
Tested on msys2 which is the only place it would have been buggy
CMake seems to share the gdiplus linkage with the other dependencies automatically now
When wxAny holds an enum, it cannot be compared with an integer due to a
missing conversion function. In such case, conditional properties
compare a raw value rather than wxAny.
Introduces classes:
- INSPECTED: base class for types taking advantage of
generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
We just want to make sure our netlist exporter works. Being
deterministic is the simulator's job, not ours, though perhaps we should
investigate that too eventually.
`linearize` command resamples the data. Fourth and further digits from
decimal point are cut off by using `wrdata` command instead of `write`.
Oddly, "sources" unit test is not working (so it's still uncommented) --
some substantially different values are generated when generating the
reference with standalone Ngspice.
Unfortunately, Windows headers define a lot of macros for common words,
so we had to rename some enums to not collide.
We also fix some of the many bugs related to the new simulation
architecture and the Spice Model Editor dialog.
- Tab-switching,
- Automatic expansion of categories on tab-switch,
- Various minor simulation improvements,
- Various new simulation-related bugfixes.
Don't serialize parameters in certain models for default values. Infer
models from Value field for some kinds of models. Resolve synonyms when
loading models from Spice libraries.
Rewrite the spice exporter to work with the new simulation model
architecture and data model, with many bugfixes related to the latter
two along the way.
Implemented serialization and deserialization of models in symbol fields
through the SIM_VALUE class. We don't carry the Spice legacy of
case-insensitive suffixes, instead we conform to the SI standard (i.e. M
is Mega, not milli, P is peta, p is pico).
Parameter grid value validation is implemented by simply not allowing
any characters that will make the value invalid (instead of highlighting
the field in a red color). This will likely be changed at some point in
the future.
This commit adds parameter display functionality, via a wxPropertyGrid
widget, to the Sim Model Editor. To faciliate that, a SIM_VALUE class is
created to serialize, deserialize, and validate numeric values in the
new parameter grid.
SPICE_MODEL is renamed to SIM_MODEL and split into several subclasses
that correspond to different model kinds.
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons. These caused heap overflows when sorting pin tables
This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment. Also adds unit
tests for common error cases
Also fixes two bugs:
1) subsequent text items that are marked >NAME or >VALUE will now get
imported as text items with ${REFERENCE} or ${VALUE} (instead of overwriting
the previous text item)
2) we no longer (accidentally) capitalize all text items.
Fixes https://gitlab.com/kicad/code/kicad/issues/11321
When importing a eagle board file using wxXmlDocument, the strings in eagle BOARD
(UTF8 encoded) are correctly converted to wxString (using unicode wide chars)
So trying to reconvert these strings using FROM_UTF8( <wxString>.c_str() )
is incorrect and can break initial string if non ASCII7 chars are found
Bugs found but not fixed yet:
* Reference and Value are not converted correctly yet
* HOTFIX: test commented out
* GP3906-TLP and UBLOX_ZOE_M8-0-10 are not able to import the description again
* HOTFIX: description removed from gold file
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
SIMULATOR has now an Attach() method, which should be called
with proper SIMULATION_MODEL that should be simulated, before calling Run()
Concrete class of SIMULATION_MODEL for ngspice is NGSPICE_CIRCUIT_MODEL,
renamed from NETLIST_EXPORTER_PSPICE_SIM. DIALOG_SIM_SETTINGS relies
on above mentioned object, so it was added as an argument of the constructor.
- factored out 'business' code from the UI code
- moved to the new DEBUG_DECORATOR interface
- UI-less log file and log player classes as a step towards P&S unit tests
This is for the out-of-box experience for novice users. It is presumed
that folks with larger more complicated boards will turn it off.
Fixes https://gitlab.com/kicad/code/kicad/issues/6413
* Add test-code for pads
* Move test-code into board_test_utils.cpp for reuse, one method per object
* Add a real (rather small) Altium footprint for testing purposes
The test simply loads every footprint of a library, and compares all elements with an equivalent
KiCad footprint. This allows us to quickly spot regressions in the altium and kicad footprint importer,
and any code in-between. This test is only a demo, as the checks are still incomplete and quite a few
tests are missing.
It has to be noted that mask expansion is not supported rigt now by the altium importer, thus the
reference footprint is adjusted to keep the test happy.
Test should not be testing against the polygonization error; if done
correctly that should all be on the correct side of the shape. Use an
epsilon instead (I chose polygonization error / 10, but the value isn't
terribly important).
Fixes https://gitlab.com/kicad/code/kicad/issues/10724
- Fix duplicate class names returned by GetClass().
- replace MTEXT name (in GetClass) by better name (FP_TEXT, FP_TEXTBOX...)
- Add missing Cast_to_PCB_TEXTBOX and Cast_to_FP_TEXTBOX
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
Although pcb_base_frame.cpp is in the pcbnew source tree, it is compiled
and included in pcbcommon.lib. Because pcb_base_frame has a dependency
on pcbnew_navlib, the latter also needs to be included in pcbcommon to
avoid linkage issues.
The superfluous references to pcbnew_navlib in the qa projects have been
removed.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.
Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
Includes bug fix for catastrophic error in Add() for converting to
radians.
Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
- in python tests force the "C" locale is in use (remove wx alerts in some locales)
- disable some new DRC tests that are irrelevant in QA tests and create false positives
The main fix is for errors in SCH_TEXT and derived:
qa test expects 4 rotations is an identity transform:
This is false if the item has autoplaced fields.
The fix clears autoplaced flags.
Also includes going from distance-based neighbor exclusion to angle-
based. (Distance doesn't work when very short segments are followed
by very long ones.)
Fixes https://gitlab.com/kicad/code/kicad/issues/2512
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.
ADDED angle override for thermal relief spokes in Pad Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/4067
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.