|
UF_SF_find_minimum_distance这个函数怎么用啊?有没有例子。" C7 t' U9 N5 w4 h/ o
我创建了两个正方体,来求两个实体的最小距离,好像不行,且我已经把,feature转换成body的tag了。代码如下:
. ~) Y# Y+ `: ]& U. S int ret;
; Y. J( W+ u4 b( `" p, W$ G tag_t body_tag_1;
+ L6 U! _2 S7 C tag_t body_tag_2;
" R. F' y9 [* @3 P% J tag_t cyl_tag;
' B o3 ?. a& U9 u) H0 N char *edge_lens[3]={"10","10","10"};
7 f; {0 O) C! I; N0 ^* z) b# P% O ret=UF_MODL_create_block1(UF_UNITE ,origin,edge_lens,&cyl_tag);, {1 _, i$ L+ J* ]) S( Y& ^
tag_t part_1;
$ `. C1 o% M4 y: c double origin1[3]={0,0,20};
' x9 a' ?0 I, h( L9 F0 M char h1[256]="20";
" c& c: U2 H. Q! z) f. S char d1[256]="40";
8 c8 v" S5 A, s4 y; v6 f0 @% O( C
ret=UF_MODL_create_block1(UF_UNITE ,origin1,edge_lens,&part_1);+ R- U6 h4 G2 Z
UF_MODL_ask_feat_body(cyl_tag,&body_tag_1);
6 L, {/ D7 ?9 U$ @& O' {UF_MODL_ask_feat_body(part_1,&body_tag_2);+ _# s: ` z5 M9 A
double point[3],point1[3];1 Z2 g: k* F; U2 n: t
data.value.real=3.14;, s; w: z; s+ v& I1 R2 G
double min_dist;
8 q8 r u% J! f9 h: Q: } UF_SF_find_minimum_distance(body_tag_1,body_tag_2,&min_dist,point,point1);2 q4 q, r- l- z/ n7 S* Y' F$ V
data.value.real=min_dist;: p$ x' `3 ?3 r
UF_STYLER_set_value(dialog_id,&data); $ L3 j( x( N: h3 S1 _
谢谢!!!! |
|