青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

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

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

[复制链接]
发表于 2013-3-14 10:57 | 显示全部楼层 |阅读模式
UF_STRING_t guide;  T* V0 K, k( W0 I) I
   UF_STRING_t section;
8 i' A0 X5 P5 `( |% N# D   UF_STRING_t spine;   //脊线+ t. z+ p1 g& r& u9 ~
   UF_STRING_t curve;5 F4 K8 f$ C) x2 ^5 o
   UF_METHOD_t orientation;
- I5 ~2 e2 R. H   UF_METHOD_t scaling;
% \5 q% Y/ J( T5 }+ R   " }* T% Q; ?3 K6 G
   UF_STRING_p_t s_guide = &guide;! ~6 S0 E4 |) J3 y
   UF_STRING_p_t s_section=&section;//截面线
) \; b( W- J/ j! O6 t   UF_STRING_p_t s_spine=&spine;& A$ ^! z, X+ c+ |
   UF_STRING_p_t s_curve=&curve;
9 z6 w. C/ D$ X   
( p# O/ H8 A$ F) u5 [5 {( R8 J   UF_MODL_init_string_list(s_guide);
" Q7 V; v$ e" p   UF_MODL_create_string_list(1,1,s_guide);
6 }' _# q) q7 y( p2 Y   4 }8 @/ @' E; y7 ~! m; q
   UF_MODL_init_string_list(s_section);
6 S3 C! X; H2 p/ i+ O   UF_MODL_create_string_list(1,1,s_section);5 g$ W* y; g' H. c. x
   
% m1 J3 m7 {# I' f' I   UF_MODL_init_string_list(s_spine);( K4 o! X, C6 O
   UF_MODL_create_string_list(2,2,s_spine);& i/ f. ?+ Z' ?* |' \
   
( U6 n) J9 Z& I6 Z  h* M   UF_MODL_init_string_list(s_curve);
5 I  f1 m2 W+ l$ J- K   UF_MODL_create_string_list(1,1,s_spine);0 m5 {. t: v/ r1 c8 N
   6 H5 j3 M* B1 C/ }/ ]- i3 D
   int alignment=1;      //对齐方式--参数
0 M/ v6 d0 U& q1 \* e) H8 y   int body_type=0;      //扫描成片体( @& W: {6 x  u* p8 Y/ T
   int inter;7 V+ w: @+ j5 a
   UF_FEATURE_SIGN boolean=UF_NULLSIGN;//布尔运算
0 [3 P4 t) V' i( i; ?9 o* ?. l. |; ]   double tol[3]={0.01,0.01,0.01};   //公差6 n8 a1 n/ {" ~
   tag_t  body_obj_id;
1 d% O* q, {8 Y/ w; b   2 _; c  p+ e; s8 o
   s_guide->num=1;             //引导线为1个2 `8 U  u" i7 h0 T
   s_guide->string[0]=1;       //每一个只有一个items
1 C' p- ]" h7 Y; m. m   s_guide->dir[0]=1;          //UF_MODL_CURVE_START_FROM_BEGIN   引导线的方向# j( J3 [+ b9 [& E3 W* L
   s_guide->id[0]=edge_blk[0]; //引导线地址5 A- B2 A7 t" H% a) Y2 Q
//   s_guide->id[1]=edge_blk[0];8 Z! K, d  g5 X0 t# L
   % z) y6 S; r+ w( W6 I
   s_section->num=1;                  //截面线串为1根- E* k+ x: F  f/ H- ^& l( X* x
   s_section->string[0]=1;            //3 S- f$ \! P. Y8 D- ?; n
   s_section->dir[0]=1;
: D) K$ t& u0 O* ~- H   s_section->id[0]=line;//          //截线地址
( ^& B! J! @5 q   & \; D; P3 {* U
//   s_spine->num=0;
6 I  s/ q- {- ~; }# X$ K   5 y& p, W% M7 @/ q! |* A3 \
   //方向5 \' D9 g- J" {7 K+ G4 r+ y3 M
   orientation.method=3;& N9 F# X7 ~2 o
   orientation.inter=inter;' ~% S% U$ C7 Y% D5 X$ W
   orientation.id=NULL_TAG;& E) |7 S+ W/ P3 L! H
   orientation.value[0]=0;
% Y) @! V3 c% T& {   orientation.value[1]=0;; E5 j5 N2 g- T. V
   orientation.value[2]=0;
. P2 u3 k" w: h( d, q! R$ ~# C- u& n& ^   orientation.s_curve->num=1;6 [9 P1 K- l7 |* p
   orientation.s_curve->string[0]=1;$ d7 @2 G) D3 V. N# D
   orientation.s_curve->dir[0]=1;) Z5 t2 h. }$ G- x* @9 D1 ^* y+ m
   orientation.s_curve->id[0]=edge_blk[0];7 o9 T, G: }5 K7 m( o7 I7 d
   ; Q' {# p0 p! \6 a  p7 j9 w8 T5 l
   //缩放比例
1 d0 @2 v$ D" G   scaling.method=1;! N4 r; p; ~4 ~% q7 O
   scaling.id=NULL_TAG;
8 ~+ Z  q% E; }8 \4 r! t- Z5 {   scaling.inter=inter;
' ^' Z* g* x8 t' d  ^   scaling.value[0]=0.5;
& [8 V. n6 i# r. S- r4 T5 c- b   scaling.s_curve=NULL;
$ m3 u& `8 O4 N. B7 @1 y   ' T( p" ?: Y# y, ^" R0 q9 O1 q. ]/ c
   UF_MODL_create_sweep(s_guide,s_section,s_spine,&orientation,- D' s0 x2 {9 s2 {' m  Y% h) G
    &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-7-16 14:12 , Processed in 0.137544 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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