Commit Graph

62 Commits

Author SHA1 Message Date
Mike Williams e30b325433 multichannel tool: fixup for rebase 2025-08-20 15:20:13 -04:00
Mike Williams 92ef03cf15 design blocks/multichannel: make apply layout do routing, etc. 2025-08-20 15:20:13 -04:00
Mike Williams 2f88ee9dee multichannel tool: just pass COMPAT_DATA& instead its parts 2025-08-20 15:20:13 -04:00
Mike Williams 3151d97010 multichannel tool: formatting and comments 2025-08-20 15:20:13 -04:00
Mike Williams 4df013cf13 multichannel tool: pass RULE_AREA to functions called findXInRuleArea
Was previously passing just the zone in some of them.
2025-08-20 15:20:13 -04:00
Mike Williams fbb9b296e3 multichannel tool: rename ZONE* from m_area to m_zone for clarity 2025-08-20 15:20:13 -04:00
Mike Williams 97af2af779 design blocks / multichannel: basics of placing DB layout 2025-08-20 15:20:13 -04:00
Mike Williams 986c1a597a multichannel tool: remove redundant m_raFootprints 2025-08-20 15:20:13 -04:00
Jeff Young 6f389fd320 Tighten parent/child undo/redo architecture.
Always look for pre-existing undo/redo record.  Checking for IsNew()
is less robust and should be avoided.  Also moves the checking to a
location where it will be easier to ensure that it's uniform.

Push get-undo-level-item processing down a level so it is uniformly
called.

Make sure tables & labels are uniformly handled.

Remove incorrect usage of Get/SetGroupId() for storing lastPin
(which we don't use anyway).

Lists of deleted and changed items MUST include the screen pointer.
An item could be changed on one screen but not on another.

Also tightens handling of PCB_NETINFO_T items, which are not in the
view.

Also fixes a bug where there is no increment parameter if you assign
the base increment command to a hotkey.
(This was discovered while testing the above changes.)

Also fixes a bug where delete during a move in PCB Editor did an
undo instead of a delete.
(Again, found while testing above.)

An experiment was also run to collapse shared parts of SCH_EDIT_FRAME
and SYMBOL_EDITOR_FRAME into SCH_BASE_EDIT_FRAME.  However, sharing the
undo code actually increased complexity, and there was very little else
of value in SCH_BASE_EDIT_FRAME (other than the Increment() routines).
2025-08-18 19:20:09 +01:00
Jeff Young 0128fb2eaf Formatting. 2025-07-29 23:11:19 +01:00
Alexander Boehm 2e94e6413f repeat layout: always fixupNet
I don't understand how cloned nets get their target zone
net in the first place. What I do know is that rarely it does
not work and the source net is retained. This is where
fixupNet() shines and does what its name suggests.
2025-06-10 14:18:46 -04:00
Alexander Boehm 159f2c9482 multi-channel tool: more fine grained control over in/exclusion
The locking option from the repeat layout dialog was renamed and
is now called 'include locked items', like in the code.
If an item is locked in the source rule area it is not replicated,
if an item is locked in the target area it will not be deleted upon
running the repeat layout tool. Added an option to ignore tracks that
do not share a net with a pad inside the source rule area. This gives
unrelated track segments lying inside the rule areas a chance
of peaceful coexistance.
2025-06-10 17:33:26 +00:00
Alexander Boehm 6e06125719 multi-channel tool: copy only routing fully within rule area
Tracks segments of arbitrary lenght were replicated as long as some
part was inside the reference rule are. Now only track segments fully
within the rule area are replicated. This improves performance,
consistency (e.g. only zone fills fully within rule area are copied) and
usablity. Regarding the usability: if a channel is replicated and then
connected to something else these wires were often messed up if another
replication (some internal update) was necessary. Now the chance that
external connections going into the rule area survive an replication is higher.
2025-06-10 17:33:26 +00:00
Alexander Boehm 6dd366f7bf multi-channel tool: anchor footprints
adds a dropdown menu to select an anchor footprint from the
reference rule area. The corresponding footprints in the
target areas determine displacement and rotation off all the
replicated items. If no anchor footprint has been selected
the previous behavior is unchanged, i.e. rule area position
determines placement.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20603
2025-06-10 17:33:26 +00: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 09fd6c13e2 Quiet Coverity. 2025-06-02 13:17:08 +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
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 a582c51de7 multichannel/shapes: don't try to rectify empty polygons 2025-05-07 14:10:22 -04:00
Mike Williams 87c91fea3d multichannel: support groups 2025-05-07 12:40:59 -04:00
Alexander Boehm 70af60c930 multi-channel tool: do not duplicate uuids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20665
2025-04-16 03:20:04 -04:00
Alexander Boehm 4bc099429c repeat layout: fixup net names of copied vias
When replicating a layout with the multichannel tool
the net names of vias are now updated to reflect the
potentially different connections in the target area.

Fixes https://gitlab.com/kicad/code/kicad/issues/20334
2025-04-15 09:28:27 -07:00
Mike Williams 05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Mike Williams a90b8ec57a pcb: merge RunOnChildren/Descendants into one function with a mode 2025-03-27 13:16:09 -04:00
Jeff Young 6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
JamesJCode 4a99a3060d Add new DRC expression function isMemberOfSheetOrChildren
This allows the multichannel tool to search for footprints that are in nested
hierarchical sheets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20339
2025-03-17 15:55:59 +00:00
JamesJCode ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
Tomasz Wlostowski c05cc345f3 multichannel: possible fix for ghosting footprints when using grouping 2025-03-09 23:36:54 +01:00
Jeff Young 20f40c1030 Replace GetConnectedItems() type list with an EXCLUDE_ZONES flag.
The type list kept atrophying when various new
items were added (arcs, shapes).

And god knows what the purpose of putting PCB_FOOTPRINT_T
in some of them was.  As far as I can tell a CN_ITEMs
parent can never be a footprint.

(Also moves IGNORE_NETS to a flag so that we don't
end up with two booleans and the potential to have
them out-of-order.)
2025-02-26 11:02:10 +00:00
Jeff Young c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
JamesJCode 5cad4ad8d0 Multichannel: Don't include footprints outside of reference area 2025-01-10 11:23:56 +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 a45b601e11 Correctly handle zone net updates in multichannel tool
Also fixes some item duplication issues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19410
2024-12-31 09:59:44 +00:00
JamesJCode dfe0d6345b Another go at supressing FOOTPRINT field on FOOTPRINT objects 2024-12-28 21:57:35 +00:00
Jon Evans babdf43f86 Multichannel: restore temporary RA name if one was set 2024-11-24 18:24:09 -05:00
Jon Evans d34d2c09f8 Multicahnnel: remove redundant COMMIT
Seems to not be needed anymore, after 69fe1368

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19193
2024-11-24 12:20:55 -05:00
Jon Evans 09c327e02f Multichannel: replicate free tracks and vias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19097
2024-11-24 12:10:14 -05:00
Jon Evans bf082dec73 Multichannel: pick source area interactively if needed 2024-11-24 12:10:14 -05:00
Jon Evans 69fe1368f1 Multichannel: support free items; fix group handling
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19096
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19095
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19097
2024-11-24 12:10:14 -05:00
Jon Evans d9f5c72877 Multichannel: copy all field text attributes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19087
2024-11-24 12:10:14 -05:00
Jeff Young 992e6f7bc2 Code style 2024-11-24 12:10:14 -05:00
John Beard df933df416 Multichannel: split out some geometric routines
Putting them somewhere in the geom utils means they
can be reused, and also tested if needed.
2024-11-08 19:48:03 +08:00
John Beard 6a96c16c2c Multichannel: fix polygon 'rectifying' function
It was choosing the wrong side of the boundary, which
caused it to sometimes self-intersect and omit some components.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19068
2024-11-08 19:48:03 +08:00
JamesJCode 231fa952fb Add auto-generation of placement rules areas from component classes 2024-11-03 21:43:55 +00:00
Tomasz Wlostowski 27f26822dc MULTICHANNEL_TOOL: put the 'group items' option in one unique place 2024-11-02 19:59:09 +01: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
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
Tomasz Wlostowski ca8d5df9f6 multichannel: allow selecting entire groups as RAs + throw an error in Repeat Layout when there's single RA in the project 2024-08-14 00:09:32 +02:00
Tomasz Wlostowski 1a503a1d91 MULTICHANNEL_TOOL: post-rebase fixes 2024-08-14 00:09:32 +02:00