Duplicate removes net association from fills

Bug #1850758 reported by ocb-hd-ccb on 2019-10-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
High
jean-pierre charras

Bug Description

I have included a test file. I found this when trying to panelize my board. I would select the single layout and C-d to duplicate. I would then place the board where I wanted and all the fill net associations had been removed.

I also had similar issues when appending the single board multiple times into a new pcbnew file. This behaviour was even more strange because some of the net associations would persist but there was always one board where it failed.

I think I named the files well enough to illustrate the problem. This is a real pain when trying to panelize as I had to go into each fill and reassign the net.

```
Application: KiCad
Version: (5.99.0-279-gaf837ed76), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.39.2
Platform: Mac OS X (Darwin 19.0.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Oct 29 2019 15:23:31
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF
```

ocb-hd-ccb (ocb-hd-ccb) wrote :
ocb-hd-ccb (ocb-hd-ccb) wrote :

The included screen shot illustrates why the appended board is 'even more strange'. You can see some of the fills don't even render with or without association.

Wayne Stambaugh (stambaughw) wrote :

I'm not sure the expectation of copy and paste is the same as duplicate board for panelization purposes. There is a File->Append Board feature when you open Pcbnew in the stand alone mode for panelizing boards which should not cause the issue you are seeing. Please keep in mind that the board editor in KiCad was not designed as a panelization tool and that support for panelization is not a priority. I'm not sure I would consider this a bug but I'm willing to entertain reasonable proposals if we want to create a paste special feature to handle this.

Changed in kicad:
status: New → Opinion
importance: Undecided → Wishlist
ocb-hd-ccb (ocb-hd-ccb) wrote :

This is beyond a panalization feature request. Many PCBs have duplicated parts: an array of LEDs, a relay bank with coresponding flybacks and snubber, fill in the blank. This is an efficient workflow bug that I just happened to find when duplicating my board.

Both the append, duplicate and copy&paste functions produce broken nets.

This is not "support for panelization"...

ocb-hd-ccb (ocb-hd-ccb) wrote :

I will let someone else change that status of this bug but it is certainly not 'opinion'.

What do your propose we set the copied net names to: pick a net name
from the schematic and hope it is correct or make up some new nets and
hope that is correct? If we don't clear them, they will be set to the
same nets as copied objects which will tied all of the shared net names
together which may or may not be correct. I have yet to hear a good
suggestion on how to resolve this issue so clearing them an forcing the
user to set them to the correct name seems like the safest bet.

On 11/4/19 2:32 PM, ocb-hd-ccb wrote:
> This is beyond a panalization feature request. Many PCBs have duplicated
> parts: an array of LEDs, a relay bank with coresponding flybacks and
> snubber, fill in the blank. This is an efficient workflow bug that I
> just happened to find when duplicating my board.
>
> Both the append, duplicate and copy&paste functions produce broken nets.
>
> This is not "support for panelization"...
>

Wayne Stambaugh (stambaughw) wrote :

It's the best status option provided by Launchpad which fits this bug
report. Obviously it's valid but what to do about it is definitely an
opinion. I'm also sure this has been reported elsewhere if memory serves.

On 11/4/19 2:33 PM, ocb-hd-ccb wrote:
> I will let someone else change that status of this bug but it is
> certainly not 'opinion'.
>

ocb-hd-ccb (ocb-hd-ccb) wrote :

@Wayne thank you for explaining it like that. In that context it makes sense to clear the nets.

Maybe since there is currently 3 ways to copy a board, append, duplicate, and c&p, one of them could keep nets.

I would think append board would be best suited for this and it appears to 'want' to work. Here is my symptoms with it.

Append board #1: Perfect
Append board #2: Nets are assigned but don't render
Append board #3: Board #2 nets render and Board #3s don't render...

This could just be associated with the rendering of the boards? What I have to do now is to append qty+1 then just delete the last one for the boards to all render correctly.

ocb-hd-ccb (ocb-hd-ccb) wrote :

Attached are pictures:

This is appending the board and hitting 'b' to update the nets after each append. Then switching over to the render preview to take a screen shot.

Wayne Stambaugh (stambaughw) wrote :

The problem is always more subtle and difficult that it appears at first glance. One thing the KiCad project tries to do is avoid making assumptions about the user's intent. This rarely ever ends well. I would rather we clear all of the nets so that the DRC complains rather than inadvertently create bad boards where the user missed something that KiCad assumed that the user intended. Most users frown upon throwing money away. I think this is case where the current behavior while inconvenient, is preferable to the alternatives.

As for #9, this isn't really what the append board feature is for. The append board feature is used to create multiple copies of the same board for panelization purposes. Using this feature to duplicate circuits on a single board may have unexpected side effects which may be causing the rendering issues. Have you tried the array tool? This might give you better results than your current solution.

ocb-hd-ccb (ocb-hd-ccb) wrote :

Same thing happens when you keep the edge cuts from the appended board. See picture. This is after 'b' update nets.

Changed in kicad:
milestone: none → 6.0.0-rc1
importance: Wishlist → High
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision c34a5842892623a8b22564b09e9c688ab1aad219
https://git.launchpad.net/kicad/patch/?id=c34a5842892623a8b22564b09e9c688ab1aad219

Changed in kicad:
status: Opinion → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)

In fact this is a bug in a copy constructor I created a few time after having fixed a similar bug.

This issue happens also in undo/redo command (the bug I previously fixed)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers