NX二次开发源码分享: 高亮镜像Wave linked的面
NX二次开发源码分享: 高亮镜像Wave linked的面
static void highlight_mirrored_face(tag_t face)
{
int
ii,
jj,
n_feats,
n_items;
char
*feat_type;
tag_t
*feats,
mirror,
*results,
*sources;
n_feats = ask_face_feats(face, &feats);
for (ii = 0; ii < n_feats; ii++)
{
UF_CALL(UF_MODL_ask_feat_type(feats, &feat_type));
if ((!strcmp(feat_type, "MIRROR")) &&
! UF_CALL(UF_WAVE_map_link_geom_to_source(feats, face, TRUE,
&mirror)))
{
/*Begin work around to PR 4244233 */
if (mirror == NULL_TAG)
{
UF_CALL(UF_WAVE_ask_linked_feature_map(feats, TRUE,
&n_items, &sources, &results));
for (jj = 0; jj < n_items; jj++)
{
if (results == face)
{
mirror = sources;
break;
}
}
if (n_items > 0)
{
UF_free(sources);
UF_free(results);
}
}
/*End work around to PR 4244233 */
UF_DISP_set_highlight(face, TRUE);
UF_DISP_set_highlight(mirror, TRUE);
uc1601("Mirrored face highlighted", TRUE);
UF_DISP_set_highlight(face, FALSE);
UF_DISP_set_highlight(mirror, FALSE);
}
UF_free(feat_type);
}
if (n_feats > 0) UF_free(feats);
}
页:
[1]