二级士官
UID2786010
U币1
G币345
技术0
主题8
精华0
阅读权限40
注册时间2017-2-15
最后登录2022-9-26
在线时间30 小时
二级士官
|
// 扫掠 //
UF_STRING_t guide;
UF_STRING_t section;
UF_STRING_t spine; //脊线
UF_STRING_t curve;
UF_METHOD_t orientation;
UF_METHOD_t scaling;
UF_STRING_p_t s_guide = &guide;
UF_STRING_p_t s_section=§ion;//截面线)
UF_STRING_p_t s_spine=&spine;
UF_STRING_p_t s_curve=&curve;
UF_MODL_init_string_list(s_guide);
UF_MODL_create_string_list(1,1,s_guide);
UF_MODL_init_string_list(s_section);
UF_MODL_create_string_list(1,1,s_section);
UF_MODL_init_string_list(s_spine);
UF_MODL_create_string_list(1,1,s_spine);
UF_MODL_init_string_list(s_curve);
UF_MODL_create_string_list(1,1,s_curve);
int alignment=1; //对齐方式--参数1
int body_type=1; //扫描成实体
int inter=1;
UF_FEATURE_SIGN boolean=UF_NULLSIGN;//布尔运算
double tol[3]={0,0,0}; //公差
tag_t body_obj_id;
// 引导线
s_guide->num=1; //引导线个数
s_guide->string[0]=1; //每一个只有一个items
s_guide->dir[0]=1; //UF_MODL_CURVE_START_FROM_BEGIN 引导线的方向
for(int i=0;i<segment_count;i++)
{
s_guide->id[i]=segments[i]; //引导线地址
}
// 截面
s_section->num=4; //截面线串为1根
s_section->string[0]=1;
s_section->dir[0]=1;
s_section->id[0]=object_tag[0]; //截线地址
s_section->id[1]=object_tag[1];
s_section->id[2]=object_tag[2];
s_section->id[3]=object_tag[3];
// 脊柱线spine
s_spine->num=1;
s_spine->string[0]=1;
s_spine->dir[0]=1;
for(int i=0;i<=502;i++)
{
s_spine->id[i]=seg_spine[i];
}
//方向
orientation.method=4;
orientation.inter=inter;
orientation.id=NULL_TAG;
orientation.value[0]=0;
orientation.value[1]=0;
orientation.value[2]=0;
orientation.s_curve->num=1;
orientation.s_curve->string[0]=1;
orientation.s_curve->dir[0]=1;
for(int i=0;i<502;i++)
{
orientation.s_curve->id[0]=segments[i]; //引导线地址
}
//缩放比例
scaling.method=1;
scaling.id=NULL_TAG;
scaling.inter=inter;
scaling.value[3]=0;
scaling.s_curve=NULL;
UF_MODL_create_sweep(s_guide,s_section,s_spine,&orientation,&scaling,&alignment,&inter,&body_type,boolean,tol,&body_obj_id);
UF_MODL_free_string_list(s_guide);
UF_MODL_free_string_list(s_section);
UF_MODL_free_string_list(s_spine);
UF_MODL_free_string_list(s_curve);
|
|