kicad-developers team mailing list archive
Mailing list archive
Re: Hoping to contribute but I have some questions
Thank you so much for the prompt response and encouragement.
For those who are unaware, when a board is being debugged you typically look at the schematic and need to find the relevant component. If the PCB is numbered geographically this is much easier to do than if the board simply follows the numbering of the schematic. The flow of the design allows you to locate components on the schematic but unless those components are numbered geographically (i.e. right to left, top to bottom, etc) it can take forever to find them on the PCB. This is why this function is common on PCB design tools.
I think I understand what you mean with respect to files, but I figured it was an improvement to my prior approach which was to directly alter the sch files afterwards, plus I believe some other PCB suites do (or did) it this way. Basically the PCB editor provides a log of changes to reference designations and record it as was/is (i.e. C19 C6 means rename C9 as C6).
Nevertheless, I was unaware of the KiwayMailIn() functions but I figured something like that might exist based upon the behavior of Kicad when I had both PCBnew and eeSchema open. I will look into this further as it sounds like a superior approach as it would ensure the schematic and the PCB remain coherent (if that is the right term).
You are right: this would not be a tool per se but a command run from the menu. Again, I apologize for my lack of relevant experience: I have written many thousands of lines of embedded c, but nothing in c++. As such I am new to the world of GUIs, objects, and so on, and the relevant terminology.
Given this would be a command run from the menu, is there a guide to adding one somewhere for PCBnew and/or eeSchema?
From: Seth Hillbrand <seth@xxxxxxxxxxxxx>
Sent: January 4, 2019 1:19 PM
To: Brian Piccioni <brian@xxxxxxxxxxxxxxxxxxxxx>
Cc: 'KiCad Developers' <kicad-developers@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Kicad-developers] Hoping to contribute but I have some questions
Am 2019-01-04 12:51, schrieb Brian Piccioni:
> I am still keen to attempt to incorporate geographical component
> annotation into KiCad.
This could be an interesting feature. I'll be keen to see what you come up with.
> The first thing I want to do is to add the ability for eeSchema to
> import a “was/is” file to update schematic annotation.
I would prefer that you avoid files in this action. They generally clutter the user space and have cross platform differences that can cause issues. Instead, I would recommend that you look at the
KiwayMailIn() functions to define a new mail command from pcbnew -> eeschema. You could also define a command from eeschema to pcbnew requesting the position information.
> 1) Where are the file IO functions? I have searched for (for example)
> LoadProjectFIle and find the prototype but not the actual function.
> Similarly I find the prototype for SaveEEFile() but not the actual
I'd avoid these. They are generally listed as *_plugin.cpp in the relevant program directories. So eeschema has sch_plugin.cpp that is the base class for sch_legacy_plugin.cpp and sch_eagle_plugin.cpp.
Similar things are done in pcbnew
> 2) I would like to copy as much of the existing code and dialogs as
> possible (i.e. make new dialog based off another dialog) but when I
> open, for example, dialog_annotate_base.h I see
All of the *_base files are generated from wxformbuilder. These are the *.fbp files. The files of the same name but without the _base extension are the overloaded classes that we write by hand.
> 3) There is a guide on the Kicad documentation “Tool framework” which
> describes adding a tool to PCBNew. Is there a similar guide to adding
> a tool/function to eeSchema? How do I go about this?
There is not currently a tool framework in Eeschema. This will be coming in v6. For now, I'd recommend not developing Eeschema tools as the framework will change. That said, your proposed addition does not sound like a tool but rather a command or plugin that can be run from the menus.