青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

青华模具培训学院
查看: 2341|回复: 3

[疑难] UF_MODL_create_sweep具体如何使用,在别人那里拷了程序,不报错。就是ug会卡死

[复制链接]
发表于 2013-3-14 10:57 | 显示全部楼层 |阅读模式
UF_STRING_t guide;
4 M8 r5 v7 @: b   UF_STRING_t section;
5 X/ w: b9 Q" c1 M7 ?3 g   UF_STRING_t spine;   //脊线9 R- _2 U/ n0 D
   UF_STRING_t curve;
, g- \4 |, u4 y5 ^2 ~. s" Z- @2 N* I   UF_METHOD_t orientation;
0 [' b# Z2 P* `! v9 d+ I$ w3 Y( l   UF_METHOD_t scaling;# A/ a. C' r2 m  L# b
   
9 L- k. ~& h8 }! ~" f) |   UF_STRING_p_t s_guide = &guide;
+ e! ?+ v" \7 t, b& Q# I   UF_STRING_p_t s_section=&section;//截面线& x+ k( y4 P: z6 K+ u; J
   UF_STRING_p_t s_spine=&spine;
" C8 _9 q# m2 ~8 n/ N: p( U   UF_STRING_p_t s_curve=&curve;- Y2 S* A+ B$ P! @4 g+ y) D$ d& e
   $ _0 |/ c8 w- a% j
   UF_MODL_init_string_list(s_guide);
9 a" p# I0 W8 l  }: @   UF_MODL_create_string_list(1,1,s_guide);6 ?3 Y+ t* n* i$ `" f6 \$ J
   
3 ?8 |, ]' j: ?6 S* O; w6 h  L6 O1 k   UF_MODL_init_string_list(s_section);* y, g! Z8 T- q5 h7 E
   UF_MODL_create_string_list(1,1,s_section);& L' J( s9 Y" @
   : J* q6 V2 O0 k: ]
   UF_MODL_init_string_list(s_spine);( y* O3 Y( [7 L1 R1 b& q
   UF_MODL_create_string_list(2,2,s_spine);9 a' Y& O% U* ?' \* m& j9 i
   
7 T3 B5 c6 |; m   UF_MODL_init_string_list(s_curve);. R/ q. \4 b' Z1 t) p
   UF_MODL_create_string_list(1,1,s_spine);: I. D( K4 X, n5 r, O* ^& ], D, |# c
   
) e: g& E" C# {; W- u6 h' Y   int alignment=1;      //对齐方式--参数$ u7 k% K9 O$ g# u3 E2 ~+ _0 c
   int body_type=0;      //扫描成片体
2 a2 v6 v/ d8 f  j1 y2 V8 @   int inter;
$ `, Z( ~0 `) t5 n  A   UF_FEATURE_SIGN boolean=UF_NULLSIGN;//布尔运算
# E# i0 @, O: M* O+ P. {6 @   double tol[3]={0.01,0.01,0.01};   //公差5 g" O$ N& ?. q* r
   tag_t  body_obj_id;4 L$ l6 ^7 Z9 q$ \- P! V
   : ^: U) ^' V+ l
   s_guide->num=1;             //引导线为1个0 J8 y" O: P2 F, H" i3 O  q  w
   s_guide->string[0]=1;       //每一个只有一个items
; ^9 O- U/ I0 y- U6 K& s9 e   s_guide->dir[0]=1;          //UF_MODL_CURVE_START_FROM_BEGIN   引导线的方向
; Z/ ~: b; W4 M# Z+ G4 u5 }" U   s_guide->id[0]=edge_blk[0]; //引导线地址( }* \8 r( ^7 ?. o! W
//   s_guide->id[1]=edge_blk[0];
3 u  ?$ r& @$ U   4 H! W  Y' A, I0 v  X% A
   s_section->num=1;                  //截面线串为1根/ [+ p- e6 F! e/ Y) x: S7 k" J
   s_section->string[0]=1;            //
& N/ K" x/ t! I) Z+ _# ~   s_section->dir[0]=1;3 S( X! \/ Z/ g1 _. I3 C
   s_section->id[0]=line;//          //截线地址" Q/ p0 [) K, J. \- j- q0 M/ ^
   
% `% N6 N0 Q7 ]; g& h//   s_spine->num=0;
' E) b4 D; V3 A& v2 V* _1 n   
# P& L2 P/ V1 H& ?( K5 A   //方向
5 F0 T, W. W/ f7 M   orientation.method=3;0 y- Y) v8 U7 N" \
   orientation.inter=inter;
! d" a! N0 \$ g   orientation.id=NULL_TAG;
- ^+ Y# T, H* l  T   orientation.value[0]=0;) }7 T$ x8 C. ]$ B
   orientation.value[1]=0;
1 c, {- l% Z3 L" B9 [" J! s; w   orientation.value[2]=0;
5 K8 P7 A4 y9 F7 }- U   orientation.s_curve->num=1;
$ o% O$ b  m$ u5 u! e   orientation.s_curve->string[0]=1;
  B4 P) ]# I8 @' }" L( y  Q+ W) B! Y3 s   orientation.s_curve->dir[0]=1;
( c6 R( y  t4 d% u( I   orientation.s_curve->id[0]=edge_blk[0];, A. O3 E$ r; _( o
   
: b. H" K+ W9 H, h6 u. g0 V   //缩放比例
5 C8 @( O* f& h/ Y  ^, A2 S0 c9 w8 Z   scaling.method=1;! \0 C# C5 O( c- q
   scaling.id=NULL_TAG;( m* G2 h. \4 T, D0 j7 H- W+ D! s# @
   scaling.inter=inter;
, A: G0 }7 n! z3 s   scaling.value[0]=0.5;! v0 y- @" W. _6 p' O- U2 i) @
   scaling.s_curve=NULL;( ]! M, N0 a* @8 |5 Q
   7 m% T% v' H1 q+ O& x: h
   UF_MODL_create_sweep(s_guide,s_section,s_spine,&orientation,5 H+ C. l. W3 m% m, {/ L0 b
    &scaling,&alignment,&inter,&body_type,boolean,tol,&body_obj_id);
发表于 2013-4-30 16:16 | 显示全部楼层
呵呵呵呵,有偿帮忙解决,呵呵,我经常用,my qq:593939109
回复 支持 反对

使用道具 举报

发表于 2013-12-24 15:22 | 显示全部楼层
楼主解决了吗,我也遇到相同问题
回复 支持 反对

使用道具 举报

发表于 2018-1-20 11:11 | 显示全部楼层
楼主解决了吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|关于我们|sitemap|小黑屋|Archiver|手机版|UG网-UG技术论坛-青华数控模具培训学校 ( 粤ICP备15108561号 )

GMT+8, 2025-5-9 21:08 , Processed in 0.209179 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表