]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1942: group - names are empty strings
authordbv <dbv@opencascade.com>
Wed, 1 Feb 2017 08:52:23 +0000 (11:52 +0300)
committerdbv <dbv@opencascade.com>
Wed, 1 Feb 2017 08:52:45 +0000 (11:52 +0300)
Fixed naming for Intersection feature.

src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp
src/FeaturesPlugin/Test/Test1942.py [new file with mode: 0644]
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h

index f04d203ab579a3da0f0daa8db6087b0819c3b751..8fa040447c0a0882ddbdf66f32f9069a51839f5a 100644 (file)
@@ -141,4 +141,5 @@ ADD_UNIT_TESTS(TestExtrusion.py
                TestRecover.py
                TestRecover1798.py
                Test1922.py
+               Test1942.py
 )
index 3e04656b11108d6f67e0a9a81b6e95584331025a..73153a340762edd37adf7744a828970ba3ecad0d 100644 (file)
@@ -13,6 +13,7 @@
 #include <ModelAPI_AttributeSelectionList.h>
 
 #include <GeomAlgoAPI_Intersection.h>
+#include <GeomAPI_ShapeExplorer.h>
 
 #include <sstream>
 
@@ -107,35 +108,80 @@ void FeaturesPlugin_Intersection::loadNamingDS(std::shared_ptr<ModelAPI_ResultBo
                                                const ListOfShape& theTools,
                                                GeomAlgoAPI_MakeShape& theMakeShape)
 {
-  //load result
   std::shared_ptr<GeomAPI_Shape> aResultShape = theMakeShape.shape();
-  std::shared_ptr<GeomAPI_DataMapOfShapeShape> aMapOfShapes = theMakeShape.mapOfSubShapes();
-  const int aDeletedTag = 1;
-  /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-  const int aSubsolidsTag = 2;
-  const int aModifyTag = 100000;
-  int aModifyToolsTag = 200000;
-  std::ostringstream aStream;
-
-  theResultBody->storeModified(theBaseShape, aResultShape, aSubsolidsTag);
-
-  std::string aModName = "Modified";
-  theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX,
-                                             aModifyTag, aModName, *aMapOfShapes.get(), true);
-  theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::EDGE,
-                                             aModifyTag, aModName, *aMapOfShapes.get(), true);
-  theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE, aDeletedTag);
-
-  int anIndex = 1;
-  for(ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) {
-    aStream.str(std::string());
-    aStream.clear();
-    aStream << aModName << "_" << anIndex++;
-    theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX,
-                                   aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
-    theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE,
-                                 aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
-    theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
-    aModifyToolsTag += 10000;
+  theResultBody->storeModified(theBaseShape, aResultShape);
+
+  const int aDeletedVertexTag = 1;
+  const int aDeletedEdgeTag   = 2;
+  const int aDeletedFaceTag   = 3;
+
+  theResultBody->loadDeletedShapes(&theMakeShape,
+                                   theBaseShape,
+                                   GeomAPI_Shape::VERTEX,
+                                   aDeletedVertexTag);
+  theResultBody->loadDeletedShapes(&theMakeShape,
+                                   theBaseShape,
+                                   GeomAPI_Shape::EDGE,
+                                   aDeletedEdgeTag);
+  theResultBody->loadDeletedShapes(&theMakeShape,
+                                   theBaseShape,
+                                   GeomAPI_Shape::FACE,
+                                   aDeletedFaceTag);
+
+  ListOfShape aShapes = theTools;
+  aShapes.push_back(theBaseShape);
+  GeomAPI_DataMapOfShapeShape aShapesMap; // Map to store {result_shape, original_shape}
+  const int aShapeTypesNb = 2;
+  const GeomAPI_Shape::ShapeType aShapeTypes[aShapeTypesNb] = {GeomAPI_Shape::VERTEX, GeomAPI_Shape::EDGE};
+  for(ListOfShape::const_iterator anIt = aShapes.cbegin(); anIt != aShapes.cend(); ++anIt) {
+    const GeomShapePtr aShape = *anIt;
+    for(int anIndex = 0; anIndex < aShapeTypesNb; ++anIndex) {
+      for(GeomAPI_ShapeExplorer anOrigShapeExp(aShape, aShapeTypes[anIndex]);
+          anOrigShapeExp.more();
+          anOrigShapeExp.next()) {
+        ListOfShape aHistory;
+        const GeomShapePtr aSubShape = anOrigShapeExp.current();
+        theMakeShape.modified(aSubShape, aHistory);
+        for(ListOfShape::const_iterator aHistoryIt = aHistory.cbegin();
+            aHistoryIt != aHistory.cend();
+            ++aHistoryIt) {
+          aShapesMap.bind(*aHistoryIt, aSubShape);
+        }
+      }
+    }
+  }
+
+  int aModifiedVertexIndex(1),
+      aGeneratedVertexIndex(1),
+      aModifiedEdgeIndex(1),
+      aGeneratedEdgeIndex(1);
+  int aTag = 4;
+  GeomAPI_DataMapOfShapeShape aStoredShapes;
+  for(int anIndex = 0; anIndex < aShapeTypesNb; ++anIndex) {
+    for(GeomAPI_ShapeExplorer aShapeExp(aResultShape, aShapeTypes[anIndex]);
+        aShapeExp.more();
+        aShapeExp.next()) {
+      const GeomShapePtr aSubShape = aShapeExp.current();
+      if(aStoredShapes.isBound(aSubShape)) {
+        continue;
+      }
+      if(aShapesMap.isBound(aSubShape)) {
+        theResultBody->modified(aShapesMap.find(aSubShape),
+          aSubShape,
+          std::string("Modified_")
+            + (anIndex == 0 ? "Vertex_" : "Edge_")
+            + std::to_string((long long)(anIndex == 0 ? aModifiedVertexIndex++
+                                                      : aModifiedEdgeIndex++)),
+          aTag++);
+      } else {
+        theResultBody->generated(aSubShape,
+          std::string("Generated_")
+            + (anIndex == 0 ? "Vertex_" : "Edge_")
+            + std::to_string((long long)(anIndex == 0 ? aGeneratedVertexIndex++
+                                                      : aGeneratedEdgeIndex++)),
+          aTag++);
+      }
+      aStoredShapes.bind(aSubShape, aSubShape);
+    }
   }
 }
diff --git a/src/FeaturesPlugin/Test/Test1942.py b/src/FeaturesPlugin/Test/Test1942.py
new file mode 100644 (file)
index 0000000..110f62e
--- /dev/null
@@ -0,0 +1,187 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Point_2 = model.addPoint(partSet, 100, 40, 70)
+Axis_4 = model.addAxis(partSet, model.selection("VERTEX", "Origin"), model.selection("VERTEX", "Point_2"))
+Plane_4 = model.addPlane(partSet, model.selection("EDGE", "Axis_4"), model.selection("VERTEX", "Point_2"), True)
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+model.addParameter(Part_1_doc, "a", "100")
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/Plane_4"))
+SketchLine_1 = Sketch_1.addLine(-5.023684372475525, -46.5755143466786, -14.75825153820805, -43.01597925234075)
+SketchLine_1.setName("SketchLine_9")
+SketchLine_1.result().setName("SketchLine_9")
+SketchLine_2 = Sketch_1.addLine(-33.96152175760117, -20.26294727816075, -38.72043789437247, 5.632510332222703)
+SketchLine_2.setName("SketchLine_10")
+SketchLine_2.result().setName("SketchLine_10")
+SketchLine_3 = Sketch_1.addLine(-5.023684372475525, -46.5755143466786, -30.86227207373359, -37.12739424591874)
+SketchLine_3.setName("SketchLine_1")
+SketchLine_3.result().setName("SketchLine_1")
+SketchLine_3.setAuxiliary(True)
+SketchLine_4 = Sketch_1.addLine(-30.86227207373359, -37.12739424591874, -38.72043789437247, 5.632510332222703)
+SketchLine_4.setName("SketchLine_2")
+SketchLine_4.result().setName("SketchLine_2")
+SketchLine_4.setAuxiliary(True)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(-20.37351638704503, 39.82660556161157, 5.515492360623621, 50.89855436380311)
+SketchLine_5.setName("SketchLine_4")
+SketchLine_5.result().setName("SketchLine_4")
+SketchLine_6 = Sketch_1.addLine(5.515492360623621, 50.89855436380311, 32.11790618078412, 35.7788047045564)
+SketchLine_6.setName("SketchLine_5")
+SketchLine_6.result().setName("SketchLine_5")
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_4")
+SketchLine_7 = Sketch_1.addLine(32.11790618078412, 35.7788047045564, 51.23593736581751, -10.42185420425237)
+SketchLine_7.setName("SketchLine_6")
+SketchLine_7.result().setName("SketchLine_6")
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_5")
+SketchLine_8 = Sketch_1.addLine(51.23593736581751, -10.42185420425237, 33.52439630860805, -30.08966199583723)
+SketchLine_8.setName("SketchLine_7")
+SketchLine_8.result().setName("SketchLine_7")
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_6")
+SketchLine_9 = Sketch_1.addLine(33.52439630860805, -30.08966199583723, -5.023684372475525, -46.5755143466786)
+SketchLine_9.setName("SketchLine_8")
+SketchLine_9.result().setName("SketchLine_8")
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
+SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7")
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.startPoint(), SketchLine_9.endPoint())
+SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_8")
+SketchArc_1 = Sketch_1.addArc(-4.455634849643539, -14.84052735945157, -33.96152175760117, -20.26294727816075, -14.75825153820805, -43.01597925234075, False)
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_9")
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.endPoint())
+SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_10")
+SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_1.result())
+SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_2.result())
+SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_3.startPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_11")
+SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_2.endPoint())
+SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_12")
+SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_3.result())
+SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_13")
+SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_4.result())
+SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_14")
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 30)
+SketchArc_2 = Sketch_1.addArc(-8.152231059872202, 11.25015706261054, -38.72043789437247, 5.632510332222703, -20.37351638704503, 39.82660556161157, True)
+SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_2.endPoint())
+SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_15")
+SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_2.result())
+SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchArc_2.endPoint())
+SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_16")
+SketchConstraintTangent_4 = Sketch_1.setTangent(SketchLine_5.result(), SketchArc_2.results()[1])
+SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_5.result(), SketchLine_9.result())
+SketchCircle_1 = Sketch_1.addCircle(2.333185352801025, 5.209035955269018, 34.7006180228472)
+SketchCircle_1.setName("SketchCircle_2")
+SketchCircle_1.result().setName("SketchCircle_2")
+SketchCircle_1.results()[1].setName("SketchCircle_2_2")
+SketchCircle_1.setAuxiliary(True)
+SketchArc_3 = Sketch_1.addArc(2.333185352801025, 5.209035955269018, 9.336485740095949, 23.71540254943274, 4.745637396078732, -14.43051332599376, True)
+SketchArc_3.setName("SketchArc_4")
+SketchArc_3.result().setName("SketchArc_4")
+SketchArc_3.results()[1].setName("SketchArc_4_2")
+SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_3.center(), SketchCircle_1.center())
+SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_17")
+SketchPoint_1 = Sketch_1.addPoint(-30.48122876352205, 16.49385395867538)
+SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_18")
+SketchPoint_2 = Sketch_1.addPoint(33.38569114717736, 20.69692719513029)
+SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_19")
+SketchPoint_3 = Sketch_1.addPoint(4.745637396078732, -14.43051332599376)
+SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchArc_3.endPoint())
+SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_20")
+SketchPoint_4 = Sketch_1.addPoint(9.336485740095949, 23.71540254943274)
+SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchArc_3.startPoint())
+SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_21")
+SketchArc_4 = Sketch_1.addArc(2.333185352801027, 5.209035955269019, 9.336485740095949, 23.71540254943274, 4.745637396078732, -14.43051332599376, False)
+SketchArc_4.setName("SketchArc_3")
+SketchArc_4.result().setName("SketchArc_3")
+SketchArc_4.results()[1].setName("SketchArc_3_2")
+SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchArc_4.endPoint())
+SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_22")
+SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchArc_3.startPoint(), SketchArc_4.startPoint())
+SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_23")
+SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchArc_3.results()[1])
+SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchPoint_3.coordinates())
+SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_24")
+SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchArc_4.startPoint(), SketchPoint_4.coordinates())
+SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_25")
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), "a/2")
+model.do()
+Sketch_1.result().setColor(85, 255, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchPoint_5 = Sketch_2.addPoint(27.94100551732842, 60.77708330244815)
+SketchPoint_5.setAuxiliary(True)
+SketchArc_5 = Sketch_2.addArc(29.50596093963414, 45.389553391128, 31.03624924456759, 29.99853718200911, 27.94100551732842, 60.77708330244815, True)
+SketchArc_5.setName("SketchArc_6")
+SketchArc_5.result().setName("SketchArc_6")
+SketchArc_5.results()[1].setName("SketchArc_6_2")
+SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchPoint_5.coordinates(), SketchArc_5.endPoint())
+SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_26")
+SketchPoint_6 = Sketch_2.addPoint(31.03624924456759, 29.99853718200911)
+SketchPoint_6.setAuxiliary(True)
+SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchPoint_6.coordinates(), SketchArc_5.startPoint())
+SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_27")
+SketchArc_6 = Sketch_2.addArc(29.50596093963414, 45.389553391128, 31.03624924456759, 29.99853718200911, 27.94100551732842, 60.77708330244815, False)
+SketchArc_6.setName("SketchArc_5")
+SketchArc_6.result().setName("SketchArc_5")
+SketchArc_6.results()[1].setName("SketchArc_5_2")
+SketchConstraintCoincidence_26 = Sketch_2.setCoincident(SketchArc_5.endPoint(), SketchArc_6.endPoint())
+SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_28")
+SketchConstraintCoincidence_27 = Sketch_2.setCoincident(SketchArc_5.startPoint(), SketchArc_6.startPoint())
+SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_29")
+SketchConstraintTangent_6 = Sketch_2.setTangent(SketchArc_6.results()[1], SketchArc_5.results()[1])
+SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchArc_6.startPoint(), SketchPoint_6.coordinates())
+SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_30")
+SketchConstraintCoincidence_29 = Sketch_2.setCoincident(SketchArc_6.endPoint(), SketchPoint_5.coordinates())
+SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_31")
+SketchLine_10 = Sketch_2.addLine(28.46272147483239, 70.73361683339229, 38.77955906494226, 70.73651278326217)
+SketchLine_10.setName("SketchLine_11")
+SketchLine_10.result().setName("SketchLine_11")
+SketchLine_10.setAuxiliary(True)
+SketchPoint_7 = Sketch_2.addPoint(28.46272147483239, 70.73361683339229)
+SketchConstraintCoincidence_30 = Sketch_2.setCoincident(SketchPoint_7.coordinates(), SketchLine_10.startPoint())
+SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_32")
+SketchLine_11 = Sketch_2.addLine(16.42641095303756, 70.73023822521078, 28.46272147483239, 70.73361683339229)
+SketchLine_11.setName("SketchLine_12")
+SketchLine_11.result().setName("SketchLine_12")
+SketchConstraintCoincidence_31 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_10.startPoint())
+SketchConstraintCoincidence_31.setName("SketchConstraintCoincidence_33")
+SketchConstraintParallel_2 = Sketch_2.setParallel(SketchLine_10.result(), SketchLine_11.result())
+SketchConstraintCoincidence_32 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchPoint_7.coordinates())
+SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_34")
+model.do()
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_9r-SketchLine_10r-SketchLine_4r-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r-SketchArc_1_2f-SketchArc_2_2f-SketchArc_4_2r-SketchArc_3_2r")], model.selection("EDGE", "Sketch_2/Edge-SketchLine_12"), 360, 0)
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "PartSet/Plane_4"), model.selection("SOLID", "Revolution_1_1")])
+Recover_1 = model.addRecover(Part_1_doc, Partition_1, [Revolution_1.result()])
+Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/Axis_4"), model.selection("VERTEX", "PartSet/Point_2"), True)
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchArc_2_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_7"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_8"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")])
+Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Recover_1_1")], [model.selection("FACE", "Face_1_1")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_2_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_2"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_6_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_4_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_3"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_1_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_4"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_3_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_7_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_5_1")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Intersection_1_1_7"), model.selection("EDGE", "Intersection_1_1_6"), model.selection("EDGE", "Intersection_1_1_3"), model.selection("EDGE", "Intersection_1_1_11"), model.selection("EDGE", "Recover_1_1/Shape33"), model.selection("EDGE", "Recover_1_1/Shape18"), model.selection("EDGE", "Recover_1_1/Shape32"), model.selection("EDGE", "Intersection_1_1_2"), model.selection("EDGE", "Intersection_1_1_10"), model.selection("EDGE", "Intersection_1_1_9"), model.selection("EDGE", "Intersection_1_1_8")])
+model.end()
+
+aGroupFeature = Group_1.feature()
+aSelectionList = aGroupFeature.selectionList("group_list")
+assert(aSelectionList.size() == 11)
+for index in range(0, aSelectionList.size()):
+  attrSelection = aSelectionList.value(index)
+  shape = attrSelection.value()
+  name = attrSelection.namingName()
+  assert(shape.isVertex())
+  assert(name)
+
+aGroupFeature = Group_2.feature()
+aSelectionList = aGroupFeature.selectionList("group_list")
+assert(aSelectionList.size() == 11)
+for index in range(0, aSelectionList.size()):
+  attrSelection = aSelectionList.value(index)
+  shape = attrSelection.value()
+  name = attrSelection.namingName()
+  assert(shape.isEdge())
+  assert(name)
+
+assert(model.checkPythonDump())
index 91b9781c60f81bf468c14461e45003a3bbbea256..e2f662115d1fef74dcccb77860d1a477dcf212a2 100644 (file)
@@ -79,7 +79,7 @@ public:
 
   /// \return the list of shapes modified from the shape \a theShape.
   /// \param[in] theShape base shape.
-  /// \param[out] theHistory modified shapes.
+  /// \param[out] theHistory modified shapes. Does not cleared!
   GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
                                            ListOfShape& theHistory);