Pin numbering error when creating pad array

Bug #1808706 reported by Petr Polasek on 2018-12-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
John Beard

Bug Description

When creating circular pad array from one initial pad with number 1, the generated pads do not get properly numbered when using the option "Initial Number: Use first free number". All of them then get number 2 instead of being numbered 2-4. When using the other option, the numbers get generated properly.

Application: kicad
Version: 6.0.0-rc1-unknown-968ea98~66~ubuntu18.04.1, release build
    wxWidgets 3.0.4
    libcurl/7.61.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.1 librtmp/2.3
Platform: Linux 4.18.0-12-generic 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.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:

Seth Hillbrand (sethh) on 2019-01-05
Changed in kicad:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 5.1.0
Changed in kicad:
assignee: nobody → John Beard (john-j-beard)
John Beard (john-j-beard) wrote :

@Seth Is the "first free number" thing even useful? How often do people do that rather than writing in their own numbers? I feel like perhaps just removing this option makes more sense. Otherwise it's not clear:

* First available number: if you have pads "1, 4, 6" already, is the first available number 2 or 7?
* If 2: do you skip all existing numbers (so the new items here are "2, 3, 5, 7".

Finding the "highest" existing pad number is quite a pain, especially if you have pads that don't fit an alphabet.

Seth Hillbrand (sethh) wrote :


I honestly have no idea whether this is used. I personally do not use it. But that might be mostly because it doesn't work logically.

I see the first available number option as creating 2, 3, 5, 7 as you note.

Mostly, I think that in v6 we create a preview function with this dialog and many usability issues go away.

John Beard (john-j-beard) wrote :

@Seth, hmm, I can see a way to do it that way. Should it also skip existing ref-des'es when arraying MODULEs on a BOARD (Not just D_PADs on a MODULE)?

John Beard (john-j-beard) wrote :

@Seth, I can make it skip numbers, but actually, it still has an issue with co-ordinate systems.

Imagine you have a pad "B2" already. What happens to the following array?

A1 A2 A3
B1 !B2! B3
C1 C2 C3

I think this option might just not be worth the effort?

Seth Hillbrand (sethh) wrote :

@John- When arraying in the board editor, we do not allow numbering. Essentially, this option is only useful for non-modules.

Responding to #4, I would say that we can't protect people from everything. In that array, the !B2! would be B3 as the secondary number axis gets skipped when there is a duplicate. If the user wanted an aligned array with that numbering, then they either need to remove the existing pad or change the pad numbering option.

John Beard (john-j-beard) wrote :

@Seth - in the board editor, it does increment the module refdes. Currently it could make a duplicate, if the refdes exists. Is that still OK?

I'll make it only skip numbers for 1-D array numbering: say pad 4 exists and "use first available" is set:

1 2
3 5
6 7

For 2-D it will not: say A4 exists:

A1 A2
A3 A4

Does that sound OK?

John Beard (john-j-beard) wrote :

sorry, I misread that - I already have it working that way...

Seth Hillbrand (sethh) wrote :

Makes sense. I guess I didn't realize that module refdes were incremented. Let's address that separately from the pad numbering unless you think it makes more sense to combine some aspect of that code.

Changed in kicad:
status: Triaged → In Progress
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 453a91f661d716853a5b382b7c7bc19a3b55acb6

Changed in kicad:
status: In Progress → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers