Changing the color of rapids path

More
25 Dec 2020 12:48 - 26 Dec 2020 10:48 #193173 by SvenH
After having a crash on the same location twice, iIt took some serious troubleshooting to find the cause.

I found I had a rapid going through the material which went through because of making a programmed corner in to a smooth rounded corner.

But the path was shown in dark green brown and that was lost in a sea of a black background and white and red traveled milling paths.

So I'd like to change the color of the path of the rapids that were actually traveled.
Do any of you know where this color is programmed?
Last edit: 26 Dec 2020 10:48 by SvenH.

Please Log in or Create an account to join the conversation.

More
25 Dec 2020 15:06 #193178 by tommylight
What GUI?

Please Log in or Create an account to join the conversation.

More
26 Dec 2020 04:59 #193210 by cmorley
rs274/glcanon.py

class GLCanonDraw:

This class's variable 'colors' set the colors of drawing for all the popular screens

Chris
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
03 Jan 2021 21:57 #193996 by cakeslob
ok then, with the recent updates from last week, lets get this going on axis now , someone help me out with this

we have 2 commits
axis/extension/emcmodule.cc
github.com/LinuxCNC/linuxcnc/commit/8acb...deafe67d7ad17b355c44

and the qtvcp qt5_graphics commit
github.com/LinuxCNC/linuxcnc/commit/94a7...891b4254a7ec3c8897f0

with the emcmodule changed, i should be able to pass the part from qt5_graphics, into axis.py via usercommand.py

def set_plot_colors(self, jog=None,traverse=None,feed=None,
                    arc=None,toolchange=None,probe=None):
        def C(s):
            a = self.colors[s + "_alpha"]
            s = self.colors[s]
            return [int(x * 255) for x in s + (a,)]

        if jog is None:
            jog = C('backplotjog')
        if traverse is None:
            traverse = C('backplottraverse')
        if feed is None:
           feed = C('backplotfeed')
        if arc is None:
            arc = C('backplotarc')
        if toolchange is None:
            toolchange = C('backplottoolchange')
        if probe is None:
            probe = C('backplotprobing')
        try:
            self.logger.set_colors(
                jog,
                traverse,
                feed,
                arc,
                toolchange,
                probe)
        except Exception as e:
            print(e)
that doesnt get me any errors, but i do not know how to set them for axis. I have an example from cmo for the qtvcp way

In the handler file (gcodegraphics needs to be the right widget name)

def initialized__(self):
        # set rapids to solid red:
        self.w.gcodegraphics.set_plot_colors(jog=(255,0,0,255))
        #return back to all defaults:
        self.w.gcodegraphics.set_plot_colors()

key words can be jog=None,traverse=None,feed=None,
arc=None,toolchange=None,probe=None

color = (red, green, blue, alpha)
each are 0-255
I have not tried to change color as the plotter is running - but it should work.


, but now to translate to axis, im not sure, i dont exactly understand self very well, but Im not sure what i should be calling on,
im just trying to tie it into a button to test
def change_job():
 self.w.gcodegraphics.set_plot_colors(jog=(255,0,0,255))

self.w.gcodegraphics.set_plot_colors(jog=(255,0,0,255))
not sure what I should change this to, or if im even on the right path. im trying out things like
" LivePlotter.set_plot_colors(jog=(255,0,0,255))"
"GlCanonDraw.set_plot_colors(jog=(255,0,0,255))"
"self.o.set_plot_colors(jog=(255,0,0,255))"

would the "def set_plot_colors" even go into axis.py or would it go into a different extension?
if axis.py is correct, do i need to put it into a different class or something?

Please Log in or Create an account to join the conversation.

More
04 Jan 2021 04:53 #194014 by cmorley
in the .axisrc file:
try:
    live_plotter.logger.set_colors((255,0,0,255),
                                    (0,255,0,255),
                                    (0,0,255,255),
                                    (255,255,0,255),
                                    (255,255,255,255),
                                    (0,255,255,255))
except Exception as e:
    print (e)

Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Powered by Kunena Forum