|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 P! h' f& T! V; z v
( q! ]2 T' d9 b) L$ B5 g9 [NX二次开发源码分享: 高亮镜像Wave linked的面3 |" V- t1 k0 J$ ^
2 v- k' M" ?+ m' w) ]
static void highlight_mirrored_face(tag_t face)
4 Y) Z! r/ y, x& Q0 p{( L) T, R' x' P" i' ^! T" w
int
6 ?" e1 k/ E. R; s7 {5 i( V ii,
: j( Q5 m9 k+ d8 U1 [8 Q3 ]9 F jj,
6 X4 a0 p3 M+ y1 H |, c n_feats,; \& U' {/ L) S" U6 T! z ?3 }
n_items;; D; h: c* v+ O8 M
char6 H8 Q1 d( E9 g! X( e5 V0 y
*feat_type;. \+ V4 _( ~( J* Q9 T- M
tag_t
8 r' V, G# Z9 |8 `, w0 X) R' [. ?" @ *feats,
3 e6 t* l) L" O' @6 X. D: S mirror,
7 U: N- I( W- h1 `( K *results,0 _& `, N! {$ X3 r! {+ q% f8 p" @
*sources;: L5 b3 s. B: X! B7 `# p- C* i
( _1 {% Z. g2 @/ c! t* b n_feats = ask_face_feats(face, &feats);
3 x/ ]1 V7 w) X Q7 R1 e) I
2 T, |0 ^' P1 F- y. j for (ii = 0; ii < n_feats; ii++)0 Y4 S8 G7 M1 U
{
# R, D1 F/ _8 u' d6 K# I6 ] UF_CALL(UF_MODL_ask_feat_type(feats[ii], &feat_type));
6 [; A' @: m! Z2 Z' O! a4 D/ q- \ if ((!strcmp(feat_type, "MIRROR")) &&
' {+ @$ Z* x9 n+ Q ! UF_CALL(UF_WAVE_map_link_geom_to_source(feats[ii], face, TRUE,
7 C! [: [ v) B4 w) T. d" F. t &mirror)))
( K7 W& ~) Y+ o& j% f. v {9 c, ?! S+ ]7 Q: n0 L4 J& P
2 k4 x& M/ f7 J4 v9 q. |
/* Begin work around to PR 4244233 */' S4 k& e R# q9 t L$ Z h/ [
if (mirror == NULL_TAG)
) j& C4 R3 E- A* r {
' d6 J% _, W1 I UF_CALL(UF_WAVE_ask_linked_feature_map(feats[ii], TRUE,
8 f4 ? n" C2 p8 I" X9 ]4 ~ &n_items, &sources, &results));" g5 k9 Z) ~* r7 D# d- M
for (jj = 0; jj < n_items; jj++)$ W/ I! S4 Z1 m- p# Z& O9 |
{0 X" K# j d+ ~4 I" L3 b
if (results[jj] == face), a8 f0 f m c- B# l* r; K
{3 f6 i$ W2 e1 I* j% y- m
mirror = sources[jj];8 w/ D1 W5 D/ k$ z6 Y
break;+ }& @: A z2 u" H
}: O, l0 K/ I9 u% I! P8 K
}
1 H" c Y, e7 d, I3 P+ @ if (n_items > 0)( ^; \- y# }1 o2 m9 r, t
{" P: u- }1 C* k4 J
UF_free(sources);+ N# c" U! d- r
UF_free(results);8 M8 F' [( C- i2 Q
}
+ x+ y* @0 Y7 Q }
& L G7 z5 K- V1 O3 K /* End work around to PR 4244233 */
5 P; D' |$ S& x3 E
" D+ S6 R1 M. c; r; ^" A$ I4 V UF_DISP_set_highlight(face, TRUE);
4 e" T7 v1 {5 ]% p UF_DISP_set_highlight(mirror, TRUE);; ~# `( v) Q: U$ C7 ?: D4 |
uc1601("Mirrored face highlighted", TRUE);5 i! W7 ^) J" n. A4 @4 [
UF_DISP_set_highlight(face, FALSE);- @( G: l6 m3 [
UF_DISP_set_highlight(mirror, FALSE);) l% o9 Q+ }& `5 \ x7 F3 C
}! r/ U2 R- `" I9 I+ |8 ^. C5 F
UF_free(feat_type);
, N9 P" G3 o5 U4 }& f s! Y }
& `+ `7 b! w6 ]9 ]: o( f+ h5 B
U+ g- |3 E d' c2 U" x if (n_feats > 0) UF_free(feats);7 X2 Q: ^3 @) \4 P' e
}& x) l, m, D. \: p
! E4 \1 |) j- F* \2 e% S- }2 s
|
|