Error in tool_offsetview.py

More
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.

More
2 years 1 month ago #310879 by MarkoPolo
Yes, it's ok now, thanks..

Please Log in to join the conversation.

More
2 years 1 month ago #311059 by MennilTossFlykune
Would it be possible for qt5_graphics.py to use QOpenGLWidget instead of QGLWidget? It solves a weird issue with opacity for me.

QGLWidget:


QOpenGLWidget:


The files I've attached should contain the necessary changes

Please Log in to join the conversation.

More
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.

Please Log in to join the conversation.

More
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.

More
2 years 4 weeks ago #311167 by MennilTossFlykune

Pushed the changes to master. Thank you. 
Thanks, I forgot one thing however, of course...
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.

More
2 years 4 weeks ago #311202 by snowgoer540

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.

More
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.

More
2 years 4 weeks ago #311214 by MennilTossFlykune
In gcode_graphics.py, yet another self.makeCurrent()
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)
Does that work?

Please Log in to join the conversation.

More
2 years 4 weeks ago #311215 by MarkoPolo
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
Powered by Kunena Forum