This isn't a major hotspot, but Flip does show up a little on
a profile of board loading, so it not nothing, and it's quite
easy to maintain the existing geometry here.
Also maintains the hull on rotation.
And add some tests around the courtyard and hull class invariants.
There are some headers which don't need to include pad.h (which brings
padstack.h) - they just need forward defines.
While pad.h is not an especially heavy include on the scale of things,
footprint is quite heavy. And both reduce inclusion load and
reduce the number of files needlessly sensitive to changes in headers.
7b7fc35c9c moved Library Link, Library Description, Keywords, and
Component Class property registrations from FOOTPRINT_DESC to
PCB_PROPERTIES_PANEL::rebuildProperties() for display ordering.
rebuildProperties() only runs in the GUI so these properties
were not being registered in non GUI QA tests
This commit moves them back to FOOTPRINT_DESC
The Value property remains in rebuildProperties() for variant support
The Allegro importer can produce out-of-range layer values
when non-ETCH layer classes share the copper layer list
pointer but have subclass indices beyond the copper layer
count. Add a bounds check in GetLayer() so these fall
through to the custom layer mapping instead of feeding
large values into getNthCopperLayer(). Also guard the
LSET::test() calls in FOOTPRINT against invalid layers
to prevent the dynamic_bitset assertion failure that
caused the crash.
This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.
Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
The item-by-id cache was not being updated when footprint children
were added, removed, or replaced. This caused stale cache entries
pointing to freed memory and missing entries requiring slow linear
search fallback.
Add CacheItemById and UncacheItemById methods to BOARD. Update
FOOTPRINT::Add and FOOTPRINT::Remove to call these when the footprint
is on a board. Fix the footprint properties dialog, Deserialize, and
assignment operators to uncache items before deleting them.
Also remove the spurious m_itemByIdCache check from IncrementTimeStamp
since this cache is managed by Add/Remove operations and should not be
cleared on timestamp increment.
Tree adapters now call GetFootprints() directly instead of going through
GFootprintList and its cache file. FOOTPRINT implements LIB_TREE_ITEM so
footprint objects work directly in library tree displays similar to
LIB_SYMBOL.
Removed cache read/write calls from files.cpp, footprint_edit_frame.cpp,
and pcb_base_edit_frame.cpp. The footprint chooser uses AsyncLoad() and
BlockUntilLoaded() to ensure libraries are ready before building trees.
GFootprintList still exists for cvpcb and eeschema cross-module access
via KIWAY, but no longer reads or writes cache files.
- Make arc_tolerance_factor arrays thread_local in SHAPE_POLY_SET::inflate2
and inflateLine2 to avoid races during parallel zone filling.
- Remove redundant m_maxError assignment in ZONE_FILLER::fillCopperZone
since it's already initialized in the constructor. This prevents multiple
threads from writing to the member variable concurrently.
- Add mutex protection to FOOTPRINT::GetBoundingBox to synchronize cache
access when multiple threads compute bounding boxes concurrently.
Two things were happening here
1. The FOOTPRINT copy constructor and assignment operators did not copy
the static component class from the source footprint. So when the undo
system created copies of footprints, the component class information was lost.
2. When only the component class changed (no other footprint parameters), the
change was not recorded in the commit and could be lost.
This change adds the component class info to the copy operation, tracks
it in COMMIT and updates footprins without component classes to 'none'
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21101
We had some copy/pasta in the points group and lost dangling pointers
from a move operation. Potentially a cause of heap corruption
Also set the parser to skip null fields on load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22623
When nothing is selected in the footprint and symbol editors, we show
the properties of the footprint and symbol, allowing easy access to
their properties
1) Always be explicit about what the delimiters are
2) If space is a delimiter, we probably want to skip
empty fields (wxTOKEN_STRTOK)
3) If space is not a delimiter, we often need to
trim the resultant tokens
4) Be more lenient about \t\r\n (and when they are
included, include them in the same order)
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.
Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.
They also have a layer, which allows them to be selected and
made visible according to layer filters.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691
Currently all texts on the same layer do not sort stably in the file
format. Add sorting criteria to sort by position, angle, size
and so on and finally by string.
Footprints can now have a custom stackup. This means that they specify
an exact number of copper layers and the layers map 1:1 to board layers.
If the board doesn't contain that layer, the element just doesn't
show. We could make this a DRC check later on.
If there is no stackup, the behavior is the current default: a rule area
the In1 layer "expands" to all Inner layers.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10838