Symbol reference swap does not change copper zone net

Bug #1774967 reported by Patrik Bachan on 2018-06-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Medium
Unassigned

Bug Description

Hi,
here is simple way to reproduce this bug:
- let's have Schematic with symbols J1 and J2, both already in PCB
- attach copper zone to any pad, eg. Net-(J1-Pad1)
- Swap J1 and J2 references in schematic and update PCB (match by _timestamp_)

Current behavior:
Copper zone remains attached to Net-(J1-Pad1) and breaks connection from pad, because pads' net changed from Net-(J1-Pad1) to Net-(J2-Pad1)

Expected behavior:
Copper zone should be attached to Net-(J2-Pad1), because only references changed, FPs stayed in place. (Same behavior as traces have)

This happens only when you swap references, if you change reference to something unique, copper zones net is changed and everything is OK.

If you use netlabel to name net you attach copper zone to, there is no reference in net name and thus everything is OK.

Application: kicad
Version: (5.0.0-rc2-dev-683-gc8f4e1051), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.31.1
Platform: Linux 4.16.13-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.66.0
    Curl: 7.59.0
    Compiler: GCC 7.3.1 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON

Seth Hillbrand (sethh) wrote :

Refilling the zones connects the correct zone to the correct pad. Live zone updates would address thing but it needs to be a user option to allow it.

Changed in kicad:
importance: Undecided → Wishlist
status: New → Triaged
Patrik Bachan (xorly) wrote :

Yes, but correct pads' net is now Net-(J2-Pad1) and zone remained connected to Net-(J1-Pad1). The only change in PCB is reference swap, footprints stays in place, so traces and zones should stay attached to those footprints. Only traces does, see in screen record.

Seth Hillbrand (sethh) wrote :

@Patrik-

When you specify the zone net as Net-(J101-Pad1), the zone keeps that net unless you delete all pads. You are updating where J101 is but not changing the net's zone.

If you want the zone's net to be independent of the component, you will need to give it a name that is also independent of the component.

Jeff Young (jeyjey) wrote :

A named net is certainly the "gold standard".

Barring that, we should keep the zone attached to whatever it was attached to. If you update with match-by-reference, then the auto-generated-net-names (which encode reference+pad) are the "silver standard". Today we handle this only when the zone's net-name no longer has any pads. We should probably do it any time the zone's net-name is auto-generated.

However, if you update with match-by-timestamp, then timestamp+pad is the "silver standard". We don't handle this at all today (either when the zone's net-name has no pads or when it's auto-generated).

Changed in kicad:
importance: Wishlist → Medium
Jeff Young (jeyjey) wrote :

Changed from wishlist to bug. If we're going to have an "Update PCB" feature, then it probably needs to handle this.

Jeff Young (jeyjey) wrote :

Pushing to 6.0 as I think making any change here is too risky for 5.0RC.

Changed in kicad:
milestone: none → 6.0.0-rc1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers