xinhaishukong 发表于 2016-8-23 20:25:33

请教一个关于solidcam后处理的问题

希望大家可以参考参考 是关于侧铣头的一些后置代码
Description:
@home_data contains information about the part home number, machine home number, planes, angles, shifts and transformation matrix.

@home_data location depends on VMID variable Home Data at Start:
if "YES", it appears after @def_tool
if "NO" appears after @end_program.

Parameters:
home_number:1 home_id:9

clearance_plane:50.000 tool_start_plane:70.000
work_upper_plane:0.000 zero_plane:-40.000
rotate_angle_x:0.000T rotate_angle_y:0.000T rotate_angle_z:0.000T
rotate_angle_x_dir:cw rotate_angle_y_dir:cw rotate_angle_z_dir:cw
x_angle_const_z:0.000T y_angle_const_z:0.000T dev_angle_z:0.000T
x_angle_const_z_dir:cw y_angle_const_z_dir:cw dev_angle_z_dir:cw
x_angle_const_y:0.000T z_angle_const_y:0.000T dev_angle_y:0.000T
x_angle_const_y_dir:cw z_angle_const_y_dir:cw dev_angle_y_dir:cw
y_angle_const_x:0.000T z_angle_const_x:0.000T dev_angle_x:0.000T
y_angle_const_x_dir:cw z_angle_const_x_dir:cw dev_angle_x_dir:cw
angle_4x_around_x:0.000T angle_4x_around_y:0.000T
angle_4x_around_x_dir:cw angle_4x_around_y_dir:cw
shift_x:0.000T shift_y:0.000T shift_z:0.000T
part_home_number:1 tool_z_level:500.000
tmatrix_I_1:1.000T tmatrix_I_2:0.000T tmatrix_I_3:0.000T tmatrix_I_4:0.000T
tmatrix_I_5:0.000T tmatrix_I_6:1.000T tmatrix_I_7:0.000T tmatrix_I_8:0.000T
tmatrix_I_9:0.000T tmatrix_I_10:0.000T tmatrix_I_11:1.000T tmatrix_I_12:0.000T
. tmatrix_I_13:0.000T tmatrix_I_14:0.000T tmatrix_I_15:0.000T tmatrix_I_16:1.000T
. x = cosy*cosz*x - sinz*cosy*y + siny*z
.. y = (-sinx*siny*cosz + cosx*sinz)*x + (sinx*siny*sinz + cosx*cosz)*y - sinx*cosy*z
z = (cosx*cosz*siny + sinx*sinz)*x + (-sinz*cosx*siny + sinx*cosz)*y - cosx*cosy*z
around Z
x = x*cos(dev_angle) - y*sin(dev_angle)
y = x*sin(dev_angle) + y*cos(dev_angle)
around Y
z = z*cos(dev_angle) - x*sin(dev_angle)
x = z*sin(dev_angle) + x*cos(dev_angle)
around X
y = y*cos(dev_angle) - z*sin(dev_angle)
z = y*sin(dev_angle) + z*cos(dev_angle)

This contains the same information as in @tmatrix .

This command is used at the end of the program to generate a sub-program for each home; you can later call this sub-program from the main program whenever you have to change the home position. If at some later point you need to change anything, you can easily do it only in one place (in the home sub-program).


tmatrix_I_1, tmatrix_I_2, tmatrix_I_3,
...
tmatrix_I_16 这个东西该怎么用呢
type: numeric
If the prepared rotation values are not good, you can use this rotation matrix to make your own position calculations.
页: [1]
查看完整版本: 请教一个关于solidcam后处理的问题