UG二次开发 创建圆弧 UF_CURVE_create_arc

文章作者:里海
来源网站:https://blog.csdn.net/WangPaiFeiXingYuan


简介:

        UG二次开发 创建圆弧 UF_CURVE_create_arc

代码:

    //圆心 douCenter
    //直径 douD
    //所在平面的法向 douVec
    int tk_create_arc(double douCenter[3], double douD, double douVec[3], 
tag_t *tagArc)
    {
        //tag_t tagP;
        //UF_CURVE_create_point(douCenter, &tagP);
        UF_CURVE_arc_t arc_coords;
        arc_coords.start_angle = 0.0;         //起始角度
        arc_coords.end_angle = 360.0 * DEGRA; //终止角度
        arc_coords.radius = douD / 2; //半径

        double douTemp[9];
        UF_MTX3_initialize_z(douVec, douTemp);
        UF_CSYS_create_matrix(douTemp, &arc_coords.matrix_tag);
        UF_MTX3_vec_multiply(douCenter, douTemp, arc_coords.arc_center);
        UF_CURVE_create_arc(&arc_coords, tagArc);
        return 0;
    }

猜你喜欢

转载自blog.csdn.net/WangPaiFeiXingYuan/article/details/129871139