User-defined netclass colours

Bug #1530637 reported by Artsiom Shchatsko
114
This bug affects 23 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

It would be very handy to be able to assign a color to a net in layout.

Tags: pcbnew
xzcvczx (xzcvczx)
Changed in kicad:
importance: Undecided → Wishlist
tags: removed: wishlist
Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

To a net in ratsnest, to routed tracks/vias or both?

Tom

Revision history for this message
Artsiom Shchatsko (cioma) wrote :

To routed tracks, vias and footprint pads

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

How to distinguish between user-assigned net colors and layer colors then?

Revision history for this message
Artsiom Shchatsko (cioma) wrote :

Net color is a property of a net and layer color is a property of a layer. Net color has a higher priority than a layer color (i.e. if a net has a color assigned then layer color is ignored and all elements of the net are shown in the assigned color).

Revision history for this message
Artsiom Shchatsko (cioma) wrote :

I quickly took a look in kicad_pcb file and it seems layer colors are not stored there. If that's the case then implementing discussed functionality might require extending kicad_pcb file format and I'd understand if developers would be reluctant to do that.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1530637] Re: Wishlist: assign a color to a net in layout

I would prefer highlighting all of the tracks, vias, and footprint pads
of a net rather than a user defined colors. Would that be acceptable?
I would most likely be just as effective and easier to implement. I
would also prefer different colors for the ratsnest which is really
helpful when routing a board.

On 1/3/2016 11:58 AM, Artsiom Shchatsko wrote:
> To routed tracks, vias and footprint pads
>

Revision history for this message
Artsiom Shchatsko (cioma) wrote : Re: Wishlist: assign a color to a net in layout

Well, as I understand, net highlighting is already implemented (Ctrl+LMB click on a net) which is useful but doesn't address the following scenario:

A complex IC has ten power supply rails. I need to place decoupling capacitors on all of them, break-out and route power nets. While doing that I might need to compromise on some decoupling capacitors, power or ground vias etc. If I could assign colors to nets it would be way easier to perform that task.

Other scenarios like coloring DDR3 memory data, control/address and clock nets are valid too.

In the end of the day I think what I actually need is an easy way to visually identify nets in layout. Color seems to be the obvious way to do that but perhaps people can suggest other ways.

Revision history for this message
Nick Østergaard (nickoe) wrote :

FYI Jeppe Johansen already made a patch to support netclass coloring, which you can then switch to when routing your DDR3 memory. You should seriously give that a look and try.

http://j-software.dk/kicad/netclass-color.patch

Revision history for this message
Nick Østergaard (nickoe) wrote :

You enable it on the new bottommost icon on the left toolbar. The icons is currently the same image as high contrast mode display button.

Revision history for this message
Jeppe Johansen (jeppe-i) wrote :

Some pictures of the above patch.

Netclass coloring: http://j-software.dk/kicad/NC.png
Netclass color+high intensity: http://j-software.dk/kicad/NC_HighIntensity.png
Configuration of colors done through netclass setup: http://j-software.dk/kicad/NetClasses.png

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

With the current HEAD, after applying the attached patch it is required to regenerate code for DIALOG_DESIGN_RULES_BASE class with wxFormBuilder.

There are minor code formatting issues (spaces between brackets and parameters in function calls, NetClassColorRenderer -> NETCLASS_COLOR_RENDERER). It would be great if there was a new toolbar icon for the new feature, though I do not see it as a requirement now. The biggest obstacle is, it changes the .kicad_pcb file format, but I realize the net color settings have to be saved in the same file. We need Wayne's opinion here.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Why to save an user preference (a color setting) in the .kicad_pcb file?
It can be also saved in the project config file.

Revision history for this message
Artsiom Shchatsko (cioma) wrote :

I agree with Jean-Pierre, project config file seems to be a way better place to keep colors.
This would allow implementing both netclass coloring and separate net coloring without changing .kicad_pcb file format.
I'd suggest the following color priority (from lowest to highest): layer, netclass, net.
By the way, would it make sense to keep layer colors in project config file too?

Having just a netclass coloring is a good step forward but it doesn't fully replace separate net coloring. E.g. like in Jeppe's screenshot ( http://j-software.dk/kicad/NetClasses.png) one would need to assign a separate netclass per net just to have it colored differently that all other nets which kind of breaks the netclass idea (i.e. same physical constraints for a set of nets).

I understand that implementing net coloring might not be the top priority so I suppose merging Jeppe's patch into the mainline would be a great improvement already.

Revision history for this message
Artsiom Shchatsko (cioma) wrote :

I mean merging Jeppe's patch after it's decided where colors shall be kept and the patch is adjusted accordingly.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1530637] Re: Wishlist: assign a color to a net in layout

I personally don't like the changes to the net class edit tab in the
design rules dialog. Colors are not design rules. They have no impact
on the board design. In this case colors are merely a per project user
preference. Setting the net and/or net class colors should happen in
either a third tab in the layer manager, a second tab in the color
dialog or some other place.

On 1/4/2016 11:53 AM, Artsiom Shchatsko wrote:
> I mean merging Jeppe's patch after it's decided where colors shall be
> kept and the patch is adjusted accordingly.
>

Revision history for this message
Artsiom Shchatsko (cioma) wrote : Re: Wishlist: assign a color to a net in layout

I agree with Wayne's comment

Sam (samuelchinnery)
Changed in kicad:
status: New → Incomplete
status: Incomplete → New
Jeff Young (jeyjey)
Changed in kicad:
status: New → Triaged
Jeff Young (jeyjey)
summary: - Wishlist: assign a color to a net in layout
+ User-defined netclass colours
Revision history for this message
Robert (robee) wrote :

Sorry for the newbie question, but it looks like someone has already written significant code for this and it was proposed to merge that code with Kicad 2 years ago, but looking at 5.0 rc2, I don't see any evidence of it being implemented. This feature is really handy, has anyone adopted the merging task? Has this already been done and I'm too dim to find it? I'm unfamiliar with patch files, but I imagine the patch is for a much older version of the code and wouldn't work with current versions, but perhaps the original author could produce a new patch?

Thanks!

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Robert,

Unfortunately, the patch had not exactly matched the projects plan and noone had time to fix it, so for the time being colored nets are not available. I agree it is a very useful feature, so there is a high chance we will implement it in v6.

Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Nicholas Dietz (poleguy) wrote :

Me too!

Revision history for this message
Iain Robertson (iain46) wrote :

Me too! I'd find it really useful if I could assign colours to nets (I think traces, vias, and pads of a particular net) during layout.

Revision history for this message
Vlad Ardelean (vard) wrote :

+1 for me, I would really love to use this feature. I use it all the time with other packages...

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

KiCad has migrated to Gitlab, this issue is available here: https://gitlab.com/kicad/code/kicad/-/issues/2003

Revision history for this message
Dang Minh Phuong (henrydang) wrote :

Me too, I like the way of Orcad Allegro, the user can right-click on the object and select assign net color, this can help the user can route the PCB when the ratsnest display is off.

Revision history for this message
Greg Gottschalk (greg-gottschalk) wrote :

Highly Useful

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/2003

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → Fix Released
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.