Error in tool_offsetview.py

More
2 years 4 weeks ago #311202 by snowgoer540
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 or Create an account 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 or Create an account to join the conversation.

  • MennilTossFlykune
  • Offline
  • Senior Member
  • Senior Member
More
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()
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 or Create an account to join the conversation.

More
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
The following user(s) said Thank You: MennilTossFlykune

Please Log in or Create an account to join the conversation.

More
2 years 4 weeks ago #311222 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Hi Cmorley

I don't know if you plan to implement the layout in qtdrahon_hd
the same as in qtdragon. If so, I have a modified file, ready to use.
Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 4 weeks ago #311228 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py

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?
 
I added it to qt5_graphics and it didn't - I missed that gcode_graphics redefined it. thank you.
The following user(s) said Thank You: MennilTossFlykune

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.397 seconds
Powered by Kunena Forum