|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 P3 F9 O& q1 W# E( n& a
x8 h0 Z% G0 [+ ?+ \NX二次开发源码分享: 高亮镜像Wave linked的面' I i+ a- t l/ R3 B
" I+ a$ |# e+ g3 l+ dstatic void highlight_mirrored_face(tag_t face)
" A6 O' e, W8 N) s{% n+ c; K, l$ D- Q. [0 S
int
" D. s; p: D! f- e' j. h ii,
2 S2 O% ]% N# J4 d! z* ^ jj,9 o& C2 U4 u$ W7 r
n_feats,
$ o# b5 f8 h( _4 `4 [ n_items;
3 H4 g7 ^7 Q9 R char* F' w/ P9 s2 n) b
*feat_type;
# |' M5 j% q, g% A9 z tag_t0 ]( ~- @7 v. W
*feats,2 ^: Y4 n. A8 u7 d8 s
mirror,
% Z3 Z4 g9 q) ~& J" j *results,$ L: B X1 n. L4 k8 E. ?
*sources; m& D) `* l4 y$ _; ^9 z h
4 w& X1 Y$ O0 U& k, F R" m1 X n_feats = ask_face_feats(face, &feats);
, k# E" T2 U6 n. U6 g/ C0 n% J: n% O0 ?9 H2 V( J8 A, u8 t
for (ii = 0; ii < n_feats; ii++)) t* U; M, ^- q r1 A4 t M9 n9 \
{
4 P, P- u! D/ {( b9 d UF_CALL(UF_MODL_ask_feat_type(feats[ii], &feat_type));
! V `( Y% U O3 v$ `8 ~ if ((!strcmp(feat_type, "MIRROR")) &&2 W" Z2 P8 v9 U) {) D9 G
! UF_CALL(UF_WAVE_map_link_geom_to_source(feats[ii], face, TRUE,
" d- w) r! Z( n' w &mirror)))) Q! T- N& ?" h, i# t. ^
{$ J9 @% }5 t/ j& G& |/ S7 k2 V
7 O* q& Y8 Z4 i1 E /* Begin work around to PR 4244233 */
+ a; `( c) s3 Z9 s5 a& l! c# A8 W if (mirror == NULL_TAG)
8 B& t: ?7 l/ e. U {
d. X) ^- \8 Z& J O0 ^ UF_CALL(UF_WAVE_ask_linked_feature_map(feats[ii], TRUE,6 x; f7 a% t- V' b; U. ^/ R
&n_items, &sources, &results));6 I J/ p! y) K8 \8 g1 V0 f9 N9 ]
for (jj = 0; jj < n_items; jj++)
& R6 Q0 j- |& S3 i {
6 }* p; f+ J6 n' Q if (results[jj] == face)
5 \% P6 ]5 `& P {; U- l3 u5 k# `' s
mirror = sources[jj];
- | G, E7 d! ^5 W" x3 |9 Y8 b break;. [" s- Q' o4 q- ^% D( O
}9 S% B2 m5 N8 ^1 S! |( H& c
}8 ?1 H ?; S9 N5 H. K# ^+ H
if (n_items > 0)
7 C) T5 I7 Q2 l" J3 x# P5 y* h9 y& ^ {
: }! U) p* X1 j( |) D( J; u4 l UF_free(sources);7 k' v0 t* ^$ S
UF_free(results);, ^. s" k7 k. C* v1 ?1 F# D
}* O+ K# f) i* \' U$ ` I' S5 h. b8 {
}
, |4 ?! }+ q' p2 a" c. }* b! M /* End work around to PR 4244233 */
- |, v, G$ b8 }/ j
! @3 r% A1 U# E& Z UF_DISP_set_highlight(face, TRUE);
c: R& Q8 k V0 B" l6 i UF_DISP_set_highlight(mirror, TRUE);+ ~* Z8 e$ c; B3 ^
uc1601("Mirrored face highlighted", TRUE);
8 V* b5 G& b, \ N UF_DISP_set_highlight(face, FALSE);
/ N7 I( W! I! p" ]3 T UF_DISP_set_highlight(mirror, FALSE);: R1 D& x* ^+ W% R5 p
}6 `7 ^. y3 ?# C' O) e3 {, U
UF_free(feat_type);
' Q0 |4 s# ?; L T% e' y- { }
; |2 U Z g2 y6 H4 k# u' S1 D7 p5 ]6 A7 [' t5 l% }
if (n_feats > 0) UF_free(feats);. N8 _ Z( o0 w( X2 q( @
}
w! \- Q, c' k: D' [ b+ e1 w# n: o4 s0 H3 C8 r- F
|
|