青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

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

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

[复制链接]
发表于 2013-3-14 10:57 | 显示全部楼层 |阅读模式
UF_STRING_t guide;
& I  t* t7 I& c4 x. \. {% n+ C   UF_STRING_t section;) p8 e, J1 E2 N# a% M
   UF_STRING_t spine;   //脊线
9 |6 _& n9 s8 ?( Z% g2 H9 f   UF_STRING_t curve;5 ?0 B) H3 @4 [) J, ?7 r8 y
   UF_METHOD_t orientation;
- C) G0 w# H" z5 E/ u+ g$ u# S   UF_METHOD_t scaling;
' y6 g5 B7 \9 V# p6 a( z   
+ V2 J, l* o, J* y   UF_STRING_p_t s_guide = &guide;
' O8 s" C/ v7 Y/ ~& J   UF_STRING_p_t s_section=&section;//截面线! s8 Q. g$ O% n* [8 A, [* `
   UF_STRING_p_t s_spine=&spine;
+ q0 c5 m* Z2 d  ]+ w$ j0 ?/ L0 {   UF_STRING_p_t s_curve=&curve;0 e- _: o" I0 d6 l
   8 S' ^' b/ ~0 k
   UF_MODL_init_string_list(s_guide);0 N, [! E/ n5 T. d. V0 M
   UF_MODL_create_string_list(1,1,s_guide);5 |, b8 u6 d2 v
   
: I0 _6 |  r# X6 _& D* F+ e* Y% w   UF_MODL_init_string_list(s_section);2 x  y7 M% ~, y: u
   UF_MODL_create_string_list(1,1,s_section);
# j# N9 T: C! W1 s2 m+ c) h   
! t$ @' o" c5 |6 {$ |9 g1 W* h   UF_MODL_init_string_list(s_spine);5 x+ i# t: u) e3 Q; L( N# U; W( P
   UF_MODL_create_string_list(2,2,s_spine);
/ x6 i, k$ b4 S) G   ( y4 o% j# t, [, k( j" V5 X1 G
   UF_MODL_init_string_list(s_curve);$ Y2 M' h" B3 _- G
   UF_MODL_create_string_list(1,1,s_spine);
) @  V2 }! p# B   
, ]* M: h5 B* a# Z+ M8 G5 h   int alignment=1;      //对齐方式--参数& f: V/ G9 Q1 R' Y! f+ k! ^0 t) F
   int body_type=0;      //扫描成片体
* c" y! F) G; ~7 J) ~5 m   int inter;
8 u: s  d( x" u8 \   UF_FEATURE_SIGN boolean=UF_NULLSIGN;//布尔运算
3 j- X' a3 U* L   double tol[3]={0.01,0.01,0.01};   //公差* k2 M' ^) ]6 U
   tag_t  body_obj_id;
4 c/ _, E9 z2 B6 q7 W' d4 s  H   5 U3 p# U2 ~7 s  |6 j
   s_guide->num=1;             //引导线为1个
: D7 I2 d/ O: u  X   s_guide->string[0]=1;       //每一个只有一个items
( v. h. E1 g8 z+ Y   s_guide->dir[0]=1;          //UF_MODL_CURVE_START_FROM_BEGIN   引导线的方向' {) C6 v# m2 f# w
   s_guide->id[0]=edge_blk[0]; //引导线地址
6 ]! P. P# U/ M7 w, r  s//   s_guide->id[1]=edge_blk[0];, q1 R4 c/ U0 E! t" y0 c. b
   . x# x( f) e0 p6 i% g
   s_section->num=1;                  //截面线串为1根
  s" b9 O, U3 }" t* @# i: f   s_section->string[0]=1;            //
" z/ x3 y/ ^1 r8 u. u6 |   s_section->dir[0]=1;
- @( x4 I  b. G   s_section->id[0]=line;//          //截线地址
3 x  d: k6 i% @2 a; g   0 _* I+ P' L7 B) h( ]4 j
//   s_spine->num=0;
9 }- r: s2 s4 f& n* \1 n   
8 W$ G) y- O) _7 G: `& G- s! K   //方向0 T$ i7 h. J3 Z" X2 H) Q( U4 a
   orientation.method=3;9 p7 e( P) e1 g1 W
   orientation.inter=inter;
  l" N( t$ k2 N5 c* L4 R+ L: U   orientation.id=NULL_TAG;7 L" y7 j8 U3 v# y& }8 }! X
   orientation.value[0]=0;
6 E+ h( |# x" B( B   orientation.value[1]=0;- T) m1 o: I7 U
   orientation.value[2]=0;# D$ _/ Q# y# p+ L
   orientation.s_curve->num=1;* r$ \6 @( u3 F0 k
   orientation.s_curve->string[0]=1;
' j) I3 ?0 j3 a5 L5 m( Y& r* A; u   orientation.s_curve->dir[0]=1;, c. j  s/ w9 p& y. c8 L" F8 M4 o
   orientation.s_curve->id[0]=edge_blk[0];
2 W+ w% r+ w& a+ {% n  w6 h* @* @   
& P. j: W$ R4 J0 s4 y# B2 k   //缩放比例; j) k% {) H1 T& Y0 n/ M% Q1 N
   scaling.method=1;
3 M( l: y  n4 u8 T6 H8 o4 }* R   scaling.id=NULL_TAG;# I2 a9 a3 ^6 x, B( n
   scaling.inter=inter;
2 r: v! [6 k2 K# T6 P   scaling.value[0]=0.5;
* U0 y: N/ }1 a( T0 u1 d$ H2 a" r   scaling.s_curve=NULL;
9 f/ W  Y9 G1 \3 ]/ U1 A   + v; g5 E* E8 h! V$ d+ C
   UF_MODL_create_sweep(s_guide,s_section,s_spine,&orientation,
8 ~4 b3 ~9 \+ P) v$ }- Z; y: [    &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, 2024-9-28 00:11 , Processed in 0.049525 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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