|
我用以下代码去得到一个拉伸特征的信息.但是执行之后却什么都得不到.运行错误代码为"UNKNOWN FEATURE TYPE".请问我程序哪里出错了啊??我做测试的模型是一个在ug手动拉伸的正方形.希望各位高手指点啊....
_+ \4 _, N6 ?) @9 Btag_t part1;. _4 U; o! ?. b b" l5 g
int type=UF_feature_type;
% W t" X# H K$ q, mtag_t feature=NULL_TAG;
! Y" U2 L8 o0 t: zint a;
; T; s- r' c: `$ n9 qchar * feature_type;
8 \' s9 ]) J8 B: d, R4 echar msg[100];
8 ~; t6 q: K, S: G" z( V& |int * n_o;3 A% @( a6 v0 F/ a
tag_t * objects;5 K: ^& V0 o: Q5 t
UF_MODL_SWEEP_TRIM_object_p_t trim_ptr;$ G1 P( T5 R7 _. @4 e* i; d
char * taper_angle;
. w1 v+ T1 A! M8 v7 \char *limits[2];& N: v9 @( ?+ g5 @9 X% D ?
char *offsets[2];
! B4 R+ _" p- edouble region_point[3],direction[3];! P8 d K# \3 M4 X
logical * region_specified;
$ i" e0 S8 W& Ological * solid_creation;$ H+ a+ d4 y7 Z: Z/ |+ t
part1=UF_PART_ask_nth_part(0);) G, ^8 M% O# U+ R% O. F
UF_OBJ_cycle_objs_in_part(part1,type,&feature);
; O+ D* D# I! a8 m8 C; \1 c- e% ufor (i=0;feature!=NULL;i++)
8 g2 f; q# c6 `& ?( o: ^: T0 M{
( F! A% l; O: o UF_OBJ_cycle_objs_in_part(part1,type,&feature);# r# _8 d9 @4 x6 l" i: X% \
UF_MODL_ask_feat_type(feature,&feature_type);
3 F! I5 _5 W, B6 {7 P if(strcmp(feature_type,"EXTRUDE")==0) 0 r' B+ A) ^$ l4 g
{
' E- w( u- R2 J9 Y5 O9 m' t a=UF_MODL_ask_extrusion(feature,n_o,&objects,&trim_ptr,&taper_angle,limits,offsets,region_point,region_specified, solid_creation,direction );- ^6 e6 ^6 t: o) W7 q4 X
UF_get_fail_message(a,msg);) o9 [0 G7 |2 C! ?4 K
uc1601(msg,1);* I+ h. d: M: `" h- K# r
}
" K- a0 z3 ~; J} |
|