Salome HOME
Regression of 0020206: EDF SMESH 987: Netgen1D2D3D +submesh
authoreap <eap@opencascade.com>
Wed, 4 May 2011 14:16:19 +0000 (14:16 +0000)
committereap <eap@opencascade.com>
Wed, 4 May 2011 14:16:19 +0000 (14:16 +0000)
   in Compute(), fix sorting submeshes according to dim of shape the algo assigned to

           aShapeDim = GetShapeDim( algoShape );
+          if ( algoShape.ShapeType() == TopAbs_COMPOUND )
+          {
+            TopoDS_Iterator it( algoShape );
+            aShapeDim += GetShapeDim( it.Value() );
+          }

src/SMESH/SMESH_Gen.cxx

index 9dd6d0d058f812fd065579ba679770413d80db36..cbc49c40a0dee543d650c6551a80d516ed91512d 100644 (file)
 #include "OpUtil.hxx"
 #include "Utils_ExceptHandlers.hxx"
 
-#include <gp_Pnt.hxx>
-#include <BRep_Tool.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS_Iterator.hxx>
 
 #include "memoire.h"
 
@@ -222,6 +219,11 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
           }
           // add smToCompute to shDim2sm map
           aShapeDim = GetShapeDim( algoShape );
+          if ( algoShape.ShapeType() == TopAbs_COMPOUND )
+          {
+            TopoDS_Iterator it( algoShape );
+            aShapeDim += GetShapeDim( it.Value() );
+          }
           shDim2sm.insert( make_pair( aShapeDim, smToCompute ));
         }
         else