]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022448: [CEA 1031] Error when exporting XAO of a box with ellipsoids
authormpa <mpa@opencascade.com>
Wed, 15 Jan 2014 10:39:59 +0000 (10:39 +0000)
committermpa <mpa@opencascade.com>
Wed, 15 Jan 2014 10:39:59 +0000 (10:39 +0000)
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx

index c44d07e3be4858256b8a80be7d0d3e15d113090a..edfde097a6158aa90a4590a17f49d897fa67830b 100644 (file)
@@ -3643,7 +3643,11 @@ static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
 {
   if (theWhereFunction.IsNull() || theWhat.IsNull()) return false;
 
-  if (theWhereIndices.Contains(theWhat)) {
+  if(theWhereIndices.Contains( theWhat ) &&
+    (theWhat.ShapeType() == TopAbs_VERTEX || theWhat.ShapeType() == TopAbs_EDGE ||
+     theWhat.ShapeType() == TopAbs_FACE || theWhat.ShapeType() == TopAbs_SOLID)) {
+    // It is possible to add a shape only next type: vertex, edge, face or solid
+    // to create after a group on these elements
     // entity was not changed by the operation
     Standard_Integer aWhatIndex = theWhereIndices.FindIndex(theWhat);
     theModifiedList.Append(aWhatIndex);
@@ -3698,7 +3702,10 @@ static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
             isGood = Standard_True;
             Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length();
             for (imod = 1; imod <= aModifLen; imod++) {
-              theModifiedList.Append(anIntegerArray->Array()->Value(imod));
+              TopoDS_Shape curShape = theWhereIndices.FindKey(anIntegerArray->Array()->Value(imod));
+              if(curShape.ShapeType() == TopAbs_VERTEX || curShape.ShapeType() == TopAbs_EDGE ||
+                 curShape.ShapeType() == TopAbs_FACE || curShape.ShapeType() == TopAbs_SOLID)
+                theModifiedList.Append(anIntegerArray->Array()->Value(imod));
             }
           }
         }