213 Commits

Author SHA1 Message Date
Jeff Young
8a60893249 Regularize content of item descriptions.
1) Use sentence capitalisation
2) Show text of text items

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21582
2025-08-29 12:03:55 +01:00
Andrzej Wolski
c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07:00
Jeff Young
d3f2bec6a6 Performance tweaks. 2025-08-05 13:49:31 +01:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
79d17fcb6e Cleanup export zone settings for initializing zones (KICAD-EYF). 2025-07-14 14:12:00 +01:00
Jeff Young
21c9364063 ClearArcs before calling SHAPE_POLY_SET boolean ops.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21209
2025-06-30 15:48:06 -06:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young
d81e9e6cd1 Code cleanup.
A placement-area is a rule-area sub-type.  We don't
need to say rule-area-placement each time.

Also removes some dead code, and simplifies some
damage-propagation logic.
2025-06-07 17:44:00 +01:00
Jon Evans
7e24210b1e API: Use net names, not codes, and allow creating new nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21027


(cherry picked from commit 0ff77bd33292b80ab9f5d686c5e7d9ce06be715f)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-30 22:13:44 -04:00
jean-pierre charras
4de6be8124 Fix a collision name in a windows header (GROUP). Windows specific.
Changed to GROUP_PLACEMENT (No actual code change)
2025-05-08 11:15:55 +02:00
Mike Williams
87c91fea3d multichannel: support groups 2025-05-07 12:40:59 -04:00
Jeff Young
5573dce448 Fix various errors in intersecting zones test.
Also gives a clearer error message, and better
descriptions of named zones.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20718
2025-04-22 13:15:03 +01: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
Jeff Young
07eda5d57e ADDED: report copper area for current selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20439
2025-03-27 10:14:30 +00:00
Jeff Young
6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
JamesJCode
3d41eca856 Fix use of footprint Orientation property in DRC expression parser 2025-03-06 13:08:03 +00:00
Jeff Young
9856cb2210 An arbitrary layer flip can not be done without the board.
(User-defined layers can be sided or not.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20169
2025-03-05 17:59:22 +00:00
Daniel Treffenstädt
27edf0b949 ADDED: Per layer properties of zones used for control over zone hatching position 2025-03-02 20:31:04 +00:00
Jeff Young
3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young
e7652685f0 Always report all track keepout violations.
(Regardless of report-all-errors-per-track setting.
There's no clear rule here, but to do otherwise just
feels wrong.  Keepout areas are distinct, it's not
like tracks too close together reporting lots of
clearance errors.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13219
2025-02-24 11:08:29 +00:00
Seth Hillbrand
d0077cceb3 Update reported name for teardrop areas
When reporting DRC, teardrops are treated as tracks but reported as
zones.  This causes confusion for designers using specific keepouts.
This changes the reported name to "Teardrop" for consistency
2025-02-10 14:36:14 -08:00
Ian McInerney
088e0e80a1 Fix layer writing/reading for copper zones
* Always enumerate layers - never use the wildcards
* Keep fills on layers the zone is actually on when loading

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19775
2025-01-29 00:31:28 +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
Jon Evans
0ba869465c API: switch to Distance type for thermal settings 2025-01-09 21:25:15 -05:00
Ian McInerney
660f5bad21 Attach zone min width validator to correct property 2025-01-06 11:46:01 +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
lucas
4feb7cd9ed API: Don't create zones without an outline 2024-12-28 13:08:42 +00:00
Jon Evans
6c47f32ccf API: Fixes for creating new zones 2024-12-26 13:34:16 -05: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
Jeff Young
ce20689caf Use old algorithm when allow-external-fillets is on.
Otherwise we'll trim them off.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19121
2024-12-03 16:55:59 +00:00
Jon Evans
af91519e06 API: Implement Deserialize for ZONE 2024-11-23 12:06:54 -05:00
Jon Evans
4ab8c23851 ZONE: Revert accidental formatting changes 2024-11-23 11:08:30 -05:00
Jon Evans
62df972c2d API: implement serialization for ZONE 2024-11-23 11:04:34 -05:00
Jon Evans
dd65a44dd6 API: Add initial spec for ZONE serialization 2024-11-21 22:09:14 -05:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Tomasz Wlostowski
2daabbf6e2 MULTICHANNEL_TOOL: enable the tool by default and remove ADVANCED_CFG option 2024-11-02 19:59:09 +01:00
Jeff Young
c4b99eefd4 Remove stale comments; improve other comments/formatting. 2024-10-31 11:20:31 +00:00
Jeff Young
56df6d0bc7 Trim zone apron to the same-net-intersecting-zone envelope. 2024-10-31 11:20:31 +00:00
JamesJCode
37a3e55bd3 Allow pcb rule areas to handle keepout and placement concurrently
- Implements component classes for placement rule areas and multichannel tool
- Implements property inspector properties for rule areas
- Fixes some zone member default initialisation issues
- Gates all multichannel-related imlpementation with existing adv config flag
- Removes rule area type enum, replaces with inference from keepout and
  placement settings
2024-10-10 23:29:02 +01:00
JamesJCode
bc0c9634b8 Don't store DRC expressions in file format for placement rule areas 2024-10-09 18:47:05 +01:00
John Beard
de5a866295 Fix uninitialised vars in ZONE
ZONE has a huge number of state variables. Some of these
have setters that check m_foo == aNewFoo. This is only
good karma if m_foo is initialised!

This doesn't set all of the members (maybe it should,
or maybe there should be sub-objects with explicit ctors)
but at least it should prevent obvious un-inited reports.
2024-10-05 22:26: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
Seth Hillbrand
b6c1a3ba63 Move SetLayerSet to const reference
Avoids potential performance inefficiencies
2024-08-17 07:56:30 -07:00
John Beard
1662d7f546 Pcbnew: don't assume zones are in the UiOrder list
This can be false, for example when zones are being rescued,
even if the LSET is non-zero-sized.
2024-08-16 08:30:52 +01:00
Tomasz Wlostowski
b84da7be02 multichannel: conditional rule area expression property 2024-08-13 22:50:26 +02:00
Tomasz Wlostowski
145f26dd1e pcbnew: fix post-rebase errors 2024-08-13 22:50:26 +02:00
Tomasz Wlostowski
c4d5c99b42 pcbnew: more checks for rule area type (keepout/placement) in various zone-related code 2024-08-13 22:50:26 +02:00