*-----shift all data according to the MCHINE ZERO indicated by the
* user in the POSTPR interaction
TRANS_MATX = 0 - X_MACH ;
TRANS_MATY = 0 - Y_MACH ;
TRANS_MATZ = 0 - Z_MACH ;
*-----shift the HOME according to the MCHINE ZERO indicated by the
* user in the POSTPR interaction
Xhome = X_HOME - X_MACH ;
Yhome = Y_HOME - Y_MACH ;
Zhome = Z_HOME - Z_MACH ;
*-----tool location is HOME
Xold = X_HOME ;
Yold = Y_HOME ;
Zold = Z_HOME ;
*-----Save the first origin data for later use
IF_SET (FirstOriginChange _EQ_ YES )
XfirstOrigin = X_ORIGIN ;
YfirstOrigin = Y_ORIGIN ;
ZfirstOrigin = Z_ORIGIN ;
FirstOriginChange = NO ;
END_IF ;
*.....distance between the rotation center and the ORIGIN
TRANS_MATX = X_ORIGIN - XfirstOrigin - X_MACH ;
TRANS_MATY = Y_ORIGIN - YfirstOrigin - Y_MACH ;
TRANS_MATZ = Z_ORIGIN - ZfirstOrigin - Z_MACH ;
* SET_OFF CIR_INTERP ; (去除 * 号则不输出G02、G03)
*.....check for change in orientation ( 4,5 axis positioining )
FlagError = NO ;
Flagrotmac = no ;