Salome HOME
0023450: Fields are not displayed in GEOM
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShellSolid.cxx
index 964ea96cd98646b71abb1059fac11d921f51d63e..942538773cdfc2b0386b5e4a6251862889f82fb4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
@@ -27,8 +27,6 @@
 //
 #include <GEOMAlgo_ShellSolid.hxx>
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <Standard_Failure.hxx>
 
 #include <gp_Pnt2d.hxx>
 
 #include <BOPCol_DataMapOfShapeListOfShape.hxx>
 #include <BOPCol_ListOfShape.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
 #include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
 #include <BOPDS_DS.hxx>
 #include <BOPAlgo_Builder.hxx>
 
@@ -101,7 +95,6 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder()
 //=======================================================================
 void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
 {
-  myErrorStatus=0;
    //
   myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
   myDS=myPaveFiller->PDS();
@@ -109,57 +102,57 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
   //
   // 1. CheckData
   CheckData();
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   // 2. Prepare
   Prepare();
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   // 3. Fill Images
   // 3.1 Vertice
   FillImagesVertices();
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   BuildResult(TopAbs_VERTEX);
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   // 3.2 Edges
   FillImagesEdges();
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   BuildResult(TopAbs_EDGE);
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   } 
   //
   // 3.3 Wires
   FillImagesContainers(TopAbs_WIRE);
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   BuildResult(TopAbs_WIRE);
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   
   // 3.4 Faces
   FillImagesFaces();
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
   //
   BuildResult(TopAbs_FACE);
-  if (myErrorStatus) {
+  if (HasErrors()) {
     return;
   }
 }
@@ -186,7 +179,6 @@ GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid()
 //=======================================================================
 void GEOMAlgo_ShellSolid::Perform()
 {
-  myErrorStatus=0;
   //
   try {
     Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
@@ -207,7 +199,7 @@ void GEOMAlgo_ShellSolid::Perform()
       myErrorStatus=10;
       return;
     }
-    if(myDSFiller->ErrorStatus()) {
+    if(myDSFiller->HasErrors()) {
       myErrorStatus=11;
       return;
     }
@@ -237,11 +229,7 @@ void GEOMAlgo_ShellSolid::Perform()
       return;
     }
     //
-#if OCC_VERSION_LARGE > 0x06070100
     Handle(IntTools_Context) aCtx=myDSFiller->Context();
-#else
-    Handle(BOPInt_Context) aCtx=myDSFiller->Context();
-#endif
     const BOPDS_IndexRange& aRange=pDS->Range(iRank);
     aRange.Indices(iBeg, iEnd);
     const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
@@ -251,7 +239,7 @@ void GEOMAlgo_ShellSolid::Perform()
     GEOMAlgo_ShellSolidBuilder aSSB;
     //
     aSSB.PerformWithFiller(*myDSFiller);
-    iErr=aSSB.ErrorStatus();
+    iErr=aSSB.HasErrors();
     if (iErr) {
       myErrorStatus=15;
       return;