]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2227 : regression in multi-translation
authormpv <mpv@opencascade.com>
Tue, 25 Jul 2017 06:23:13 +0000 (09:23 +0300)
committermpv <mpv@opencascade.com>
Tue, 25 Jul 2017 06:23:13 +0000 (09:23 +0300)
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
src/Model/Model_ResultCompSolid.cpp
src/Model/Model_ResultCompSolid.h
src/ModelAPI/ModelAPI_ResultBody.cpp
src/ModelAPI/ModelAPI_ResultBody.h

index 47bba1929b8c0fd90c1bb7ea7706777ebea54278..d4a7c0e9cf6ea2cb3b54d1b283a4dee2bd9b8a4b 100644 (file)
@@ -645,7 +645,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> 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<ModelAPI_ResultBody> 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);
     }
   }
index 23096f0dec0c2e8cb0229236c184b8af4464f556..a46a47d2b6413a2db0b6cdc92e29d9a7719bfcb9 100755 (executable)
@@ -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);
   }
 
index e97a541bb4f24fff552e5d35cedb3d1783bf0cd6..0fa8b4fd188ec6fb7dc949a3af1c2ad2653e1adf 100755 (executable)
@@ -65,13 +65,14 @@ void Model_ResultCompSolid::storeModified(const std::shared_ptr<GeomAPI_Shape>&
   updateSubs(theNewShape);
 }
 
-void Model_ResultCompSolid::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
+void Model_ResultCompSolid::loadAndOrientModifiedShapes(GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  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<std::shared_ptr<ModelAPI_ResultBody> >::const_iterator aSubIter = mySubs.cbegin();
     for(; aSubIter != mySubs.cend(); aSubIter++) {
       (*aSubIter)->loadAndOrientModifiedShapes(
index 69d81356591e5e7e9ac6415c1264c79d81009e3d..7fcf5cc59bae616da02259d634912179528e381b 100755 (executable)
@@ -62,7 +62,8 @@ public:
     std::shared_ptr<GeomAPI_Shape>  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
index c88c0f5a631d20ccfcc56b5620223fd54c4a96c7..4025d17b769b0a4e744586473d1c764982a9026e 100644 (file)
@@ -132,7 +132,8 @@ void ModelAPI_ResultBody::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* th
     std::shared_ptr<GeomAPI_Shape>  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,
index 76a10b0b85bb3a4eaa80c5475835cb91389970ac..98a4b6a290c53f76da28f7e60c94c1f3d8597b3f 100644 (file)
@@ -128,7 +128,8 @@ public:
     std::shared_ptr<GeomAPI_Shape>  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<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape,