std::list<std::string> aListOfMedias;
// Add feature in the file
+ std::list<FeaturePtr> aVolumeFeatureList;
std::list<FeaturePtr> aFeatures = document()->allFeatures();
std::list<FeaturePtr>::iterator itFeature = aFeatures.begin();
int aMediumIndex = 0;
}
else if (aFeature->getKind() == "Volume")
{
+ aVolumeFeatureList.push_back(aFeature);
std::list<std::map<std::string, std::string>> aFeatureDimensionsList;
aFeatureDimensionsList = ExchangePlugin_ExportRoot::computeVolume(aFeature);
aNameShape = Locale::Convert::toString(anObject->data()->name());
}
+ // Check if top volume in Volume list
+ bool err = true;
+ std::list<FeaturePtr>::iterator jtFeature = aVolumeFeatureList.begin();
+ for (; jtFeature != aVolumeFeatureList.end(); ++jtFeature){
+ std::string aCurrName = Locale::Convert::toString((*jtFeature)->firstResult()->data()->name());
+ if (aCurrName == aNameShape)
+ err = false;
+ }
+ if (err)
+ setError("An error occured while exporting : The selected ROOT top volume \"" + aNameShape + "\" is not in the volume list and thus seems to not be a proper Volume result");
+
// Create the end of file
std::string aExportFileName = string(ExchangePlugin_ExportFeature::EXP_NAME_FILE_ID())->value();
anAlgo->buildEnd(aNameShape, aExportFileName);