UF_CAM_ask_auto_blank UF_CAM_set_auto_blank

本文详细介绍了如何查询自动毛胚体的类型及其数据,包括偏移数据的解释和不同类型的毛胚几何体定义。通过示例代码演示了如何获取毛胚体几何类型及偏移值。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

* 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_ask_auto_blank - 阿尔法科技 - 阿尔法科技
 
毛胚几体的类型0-4在头文件中都有定义,分别对应:
enum UF_CAM_blank_geom_type_e
{
    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;
 }

转载于:https://www.cnblogs.com/nxopen/p/Alpha.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值