]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fill: consider the list of tools while storing the history of modified shapes.
authorazv <azv@opencascade.com>
Mon, 28 Jan 2019 08:35:41 +0000 (11:35 +0300)
committerazv <azv@opencascade.com>
Mon, 28 Jan 2019 08:35:41 +0000 (11:35 +0300)
src/CollectionPlugin/Test/TestGroupMove6.py
src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp

index 9807143bfa0d4cd1a9ff72fde1ad6caf23a59a4a..5229e0c27675f6d4f80b94b4791d91a246f224f7 100644 (file)
@@ -71,17 +71,17 @@ selectionList = Group_3.feature().selectionList("group_list")
 assert(selectionList.size() == 19)
 assert(aFactory.validate(Group_3.feature()))
 
-# groups related to the copied box should stay untouched
+# groups related to the copied box should contain only the elements connected with the original box
 selectionList = Group_4.feature().selectionList("group_list")
 assert(selectionList.size() == 1)
 assert(aFactory.validate(Group_4.feature()))
 
 selectionList = Group_5.feature().selectionList("group_list")
-assert(selectionList.size() == 6)
+assert(selectionList.size() == 3)
 assert(aFactory.validate(Group_5.feature()))
 
 selectionList = Group_6.feature().selectionList("group_list")
-assert(selectionList.size() == 12)
+assert(selectionList.size() == 3)
 assert(aFactory.validate(Group_6.feature()))
 
 
@@ -108,10 +108,11 @@ assert(selectionList.size() == 16)
 assert(aFactory.validate(Group_2.feature()))
 
 selectionList = Group_3.feature().selectionList("group_list")
-assert(selectionList.size() == 19)
+# one of edges should disappear, due to its belonging to the face of the filling
+assert(selectionList.size() == 18)
 assert(aFactory.validate(Group_3.feature()))
 
-# groups related to the copied box should stay untouched
+# groups related to the copied box should be split correspondingly
 selectionList = Group_4.feature().selectionList("group_list")
 assert(selectionList.size() == 1)
 assert(aFactory.validate(Group_4.feature()))
@@ -121,7 +122,7 @@ assert(selectionList.size() == 6)
 assert(aFactory.validate(Group_5.feature()))
 
 selectionList = Group_6.feature().selectionList("group_list")
-assert(selectionList.size() == 12)
+assert(selectionList.size() == 5)
 assert(aFactory.validate(Group_6.feature()))
 
 assert(model.checkPythonDump())
index 56608a69204c0fd93da046b0fb4274fb2a29595c..27b46bc03cf2867fffd6af5051a609afb55b6b00 100644 (file)
@@ -166,6 +166,9 @@ void FeaturesPlugin_BooleanFill::execute()
     std::shared_ptr<ModelAPI_ResultBody> aResultBody =
         document()->createBody(data(), aResultIndex);
 
+    // tools should be added to the list to fulfill the correct history of modification
+    aListWithObject.insert(aListWithObject.end(), aTools.begin(), aTools.end());
+
     ListOfShape aUsedTools = aTools;
     aUsedTools.insert(aUsedTools.end(), aPlanes.begin(), aPlanes.end());
 
@@ -261,6 +264,9 @@ void FeaturesPlugin_BooleanFill::execute()
 
     ListOfShape aBaseShapes;
     aBaseShapes.push_back(aCompSolid);
+    // tools should be added to the list to fulfill the correct history of modification
+    aBaseShapes.insert(aBaseShapes.end(), aTools.begin(), aTools.end());
+
     FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, aBaseShapes, aUsedTools,
                                              aMakeShapeList, aResultShape);
     setResult(aResultBody, aResultIndex);