Hi,
what GUI are you planing? Just because I believe this thread is wrong here in the gmoccapy area. Should I move it to other GUI?
I am doing an small panel inside gmoccapy, where i want to display and calculate some cutting parameters. I found inside the gmoccapy.py file something like this and was wondering if I can use this inside my py-script.
Code:
def _update_toolinfo( self, tool ):
toolinfo = self.widgets.tooledit1.get_toolinfo( tool )
if toolinfo:
# Doku
# toolinfo[0] = cell toggle
# toolinfo[1] = tool number
# toolinfo[2] = pocket number
# toolinfo[3] = X offset
# toolinfo[4] = Y offset
# toolinfo[5] = Z offset
# toolinfo[6] = A offset
# toolinfo[7] = B offset
# toolinfo[8] = C offset
# toolinfo[9] = U offset
# toolinfo[10] = V offset
# toolinfo[11] = W offset
# toolinfo[12] = tool diameter
# toolinfo[13] = frontangle
# toolinfo[14] = backangle
# toolinfo[15] = tool orientation
# toolinfo[16] = tool info
self.widgets.lbl_tool_no.set_text( str( toolinfo[1] ) )
self.widgets.lbl_tool_dia.set_text( toolinfo[12] )
self.widgets.lbl_tool_name.set_text( toolinfo[16] )
# we do not allow touch off with no tool mounted, so we set the
# coresponding widgets unsensitive and set the description acordingly
if tool <= 0:
self.widgets.lbl_tool_no.set_text( "0" )
self.widgets.lbl_tool_dia.set_text( "0" )
self.widgets.lbl_tool_name.set_text( _( "No tool description available" ) )
self.widgets.btn_tool_touchoff_x.set_sensitive( False )
self.widgets.btn_tool_touchoff_z.set_sensitive( False )
else:
self.widgets.btn_tool_touchoff_x.set_sensitive( True )
self.widgets.btn_tool_touchoff_z.set_sensitive( True )
@Mike_Eitel
halui.tool.diameter float out
Current tool diameter, or 0 if no tool is loaded.
in my machine the is no parameter like this (just offsets and number).
@phillc54
thanks I will try this....