]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020982: EDF 1547 SMESH: Creation of non-conformal quadratic pyramids
authoreap <eap@opencascade.com>
Fri, 17 Sep 2010 05:34:11 +0000 (05:34 +0000)
committereap <eap@opencascade.com>
Fri, 17 Sep 2010 05:34:11 +0000 (05:34 +0000)
    Move all checks of shape validity from AddCompoundSubmesh() to IsGroupOfSubShapes()

src/SMESHDS/SMESHDS_Mesh.cxx

index 091e4f70cf8c6e0acabe1e1affd326b563297d3e..358f1230a37b11bfb1b8c0233ec35ea561f8c46e 100644 (file)
@@ -1073,15 +1073,13 @@ TopoDS_Shape SMESHDS_Mesh::ShapeToMesh() const
 
 bool SMESHDS_Mesh::IsGroupOfSubShapes (const TopoDS_Shape& theShape) const
 {
-  if ( myShape.IsSame( theShape ))
+  if ( myIndexToShape.Contains(theShape) )
     return true;
 
-  for ( TopoDS_Iterator it( theShape ); it.More(); it.Next() ) {
-    if (myIndexToShape.Contains( it.Value() ) ||
-        IsGroupOfSubShapes( it.Value() ))
+  for ( TopoDS_Iterator it( theShape ); it.More(); it.Next() )
+    if (IsGroupOfSubShapes( it.Value() ))
       return true;
-  }
-  
+
   return false;
 }
 
@@ -1205,7 +1203,7 @@ int SMESHDS_Mesh::AddCompoundSubmesh(const TopoDS_Shape& S,
                                      TopAbs_ShapeEnum    type)
 {
   int aMainIndex = 0;
-  if ( IsGroupOfSubShapes( S ) || (S.ShapeType() == TopAbs_VERTEX && myIndexToShape.Contains(S)) )
+  if ( IsGroupOfSubShapes( S ))
   {
     aMainIndex = myIndexToShape.Add( S );
     bool all = ( type == TopAbs_SHAPE );