Pass the current SCHEMATIC object pointer in SCH_SYMBOL ctor so that
newly created symbols will update the current instance data on creation
when the current sheet instance is being displayed.
This is a better fix for the master branch and cherry-picking from 6.0
was a mess.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
The hash table for integer hashes is extremely limited and places most
elements in the same buckets. This leads to a linear search time for
structures built on this.
This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
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
Only pins from the current symbol part were used: the rest was
incorrectly set to Not Connected.
Also slightly change generation of names for Not Connected nets.
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
This change removes the incorrect assumption that symbol pin numbers are
integers and are the same as indexes in the vector storing the symbol
pins.
"~" is now used to denote a floating sim model pin.
The commit bumps the schematic file format version in order to fix the
initial symbol default instance data to the first instance of each symbol.
It also sets the initial instance data to undefined in the SCH_SYMBOL
ctor so on the first schematic save, the default instance will be set
to the first instance of the symbol.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
There is no technical reason for this restriction for non-power symbols, so let's remove it.
This will allow more flexibility and compatibility with other tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9389
The legacy and s-expression (prior to version 20200828) file formats only
supported symbol unit and reference fields so the newly added value and
footprint fields must be updated from the original symbol fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12226
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize(). This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.
When changing units, we might not have the original pins
available to set the Alt assignments. Instead, we search
by number and skip the pin if it doesn't exist in the
new unit
Fixes https://gitlab.com/kicad/code/kicad/issues/12218
ba7a06f5 tried to fix a (minor) issue in net names when the name was coming
from a input power pin having a '/' in name. But ba7a06f5 blindly escaped any '/'
in net name, and the hierarchy info was lost.
Now only the pin name is escaped (like any other pin name used in net names)
Unconnected items and schematic partity violations are also now
represented by markers, so the ERC/DRC window itself needs to do
the deep-delete.
Fixes https://gitlab.com/kicad/code/kicad/issues/12182
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference
Fixes https://gitlab.com/kicad/code/kicad/issues/12130
Template instantiations need to follow the template definitions or you
don't get all of the template members, just the ones called from within
the file
On msys2, this file (mainly a large amount of data) compiled in debug mode
crashes Eeschema at start (issue probably related to a memory issue).
On msys2, binaries built in debug are always *very* large
Removes the need for the "KiCad" workaround where stacked pins need
to be "Passive" type. Pins that have the same parent symbol, name,
position and type are considered to be the same output and do not
trigger ERC errors
Fixes https://gitlab.com/kicad/code/kicad/issues/5367
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.
Implement parsing and loading Spice libraries into KiCad. This is done
without any involvement of Ngspice -- we create our own in-tree parser
using PEGTL -- because Ngspice doesn't offer any intermediate output we
could plug ourselves into. We don't parse everything -- just the library
content, so this won't be that much effort.
We implement some basic Spice code preview to give the user a hint what
Spice code eir model will correspond to.
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.
With that also begin reworking the internal structure of the simulation
model storage. Some models have parameter information extracted from
Ngspice, which was specially patched to faciliate that. The model is
stored and managed by the SPICE_MODEL class (later will be renamed to
SIM_MODEL).
SCH_SYMBOL::Unit() is updated when the symbol is on the screen, we need
to get the instance unit so it's right even if it's not being displayed /
has never been displayed.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12050
Placing a symbol from symbol editor starts the TwoClickPlace in a
different context. We need to prevent multiple contexts of the same
tool
Fixes https://gitlab.com/kicad/code/kicad/issues/11891
Pins that are explicitly connected in the schematic should not have an
"unconnected pin" ERC error. But stacked pins do not count as
explicitly connected because the schematic designer has not connected
them
(cherry picked from commit 865bb54591)
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.
Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame. This allow
for the cleanup actions onClose() to happen prior to the next action
starting
Fixes https://gitlab.com/kicad/code/kicad/issues/11891
U1 and u1 are allowed but if they both exist in the same schematic, they
will throw an ERC and annotation error. Reannotating will make them U1
and u2.
Fixes https://gitlab.com/kicad/code/kicad/issues/11862