zoukankan      html  css  js  c++  java
  • NX二次开发-UFUN创建圆形阵列UF_MODL_create_circular_iset

    例子转载自 胡工NX二次开发论坛https://www.ugapi.com/thread-1028.html

    用这个函数做圆形阵列必须要执行布尔运算,不做布尔运算,或者布尔运算失败,函数就会执行失败。

    NX9+VS2012
    
    #include <uf.h>
    #include <uf_modl.h>
    
    
    UF_initialize();
    
    double origin[3] = { 0.0, 0.0, 0.0 };
    double orig_iset[3] = { 0.0, -0.75, 0.0 };
    double direction[3] = { 0.0, 0.0, 1.0 };
    char *height = ".25";
    char *diam_cover = "2.0";
    char *diam_hole = "0.5625";
    char *diam_iset = "0.21875";
    char *part_name = "cover";
    UF_FEATURE_SIGN create = UF_NULLSIGN;
    UF_FEATURE_SIGN sub = UF_NEGATIVE;
    tag_t cover_id, hole_id, iset_id, feat_obj, part;
    uf_list_p_t feat_list;
    int english_units = 2;
    
    UF_MODL_create_cyl1(create, origin, height, diam_cover, direction,&cover_id);
    
    UF_MODL_create_cyl1(sub, origin, height, diam_hole, direction,&hole_id);
    
    UF_MODL_create_cyl1(sub, orig_iset, height, diam_iset, direction,&iset_id);
    UF_MODL_create_list(&feat_list);
    UF_MODL_put_list_item(feat_list, iset_id);
    
    UF_MODL_create_circular_iset(0, origin, direction, "3", "120",feat_list, &feat_obj);
    
    UF_MODL_delete_list(&feat_list);
    
    UF_terminate();
    
    Caesar卢尚宇
    2020年5月20日

  • 相关阅读:
    flask helloworld
    (16)centos7 日志文件
    (15)centos7 系统服务
    (14)centos7 进程管理
    (13)centos7 任务计划
    (12)centos7 环境变量配置
    [BZOJ2045]双亲数(莫比乌斯反演)
    bzoj2018 [Usaco2009 Nov]农场技艺大赛
    bzoj 1001 [BeiJing2006]狼抓兔子
    bzoj 5056: OI游戏 最短路树的计数
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/12925844.html
Copyright © 2011-2022 走看看