|
创建圆锥
Part *workPart(theSession->Parts()->Work());
Part *displayPart(theSession->Parts()->Display());
Features::Cone *nullNXOpen_Features_Cone(NULL);
Features::ConeBuilder *coneBuilder;
std::vector<TaggedObject *>selectedObjectes=this->axis0->GetProperties()->GetTaggedObjectVector("SelectedObjects");
Axis *axis1=dynamic_cast<Axis *>(selectedObjectes[0]);
coneBuilder = workPart->Features()->CreateConeBuilder(nullNXOpen_Features_Cone);
coneBuilder->TopDiameter()->SetValue(expressionTD->Value());
coneBuilder->BaseDiameter()->SetValue(expressionBD->Value());
coneBuilder->Height()->SetValue(expressionH->Value());
coneBuilder->SetAxis(axis1);
coneBuilder->CommitFeature();
coneBuilder->Destroy();
编译可以通过 UG里运行不了 如果把
std::vector<TaggedObject *>selectedObjectes=this->axis0->GetProperties()->GetTaggedObjectVector("SelectedObjects");
Axis *axis1=dynamic_cast<Axis *>(selectedObjectes[0]); coneBuilder->SetAxis(axis1);这几句注释掉可以生成圆锥。求大神指教
|
|