From: mpv Date: Tue, 25 Jul 2017 06:23:13 +0000 (+0300) Subject: Fix for the issue #2227 : regression in multi-translation X-Git-Tag: V_2.7.2~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b5b7c064ca02e68da4cf892ec28bb7ba80a4c550;p=modules%2Fshaper.git Fix for the issue #2227 : regression in multi-translation --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp index 47bba1929..d4a7c0e9c 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp @@ -645,7 +645,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr t const std::string aModFName = "Modified_Face"; theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE, - aModifyTag, aModName, theMapOfShapes); + aModifyTag, aModName, theMapOfShapes, false, false, true); theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE, aDeletedTag); @@ -666,7 +666,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr t } theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, aName == aModEName ? GeomAPI_Shape::EDGE : GeomAPI_Shape::FACE, - aTag, aName, theMapOfShapes); + aTag, aName, theMapOfShapes, false, false, true); theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag); } } diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index 23096f0de..a46a47d2b 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -190,10 +190,10 @@ void FeaturesPlugin_Partition::storeResult( GeomShapePtr aShape = *anIt; std::string aModEdgeName = aModName + "_Edge_" + std::to_string((long long)anIndex); aResultBody->loadAndOrientModifiedShapes(theMakeShape.get(), aShape, GeomAPI_Shape::EDGE, - aModTag, aModEdgeName, *aMapOfSubShapes.get(), false, true); + aModTag, aModEdgeName, *aMapOfSubShapes.get(), false, true, true); std::string aModFaceName = aModName + "_Face_" + std::to_string((long long)anIndex++); aResultBody->loadAndOrientModifiedShapes(theMakeShape.get(), aShape, GeomAPI_Shape::FACE, - aModTag + 1, aModFaceName, *aMapOfSubShapes.get(), false, true); + aModTag + 1, aModFaceName, *aMapOfSubShapes.get(), false, true, true); aResultBody->loadDeletedShapes(theMakeShape.get(), aShape, GeomAPI_Shape::FACE, aDelTag); } diff --git a/src/Model/Model_ResultCompSolid.cpp b/src/Model/Model_ResultCompSolid.cpp index e97a541bb..0fa8b4fd1 100755 --- a/src/Model/Model_ResultCompSolid.cpp +++ b/src/Model/Model_ResultCompSolid.cpp @@ -65,13 +65,14 @@ void Model_ResultCompSolid::storeModified(const std::shared_ptr& updateSubs(theNewShape); } -void Model_ResultCompSolid::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS, +void Model_ResultCompSolid::loadAndOrientModifiedShapes(GeomAlgoAPI_MakeShape* theMS, std::shared_ptr theShapeIn, const int theKindOfShape, const int theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, const bool theIsStoreSeparate, - const bool theIsStoreAsGenerated) + const bool theIsStoreAsGenerated, + const bool theSplitInSubs) { - if (mySubs.size()) { // consists of subs + if (theSplitInSubs && mySubs.size()) { // consists of subs std::vector >::const_iterator aSubIter = mySubs.cbegin(); for(; aSubIter != mySubs.cend(); aSubIter++) { (*aSubIter)->loadAndOrientModifiedShapes( diff --git a/src/Model/Model_ResultCompSolid.h b/src/Model/Model_ResultCompSolid.h index 69d813565..7fcf5cc59 100755 --- a/src/Model/Model_ResultCompSolid.h +++ b/src/Model/Model_ResultCompSolid.h @@ -62,7 +62,8 @@ public: std::shared_ptr theShapeIn, const int theKindOfShape, const int theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, const bool theIsStoreSeparate = false, - const bool theIsStoreAsGenerated = false); + const bool theIsStoreAsGenerated = false, + const bool theSplitInSubs = false); /// Returns the number of sub-elements diff --git a/src/ModelAPI/ModelAPI_ResultBody.cpp b/src/ModelAPI/ModelAPI_ResultBody.cpp index c88c0f5a6..4025d17b7 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.cpp +++ b/src/ModelAPI/ModelAPI_ResultBody.cpp @@ -132,7 +132,8 @@ void ModelAPI_ResultBody::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* th std::shared_ptr theShapeIn, const int theKindOfShape, const int theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, const bool theIsStoreSeparate, - const bool theIsStoreAsGenerated) + const bool theIsStoreAsGenerated, + const bool /*theSplitInSubs*/) { myBuilder->loadAndOrientModifiedShapes( theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes, theIsStoreSeparate, diff --git a/src/ModelAPI/ModelAPI_ResultBody.h b/src/ModelAPI/ModelAPI_ResultBody.h index 76a10b0b8..98a4b6a29 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.h +++ b/src/ModelAPI/ModelAPI_ResultBody.h @@ -128,7 +128,8 @@ public: std::shared_ptr theShapeIn, const int theKindOfShape, const int theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, const bool theIsStoreSeparate = false, - const bool theIsStoreAsGenerated = false); + const bool theIsStoreAsGenerated = false, + const bool theSplitInSubs = false); /// load and orient generated shapes MODELAPI_EXPORT virtual void loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS, std::shared_ptr theShapeIn, const int theKindOfShape,