• NX二次开发-隐藏对象UF_OBJ_set_blank_status


     1     NX9+VS2012
     2 
     3     #include <uf.h>
     4     #include <uf_curve.h>
     5     #include <uf_obj.h>
     6 
     7 
     8     UF_initialize();
     9 
    10     //起点
    11     double ArcStartPoint[3];
    12     ArcStartPoint[0] = 0.0;
    13     ArcStartPoint[1] = 0.0;
    14     ArcStartPoint[2] = 0.0;
    15     tag_t ArcStartPointTag = NULL_TAG;
    16     UF_CURVE_create_point(ArcStartPoint, &ArcStartPointTag);
    17 
    18     //终点
    19     double ArcEndPoint[3];
    20     ArcEndPoint[0] = 100.0;
    21     ArcEndPoint[1] = 0.0;
    22     ArcEndPoint[2] = 0.0;
    23     tag_t ArcEndPointTag = NULL_TAG;
    24     UF_CURVE_create_point(ArcEndPoint, &ArcEndPointTag);
    25 
    26     //第三点
    27     double Arc3Point[3];
    28     Arc3Point[0] = 50.0;
    29     Arc3Point[1] = 50.0;
    30     Arc3Point[2] = 0.0;
    31     tag_t Arc3PointTag = NULL_TAG;
    32     UF_CURVE_create_point(Arc3Point, &Arc3PointTag);
    33 
    34     //设置类型
    35     UF_CURVE_limit_t limit[2];
    36     UF_CURVE_limit_p_t pLimit[2] = { &limit[0], &limit[1] };
    37     limit[0].limit_type = UF_CURVE_limit_to_entity;
    38     limit[0].limiting_obj = ArcStartPointTag;//按点
    39     limit[1].limit_type = UF_CURVE_limit_to_entity;
    40     limit[1].limiting_obj = ArcEndPointTag;//按点
    41 
    42     tag_t SupportPlane = NULL_TAG;//放置平面
    43     tag_t ArcTag = NULL_TAG;
    44     UF_CURVE_create_arc_3point(ArcStartPointTag, ArcEndPointTag, Arc3PointTag, pLimit, SupportPlane, FALSE, &ArcTag);
    45 
    46     //隐藏圆弧
    47     UF_OBJ_set_blank_status(ArcTag, UF_OBJ_BLANKED);//UF_OBJ_BLANKED隐藏对象,UF_OBJ_NOT_BLANKED显示对象
    48 
    49     UF_terminate();

  • 相关阅读:
    sprint2第五天任务完成情况
    sprint2第四天任务完成情况
    sprint2第三天任务完成情况
    spark编程基础1
    git基本命令
    自定义bean对象实现序列化接口(Writable)
    HDFS 2.X新特性
    win10-idea连接hdfs集群
    centos6-yum源失效问题
    hadoop-源码编译
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/10957326.html
Copyright © 2020-2023  润新知