• NX二次开发-创建圆弧(圆心-半径)UF_CURVE_create_arc_center_radius


     1     NX9+VS2012
     2 
     3     #include <uf.h>
     4     #include <uf_curve.h>
     5     #include <uf_modl.h>
     6 
     7     UF_initialize();
     8 
     9     //圆心点
    10     double p1[3] = {0.0, 0.0, 0.0};
    11     tag_t CenterTag = NULL_TAG;
    12     UF_CURVE_create_point(p1, &CenterTag);
    13 
    14     //辅助点
    15     double HelpPoint[3] = {100.0, 0.0, 0.0};
    16     tag_t HelpPointTag = NULL_TAG;
    17     UF_CURVE_create_point(HelpPoint, &HelpPointTag);
    18 
    19     //类型
    20     UF_CURVE_limit_t limit[2];
    21     UF_CURVE_limit_p_t pLimit[2] = { &limit[0], &limit[1] };
    22     limit[0].limit_type = UF_CURVE_limit_value;
    23     limit[0].value = 0;//按值
    24     limit[1].limit_type = UF_CURVE_limit_value;
    25     limit[1].value = 90;//按值
    26 
    27     //创建XZ基准平面,用来放圆弧
    28     double PlanePoint[3] = { 0.0, 0.0, 0.0 };
    29     double Direction1[3] = { 0.0, 1.0, 0.0 };
    30     tag_t DplaneTag = NULL_TAG;
    31     UF_MODL_create_fixed_dplane(PlanePoint, Direction1, &DplaneTag);
    32     
    33     tag_t ArcTag = NULL_TAG;
    34     UF_CURVE_create_arc_center_radius(CenterTag, 100, HelpPointTag, pLimit, DplaneTag, FALSE, &ArcTag);
    35 
    36     UF_terminate();

  • 相关阅读:
    条件运算符 (?:)
    SVN地址修改
    dev -gridview隐藏子表标题
    继承与 Data Member(3)
    继承与 Data Member(2)
    继承与 Data Member(1)
    Data Member 的存取
    Data Member 的布局
    Data Member 的绑定
    对于 sizeof(class_name) 值的讨论(2)
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/10957304.html
Copyright © 2020-2023  润新知