Change colored axis reference pointers in Preview tab gnomon

More
31 Jan 2024 17:23 #292080 by comjon
For those not familiar with the term 'gnomon' I learned about it in the context of MasterCAM but do not think in LinuxCNC we use the same reference. It is the colored 3 vector pointy thingy that displays in the Preview tab and usually at the homed point for a;; three axes on a 3 axes mill. Well anyway, by default it seems LinuxCNC StepConf builds new configurations with the 1st cartesian coordinate quadrant as the plot area; when viewed in the Preview tab the gnomon implies a reference point at the lower left and this kind of implies which direction the axes table will move. The X axis gnomon pointer is intuitive. On my mill, the table moves to the left and the gnomon leader line is saying " hey look the spindle and tool are traversing to the right across the work". However, the Y axis points in a direction that both frames the 1st quadrant of the cartesian coordinate system, and has the tool moving relative to the work in the opposite direction. On my mill as many others, the cartesian coordinate the work is performed in is quadrant 4, (right lower). What is interesting is that the table movement and AXIS display are exactly what I expect, it just drives me a bit bonkers seeing the gnomon vector pointy thing out of place and pointing the wrong direction. How do I change ONLY the way the pointers orient, please ? I really hope my question does not give everyone a headache today. ;) Pic of gnomon attached.

I have researched the help forum for answers, but none of the issues described in detail as mine. I tired several settings changes also, and while I was able to invert the splash 'LinuxCNC' code, that is not really what I want to do. 
Attachments:

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

More
31 Jan 2024 17:42 #292081 by Aciera
Not entirely sure I understand what you are saying but the coordinate symbol in the preview is located in the current work offset zero position and the arrows point in the positive direction of the XYZ axes.
Are you saying that you want the Y arrow to point in the negative direction?

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

More
31 Jan 2024 17:59 #292084 by comjon

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

More
31 Jan 2024 18:51 #292092 by Aciera
For this you would need to modify the file 'glcanon.py' where the coordinate symbol is created.

Line 1789 and following:
        glColor3f(*self.colors['axis_y'])
        glBegin(GL_LINES)
        glVertex3f(0.0,0.0,0.0)
        glVertex3f(0.0,1.0,0.0)
        glEnd()

        if view != y:
            glPushMatrix()
            glTranslatef(0, 1.2, 0)
            if view == x:
                glTranslatef(0, 0, -0.1)
                glRotatef(90, 0, 1, 0)
                glRotatef(90, 0, 0, 1)
            glScalef(0.2, 0.2, 0.2)
            self.hershey.plot_string(letters[1], 0.5)
            glPopMatrix()

I have not tested this but maybe try changing the fourth line above to:
        glVertex3f(0.0,-1.0,0.0)

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

More
31 Jan 2024 22:13 #292107 by comjon
Thanks Aciera that worked for moving the y axis line, wonder if there is a way to also to move the labeling letter 'Y'.

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

More
01 Feb 2024 05:03 #292122 by Aciera
Try changing :

glTranslatef(0, 1.2, 0)

to :

glTranslatef(0, -1.2, 0)

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

More
01 Feb 2024 17:28 #292145 by comjon
That worked, again my thanks to you.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.171 seconds
Powered by Kunena Forum