gcodegraphics set_plot_colors

More
5 years 2 weeks ago #223146 by snowgoer540
This is probably a long shot, but is it possible to set jog, traverse, feed, arc, toolchange, probe RGBA via stylesheets?

Just was exploring this this evening and thought I would ask, nothing super pressing just was having fun. I see font should be possible for the DRO, but that was all I saw.

There are other ways to do it (adding a section to .prefs for example). But doesnt hurt to ask :)

Please Log in to join the conversation.

More
5 years 2 weeks ago #223172 by cmorley
Not currently.
I had envisioned adding tool color to the tool editor at one time - but havent tried that either.

Please Log in to join the conversation.

More
5 years 2 weeks ago #223180 by snowgoer540
I figured as much. Maybe I will go the preferences file route for now.

The colored tool thing seems like it would be neat for mills/etc.

Also, I was having a poke around github this morning, and I noticed that in lib/python/qtvcp/widgets there is a jog_increments.diff that looks like it might have gotten uploaded accidentally amidst other updates instead of actually changing jog_increments.py.

Here is the commit that added it for reference: github.com/LinuxCNC/linuxcnc/commit/c6c4...4101e509bb6b7a808b53

Please Log in to join the conversation.

More
5 years 2 weeks ago #223198 by cmorley
ok thanks. I'll clean that up soon.

Please Log in to join the conversation.

More
5 years 2 weeks ago #223307 by cakeslob
preference file/tool table, that would be slick.
Here is my crude axis implementation
Code:
def backplot():            # tool 1 = #Red (255,0,0)       if s.tool_in_spindle == 1:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,0,0,255),                                     (255,0,0,255),                                     (255,255,255,255),                                     (0,255,255,255))       #tool 2 = #Lime (0,255,0)       elif s.tool_in_spindle == 2:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                 #tool 8 = #Blue (0,0,255)       elif s.tool_in_spindle == 8:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,0,255,255),                                     (0,0,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                     #tool 22 = #Yellow (255,255,0)       elif s.tool_in_spindle == 22:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,255,0,255),                                     (255,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))          #tool 24 = #Cyan (0,255,255)       elif s.tool_in_spindle == 24:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,255,255),                                     (0,255,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                                                 #tool 7 = #Magenta / (255,0,255)       elif s.tool_in_spindle == 7:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,0,255,255),                                     (255,0,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                       #tool 18 = #Maroon (128,0,0)       elif s.tool_in_spindle == 18:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (128,0,0,255),                                     (128,0,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                    #tool 3 = #Olive (128,128,0)       elif s.tool_in_spindle == 3:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (128,128,0,255),                                     (128,128,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                                                                             else:              live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))       

Please Log in to join the conversation.

More
5 years 2 weeks ago #223317 by cmorley
I pushed to master the ability to set feed, rapid and jog color with stylesheets (or in designer )
Code:
#gcodegraphics{ qproperty-jog_color: blue; qproperty-Feed_color: white; qproperty-Rapid_color: yellow; }

Please Log in to join the conversation.

More
5 years 2 weeks ago #223318 by snowgoer540
Nice!!!  Thanks! 

Two questions:
1.  Does feed cover arc colors as well (I haven’t looked at the commit).  I just very recently through messing around with these learned that they are in fact two different colors of puke pink :laugh:
2.  Instead of “blue” or “yellow”, etc.  can one also set it via the RGBA color (to do control alpha)?

Thanks again, I was getting ready to add this to qtplasmacs preferences and now I don’t have to :)

Please Log in to join the conversation.

More
5 years 2 weeks ago #223321 by cmorley
feed covers arc and feed.

I forgot to try RBGA in stylesheets but it should work fine.

Please Log in to join the conversation.

More
5 years 2 weeks ago #223324 by cmorley
yes it works

Please Log in to join the conversation.

More
5 years 2 weeks ago #223340 by snowgoer540
This is awesome!  Thanks again!

Please Log in to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum