|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
/*********************************************************/* J7 S. K7 q' D3 z
#include <stdio.h>
/ l3 U( e0 o" c& u0 @8 g; i#include <stdlib.h>
1 j0 ]% W" y g$ u4 i, P#include <uf.h>
0 I- x8 y7 q: \$ C" ~8 G# C9 o#include <uf_attr.h> J, s1 G5 B. k
#include <uf_cfi.h>0 R$ n% W1 b5 ?- z. c+ e4 L
#include <uf_curve.h># N- l( D M/ [' Z
#include <uf_ui.h>+ K' d3 h0 P% {+ g; m
#include <uf_modl.h>" G8 g4 E3 H6 I, q6 A* X8 G
& a, i3 M2 a) k! j
/************* unload alloc mem *************************/8 j9 t- p$ @3 V1 m8 ]
/* UF_UNLOAD_SEL_DIALOG _UG_TERMINATE _IMMEDIATELY */
" L! d/ I0 X$ h$ C- R2 x' a J% ^+ E% P
extern void ufusr( char *param, int *reTCod, int param_len )
: A/ G2 |1 y. J" E{" X5 n+ E4 c4 x d0 ]% C
UF_initialize();
) y* X( U! Q+ h0 d) q% {$ D
: x5 y# x6 r3 L( P9 E2 r, w7 I5 \ |9 G# j, Q* O
double coner[3]={0,0,0};
4 I2 O1 x9 E. w char *edge[3] = {"10","50","20"};! Z/ H5 W0 Q+ i$ K$ n
tag_t blk_tag;
6 o l' Y, S9 ~, r UF_MODL_create_block1(UF_NULLSIGN,coner,edge,&blk_tag);( u% q9 c, D+ y4 J9 N" L
I; z5 N3 v0 L* H8 Q3 i6 g' M( Y
- ~3 K/ o7 ?$ j' K
UF_MODL_ask_feat_body(blk_tag,&blk_tag);
- \7 W$ A; y6 p+ F/ a uf_list_p_t end_list;* i. M# {. j; S9 u1 [/ G4 h* e
UF_MODL_create_list(&end_list);6 y; D; x- o8 G
UF_MODL_ask_body_edges(blk_tag,&end_list);
1 e) Z; t& P3 @1 S5 u+ l% F: @/ C int num;
6 P. Z4 s- e$ ~ UF_MODL_ask_list_count(end_list,&num);
, Q7 r# ]9 B9 F3 `4 ?, h y/ E: r8 I# Y# N; |
char *radius ="2";
2 C* H4 M8 s$ G& k4 G" {8 G& F int smooth_overflow = 0;
3 o% U$ ^: Y. \' z int cliff_overflow = 0;
z' d: U. \( i: ` o5 m int notch_overflow = 0;
* H! E2 _; c# G5 n: u double vrb_tool = 0;" }+ p& @$ J2 t/ B- p3 p
tag_t feature_obj_id ;
% |- G5 Y9 A; T) y/ ]3 P uf_list_p_t end_list2;
6 M3 T) r- }) d X* d UF_MODL_create_list(&end_list2);
) ]' j. X9 I- D for (int i = 0; i < num ; i++)
/ |) |+ j1 m! O b9 W" M {
: K2 I' z/ A; h! c/ ^, S9 N+ \ tag_t tt,curve1;( u: g* _8 _/ l- Q) o2 ^# J8 j3 z
UF_MODL_ask_list_item(end_list,i,&tt);' w1 p) w; `$ C: k( d
UF_MODL_create_curve_from_edge(tt,&curve1); //抽取曲线
1 A% W$ @* ^, J1 r8 G1 ] V- t8 I double point1 [ 3 ] ;
! y( q9 S" d% i- {/ n2 z w( T double point2 [ 3 ] ;
, U4 u* |8 l# i. D ^* r int vertex_count;: y* d, y& T5 G# s; U
UF_MODL_ask_edge_verts(tt,point1,point2,&vertex_count);( Q; g0 } \# E: C# C
if ((point1[0]==point2[0])&(point1[1]==point2[1])), _# ]5 S/ y2 j6 E) l4 W' V' }+ c
{
4 s' ?: q8 t4 ^% x% `' w UF_MODL_put_list_item(end_list2,tt);
4 B0 r/ f! _ F1 X K }
6 i" [. W$ I& f! s) D% g }
6 {2 M, L. {0 j# d W UF_MODL_create_blend(radius,end_list2,smooth_overflow,cliff_overflow,notch_overflow,vrb_tool,&feature_obj_id);
& h% e# K9 B- ^7 _8 \ UF_MODL_delete_list(&end_list);* q% T. ?* O% _) l( s
! c. S2 c9 d7 Z) r. z! G7 H UF_terminate();
3 w) V3 f$ Z3 T$ y) Y1 C9 h. T return;
* @( M$ t9 ?( {: c1 F/ W, I}
! P y' @: o z2 P# d$ f- B2 h
+ O% H# M9 b& S/ A+ textern int ufusr_ask_unload()
+ V+ n% p% f. O8 J) {0 e; C7 q* P{
! g( t* t( V' ^6 _ P7 e! b/ _ return UF_UNLOAD_IMMEDIATELY;
1 C N' j' a. ` z1 J}
, ?2 @- n" H/ B0 {+ ?9 s' T
2 i" ?% W8 B& ]) X |
-
评分
-
查看全部评分
|