Code:
if hal_present:
mycomp = hal.component("boundaries")
mycomp.newpin("max_lim_x",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("min_lim_x",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("mid_lim_x",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("max_lim_y",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("min_lim_y",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("mid_lim_y",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("max_lim_z",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("min_lim_z",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.newpin("mid_lim_z",hal.HAL_FLOAT,hal.HAL_OUT)
mycomp.ready()
if vars.metric.get():
conv = 1
else:
conv = 1/25.4
# this function is called at [DISPLAY]CYCLE_TIME interval
def user_live_update():
min_extents = from_internal_units(o.canon.min_extents, conv)
max_extents = from_internal_units(o.canon.max_extents, conv)
mycomp['min_lim_x'] = min_extents[0]
mycomp['max_lim_x'] = max_extents[0]
mycomp['mid_lim_x'] = min_extents[0] + (max_extents[0] - min_extents[0])/2
mycomp['min_lim_y'] = min_extents[1]
mycomp['max_lim_y'] = max_extents[1]
mycomp['mid_lim_y'] = min_extents[1]+ (max_extents[1] - min_extents[1])/2
mycomp['min_lim_z'] = min_extents[2]
mycomp['max_lim_z'] = max_extents[2]
mycomp['mid_lim_z'] = min_extents[2]+ (max_extents[2] - min_extents[2])/2
this code create new pin BOUDARIES and you can use it in pyvcp or glade.
I have problem with remap m6 code. Boudaries are calculated with path to tool change and i dont know haw to discard remap code from calculation.