iCAx开思网
标题:
急问,那位大侠告知怎样在UG用程序创建扫描体?
[打印本页]
作者:
hustcad
时间:
2005-6-1 16:51
标题:
急问,那位大侠告知怎样在UG用程序创建扫描体?
以下是实现的代码,不能创建成功,那位大侠指点一二??急盼!!!!!
首先,我通过程序画出了5条截面线和3根导线,然后做了一个扫描实体的程序代码,拷贝如下,请各位大虾帮忙找问题:
/*----------------------------------------------------------*/
/*[说明]:扫描创建实体
/*----------------------------------------------------------*/
UF_MODL_init_string_list([$s_guide)]
UF_MODL_create_string_list(3,3,[$s_guide)]
s_guide.num = 3;
for(i=0;i<3;i++)
{
s_guide.string = 1;
s_guide.dir = 1;
s_guide.id = guideLine_tag;
}
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 = 1;
s_section.dir = 1;
s_section.id = spline_tag;
}
alignment = 1;//Alignment method:
= Parameter
= Arc Length
inter = 2;//Interpolation method (for s_section->num > 1):
= Linear
= Cubic
body_type =0;//Type of body:
= Sheet (Default)
= Solid
boolean =UF_NULLSIGN;//The sign of the operation to be performed.
// UF_NULLSIGN = create new target solid
//UF_POSITIVE = add to target solid
//UF_NEGATIVE = subtract from target solid
//UF_UNSIGNED = intersect with target solid
//Tolerances:
tol[0] = 0.025;//[0] = Distance
tol[1] = 0.2; //[1] = Angle (in radians)
tol[2] = 0.1; //[2] = Intersection
UF_MODL_create_sweep(&s_guide, //UF_STRING_p_t s_guide,
&s_section, //UF_STRING_p_t s_section,
NULL, //UF_STRING_p_t s_spine,
NULL, //UF_METHOD_p_t orientation,
NULL, //UF_METHOD_p_t scaling,
&alignment, //int * alignment,
&inter, //int * inter,
&body_type, //int * body_type,
boolean, // UF_FEATURE_SIGN boolean,
tol, //double tol[ 3 ],
[$body_obj_id)]//tag_t * body_obj_id
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3