Back tool lathe mode not working

More
6 years 4 months ago #169724 by Schaap
Hello,

I’m trying out Gmoccapy 3.08.2 on linuxcnc 2.8pre-~ and I can’t seem to get back tool lathe to work.
In Axis, the setting BACK_TOOL_LATHE = 1 works just fine, but in Gmoccapy it has no effect.

I’ve searched the web/forum and haven’t found anyone reporting this issue.
Is this something known?

Thanks,
Ben

Please Log in to join the conversation.

More
6 years 4 months ago #169782 by bbsr_5a
the gemoccapy is as of the master 2.8 rewriten so it may not work on spetial things like you expect
if you like to check if it has worked on gmoccapy from 2.7.15 this woudt give programmers a info on how to solve it in the master

Please Log in to join the conversation.

More
6 years 4 months ago #169824 by fixer
I don't think this ever worked correctly.
My proposed fix in glcanon.py is (around line 1800):
Code:
lathe_shapes = [ None, # 0 (1,-1), (1,1), (-1,1), (-1,-1), # 1..4 (0,-1), (1,0), (0,1), (-1,0), # 5..8 (0,0) # 9 ] lathe_shapes_back = [ None, # 0 (-1,-1), (-1,1), (1,1), (1,-1), # 1..4 (0,-1), (-1,0), (0,1), (1,0), # 5..8 (0,0) # 9 ] def lathetool(self, current_tool): glDepthFunc(GL_ALWAYS) diameter, frontangle, backangle, orientation = current_tool[-4:] w = 3/8. if '-X' in self.geometry: frontangle = 360 - frontangle backangle = 360 - backangle radius = self.to_internal_linear_unit(diameter) / 2. glColor3f(*self.colors['lathetool']) glBegin(GL_LINES) glVertex3f(-radius/2.0,0.0,0.0) glVertex3f(radius/2.0,0.0,0.0) glVertex3f(0.0,0.0,-radius/2.0) glVertex3f(0.0,0.0,radius/2.0) glEnd() glNormal3f(0,1,0) if orientation == 9: glBegin(GL_TRIANGLE_FAN) for i in range(37): t = i * math.pi / 18 glVertex3f(radius * math.cos(t), 0.0, radius * math.sin(t)) glEnd() else: if '-X' in self.geometry: dx, dy = self.lathe_shapes_back[orientation] else: dx, dy = self.lathe_shapes[orientation] min_angle = min(backangle, frontangle) * math.pi / 180 max_angle = max(backangle, frontangle) * math.pi / 180 sinmax = math.sin(max_angle) cosmax = math.cos(max_angle) tanmax = math.cos(max_angle) sinmin = math.sin(min_angle) cosmin = math.cos(min_angle) tanmin = math.cos(min_angle) circleminangle = - math.pi/2 + min_angle circlemaxangle = - 3*math.pi/2 + max_angle d0 = 0 x1 = (w - d0) sz = max(w, 3*radius) glBegin(GL_TRIANGLE_FAN) glVertex3f( radius * dx + radius * math.sin(circleminangle) + sz * sinmin, 0, radius * dy + radius * math.cos(circleminangle) + sz * cosmin) for i in range(37): #t = circleminangle + i * (circlemaxangle - circleminangle)/36. t = circleminangle + i * (circlemaxangle - circleminangle)/36. glVertex3f(radius*dx + radius * math.sin(t), 0.0, radius*dy + radius * math.cos(t)) glVertex3f( radius * dx + radius * math.sin(circlemaxangle) + sz * sinmax, 0, radius * dy + radius * math.cos(circlemaxangle) + sz * cosmax) glEnd() glDepthFunc(GL_LESS)

Please Log in to join the conversation.

More
6 years 4 months ago #170130 by Schaap

bbsr_5a wrote: the gemoccapy is as of the master 2.8 rewriten so it may not work on spetial things like you expect
if you like to check if it has worked on gmoccapy from 2.7.15 this woudt give programmers a info on how to solve it in the master


I've checked both 2.7.14 and 2.7.15 (with Gmocappy version 1.5.11). With those versions, it works perfectly (doesn't seem to work in Axis GUI)

fixer wrote: I don't think this ever worked correctly.
My proposed fix in glcanon.py is (around line 1800):


Back tool lathe mode does seem to work in 2.7.x versions with Gmocappy.
I've tried your proposed fix, but that doesn't seem to resolve it for me in the 2.8 pre

Please Log in to join the conversation.

More
6 years 2 months ago #178043 by newbynobi
Sorry for the delay,

I just pushed a fix to LinuxCNC 2.8 for back tool lathe handling. Now it does work. I checked for the old state of the button and only changed the view of the preview if it was not Y or Y2. So if you would have changed the view once with the Y View button and stopped with that view the screen, it would have been correct. I now just set the preview according to the ini file settings.

Norbert

Please Log in to join the conversation.

Time to create page: 0.373 seconds
Powered by Kunena Forum