I was having issues with how the tool was being displayed in Axis in my configuration. My "mill" is an XZAB configuration (No "Y" axis).
I traced the issue to the ../lib/python/rs274/glcanon.py script
In the redraw method when rotating the tool it uses the geometry as parsed
by the axis.py. the problem is that axis reverses the order of the labels.
So AXZ-B becomes -BZXA
This works fine for the back plot and everything else but the glRotatef
calls in the redraw() function are reversed when GLOpen executes them (at
least this is my understanding).
I added the following (in bold) and everything seems to work for me: (There
was also an "import re" added near the top of the file)
glPushMatrix()
glTranslatef(*pos)
sign = 1
g = re.split(" *(-?[XYZABCUVW])", self.get_geometry())
g = "".join(reversed(g))
for ch in g: # Geometry in reverse order
if ch == '-':
sign = -1
elif ch == 'A':
glRotatef(rx*sign, 1, 0, 0)
sign = 1
elif ch == 'B':
glRotatef(ry*sign, 0, 1, 0)
sign = 1
elif ch == 'C':
glRotatef(rz*sign, 0, 0, 1)
sign = 1
I don't think this is the most efficient means to do this and would
appreciate feedback from the group.
Thank you!
-Tom
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
