Back tool lathe mode not working
- Schaap
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
01 Jun 2020 21:45 #169724
by Schaap
Back tool lathe mode not working was created 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
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 or Create an account to join the conversation.
- bbsr_5a
- Offline
- Platinum Member
Less
More
- Posts: 544
- Thank you received: 105
02 Jun 2020 09:24 #169782
by bbsr_5a
Replied by bbsr_5a on topic Back tool lathe mode not working
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
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 or Create an account to join the conversation.
- fixer
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 27
02 Jun 2020 17:11 #169824
by fixer
Replied by fixer on topic Back tool lathe mode not working
I don't think this ever worked correctly.
My proposed fix in glcanon.py is (around line 1800):
My proposed fix in glcanon.py is (around line 1800):
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 or Create an account to join the conversation.
- Schaap
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
04 Jun 2020 20:45 - 04 Jun 2020 20:46 #170130
by Schaap
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)
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
Replied by Schaap on topic Back tool lathe mode not working
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)
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
Last edit: 04 Jun 2020 20:46 by Schaap. Reason: more details
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
Less
More
- Posts: 2075
- Thank you received: 406
12 Aug 2020 16:14 #178043
by newbynobi
Replied by newbynobi on topic Back tool lathe mode not working
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
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 or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.130 seconds