// create attribute: not initialized by value yet
myID = TDataStd_Comment::Set(theLabel, "");
myRef = TDF_Reference::Set(theLabel, theLabel); // not initialized: reference to itself
+ } else {
+ theLabel.FindAttribute(TDF_Reference::GetID(), myRef);
}
}
Handle(TDataStd_Comment) aGroupID;
if (theLabel.Father().FindAttribute(TDataStd_Comment::GetID(), aGroupID)) {
string aGroup = TCollection_AsciiString(aGroupID->Get()).ToCString();
- return myFeatures[aGroup][aFeatureIndex->Get()];
+ if (myFeatures[aGroup].size() > aFeatureIndex->Get())
+ return myFeatures[aGroup][aFeatureIndex->Get()];
}
}
return boost::shared_ptr<ModelAPI_Feature>(); // not found