|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
+ S7 I6 }' w1 H* r/ l o; K3 I" T
' ^4 b/ i8 [- y4 bNX二次开发源码分享: 高亮镜像Wave linked的面# m* [$ \$ P7 t& H4 p9 S% P P T) T
& H. N. ^5 E7 B, d: h! `: k
static void highlight_mirrored_face(tag_t face)
8 w+ N6 g- E+ _" U- E4 {{
) A7 _- _( \" |, n- R/ I5 H int# e" ^# R0 j q" }" q9 n6 b
ii,
7 C; h/ `* K1 a jj,
4 p2 W0 L7 b2 f) N4 x$ P' @ n_feats,# D& ^8 v( c. I/ W0 N
n_items;
8 y) ^) ?$ \1 g' A* h6 v char
1 f) g h- {0 |# j7 T- x) } *feat_type;
# |/ I( k. s! [+ a: ^ tag_t
( i7 l, C/ l+ @3 i$ ] *feats,: U7 m# S" q- V6 R$ k$ _* o
mirror,. @& G' Z3 m, B! E7 {
*results,7 M7 P/ s& X5 F
*sources;, N: u6 }& k6 Y5 F3 i8 J( e
, F( O7 |: X. G n_feats = ask_face_feats(face, &feats);
$ l* {$ ?; ?; p' S! G" i4 q" {- Q: o( J) Y3 a: `
for (ii = 0; ii < n_feats; ii++)* M9 B* i4 O% h# E8 V u! ?
{
6 |6 a, f/ S/ r/ ]1 S! | UF_CALL(UF_MODL_ask_feat_type(feats[ii], &feat_type));$ C, F. c: i; O. N
if ((!strcmp(feat_type, "MIRROR")) &&
# f9 a, `+ C& j* s2 { ! UF_CALL(UF_WAVE_map_link_geom_to_source(feats[ii], face, TRUE,. Z3 o2 f+ C4 e* K8 n9 ?
&mirror)))
* ]% H8 X" |4 x, k {
! O% W9 c9 o/ x& d3 J0 N8 N
2 v5 D5 o! d9 @* s /* Begin work around to PR 4244233 */0 F+ i; l" ^! Q; p
if (mirror == NULL_TAG)0 }6 e+ `/ C0 R2 U. ?
{
8 \0 l% `% X! }- a' {3 u* j: E6 Z UF_CALL(UF_WAVE_ask_linked_feature_map(feats[ii], TRUE,0 L6 R% A6 P {" |0 Y
&n_items, &sources, &results));
2 j! c, T$ R) o9 o+ Z1 c for (jj = 0; jj < n_items; jj++)
2 r6 o, l0 \% i' I X. X {
# ~: V& J1 i% A( a* p1 R if (results[jj] == face)
- n8 ^0 V. @6 S9 d& a- Y. u {
+ g, P$ I. }+ y6 B0 {- p9 N mirror = sources[jj];: \0 Z$ l6 }& F( |7 C. B7 V1 q9 }
break;
; j6 v( x- z$ s* F }
9 x) y% ~/ T: `; u1 D. x4 N }+ f- F- r4 w# K" W" R, V( T! U
if (n_items > 0); _ X' P; Y5 O
{
% N; r5 M! B# S! n UF_free(sources);5 J4 S3 n+ L+ q) R |/ Y
UF_free(results);
5 n# |. I$ [% L }
4 m5 Q3 X" y8 O6 W5 |8 t+ t }! ]$ F8 j- m5 N2 c4 o9 y
/* End work around to PR 4244233 */( p8 X' _ D; a+ V. ?% G, u
4 h4 @9 A" o& i2 N2 k! J: T6 n
UF_DISP_set_highlight(face, TRUE);
, s5 E& |9 P: s/ {& A UF_DISP_set_highlight(mirror, TRUE);& U6 J* O; t4 U
uc1601("Mirrored face highlighted", TRUE);; z0 o# n6 m. M; W$ P
UF_DISP_set_highlight(face, FALSE);' w! J% s4 |% ?7 @1 n$ W0 ]) {
UF_DISP_set_highlight(mirror, FALSE);
8 o. h S* f; K }/ K& d* y0 w% i+ J
UF_free(feat_type);
+ M& Q" v. \! ^9 Y. a! P: E+ B }' i( Q3 x1 g; }& g
2 |* z; v# x5 \: ^2 A% J
if (n_feats > 0) UF_free(feats);
( a% F* R/ H$ N- X4 V- ^0 D}
) o4 W/ D1 |' c& I
5 n/ S$ D, X! c7 N7 C9 r7 u |
|