Changes architecture of importer to use SHAPE_LINE_CHAIN.
For now lets just load symbol shapes like this, but we could update code
for all other loading operations (also in PCB).
FIxes https://gitlab.com/kicad/code/kicad/-/issues/8060
Eagle schematics do not show the value field when it's not defined or
when not package (footprint) is defined for the symbol which is the
case for power symbols. Don't show the value field in KiCad to bring
the view more in line with what Eagle displays.
Inspired by Stefan's merge request #13433.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13433
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic. This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic. This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues. This bug does not apply when opening
the full project.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11076
This is a special field, always existing, that cannot be handled like other fields.
Also avoid using translated names when initializing the field name.
Translated names can be used only in UI, not in internal data.
fixes#13113fixes#13125
Shared schematics can have a root sheet instance when opened with the
schematic editor in stand alone mode. This would cause a crash when
opening the shared schematic in a project where it was shared because
the root instance was trying to be saved in the normal sheet instance
data which is not valid.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13102
The crash was caused by an unhandled exception. The uncaught exception
caused a cacophony of null configuration setting pointers so guards were
added to prevent crashes should other exceptions occur that do not get
handled correctly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13046
... to netclass flags. They're now directive labels and the netclass
field isn't auto-added anymore. However, we *do* auto-add an intersheet
refs field, and that's required.
While we never allow the creation of mirrored text elements in the
schematic and symbol library editors, external generation of symbols may
cause the property to be set, which can then never be changed. This
leaves the property unset for all elements
Fixes https://gitlab.com/kicad/code/kicad/issues/13007
This will make it possible to maintain sheet instance information when
copying and pasting from any sheet other that the root sheet of a
project.
Setting and getting sheet page numbers must now be performed using a
sheet path. This was done to ensure that the instance paths were not
getting changed unexpectedly from different code paths.
This fix makes some fundamental changes to the way symbols are rescued:
* The new symbol library file format is used when rescuing symbols defined
in the symbol library table.
* The original library nickname is appended to the symbol name rather than
the rescue library nickname when rescuing symbol defined in the symbol
library table.
* Escaping strings has been removed from legacy library rescues since the
legacy library file format never supported it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12525
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12624
This change reverts the storage of all symbol instance data in the root
schematic. This was done because it's not possible to reuse instance
data when importing from sub-sheets.
There has been a fundamental change in how sheet paths are store in the
instance data. The root schematic UUID is always used when saving the
instance data. To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project. This provides a way
to determine the project that stored the instance data. All uses of paths
without root sheet have been expunged from the code.
The sheet instance data is still saved only in the root sheet for the
time being. New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number. Sheet page
numbers will not be imported.
Added project name to instance data to improve the readability of the
schematic file format. It also creates an opportunity to remove orphaned
instance data by project name rather than cryptic UUIDs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
ID was not maintained or used other than to ensure unique fields.
Instead of saving, we assign the known IDs to specific field names and
sequentially create new IDs on load
Fixes https://gitlab.com/kicad/code/kicad/issues/12390
This improves the readability of the schematic file format and creates
an opportunity to remove orphaned instance data by project name rather
than cryptic UUIDs.
This change reverts the storage of all symbol instance data in the root
schematic. This was done because it's not possible to reuse instance
data when importing from sub-sheets.
There has been a fundamental change in how sheet paths are store in the
instance data. The root schematic UUID is always used when saving the
instance data. To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project. This provides a way
to determine the project that stored the instance data. All uses of paths
without root sheet have been expunged from the code.
The sheet instance data is still saved only in the root sheet for the
time being. New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number. Sheet page
numbers will not be imported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
This is mostly to output the aliases sorted (for ease of VCS integration),
but also because a btree will be faster than hashing on a small dataset.
Fixes https://gitlab.com/kicad/code/kicad/issues/11890
CHANGED: Symbol chooser search now considers custom symbol fields
Visible columns can be controlled in database libraries.
In standard KiCad libraries, we show columns for all custom fields for now.
Customizable column visibility will be added in the future.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11946
Since single-row queries are performed rapid-fire during certain actions like
stepping through the symbol browser, there is high value in caching them for
a small amount of time. The default cache parameters will keep results for
10 seconds, which errs on the side of getting fresh data from the database
on most user interactions.
Since EDA_TEXT is a base class, we can just force the child classes to pass the correct iu scaled size
ALLOW_BOLD_THICKNESS removed because it's a pre-custom font holdover
Sub-libraries allow a single-level hierarchy inside a symbol library.
This is useful for database libraries and for supporting other EDA library types where a
single file can contain multiple logical groupings of symbols.
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
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
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
The fractional part of Altium schematic units is an integer number of
1/10000 mil segments, which is 2.54 nm. The internal unit of eeschema
is 10 nm, so each fractional unit in Altium is 0.254 base eeschema
units. To be consistent with
cf33cfcad1
we round to the nearest 10nm for each element
Fixes https://gitlab.com/kicad/code/kicad/issues/11742
The original decision to escape the legacy symbol library names results
in them being escaped every time they are opened which cause the curly
braces '}' from the original escaping to be escaped on subsequent
openings. This resulted in the symbol library names in the rescue
library not matching the library ID in the schematic.
This fix is likely to have other corner case bugs given the potential
for escaped characters in legacy symbol libraries. Given that we now
have escaped rescue libraries in play, removing the escaping will only
result in more issues so we will have to fix the corner cases as we go.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11563
Prior to fixing the schematic file change churn do to instance data
changing to the last selected sheet instance, the symbol instance data
was set rather than empty. This change allows for users to set the
default instance data which is used for every new instance of the
schematic.
ADDED: Default schematic symbol instance data (unit and reference, value,
and footprint fields) can be set to be used as the default settings
for all new instances of the schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11113