|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
/*********************************************************/8 S n7 |0 E @5 ~6 ]
#include <stdio.h>1 P4 D6 S0 ^( l/ c8 }) {6 [8 |
#include <stdlib.h>
* p2 X, F& Z1 n- K, {#include <uf.h>
: Z# U# C! y8 k% k3 R4 h7 Y- k" E#include <uf_attr.h>! C, `% n* W5 L$ n" p: r& E; b4 v
#include <uf_cfi.h>+ W" R8 J6 h/ v: v8 t
#include <uf_curve.h>! y! a3 a1 C1 U- J. |/ \
#include <uf_ui.h>
3 L( j# P3 _5 e& f% }#include <uf_modl.h>
( A- _# z I1 L+ E5 z8 Y1 |7 a1 }% {! Z, ^* X
/************* unload alloc mem *************************/
) t6 y9 R6 u3 \& h0 B/* UF_UNLOAD_SEL_DIALOG _UG_TERMINATE _IMMEDIATELY */$ K& s; m& h |' N' l
6 p7 A. A! W3 A8 ?/ ~# ~/ v
extern void ufusr( char *param, int *reTCod, int param_len )
9 ^9 v0 n( w5 {' q- ]{
* H$ z4 l q) Y9 e7 i, J UF_initialize();
: F+ R4 B: h. P/ G* F# E
& _1 l: t% o; {4 c) o
% q, K# I( n2 C0 C double coner[3]={0,0,0};9 E6 B; ^/ E6 d
char *edge[3] = {"10","50","20"};+ a6 I* b0 F$ s8 ]9 n. v. \& s
tag_t blk_tag;6 t8 F7 r; {8 A
UF_MODL_create_block1(UF_NULLSIGN,coner,edge,&blk_tag);
$ r2 B/ G1 g- z% K' b" R0 F
. V8 s) W* n/ A! c; ~3 W/ b! ?* q: M3 l7 B1 u, v( t
UF_MODL_ask_feat_body(blk_tag,&blk_tag);, n5 V* W0 G, r0 w+ F; n7 c
uf_list_p_t end_list;" R {) h! S# f% ~4 Q
UF_MODL_create_list(&end_list);% P5 } G# K; K/ m3 C7 i) D% `
UF_MODL_ask_body_edges(blk_tag,&end_list);' X; b/ c1 t8 K- _% i
int num;, t( k( G; l0 V: y
UF_MODL_ask_list_count(end_list,&num);
! ~" E% O8 E" [8 @9 O. E+ x$ D5 n( f3 n. E
char *radius ="2";
! B$ B9 G2 b$ X% [$ ~. X int smooth_overflow = 0;" e7 j5 T& f1 ]" ~3 E
int cliff_overflow = 0;0 z3 H: ]. G5 _! ]- a9 ?3 @
int notch_overflow = 0;
# }! o3 Q3 A5 x double vrb_tool = 0;+ i0 v9 G, y) m0 w" B; p" e
tag_t feature_obj_id ;
& [3 D, k9 B9 E' z/ _ uf_list_p_t end_list2;; l/ ~6 S* {: E u. Z
UF_MODL_create_list(&end_list2);
5 w) f$ e+ `- T; G/ g) L/ r9 v for (int i = 0; i < num ; i++)
- @* k4 Z3 a6 o6 ~2 D8 t" c# D {) i; B7 z. y, b$ j( i
tag_t tt,curve1;
- K- L5 U3 y$ r9 f UF_MODL_ask_list_item(end_list,i,&tt);
6 Y1 T2 M2 B$ I* z% c8 o' M$ Z UF_MODL_create_curve_from_edge(tt,&curve1); //抽取曲线
4 s- `5 w6 B- X/ e double point1 [ 3 ] ;
7 `( y! q" C7 k- T) _% O. T double point2 [ 3 ] ;+ o% f: ~$ e1 v/ z9 }2 a0 e' l [
int vertex_count;7 W+ R+ t* k* a9 q6 [( l1 \" I+ L
UF_MODL_ask_edge_verts(tt,point1,point2,&vertex_count);5 \$ H) b! k Q7 ^0 D+ l! C) D
if ((point1[0]==point2[0])&(point1[1]==point2[1]))9 R, t5 W9 F* C3 f5 Z
{
# V) D, @$ ~; Y! V/ H* Q UF_MODL_put_list_item(end_list2,tt);
7 T9 D3 C* P! K }* y6 O; Z$ _; r- {
}
) y4 r& g4 _ @3 W. G' G* u% G UF_MODL_create_blend(radius,end_list2,smooth_overflow,cliff_overflow,notch_overflow,vrb_tool,&feature_obj_id);" R! b0 @ h# ?/ |! m" r6 J
UF_MODL_delete_list(&end_list); {4 B3 ~; @) P4 q4 v! I {
A+ l4 X9 G3 ?* X* O$ E
UF_terminate();
4 A& j) y! z& M! r" L) u1 N4 A return;- B! }5 m& s) G# W% r+ s1 J
}5 f. ]1 n- L$ d5 W1 S+ L$ H( }9 ]
) C4 l6 ]" u( V- [+ ] o" B8 g5 Rextern int ufusr_ask_unload()0 `% d. L/ M3 d9 G" \8 B
{3 O! d# ^! r5 M4 _8 ? {5 r6 b% r
return UF_UNLOAD_IMMEDIATELY;
- s8 z1 ~, i' g, |+ R5 l}
; U, [7 n( l& z, k3 [, M+ t5 n3 c; W+ Y$ Y
|
-
评分
-
查看全部评分
|