通过指定点控件获取点所在的面,线,体
1 std::vector<TaggedObject*>objects=this->point0->GetProperties()->GetTaggedObjectVector("SelectedObjects"); 2 if (objects.size()>0) 3 { 4 int type,ssubtype; 5 int n_parents=0; 6 tag_p_t parents; 7 UF_SO_ask_parents(objects[0]->Tag(),UF_SO_ASK_ALL_PARENTS,&n_parents,&parents); 8 for (int i=0;i<n_parents;i++) 9 { 10 UF_OBJ_ask_type_and_subtype(parents[i],&type,&ssubtype); 11 //找出所需要的类型 12 if (type==需要的类型) 13 { 14 //得到所需要类型的tag 15 } 16 } 17 }

浙公网安备 33010602011771号