青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

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

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

[复制链接]
发表于 2013-3-14 10:57 | 显示全部楼层 |阅读模式
UF_STRING_t guide;- S9 n, C5 g" F3 b& h( u- _
   UF_STRING_t section;
, a3 z9 M# P) p; F: @- e/ j9 ~$ `   UF_STRING_t spine;   //脊线; }: l4 [7 a/ I1 b& r1 V0 c4 e4 G
   UF_STRING_t curve;; `6 v/ ^% u, @( K4 _
   UF_METHOD_t orientation;1 Q- x+ K; V* n" i1 @; J8 s  Q& G* ]* I# @
   UF_METHOD_t scaling;3 ~8 s; I4 f( F8 ?- Q/ W5 D
   
- J  ?' r3 R- R& j   UF_STRING_p_t s_guide = &guide;
) z! J& ]# ^; v7 W5 V4 M   UF_STRING_p_t s_section=&section;//截面线; a( b' l; u  [( {  l) ^1 c" f) t, h
   UF_STRING_p_t s_spine=&spine;
% Y) I2 I/ C* A8 S8 C0 {   UF_STRING_p_t s_curve=&curve;
( V/ m3 ^8 p0 ]. Y$ G   5 w- u! N: n5 D' j
   UF_MODL_init_string_list(s_guide);
) ^) I" M$ ^: t% q# q% Q% F; S   UF_MODL_create_string_list(1,1,s_guide);8 i; n! `: W+ b7 f( h$ }( S% V  r3 k* \
   
# c, }/ {; h0 b7 X   UF_MODL_init_string_list(s_section);
- X6 |$ v% U3 Q1 ^- Y6 V1 y5 {/ d   UF_MODL_create_string_list(1,1,s_section);
, S4 Q% S4 a; J, \0 Y* |( A: o   ; G, Z  f0 N2 h' I
   UF_MODL_init_string_list(s_spine);0 D; D1 B3 V, l$ j9 Y7 S2 C
   UF_MODL_create_string_list(2,2,s_spine);
% N; b! V; J( @  ]' o   6 v- n0 \  i. w/ M0 ^) d  \; @
   UF_MODL_init_string_list(s_curve);# y" T5 b3 G, S3 n
   UF_MODL_create_string_list(1,1,s_spine);* e  j1 R9 T  p2 L' m
   
' W  Z% O: F) J  x* [; u   int alignment=1;      //对齐方式--参数# w$ O) D9 J8 Q8 @/ S& \
   int body_type=0;      //扫描成片体; `- s  G( z0 q8 ~: [! e! O: ^+ ]
   int inter;
0 z- l8 P2 {( ~" q1 x. Q) \; R   UF_FEATURE_SIGN boolean=UF_NULLSIGN;//布尔运算
; Q- V/ \' B% J3 w/ ?   double tol[3]={0.01,0.01,0.01};   //公差+ n8 g' {9 P1 Y" {6 g. y! j$ d
   tag_t  body_obj_id;
, W8 H' R! c9 }7 M( u4 Y   6 S* r, C$ ]* M4 X
   s_guide->num=1;             //引导线为1个5 F3 ?) K7 q1 H: G+ W9 \' p
   s_guide->string[0]=1;       //每一个只有一个items
& ^9 |# k. B" n3 l   s_guide->dir[0]=1;          //UF_MODL_CURVE_START_FROM_BEGIN   引导线的方向
; d( L( |- Q$ N8 Y/ q% [, ~   s_guide->id[0]=edge_blk[0]; //引导线地址
* t$ s5 I! P1 E9 |//   s_guide->id[1]=edge_blk[0];
5 R0 o$ q, b; }( t9 ^. D% W   / b+ N& ^- F( b2 P" _
   s_section->num=1;                  //截面线串为1根( ?9 H2 s  ?4 r4 w+ K. r, X2 P
   s_section->string[0]=1;            //: \$ z3 Y" }: F
   s_section->dir[0]=1;
* Z9 f- `3 z0 Q( g& T6 Q   s_section->id[0]=line;//          //截线地址
( R' C5 n5 k% \' S9 g1 X   . k3 n6 p( ]3 |* V# x% k. g$ E
//   s_spine->num=0;
" C& _1 t) ^  }; ?   & |, ]" j! d3 y. T4 ~$ n2 A% U
   //方向: ~0 M" n  e- s8 p; X
   orientation.method=3;; w: Z, M% j7 N* @! \- Y# K
   orientation.inter=inter;
: S+ Z& l3 d$ B( l7 b   orientation.id=NULL_TAG;& G1 ?  w0 R) d# X! C8 W
   orientation.value[0]=0;
4 I( l3 {8 [4 K" m2 V- D   orientation.value[1]=0;! E4 N$ Y  K: b* @* c0 m
   orientation.value[2]=0;+ t0 ^, @7 F/ ?% n
   orientation.s_curve->num=1;
& I( p" y7 m, k) t1 q# S   orientation.s_curve->string[0]=1;
% E  C. j% @" L. v   orientation.s_curve->dir[0]=1;8 M) ?# M: d3 Z3 w) i7 E
   orientation.s_curve->id[0]=edge_blk[0];
7 i8 ^4 [# h8 M6 n$ G/ R7 L2 l$ M     M" k: |; V6 k! G
   //缩放比例
& ]5 H, I9 }( [   scaling.method=1;1 Z: l8 g, P: N+ r+ q+ t* ?
   scaling.id=NULL_TAG;
3 g# V0 j5 n, N# R' Z8 a   scaling.inter=inter;+ [. y. V+ T3 U/ u7 K
   scaling.value[0]=0.5;
* o: O$ r  W' V* r  x: F. P   scaling.s_curve=NULL;
8 J5 Q+ n+ r' L   
9 f# G) j( ]1 A- o# Y   UF_MODL_create_sweep(s_guide,s_section,s_spine,&orientation,  X( d/ I" Y) C7 o
    &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-6-28 01:15 , Processed in 0.149190 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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