33 Commits

Author SHA1 Message Date
Jeff Young
2c102a62e0 Auto-convert numeric values in fields when referencing them in expressions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21723
2025-09-12 20:35:17 +01:00
John Beard
299a6c6c7b Netinfo: avoid transitive string_utils.h include
Put the string manipuuation utils in the cpp, and
remove string_utils.h from the includes of netinfo.h.

This spams that header into about 350 files, not all of which
need it. Then go round and tidy up the places (most exporters
and dialogs) where CPP files weren't including string_utils.h
when they used it, as well as some other order-sensitive
include issues that turned up.
2025-08-12 20:00:15 +08:00
Jeff Young
3284dc348a Formatting. 2025-06-23 09:02:51 -06:00
Jeff Young
52f77864bc Formatting. 2025-06-18 17:45:53 +01:00
JamesJCode
41601e9c2f Further DRC net class and component class match improvements
- Implements wildcard matching for constituent component classes
- Implements wildcard matching for effective net and component class names
2025-05-29 21:47:56 +01:00
JamesJCode
7176dbe6dc Re-implement wildcard matches for netclass constituents in DRC evaluation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20955
2025-05-26 19:18:56 +01:00
jean-pierre charras
b3c6a03171 Fix a few Coverity warnings (uninitialized vars). No actual code change 2025-05-01 15:39:58 +02:00
JamesJCode
eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
JamesJCode
ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
JamesJCode
85e6978aa2 Mirror netclass DRC expression semantics for component classes
With this change, "A.Component_Class == 'SOME_CLASS'" will return
true if either SOME_CLASS exists in the list of component classes
attached o the footprint, or if SOME_CLASS is the full component
class name.
2025-03-08 22:18:22 +00:00
JamesJCode
671d84562b Enable use of double properties in DRC rules expression parser
Also removes previous special-casing of FOOTPRINT Orientation
property as this is now supported natively

Also fixes name clash with Orientation property for footprints
2025-03-06 14:24:47 +00:00
JamesJCode
3d41eca856 Fix use of footprint Orientation property in DRC expression parser 2025-03-06 13:08:03 +00:00
JamesJCode
f0e287a87b Check for constituent netclasses in DRC netclass equality checks
This reverts previous behaviour whereby 'A.Netclass == x' compared
the full name of an effective netclass (e.g. 'Class1,Default'). This
was found to be unexpected behaviour to users, who were expecting
the equality to compare single netclasses. The equality check now
first checks for a constituent class with the given name, and then
falls back to a check of the full class name.

Inequality requires the netclass name being tested to not be a
constituent netclass and to not be the full class name.
2025-03-05 20:30:54 +00:00
JamesJCode
a091b6c1c9 Fix incorrect inequality in component class expression evaluation 2025-03-05 19:10:48 +00:00
jean-pierre charras
eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00
Jeff Young
d4865899c5 Handle wildcards AND case-insensitivity in pin_type comparisons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19513
2025-01-06 20:04:28 +00:00
Jeff Young
2f5cbfe57d Formatting. 2025-01-06 19:50:38 +00: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
Seth Hillbrand
78a6640ad6 Fix issue that caused assert failure in parser
Missing `else` when adding optional caused everything to fall through.
2024-12-23 08:38:45 -08:00
Jon Evans
ecdc7ee08f Add a null type for libeval / std::optional support
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19158
2024-12-02 21:21:18 -05: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
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
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00: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
Jeff Young
06a8517818 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:20:20 +00:00
Armin Schoisswohl
4dcec60bf4 add include <mutex> to fix compilation under linux 2024-03-07 13:20:16 +00:00
Armin Schoisswohl
bb9448edcb change m_CachesMutex to shared_mutex and do shared locking for read access in zone BBox calculations 2024-03-07 13:20:13 +00:00
Jeff Young
0fac52dcad Accept EEschema tokens as well as netlist tokens for pintype.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16169
2023-12-29 16:34:03 +00:00
Jon Evans
b1695add9e Fix warnings 2023-12-19 22:38:34 -05:00
Jeff Young
da5f5536c8 Honour custom layer names for Layer_Top and Layer_Bottom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15835
2023-10-06 21:55:57 +01:00
Jeff Young
55a7b9e6bf More consistent naming.
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00