70 Commits

Author SHA1 Message Date
Jeff Young
1e9da4684a Move properties inspector font-listing to SetChoicesFunc(). 2025-08-07 11:44:47 +01:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
bf6712d4f4 Don't attempt to convert reference image to a SHAPE_POLY_SET.
Also make sure we render table thicknesses when they're
drawn on copper layers.
2025-07-01 01:01:49 -06:00
Jeff Young
d973757f81 Don't assume a board (KICAD-KKF). 2025-06-30 11:59:08 -06:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young
7fbf51b17c Be more pedantic about RECURSE_MODE.
Also fixes an invalid iterator bug.

Also adds mirroring support for PCB_GROUPs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
2025-06-12 11:21:28 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Mike Williams
05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Jon Evans
dc9fa2e2ac More functional fix for IPC API item modifications
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20206
2025-03-28 20:27:45 -04:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jon Evans
e69a95126a Use correct API in BoardLayerSet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19395
2024-12-28 08:03:51 -05:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
JamesJCode
db072a524c Consolidation of Component Class implementation
- Moves functionality to FOOTPRINT class from BOARD_ITEM
- Renames DRC property from ComponentClass to Component_Class
- Adds DRC checks QA for A.Component_Class and a.hasComponentClass('x')
2024-10-24 20:11:35 +01:00
Denis Latyshev
260014710a Pcbnew: Add differential and single line length/skew mirroring
ADDED: Added functionality for mirroring differential and single line length, as well as skew adjustment elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/18469
2024-10-16 19:21:03 +00:00
JamesJCode
d64a112971 Implement Component Classes
- Adds Component Class field to SCH_DIRECTIVE_LABEL
- Adds SCH_SYMBOLs to SCH_RULE_AREA item lists
- SCH_SYMBOLs resolve Component Class directives
- Netlist exporter / importer handles Component Class names
- Adds DRC expressions and functions
- Adds QA check for component class netlist export
2024-10-01 22:36:18 +01:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
Jeff Young
b8819b4636 Another reduction in asserts. 2024-07-19 22:11:56 +01:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Seth Hillbrand
293075426b Clean up some LSEQ functions
We are derived from std::vector now.  We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices
2024-07-08 20:59:46 -07:00
Jeff Young
aa5a370b3a ADDED: user layer types.
This allows a user to define user layers to be front
or back (and therefore to flip with the board view).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8455
2024-07-03 13:32:44 +01:00
Alex Shvartzkop
48f6f837a1 Optimize BOARD_ITEM::GetParentFootprint.
CPU -8% when panning a board.
2024-06-20 04:25:33 +03:00
Jeff Young
8e349eedf0 Bug fixes for PCB_TABLES.
In particular, rotated tables and tables in rotated
footprints.
2024-06-19 12:39:22 +01:00
Jon Evans
256364aaa1 Parent property should not be accessible from the UI 2024-01-23 20:41:34 -05:00
Jeff Young
1df84f4d92 Move some PCB_GENERATOR special-cases to propMgr listeners. 2023-12-15 21:04:33 +00:00
Jeff Young
0ab474e596 Comments. 2023-12-15 18:02:52 +00:00
Jeff Young
4844cffc00 Make sure PCB_GENERATOR's lock status follows their members.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16372
2023-12-15 17:37:36 +00:00
Marek Roszko
22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Jeff Young
ec980e8696 Move "parent" property from PAD to BOARD_ITEM. 2023-08-18 22:20:09 +01:00
Jeff Young
5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jeff Young
cf8294b5c2 Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
Jeff Young
eb8994fde5 Disable locked in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089
2023-06-30 20:51:18 +01:00
Jeff Young
bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jeff Young
0d083d0230 AllCuMask() and AllTechMask() are static, they do NOT modify "this". 2023-02-03 15:08:31 +00:00
Jon Evans
96fe93618e Properties: Stop sorting by name
It's more useful to have properties shown in add order,
since we can group them
2022-11-25 16:29:56 -05:00
Jeff Young
0120df014e Give group the right parent when pasting.
Fixes https://gitlab.com/kicad/code/kicad/issues/12954
2022-11-20 22:52:06 +00:00
Jeff Young
03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Jon Evans
a5d685ff5c Handle coordinate transforms in properties system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12320
2022-10-31 23:01:52 -04:00
Jeff Young
d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Marek Roszko
a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Maciej Suminski
af71d42307 Renamed PROPERTY_TYPE enum names to avoid a conflict on MSYS2 2022-08-22 21:32:32 -04:00
Maciej Suminski
95fd58b25a Properties meta-data for pcbnew classes 2022-08-22 21:32:00 -04:00
Maciej Suminski
745c94b0a1 Properties (introspection)
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
2022-08-22 21:32:00 -04:00
Jeff Young
f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
Seth Hillbrand
442aae19d9 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

Fixes https://gitlab.com/kicad/code/kicad/issues/11114
2022-03-16 17:30:01 -07:00
jean-pierre charras
0440aa3d83 Extend layer LAYER_LOCKED_ITEM_SHADOW to draw shadow markers on other locked items:
tracks, texts, graphics.
2022-03-09 18:50:31 +01:00
Jeff Young
293021c58c ADDED: knockout pcb and fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +00:00
Jeff Young
ce0233577b Don't try to fetch layer of multi-layer objects. 2022-02-18 13:20:36 +00:00
Jeff Young
7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young
42917874dd Add duplicated items to parent group.
Fixes https://gitlab.com/kicad/code/kicad/issues/10155
2022-02-04 14:26:57 +00:00