return aMediumList;
}
+
+//=================================================================================================
+static std::list<ResultPtr> OperaAPI_Tools::getVolumeList()
+{
+ SessionPtr aSession = ModelAPI_Session::get();
+ DocumentPtr aDocument = aSession->activeDocument();
+ std::list<FeaturePtr> aFeatures = aDocument->allFeatures();
+
+ std::list<ResultPtr> aVolumeList;
+ std::list<FeaturePtr>::iterator itFeature = aFeatures.begin();
+ for (; itFeature != aFeatures.end(); ++itFeature)
+ if ((*itFeature)->getKind() == "Volume")
+ aVolumeList.push_back((*itFeature)->firstResult());
+
+ return aVolumeList;
+}
+
+//=================================================================================================
+static std::list<FeaturePtr> OperaAPI_Tools::getVolumeFeatureList()
+{
+ SessionPtr aSession = ModelAPI_Session::get();
+ DocumentPtr aDocument = aSession->activeDocument();
+ std::list<FeaturePtr> aFeatures = aDocument->allFeatures();
+
+ std::list<FeaturePtr> aVolumeFeatureList;
+ std::list<FeaturePtr>::iterator itFeature = aFeatures.begin();
+ for (; itFeature != aFeatures.end(); ++itFeature)
+ if ((*itFeature)->getKind() == "Volume")
+ aVolumeFeatureList.push_back(*itFeature);
+
+ return aVolumeFeatureList;
+}
/// Get medium list
OPERAAPI_EXPORT
static std::list<std::string> getMediumList();
+
+ /// Get volume list
+ OPERAAPI_EXPORT
+ static std::list<ResultPtr> getVolumeList();
+
+ /// Get volume list
+ OPERAAPI_EXPORT
+ static std::list<FeaturePtr> getVolumeFeatureList();
};
#endif // OPERAAPI_TOOLS_H_