78 Commits

Author SHA1 Message Date
Seth Hillbrand c52ab91c84 Reduce compile times by extracting headers
Break the most expensive header include chains that contaminate the
largest number of translation units

New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
2026-02-13 17:10:45 -08:00
Jeff Young 73c4b91c88 Hatch offset GUI bug fixes.
1) Don't double-load offset overrides

2) Might as well order in UI order when we
get the chance

3) Do a Layout() when number of table rows changes

4) Make sure we're using WX_INFOBAR (so that
it gets correctly sized when first shown)

5) Show infobar error when there are no more
layers to override.
2025-11-20 18:05:01 +00:00
Jeff Young 63f07a46bf ADDED: GUI for Board Setup zone hatching offsets.
ADDED: GUI for zone-specific hatching offset overrides

CHANGED: Layout and progressive disclosure in zone edit dialogs.

REMOVED: Ability to set zone priority as an integer.
Zone priority is now only relative, and set through
the Zone Manager.

Thanks to d.treffenstaedt for much of the heavy lifting.
2025-11-04 11:09:29 +00:00
Jeff Young 943b2fdcac Don't use std::ranges::copy for set-equal.
It's harder to read, and if you forget to clear the
destination first, it won't do what you expect.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22161
2025-10-30 11:33:27 +00:00
John Beard ed01324c1d Footprints: allow to set specific internal copper layers
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
2025-08-19 04:59:48 +08:00
Jeff Young 4e174f2078 Don't try to keep netcodes in defaultZoneSettings (KICAD-7Z8). 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
Jeff Young 8b33b25e83 Use thermal reliefs to guarantee connection to hatched zones.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20447
2025-04-04 22:45:52 +01:00
Jeff Young 6e2914b990 Update terminology. 2025-03-25 12:05:54 +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
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
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
John Beard bd86a74bcf Pcbnew: initialise ZONE_SETTINGS::m_ruleAreaPlacementSourceType
Fixes a text failure in qa_pcbnew.

If this is not initialised, at least the comparison operator will be
operating on junk member values if either side has not had the
source type set.

Maybe it doesn't even make sense for the source type/source to be
checked if m_isRuleArea is false (they're presumably "do not care" in
that context), but if they're initialised, it doesn't matter either
way.
2024-10-10 12:33:52 +08:00
JamesJCode bc0c9634b8 Don't store DRC expressions in file format for placement rule areas 2024-10-09 18:47:05 +01:00
Tomasz Wlostowski 05fc8199dc pcbnew: added Placement Rule Area properties to class ZONE:
- RuleAreaType: distinction between Keepout and Placement rule areas
- RuleAreaExpression: custom DRC language expression for assigning components for Placement rules
2024-08-13 22:50:25 +02: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
Alex Shvartzkop 284cda1fca Improve copper zone dialog layer list checkbox alignment on hidpi. 2024-05-27 01:02:12 +03:00
Jeff Young ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
Jon Evans b8aef58561 Add proper comparison operators for BOARD_DESIGN_SETTINGS and children
BOARD::operator== was just comparing pointers
2024-01-01 13:37:31 -05:00
Roberto Fernandez Bautista 0159be8ddd Fix build (broken in 90ff331c) 2023-06-10 14:21:10 +02:00
Roberto Fernandez Bautista 90ff331c58 Refactor: Move static to be inside ZONE_SETTINGS 2023-06-10 12:03:41 +02:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jon Evans e066454c61 Zones: use metric defaults and limits instead of mixed units
Update testcases to reflect new defaults
2023-02-11 07:39:29 -05:00
Jon Evans ec4d377d15 Stop removing islands for fully-isolated zones
It is hard for a user to tell what is going on when their zone
just doesn't fill at all.  We catch isolated areas in the DRC so
we can just leave them alone here until the zone has at least one
non-isolated filled area.

Also change default back to always remove islands to reduce confusion

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13271
2023-01-27 08:57:18 -05:00
Jeff Young 5759a3a10a Fix copy/pasta from previous commit. 2022-11-15 16:01:24 +00:00
Jeff Young bc0a753238 Slight improvement to overly-wide checkbox columns. 2022-11-14 20:01:37 +00:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young ded611aed5 Patch annoying large checkbox cols in wxWidgets 3.1.x on OSX. 2022-07-08 17:27:05 -06:00
Jeff Young 155620cc9a Move H/V/45 mode from zone properties to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
jean-pierre charras dbfdd3fb56 Fix some Coverity warnings. 2022-03-06 09:48:33 +01:00
jean-pierre charras 3bb1fd8311 Teardrops: fixes and enhancements:
- do not allow smoothing outlines: outlines are already optimized.
- do not allow settings incompatible with teardrop area (grid, thermal relief)
- DIALOG_COPPER_ZONE: export zone settings to similar zones only.
Fixes #11040
https://gitlab.com/kicad/code/kicad/issues/11040
2022-03-05 17:18:42 +01:00
Jeff Young 1966972fc1 Retire no-pads warning in favour of defaulting to area-based remove islands strategy. 2022-03-01 19:19:18 +00:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young 8f670552a6 Allow Rule Areas on all physical layers.
Required to do things like modify silk_clearance rules.
2022-02-17 23:59:09 +00:00
jean-pierre charras d553d620c1 DIALOG_COPPER_ZONE: add option to set the pitch of hatches around the zone outlines
This parameter exists since the beginning, but never show in this dialog
2022-02-12 18:57:02 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 038db715a3 Move zone hatch orientation to EDA_ANGLE. 2022-01-19 00:34:03 +00:00
Jeff Young 32721755bf Hook up zone-pad connections to custom rules.
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.

ADDED angle override for thermal relief spokes in Pad Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00:00
Jeff Young b4b59c3b33 Fix uninitialized variable. 2021-05-08 20:49:51 +01:00
Jeff Young e709e77870 Add missing locked setting to zone dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
2021-05-06 22:50:03 +01:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Marek Roszko 14c18b7e64 Move ui functions out of common and into ui_common 2020-10-25 20:01:12 -04:00
jean-pierre charras 13304d0870 more cleanup about removing useless include 2020-10-02 13:40:00 +02:00
Jon Evans 18e17abd6a Rename "Keepout" to "Rule Area"
These objects can now be used in advanced DRC rules and
not just for keeping things out.  Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Jeff Young f340636f70 When knocking out higher-priority zone use fill, not outline.
Also fixes a bunch of naming issues, primarily with lowercase for
protected variables, but also some for consistency with other parts
of the code.

Also changes the zone fill radio buttons in Board Setup to be more
generic referring to legacy vs. current, and to have tooltips.

Fixes https://gitlab.com/kicad/code/kicad/issues/5583
2020-09-18 16:45:41 +01:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00