Wishlist: Differentiating netnames when originating from local labels of multiple instances of hierarchical sheets

Bug #1842906 reported by Dino Ghilardi
28
This bug affects 8 people
Affects Status Importance Assigned to Milestone
KiCad
Expired
Wishlist

Bug Description

When a sheet file is used multiple times in a schematic (i.e. copying the hierarchical sheet block), nets generated from a local label of different sheets result in having the same name shown on the PCB: As an example, in the attached project you see two nets with the same name ("a") that have not to be connected and this can be a little bit confusing for the user.

In the "inspect->list nets" dialog the full name (including the sheet name) is shown, so in that dialog there is not this problem (but the full name is of course usually too long to be shown inside a pad)

A possible improvement can be highlighting/coloring/changing_line_width of the net names that are shown duplicated on pcb so that the user sees at a glance that that name is partial (and should select the net or a pad to see the full net name at the bottom of the pcbnew window).

In the attached file a simple project example.

Cheers,
Dino.

Tags: pcbnew ui
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :
Revision history for this message
Rene Poeschl (poeschlr) wrote :

Instead of highlighting how about prefixing the shown name with three dots?

Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Well... three dots seems a better solution (since may be it is faster/easier to implement).

Revision history for this message
Ian McInerney (imcinerney) wrote :

How about this, ...*/net where * is the last digit of the sheetname. I think that is somewhat clearer than just the leading dots (if you wanted to, you could differentiate them that way).

The attached patch implements that.

Changed in kicad:
status: New → Confirmed
Changed in kicad:
importance: Undecided → Wishlist
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

@Ian
I tested the patch and seems good, but for net names that are not "duplicate" adds unnecessary information (since in that case there is no risk of confusing the netnames) making the shown names longer to read.

The optimum in my opinion should be adding the "...*/" only for "namesake" nets, so that when this feature is not needed it is "transparent".

Cheers,
Dino.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Ian, I like this idea but your patch does not address cases where the path of more than one sheet has the same last character? This would put you right back to the problem that generated this bug report. I suspect a complete fix would be a bit more complex than your patch. You would have to first determine all of the possible unique sheet path prefixes before the shortened net name can be generated and this could be more than one character depending on the number of sheets and how they are named. For instance, the sheet names foo, boo, and too would require the full name being prefixed to the net name.

Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Also adding too much characters to the name could become a problem (text scaled down to very small dimensions), so a good trade-off may be:

- prepend "..."+"last character of the sheet name"+"/" when that last char of the sheet name is unique between the sheets names that have the net we are labeling.
- prepend only ".../" if it is not, so that the user can see at a glance that to know the full name of the net he needs to click on it (".../" warns him on the fact that the name without path is not unique).
-do not prepend anything if the net name is unique (i.e. there are no nets with the same name in different sheets, as when there is only a single istance of a child sheet with unique names).

Cheers,
Dino.

Revision history for this message
Ian McInerney (imcinerney) wrote :

@Wayne, I was trying not to flood the netname with characters and make it very long and unreadable except on high zoom levels.

It seems to me we should to turn this into a user-configurable display option with the following possibilities (since I don't think this will be one-size fits all, and no matter the choice we make someone will comment on it):
1) Net label (the portion after the last /) <- Default since this is the existing display
2) Duplicate-aware labeling (prepends .../, or / if on the root sheet, if a duplicate net label exists, but doesn't make the display fully unique)
3) Unique labeling (including the sheet path until it becomes different and prepend with ...)
4) Full net name

Changed in kicad:
assignee: nobody → Ian McInerney (imcinerney)
status: Confirmed → In Progress
milestone: none → 6.0.0-rc1
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Ian, I just want a solution that solves the ambiguity issue which is the original problem. I'm less concerned about how the problem is solved. Your suggestion seems perfectly acceptable to me.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/3660

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.