|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
# q- J7 }* |: a# m: I/ \- \" Q5 |# Q( k: a( Q# z' ^ R* E$ x' H
NX二次开发源码分享: 高亮镜像Wave linked的面
- e" M- \6 Y; H, F# J
' v: ]& Q7 S: \# J1 s/ w' u, A; tstatic void highlight_mirrored_face(tag_t face) o8 \( Q j4 B
{
* I( E4 L" Z7 y' V- ]- o! e s, D( ~ int
# [( A7 V" \4 ~8 x: C ii,
# p: N, `: U W8 H- E jj,6 _5 ~# T4 A5 j: n
n_feats,) p6 z, x/ v) D( R
n_items;
5 c; j0 m# B" c: O7 } char6 D1 y8 ?% _" U& |0 V& C/ }
*feat_type;1 `4 {8 Z8 Q2 V
tag_t
0 w L' D5 q4 n; W5 y9 K+ C *feats,
9 O2 }5 i9 T3 W: X7 e2 r, {4 z" k mirror, b9 v$ c$ U" t; s2 T0 N! S
*results,# s, Q8 f- u! W, q" \& o
*sources;
( F+ c; D$ s' s" X1 Z; d+ U4 @7 Z4 r% K+ s, h+ @9 k
n_feats = ask_face_feats(face, &feats);
+ g8 _: J7 C5 i* B* x, D- L O+ Q4 r6 Q: V' A- `$ _8 x9 G
for (ii = 0; ii < n_feats; ii++)% N! i+ M7 F0 J8 y' [7 e
{' o& n8 P$ i( D: j. l
UF_CALL(UF_MODL_ask_feat_type(feats[ii], &feat_type));" n" p+ p1 U, K. {! a
if ((!strcmp(feat_type, "MIRROR")) &&
5 I- {; F( r) ~4 a3 {: { ! UF_CALL(UF_WAVE_map_link_geom_to_source(feats[ii], face, TRUE,- X! I2 ~$ t- e$ r
&mirror))); A0 b0 G, A; |( w6 X1 c/ u
{& E, x: c3 `9 v# |- }
: G/ c. ?' _" Z /* Begin work around to PR 4244233 */
/ F& t9 G( _. m c4 {1 e5 B if (mirror == NULL_TAG); B2 H, y' l, S1 E6 c u& O
{5 q% L$ _/ q1 X1 T% R7 M6 x) y0 F
UF_CALL(UF_WAVE_ask_linked_feature_map(feats[ii], TRUE,
; J0 W; c2 b" l r7 o/ K &n_items, &sources, &results));( T8 z( N6 `: b" f% t- A
for (jj = 0; jj < n_items; jj++)
; b4 S1 z2 K7 N' w7 s; q9 S/ i1 Z {
8 t' {9 H2 W# C, H( q7 v8 c if (results[jj] == face)' u- X0 U# D; i) c
{& K+ q6 ]( T. r" z9 Y
mirror = sources[jj];
5 A$ V7 E# A; p* b' V5 v break;
: g& R$ R }7 R- p }# |' ^' K% n' S
}
9 c E/ m/ b2 y: g if (n_items > 0)2 \: d- J# X1 Y. x5 g. P( h
{, o$ y. G5 S8 n5 L* t! y
UF_free(sources);' t0 n9 Q x* ~$ S4 t2 } y& `
UF_free(results);3 U# N$ C! q5 Q o$ h7 {
}& }1 R2 N4 }7 C# {. H9 |7 R
}
6 r( r! u1 k3 x7 }# @/ I: W /* End work around to PR 4244233 */6 j: e) h: ~3 `" G; E/ M
9 ] i( E0 G7 x) T- L# |
UF_DISP_set_highlight(face, TRUE);& p& o: |7 s0 f9 z: z3 ~, T
UF_DISP_set_highlight(mirror, TRUE);
$ K/ d! g, Y5 Y$ v6 T( v5 X! ` uc1601("Mirrored face highlighted", TRUE);% Y$ d7 v) r' B
UF_DISP_set_highlight(face, FALSE);9 H: N/ W, N7 m! y) L
UF_DISP_set_highlight(mirror, FALSE);
1 X- R& ~5 m, o. h0 } } a* x! \; L6 x( b- a- T
UF_free(feat_type);
" |( T6 H8 S7 R }) {4 K4 @( L9 J n
+ @1 D+ X: P3 b+ J
if (n_feats > 0) UF_free(feats);
, n, o- Z! Z! `% Y& B}
% F N) Q8 w6 u2 P9 B( D, j1 ?# w- X. l9 B8 g
|
|