Kicad with Geographic Reannotation Available for Test

I have been working for several months to incorporate RenumKicadPCB functionality inside Kicad. Meanwhile, Alexander Shuklin has done most of the heavy lifting by writing back-annotation into Kicad which does all of the error checking, etc., necessary for reannotation to work. Without his help I don’t think I could have done this.

Geographical re-annotation is under PCBNew/Tools. It should provide the same functionality as RenumKicadPCB but from within Kicad. I am hopeful I can submit a merge request which will be accepted so it will become part of the distribution. Of course, given my modest c++ skills I suspect that will not go smoothly!

I have tested the code with all the projects I used to test RenumKicadPCB and it appears to work. Besides renumbering correctly, it seems to detect project errors such as modules in the PCB which are not in the schematic, etc.

I would be grateful if people who are interested in this functionality would help test it and let me know if they have any problems or suggestions.

The source code is at

Of course this is test software and not yet part of the official Kicad distribution.

4 Likes

I would love to test this.

Do you happen to have a compiled version of this for Windows you could share?
I’m usually a Linux user but on Windows 10 at the moment…so it would take me a while to figure out how to get this build.
I’d really appreciate it.

okelk

I certainly do have a compiled version of Windows as I developed it on Windows. The problem is that the Windows development environment results in a sort of linux-like tree structure (bin/etc) and I have to figure out how to bundle it up for use in a proper Windows environment. I’ll let you know when I figure this out.

Brian

1 Like

I get compilation error on Linux.

/work/ohjelmointi/kicad/kicad/pcbnew/tools/pcb_renum_tool.cpp:5:10: fatal error: dialogs/DIALOG_BOARD_RENUM_base.h: No such file or directory
 #include <dialogs/DIALOG_BOARD_RENUM_base.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If I change it to lowercase (as the file name actually is lowercase in the filesystem) it can continue compiling. (EDIT: the other similar line, too.)

Remember that Unix system are usually case sensitive. Everything must be exactly as written.

I didn’t test actual functionality, but there’s much work to do with the dialog.

Use other dialogs as model for the UI strings. Many of the strings should be Sentence case, not Title Case.

I have tried the UI builder for wxWidgets only once and gave up, but I can see you haven’t used wxWidget’s possibilities to organize the elements properly. Everything should be aligned horizontally and vertically in a grid. It would be better to use some group boxes. Colons are missing from all the labels and probably the labels and the corresponding items aren’t coupled.

(EDIT: the button box in the bottom should be standardized, too. I think there’s a dedicated wxWidgets class for that.)

Maybe you can read the UI code of some other dialogs and find inspiration and examples there?

1 Like

eelik

  Thank you. I will correct it. That's the advantage of having

other people have a look.

Brian

I have started a test build, if that succeeds there will be an Installer there (without libraries, so it installs on top of an existing nightly).

4 Likes

Great! Let me know how it works out.
Brian

I fixed the include issue. Did the test build work?

Never mind! I see it on the link. Thanks!

There was a bug in the build script. New test build that actually has a chance of working is here or here.

I’ve seen your updated branch, builds of commit e7301a7ed are on the way: Linux, MSYS2, MSVC.

@DocumentedDesigns the current state fails to build on Visual Studio, because it uses a gcc compiler extension.

Also, please don’t build strings manually, use format strings to allow translators to rearrange the sentence structure.

Simon

Thanks for this

I’m on mobile so perhaps you’ve linked to this but can you provide more details on the compiler extensions?

On the strings I’ll change them when I get home but I avoided wxprintf because it set faults with no diagnostic information if there is a miss match between format and arguments and gcc doesn’t warn like it does for printf.

So it’s a pain to hunt down the bug.

Still on mobile but I managed to open the link.

I see that msvc doesn’t seem to support initializing arrays the way I did but I can’t see what’s wrong with

dialog_board_renum

**526 Changes += ActionMessage[Change.Action];**

``

It’ll go away when I use wxprintf though.

Simon

The merge is now here. https://gitlab.com/kicad/code/kicad/-/merge_requests/108

  I think I fixed the array declarations (the MSVC error is quite

cyptic). I will fixed the strings in the morning.

Thanks

Brian

Test build is on the way, now with the right state.