UG爱好者

标题: UF_MODL_create_thru_curves函数怎么用? [打印本页]

作者: 呐哒呐哒    时间: 2017-4-6 14:54
标题: UF_MODL_create_thru_curves函数怎么用?
UF_MODL_create_thru_curves我用这个函数,按照图表详解UG NX二次开发的第107页,通过曲线生成曲面,在VS2010里生成dll没说有错误,但是在UG里运行DLL文件,总是说程序异常,或者出不来面,哪里有问题吗?求大神们指导,或者我的QQ1361050266,求加学习!谢谢!


{
UF_STRING_t s_section;
UF_STRING_t        s_spine;
int patch = 2, alignment = 2;
double value[ 5 ];
int vdegree = 3;
int vstatus = 0;
int        body_type = 0;
UF_FEATURE_SIGN boolean = UF_NULLSIGN;//布尔运算操作类型  单独创建
double tol[ 3 ] = { 0.001, 0.5*PI/180.0, 0.001}; //曲面生成精度
tag_t c_face_id[ 2 ] = {NULL,NULL};//第一条截面线与最后一条截面线相邻的表面对象
int c_flag[ 2 ] = {0,0};//与第一条主线与最后一条主线的约束关系
tag_t body_obj_id;
tag_t spp[ 30 ];

        spp[ 0 ] = spp[ 0 ] = r_helicoid_curved01_id;
//(r_helicoid_curved01_id是通过 UF_MODL_create_fitted_spline(&spline_data,&max_err,&max_err_pt,&r_helicoid_curved01_id); 创建的曲线)
        spp[ 1 ] = r_helicoid_curved02_id;
        spp[ 2 ] = r_helicoid_curved03_id;
        spp[ 3 ] = r_helicoid_curved04_id;
        spp[ 4 ] = r_helicoid_curved05_id;


UF_MODL_init_string_list(&s_section);//初始化截面线串链表
UF_MODL_create_string_list(5, 5, &s_section);//创建截面线串链表
s_section.num = 5;
for(i = 0; i < 5; i++)
{
        s_section.string[ i ] = 1;
    s_section.dir[ i ] = UF_MODL_CURVE_START_FROM_BEGIN;
        s_section.id[ i ]=spp[ i ];

}


UF_MODL_create_thru_curves
(
&s_section,
&s_spine,
&patch,
&alignment,
&value [ 6 ] ,
&vdegree,
&vstatus,
&body_type,
boolean,
&tol [ 3 ] ,
&c_face_id [ 2 ] ,
&c_flag [ 2 ] ,
&body_obj_id
);

}


作者: 2860379895    时间: 2018-12-13 16:12
请问您最后解决了嘛?我也遇到相同问题了,是什么原因呢?




欢迎光临 UG爱好者 (https://www.ugsnx.com/) Powered by Discuz! X3.2