From: cg246364 Date: Mon, 9 Nov 2020 12:54:15 +0000 (+0100) Subject: Prohibit the creation of volume when the associated group does not have a correspondi... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db03bd31921ab90fc5bf3f8ed71dfe1af8147034;p=modules%2Fshaper.git Prohibit the creation of volume when the associated group does not have a corresponding medium --- diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index 1734424ab..ee5cf6be4 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -638,10 +638,22 @@ void ExchangePlugin_ExportFeature::exportROOT(const std::string& theFileName) anAlgo->buildTranslation(anObjectName, aDx, aDy, aDz); aListNamesOfFeatures.push_back(anObjectName); aListNamesOfFeatures.push_back(aCurFeature->data()->name()); + } else if (aCurFeature->getKind() == "Partition") { + //std::cout<<"ToDo PARTITION"<firstResult()->data()->name(); + aListNamesOfFeatures.push_back(anObjectName); + aListNamesOfFeatures.push_back(aCurFeature->data()->name()); } } // Add all groups in the file + std::map >::const_iterator anIt = aMedium.begin(), + aLast = aMedium.end(); + std::vector aListMedium; + for (; anIt != aLast; anIt++) { + aListMedium.push_back(anIt->first); + } + itExport = theExport.begin(); for (; itExport != theExport.end(); ++itExport) { @@ -654,7 +666,7 @@ void ExchangePlugin_ExportFeature::exportROOT(const std::string& theFileName) //for (std::vector::iterator it = myvector.begin() ; it != myvector.end(); ++it) for (std::vector::iterator it = aListNames.begin(); it != aListNames.end(); it++) { std::string aName = anObjectName + "_" + *it; - anAlgo->BuildVolume(aName, *it, anObjectName); + anAlgo->BuildVolume(aName, *it, anObjectName, aListMedium); } } }