* Query the type and data of an automatic blank.
查询自动毛胚体的类型和数据。
*
* Return :
* Return code :
*
* Environment: Internal and External
*
* See Also:
* UF_CAM_set_auto_blank
*
* History: Released in V19.0
************************************************************************/
extern UFUNEXPORT int UF_CAM_ask_auto_blank
(
tag_t object_tag, /* <I> the operation or geometry group containing blank definition 操作或包含毛胚定义的向何体群组的tag*/
UF_CAM_blank_geom_type_t *geom_type, /* <O> type type of blank geometry defined 毛胚几何体的类型*/
double offset[6] 偏移数据 /* <O>
For geom_type = UF_CAM_auto_block_type, offset is an array of positive deltas to a minimal box aligned with the MCS which contains the specified part geometry.
对于毛胚几何体类型=UF_CAM_auto_block_type时,偏移数据是从包含零件几何体对齐加工坐标的最小包含体的正向增量。
Offset[0] = offset along +XM
Offset[1] = offset along -XM
Offset[2] = offset along +YM
Offset[3] = offset along -YM
Offset[4] = offset along +ZM
Offset[5] = offset along -ZM
For geom_type = UF_CAM_offset_from_part, offset is a single positive offset from the specified Part geometry.
对于毛胚几何体类型=UF_CAM_offset_from_part时,偏移数据是一个从零件几体上的正向偏移量。
Offset[0] = global offset of part geometry
Offset[1-5] unused */
);

{
UF_CAM_feature_geom_type,
UF_CAM_geometry_geom_type,
UF_CAM_facet_geom_type,
UF_CAM_auto_block_type,
UF_CAM_offset_from_part_type
};
上图中的:包容圆柱体、部件轮廓、部件凸包、IPW-处理中的工件,分别对应5、6、7、8,这几个娄型在头文件中未定义。
测试代码:
UF_UI_open_listing_window();
int iCount=0;
tag_t * tObj;
UF_UI_ONT_ask_selected_nodes(&iCount,&tObj);
UF_CAM_blank_geom_type_t eGeomType;
double dOffset[6];
UF_CAM_ask_auto_blank(tObj[0],&eGeomType,dOffset);
uc4404("eGeomType返回:",eGeomType);
switch(eGeomType)
{
case 0:
UF_UI_write_listing_window("毛胚体几何类型为:UF_CAM_feature_geom_type\n");
break;
case 1:
UF_UI_write_listing_window("毛胚体几何类型为:UF_CAM_geometry_geom_type\n");
break;
case 2:
UF_UI_write_listing_window("毛胚体几何类型为:UF_CAM_facet_geom_type\n");
break;
case 3:
UF_UI_write_listing_window("毛胚体几何类型为:UF_CAM_auto_block_type\n");
uc4406("+X方向偏移dOffset[0]",dOffset[0]);
uc4406("-X方向偏移dOffset[1]",dOffset[1]);
uc4406("+Y方向偏移dOffset[2]",dOffset[2]);
uc4406("-Y方向偏移dOffset[3]",dOffset[3]);
uc4406("+Z方向偏移dOffset[4]",dOffset[4]);
uc4406("-Z方向偏移dOffset[5]",dOffset[5]);
break;
case 4:
UF_UI_write_listing_window("毛胚体几何类型为:UF_CAM_offset_from_part_type\n");
uc4406("从零件几何体偏移量为",dOffset[0]);
break;
default:
break;
}