isSameName = (*aRIter)->data()->name() == aName;
}
}
- // for new Parts create names that are not in the Postponed list
- if (!isSameName && (theFeature->getKind() == "Part" || theFeature->getKind() == "Duplicate")) {
- std::shared_ptr<Model_Session> aSession =
- std::dynamic_pointer_cast<Model_Session>(Model_Session::get());
- isSameName = aSession->isLoadByDemand(aName) || aSession->hasDocument(aName);
- }
if (isSameName) {
aNumObjects++;
theObj->initAttributes();
}
+std::shared_ptr<ModelAPI_Feature> Model_Objects::featureById(const int theId)
+{
+ if (theId > 0) {
+ TDF_Label aLab = featuresLabel().FindChild(theId, Standard_False);
+ return feature(aLab);
+ }
+ return std::shared_ptr<ModelAPI_Feature>(); // not found
+}
+
void Model_Objects::synchronizeFeatures(
const TDF_LabelList& theUpdated, const bool theUpdateReferences, const bool theFlush)
{