|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
9 G2 o6 {$ ~4 K1 v: ?4 `! s& ^
* e6 k: N) M+ L5 B* R, lNX二次开发源码分享: 高亮镜像Wave linked的面' S3 `6 R r1 s
8 b: Y1 t. k' }% }4 l0 Cstatic void highlight_mirrored_face(tag_t face)# E$ A$ e8 f8 P; y/ Z: L
{: N+ u7 p6 c' c$ v$ L2 h. S5 H2 R2 g
int: C. e1 i; n9 A* z6 Q
ii," _8 w2 c \6 a6 [- N3 [, H4 I
jj,! _8 b2 p8 A" A+ Y
n_feats,
" H. p) U( s* l: z2 g n_items;
7 n8 ^) e: b! i char
( P4 C7 R, ?( o7 [* A9 Q7 d$ a *feat_type;, y3 o* {" V4 O5 T" V
tag_t; o9 Z' U6 _6 T f& b* y( a
*feats,; {# c( v) L8 t0 Q, l" g
mirror,
; g7 j, K4 x$ ^/ g *results,
& K0 C0 }7 c. D9 h0 h6 w% K3 g *sources;. Y: }7 k8 t0 ~. y+ U" G
; t5 X/ I; ^2 _2 k: z( `3 [ n_feats = ask_face_feats(face, &feats);6 l% j, m* Q' A! f7 T+ F' N
8 p* T! z: l: X3 D1 b, r+ }
for (ii = 0; ii < n_feats; ii++)
. ]- Q1 c6 l! t' E0 Q3 a. m' |- l' P- E {
& o* m. i2 P- t7 \- Q UF_CALL(UF_MODL_ask_feat_type(feats[ii], &feat_type));4 `. i/ y, [9 q
if ((!strcmp(feat_type, "MIRROR")) &&8 ~; y* I. n4 n1 b
! UF_CALL(UF_WAVE_map_link_geom_to_source(feats[ii], face, TRUE,4 v6 V6 i: u6 q5 `; h
&mirror)))
5 r) }8 F$ N4 s3 |3 U {% X/ w6 ~* X$ y2 k4 O$ B
) q+ o- w1 p* J! _/ m1 N
/* Begin work around to PR 4244233 */$ D5 T. d" M# n/ l- `9 e! L
if (mirror == NULL_TAG)
+ c# _! o3 H& ] {$ [$ F7 Y/ |' ]% }; s9 H
UF_CALL(UF_WAVE_ask_linked_feature_map(feats[ii], TRUE,9 ?# ^# y+ h6 v) O; e
&n_items, &sources, &results));
- f8 V! R4 [. S1 P for (jj = 0; jj < n_items; jj++) E+ {. y) e& @" r4 k4 x' y
{
( c2 S0 Y( k1 r: a' m if (results[jj] == face)
4 ?$ e1 _# Y' d! M; o; C+ i( _! {+ E {
/ q( V% s6 D& I/ ? mirror = sources[jj];
0 ]$ j S" l) S( f+ a break;+ K. ^) X/ U2 b9 o | a; {* _
}
D: m8 ^) q0 }" j/ p# \ }4 r3 Z: S2 Q4 J" G0 v
if (n_items > 0)
( H4 c4 I4 W; ]5 g {/ F. m4 w% p. G+ O' x7 I" i9 z6 r
UF_free(sources); G( r. }- `+ ^) X+ R z; u! D
UF_free(results);+ a S$ [. b* _9 |1 ?( ?( {5 R
} W) x$ O: N _5 }; M$ D; A) Y1 c: X
}
0 P y( a5 {( o /* End work around to PR 4244233 */0 m3 }- O3 K3 Q) j- H7 T: }
" C$ k6 s" n+ Q UF_DISP_set_highlight(face, TRUE);, t: j5 `: p( M2 N9 l8 }% e
UF_DISP_set_highlight(mirror, TRUE);
9 C- `* Z9 a+ J3 H( z6 q- _/ o uc1601("Mirrored face highlighted", TRUE);6 j2 Z' X H% O6 P7 D) m
UF_DISP_set_highlight(face, FALSE);3 |: A8 X. B n4 O. z+ [$ O! K1 h
UF_DISP_set_highlight(mirror, FALSE);
+ \. c9 c8 O) s5 ^" }. Y }; \( F n2 C. B+ s; X
UF_free(feat_type);5 d- c! l' R& G( ]/ B4 K! {- W
}
w! }7 b1 C$ X0 Z# k, R1 `5 d& N0 o7 A2 L/ `8 D% C2 y
if (n_feats > 0) UF_free(feats);
* ^* N9 m9 ^. d8 f}( u7 r# V* o' y" {4 s# w
/ \. ]# s) E& n" C1 c, E: B0 i |
|