← Back to team overview

kicad-developers team mailing list archive

Re: Back annotate references from PCB

 

I noticed one problem. It's possible to add a footprint to PCB without
schematic. Some people might want to do that (e.g. mounting holes or
fiducials), yet back-annotate. It's not possible now.

Greying out unused options is a good idea, polite towards the user, better
usability.

Annotation is changing reference designators, right? If changing values and
footprints is implemented it's not annotation and clearly shouldn't be in
the annotation dialog. Even if they aren't implemented, I find having this
back-annotation option in the eeschema annotation dialog cumbersome or
strange for some reason, I don't know why. Maybe I just expect symmetric
update possibilities, i.e. Tools->Update PCB from schematic / Tools->Update
schematic from PCB. In that case the dialogs must be different, of course.
But maybe it's just my workflow: I use eeschema Tools->Update PCB. So I
expect to have the ability to push the changes instead of pulling.

BTW, about the possibility of changing the footprint - I have always found
being able to change footprints in pcbnew strange because then it's out of
sync with the schematic and it has to be changed in the schematic manually
and updated to layout anyways. Being able to update it from the layout to
the schematic looks like an obvious missing feature.

Eeli Kaikkonen

la 30. marrask. 2019 klo 9.54 Alexander Shuklin (jasuramme@xxxxxxxxx)
kirjoitti:

> Dear all!
> Thanks for your helpful comments. I want to show you draft of what
> I've done for just now.
> I know, that sometimes people don't like if somebody change their
> code, I just rearranged some. In existing algorithms I divide method
> to 2 parts for I could reuse it in my patch(made
> checkForDuplicatedElements from SCH_REFERENCE_LIST::CheckAnnotation).
> I just cannot find better solution to do that. And I added some helper
> functions to the SCH_REFERENCE with witch you can get data about
> component faster. I would say that changes should be in separate
> commit. If them acceptable, should I divide my patch when it will be
> ready?
> In old pieces where I touched the code, I tried to leave code
> formatting like it was. I'm not sure if I had to. Git checks suggest
> to reformat it, but I feel it looks better like it's done already.
> I almost haven't done anything with design. I just added "Back
> annotate from PCB" option to the annotation dialog (see in the
> screenshot) and I had a plan to grey out some not useful(for back
> annoation) dialog options when you chose that option and enable them
> back when you moved to another one.
> But... Eeli came with idea that if PCB holds not only references, but
> also footprints and values, we can back-annotate them to the schematic
> as well. I would say, you need to have checkboxes then with options
> "references, values, footprints" and probably that's better to make a
> new dialog for that. I don't like to create new dialog, but if I will
> add them to existing annotation dialog, I believe that will look
> messy. What would you think?
> Can you advice me with some code design? In my primary job I usually
> want to split functions on small pieces, but in that case it will be
> too much methods in the class. So, normally I'm trying to split
> classes as well. Now I see that SCH_EDIT_FRAME is already very big. So
> I don't want to have more than one method for back-annotation. Is it
> ok to use some independent function, (which is not member of
> SCH_EDIT_FRAME) like I did in annotate.cpp (int
> getPcbModulesFromCPTREE) ?
> And if you have any other code suggestions please, don't hesitate to tell.
> Wayne, I've checked my code behavior with multi components, with
> components re-used in schematics in one project or separate projects,
> with PCB which is not up to date with schematic and it don't break it.
> If it found any errors it opens "Update PCB from Schematic" dialog
> Another thing is: I was looking for undo/redo feature and now it holds
> different changes for different sheets. Basically if you back annotate
> more than one sch files, you can run undo only for one sheet. I would
> say in that case there's no point to implement undo/redo feature now,
> as it will confuse a lot. Or undo behavior has to be changed somehow.
> You don't have undo feature in annotation either, probably for same
> reason.
>
> Many thanks, I hope my patch is not very bad.
> You can find that patch in my fork:
>
> https://github.com/jasuramme/kicad-source-mirror/commit/64dc222de6149cc789158db80bbe0696cf47dc3d
>
>

Follow ups

References