294 Commits

Author SHA1 Message Date
Jeff Young
e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
JamesJCode
6af44c8ffa Show full component class string in pcb properties panel
Currently, the human-readable component class is shown in the info
bar. For multiple component classes, this means that not all will
be readable. Showing the formal ordered string in the properties
panel mitigates this issue.
2025-01-20 22:56:26 +00:00
Seth Hillbrand
3a5eeef9df Auto update list of fonts when embedding files
Get the list of currently used fonts to populate the list of embedded
files when the user checks the "embed fonts" checkbox
2025-01-16 18:07:07 -08:00
JamesJCode
83f03b10ff Further netclass name method cleanup 2025-01-14 21:16:43 +00:00
jean-pierre charras
6c0e5508a9 Pcbnew: ensure footprint courtyard caches are rebuilt after rotation or flip
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19561
2025-01-09 17:59:05 +01:00
Jeff Young
c2818dcb29 Disable pad-hole-not-fully-inside-copper for board-level testing.
Also fixes the error string for it.
2025-01-07 14:50:16 +00:00
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +08:00
John Beard
527faddbfd GAL: provide constants for LoD HIDE/SHOW and a scale helper
Saves a mishmash of local HIDE/SHOW defs along with various literals.

Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.

Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
2025-01-02 22:59:31 +08: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
Sven Pauli
d070f5ee95 Whoops, mutable. 2024-12-31 19:29:20 +00:00
Sven Pauli
5815998b5b Rolled the caching 2024-12-31 19:29:20 +00:00
Sven Pauli
074edfa056 Invalidate courtyard caches when rotating 2024-12-31 19:29:20 +00:00
JamesJCode
dfe0d6345b Another go at supressing FOOTPRINT field on FOOTPRINT objects 2024-12-28 21:57:35 +00:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jon Evans
eed7222bc3 Fix misplaced continue statement 2024-12-20 09:11:00 -05:00
Seth Hillbrand
41d4a8caab Adjust DRC clearance for net ties
Items that are part of net ties (pads and copper shapes that connect to
them) should allow connections from any net in the tie.  This prevents
clearance errors from being generated for matched nets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14008
2024-12-10 15:54:47 -08:00
Jon Evans
9b1b318736 REMOVED: Footprint field from footprints
This field was redundant (was generally set to the footprint's LIB_ID)
but also buggy (not guaranteed to contain the footprint's LIB_ID)
and confusing (not a way to change the footprint's LIB_ID).
2024-12-01 15:50:40 -05:00
Jon Evans
523fcc039f API: Move trace macro to utils 2024-11-28 11:28:06 -05:00
Jon Evans
c0d43c0c0c API: Add serialization of FP_3DMODEL 2024-11-24 15:53:10 -05:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Jon Evans
26247b0d27 Support custom padstacks in footprint checker 2024-11-09 08:47:10 -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
Jon Evans
56e0811516 Phase 2 of padstack support
CHANGED: PCB file format now supports saving/loading complex padstacks

CHANGED: PTH pads are now rendered per copper layer in the copper color;
         the PTH pad color is no longer used.

ADDED: support for importing complex pad stacks from Altium PCBs

Enforce padstack-aware access to pad properties across KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
2024-10-01 19:55:03 -04: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
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
jean-pierre charras
43ea0d0adb DRC and flipped footprints: better fix than ugly commit 6bc51781
The sorting function used by DRC now also normalize segments.
2024-09-04 09:50:19 +02:00
jean-pierre charras
6bc51781b8 Fix a side effect of commit 513d659c (master) or 55fafe34 (8.0 branch)
This commit modify the order of end points of flipped graphic lines, and
create a DRC issue for flipped footprints (if flipped before this commit).
For segments inside a footprint, the "old" way to flip a segment is now
reused.
Expecting this ugly fix is only temporary.
2024-09-03 16:52:20 +02:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Jon Evans
284a760af7 Move more properties into PADSTACK 2024-07-20 17:48:20 -04:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Seth Hillbrand
3a8a5bb378 Convert courtyards with error allowance
We convert arcs/circles to polygons with an allowable error.  This means
that the segments might end up being closer than we expect and we should
allow for this deviation when checking courtyards

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18347
2024-07-09 12:10:53 -07: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
8b948e7b9c Give padstack warning violation a name.
Also regularises capitalisation & parens in some error
messages.

Also de-duplicates hole testing for PTH pads, and SMD
rationality testing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18334
2024-07-07 14:04:34 +01: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
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Alex Shvartzkop
4bf8ed32cd Optimize testCourtyardClearances when moving footprints (33%->0.69%)
Check bounding boxes without hidden text first before trying to check courtyards.

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 06:43:58 +03:00
Alex Shvartzkop
dc56364cf2 Optimize testCourtyardClearances when moving a board.
CPU usage: 86% -> 33%

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 02:00:34 +03:00
Alex Shvartzkop
f5be388acd Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.
2024-06-20 06:02:11 +03:00
Jeff Young
1eb26b439a REMOVED new footprint dialog.
We now just create an "Untitled" footprint.

Also fixes a bug where the preview of new footprints
would zoom in too far.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17573
2024-05-31 10:36:51 +01:00
Jeff Young
15d4e114e0 Move pad checking to Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102
2024-05-29 15:25:49 +01:00
jean-pierre charras
8165ec66e9 FOOTPRINT::CheckPads(): better check for hole in PHT pad.
Hole not fully inside the pad copper area is now tested.
2024-05-28 20:00:08 +02:00
Jeff Young
bc14a841cb Check for drilled hole errors in Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18093
2024-05-27 13:51:21 +01:00
Jeff Young
e400d49af6 Trim covered region to bounding hull.
Otherwise a long track crossing a footprint will look
like it covers most of it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17299
2024-05-26 18:45:58 +01:00
Jeff Young
25bb3f77fa Fix keep-upright algo for footprint text.
Also removes PCB_FIELDs from rotation centre calc in
footprint editor if there is other stuff selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16896
2024-05-17 18:34:44 +01:00
Wayne Stambaugh
f1e8495dc9 Fix QA DRC regression test issue. 2024-05-07 16:22:09 -04:00
Wayne Stambaugh
a508f2e716 Fix false annular ring width DRC test failure.
The DRC annular ring width test failed to take into account that a pad
could be contained inside another pad having the same number (thermal
vias for example) which changes the effective annular width of the pad
contained within another pad.  A test was added to calculate the effective
annular ring width in this case.

Added some PNS log viewer helper and test code to the PNS playground QA
utility for testing the effective pad annular width code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17485
2024-05-07 08:04:17 -04:00