]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/CollectionAPI/CollectionAPI_Group.cpp
Salome HOME
Initial implementation of work of "To add all elements that share the same topology...
[modules/shaper.git] / src / CollectionAPI / CollectionAPI_Group.cpp
index e6660beec193d03309016dfeceed7ef0d8bc018e..19fd1a44e7d77247a3f794db1a84a2db793a6195 100644 (file)
@@ -64,13 +64,19 @@ void CollectionAPI_Group::dump(ModelHighAPI_Dumper& theDumper) const
 
   AttributeSelectionListPtr anAttrList = aBase->selectionList(CollectionPlugin_Group::LIST_ID());
 
-  theDumper << aBase << " = model.addGroup(" << aDocName << ", " << anAttrList << ")" << std::endl;
+  theDumper << aBase << " = model.addGroup(" << aDocName << ", " << anAttrList;
+  if (anAttrList->isGeometricalSelection())
+    theDumper <<", True";
+  theDumper << ")" << std::endl;
 }
 
 //==================================================================================================
 GroupPtr addGroup(const std::shared_ptr<ModelAPI_Document>& thePart,
-                  const std::list<ModelHighAPI_Selection>& theGroupList)
+                  const std::list<ModelHighAPI_Selection>& theGroupList,
+                  const bool theShareSameTopology)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(CollectionAPI_Group::ID());
+  if (theShareSameTopology)
+    aFeature->selectionList(CollectionPlugin_Group::LIST_ID())->setGeometricalSelection(true);
   return GroupPtr(new CollectionAPI_Group(aFeature, theGroupList));
 }