Salome HOME
0022106: EDF 2464 SMESH : Split quadrangles in 4 triangles
[modules/smesh.git] / src / StdMeshers / StdMeshers_Cartesian_3D.cxx
index c1e57198fe17fc844001e1a5533358c17b9e3981..83447b16ad03c512985434201081969d430a388b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -35,6 +35,7 @@
 
 #include "utilities.h"
 #include "Utils_ExceptHandlers.hxx"
+#include <Basics_OCCTVersion.hxx>
 
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepBndLib.hxx>
 
 using namespace std;
 
+#ifdef _DEBUG_
 //#define _MY_DEBUG_
+#endif
 
-#define ELLIPSOLID_WORKAROUND // remove it as soon as http://tracker.dev.opencascade.org/view.php?id=22809 is solved
+#if OCC_VERSION_LARGE <= 0x06050300
+// workaround is required only for OCCT6.5.3 and older (see OCC22809)
+#define ELLIPSOLID_WORKAROUND
+#endif
 
 #ifdef ELLIPSOLID_WORKAROUND
 #include <BRepIntCurveSurface_Inter.hxx>
@@ -639,7 +645,7 @@ namespace
    */
   void Grid::ComputeNodes(SMESH_MesherHelper& helper)
   {
-    // state of each node of the grid relative to the geomerty
+    // state of each node of the grid relative to the geometry
     const size_t nbGridNodes = _coords[0].size() * _coords[1].size() * _coords[2].size();
     vector< bool > isNodeOut( nbGridNodes, false );
     _nodes.resize( nbGridNodes, 0 );
@@ -2118,6 +2124,7 @@ namespace
         SMESH_subMesh* sm = smIt->next();
         sm->SetIsAlwaysComputed( isComputed );
       }
+      subMeshOfSolid->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
     }
 
     // --------------------------------------------------------------------------------