就上UG网学NX二次开发:
创建圆柱UG_OPEN_API函数: UF_MODL_create_cyl1();
使用案例:圆柱体在模具设计二次开发中,应用非常广泛,比如导柱、中托司等等,都要用到;
C++圆柱体
UG二次开发创建圆柱体C++源码:
- 头文件:
- #include <uf_modl.h>
- /* TODO: Add your application code here */
- /*中磊国际模具培训-创建圆柱体*/
- UF_FEATURE_SIGN sign = UF_NULLSIGN;
- double cyl_origin[3] = { 0.0, 0.0, 0.0 };
- char * cyl_height = { "20" };
- char * cyl_diam = { "10" };
- double cyl_direction[3] = { 0.0, 0.0, 1.0 };
- tag_t cyl_obj_id;
- UF_MODL_create_cyl1(sign,cyl_origin,cyl_height, cyl_diam,cyl_direction, &cyl_obj_id);
- /* Terminate the API environment */
复制代码
|