- Posts: 6803
- Thank you received: 0
Error in tool_offsetview.py
2 years 1 month ago #310875
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Ok. try again
should work now.
Please Log in to join the conversation.
2 years 1 month ago #310879
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Yes, it's ok now, thanks..
Please Log in to join the conversation.
- MennilTossFlykune
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
2 years 1 month ago #311059
by MennilTossFlykune
Replied by MennilTossFlykune on topic Error in tool_offsetview.py
Please Log in to join the conversation.
2 years 4 weeks ago #311111
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Works on my laptop -I'll test a few other systems.
But next time, please start a new thread for a new subject.
But next time, please start a new thread for a new subject.
Please Log in to join the conversation.
2 years 4 weeks ago #311150
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Pushed the changes to master. Thank you.
Please Log in to join the conversation.
- MennilTossFlykune
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
2 years 4 weeks ago #311167
by MennilTossFlykune
The views don't apply properly unless you call self.makeCurrent when you set them
Replied by MennilTossFlykune on topic Error in tool_offsetview.py
Thanks, I forgot one thing however, of course...Pushed the changes to master. Thank you.
The views don't apply properly unless you call self.makeCurrent when you set them
Code:
def set_current_view(self):
self.makeCurrent()
if self.current_view not in ['p', 'x', 'y', 'y2', 'z', 'z2']:
return
return getattr(self, 'set_view_%s' % self.current_view)()
Please Log in to join the conversation.
- snowgoer540
- Offline
- Platinum Member
-
Less
More
- Posts: 2580
- Thank you received: 0
2 years 4 weeks ago #311202
by snowgoer540
Clicking on a line segment in the preview no longer highlights it (and subsequently the gcode preview line as well), likewise clicking on a g code line doesn’t highlight in the preview window anymore either.
Replied by snowgoer540 on topic Error in tool_offsetview.py
Thanks, I forgot one thing however, of course...
Clicking on a line segment in the preview no longer highlights it (and subsequently the gcode preview line as well), likewise clicking on a g code line doesn’t highlight in the preview window anymore either.
Please Log in to join the conversation.
2 years 4 weeks ago #311210
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
In glcanon.py we are nit getting a buffer for some reason:
Code:
def select(self, x_view, y_view):
if self.canon is None: return
pmatrix = glGetDoublev(GL_PROJECTION_MATRIX)
glMatrixMode(GL_PROJECTION)
glPushMatrix()
glLoadIdentity()
vport = glGetIntegerv(GL_VIEWPORT)
gluPickMatrix(x_view, vport[3]-y_view, 5, 5, vport)
glMultMatrixd(pmatrix)
glMatrixMode(GL_MODELVIEW)
glSelectBuffer(self.select_buffer_size)
glRenderMode(GL_SELECT)
glInitNames()
glPushName(0)
if self.get_show_rapids():
glCallList(self.dlist('select_rapids', gen=self.make_selection_list))
glCallList(self.dlist('select_norapids', gen=self.make_selection_list))
try:
buffer = glRenderMode(GL_RENDER)
except Exception as e:
print(e)
buffer = []
if buffer:
print('buffer')
min_depth, max_depth, names = (buffer[0].near, buffer[0].far, buffer[0].names)
for point in buffer:
if min_depth < point.near:
min_depth, max_depth, names = (point.near, point.far, point.names)
self.set_highlight_line(names[0])
else:
print('No buffer')
self.set_highlight_line(None)
glMatrixMode(GL_PROJECTION)
glPopMatrix()
glMatrixMode(GL_MODELVIEW)
Please Log in to join the conversation.
- MennilTossFlykune
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
2 years 4 weeks ago #311214
by MennilTossFlykune
Replied by MennilTossFlykune on topic Error in tool_offsetview.py
In gcode_graphics.py, yet another self.makeCurrent()
Does that work?
Code:
def select_fire(self):
if self.inhibit_selection: return
if STATUS.is_auto_running(): return
if not self.select_primed: return
x, y = self.select_primed
self.select_primed = None
self.makeCurrent()
self.select(x, y)
Please Log in to join the conversation.
2 years 4 weeks ago #311215
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
For me adding self.makeCurrent() to gcode_graphics.py solves the problem. it works
Please Log in to join the conversation.
Time to create page: 0.649 seconds
