X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_IBooleanOperations.cxx;h=1e4f794c6d5173293d4452510fb60d931073b500;hb=de644ac6fe44325aaa8ce9c1aa729dd9189eea6e;hp=05202784166617038590292bf45a037926ecb7b0;hpb=9680031be017f475ebb1d506a72b9527f5ce70b3;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx index 052027841..1e4f794c6 100644 --- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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,8 +35,6 @@ #include #include -#include - #include #include "utilities.h" @@ -49,8 +47,8 @@ * constructor: */ //============================================================================= -GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID) -: GEOM_IOperations(theEngine, theDocID) +GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine) +: GEOM_IOperations(theEngine) { MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations"); } @@ -82,7 +80,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean if (theShape1.IsNull() || theShape2.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN); //Add a new Boolean function Handle(GEOM_Function) aFunction; @@ -120,9 +118,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -162,7 +159,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse if (theShape1.IsNull() || theShape2.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN); //Add a new Boolean function Handle(GEOM_Function) aFunction = @@ -193,9 +190,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -225,7 +221,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList if (theShapes.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN); //Add a new Boolean function Handle(GEOM_Function) aFunction = @@ -256,9 +252,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -286,7 +281,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList if (theShapes.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN); //Add a new Boolean function Handle(GEOM_Function) aFunction = @@ -316,9 +311,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -353,7 +347,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList if (theShapes.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN); //Add a new Boolean function Handle(GEOM_Function) aFunction = @@ -387,9 +381,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -429,7 +422,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition SetErrorCode(KO); //Add a new Partition object - Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION); + Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GEOM_PARTITION); //Add a new Partition function Handle(GEOM_Function) aFunction; @@ -512,9 +505,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; } @@ -565,7 +557,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition if (theShape.IsNull() || thePlane.IsNull()) return NULL; //Add a new Boolean object - Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION); + Handle(GEOM_Object) aPart = GetEngine()->AddObject(GEOM_PARTITION); //Add a new Partition function Handle(GEOM_Function) aFunction = @@ -593,9 +585,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition return NULL; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - SetErrorCode(aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + SetErrorCode(aFail.GetMessageString()); return NULL; }