int count = 0;
tag_t* objects;
UF_UI_ONT_ask_selected_nodes(&count, &objects); //获取当前加工导航器选中的对象数量和tag
if (count <= 0)
{
return 0;
}
UF_CUT_LEVELS_t* cut_levels_ptr_addr = NULL; //读工序的切削层
UF_CUT_LEVELS_load(objects[0], &cut_levels_ptr_addr);
int num;
num = cut_levels_ptr_addr[0].num_levels;//获取切削层的层数
//a=cut_levels_ptr_addr[0].cut_levels;
print("层数");
print(num);
//读最高层 0是顶层
UF_CUT_LEVEL_single_t* level_data_ptr_addr;
UF_CUT_LEVELS_ask_level(cut_levels_ptr_addr, 0, &level_data_ptr_addr);//获取第一个工序的切削层
print("范围深度");
for (size_t i = 0; i < num; i++)
{
double level = level_data_ptr_addr[i].z_level;//读取第一个工序切削层的第一层
print(level);
}
print("切削深度");
for (size_t i = 0; i < num; i++)
{
double depth = level_data_ptr_addr[i].local_cut_depth;
print(depth);
}