对特征命名和分组的妙用

 1         //对特征命名和分组
 2         int mpcount=0;
 3         char mmsg[256];
 4         for (size_t j = 0; j < feat.size(); j++)
 5         {
 6             mpcount++;
 7             char *feat_name = NULL;
 8             UF_MODL_ask_feat_name(feat[j], &feat_name);        
 9             Features::Block *block(dynamic_cast<Features::Block *>(workPart->Features()->FindObject(feat_name)));        
10             sprintf(mmsg,"%d",mpcount);
11             char mmsg1[256]={"毛坯"};
12             strcat(mmsg1,mmsg);
13             block->SetName(mmsg1);
14             UF_free(feat_name);
15         }
16         size_t n=feat.size();
17         int counts = static_cast <int> (n);
18         tag_t *arrayTag = new tag_t[counts];
19         for (size_t k = 0;k < n; k++)
20         {
21             arrayTag[k]=feat[k];
22         }        
23         tag_t FeatureGroupTag = NULL_TAG;
24         UF_MODL_create_set_of_feature("毛坯组", arrayTag, counts, true, &FeatureGroupTag);//创建特征组

 

posted @ 2020-04-28 11:07  老婆饼里有老婆  阅读(238)  评论(0编辑  收藏  举报