Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary includes
[modules/geom.git]
/
src
/
GEOMImpl
/
GEOMImpl_IBlocksOperations.cxx
diff --git
a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
index db35fe4a489a5cfcca33657da1776e1a651ca14c..6a4428082015eadee67477f341e9e91d44d0d44a 100644
(file)
--- a/
src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
+++ b/
src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-46,10
+46,7
@@
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#include <BlockFix_CheckTool.hxx>
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#include <BlockFix_CheckTool.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include "utilities.h"
-#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <TFunction_DriverTable.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <TFunction_DriverTable.hxx>
@@
-249,8
+246,8
@@
static Standard_Boolean IsQuadrangle(const TopoDS_Face &theFace,
* constructor:
*/
//=============================================================================
* constructor:
*/
//=============================================================================
-GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine
, int theDocID
)
-: GEOM_IOperations(theEngine
, theDocID
)
+GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
}
{
MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
}
@@
-281,7
+278,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
//Add a new Face object
theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
//Add a new Face object
- Handle(GEOM_Object) aFace = GetEngine()->AddObject(G
etDocID(), G
EOM_FACE);
+ Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
//Add a new Face function
Handle(GEOM_Function) aFunction =
@@
-315,9
+312,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-342,7
+338,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
//Add a new Face object
if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
//Add a new Face object
- Handle(GEOM_Object) aFace = GetEngine()->AddObject(G
etDocID(), G
EOM_FACE);
+ Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
//Add a new Face function
Handle(GEOM_Function) aFunction =
@@
-371,9
+367,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-400,7
+395,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
//Add a new Face object
thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
//Add a new Face object
- Handle(GEOM_Object) aFace = GetEngine()->AddObject(G
etDocID(), G
EOM_FACE);
+ Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
//Add a new Face function
Handle(GEOM_Function) aFunction =
@@
-434,9
+429,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-465,7
+459,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
theFace5.IsNull() || theFace6.IsNull()) return NULL;
//Add a new Solid object
theFace5.IsNull() || theFace6.IsNull()) return NULL;
//Add a new Solid object
- Handle(GEOM_Object) aBlock = GetEngine()->AddObject(G
etDocID(), G
EOM_BLOCK);
+ Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
//Add a new Block function
Handle(GEOM_Function) aFunction =
//Add a new Block function
Handle(GEOM_Function) aFunction =
@@
-504,9
+498,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-532,7
+525,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
//Add a new Solid object
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
//Add a new Solid object
- Handle(GEOM_Object) aBlock = GetEngine()->AddObject(G
etDocID(), G
EOM_BLOCK);
+ Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
//Add a new Block function
Handle(GEOM_Function) aFunction =
//Add a new Block function
Handle(GEOM_Function) aFunction =
@@
-561,9
+554,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-588,7
+580,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
if (theCompound.IsNull()) return NULL;
//Add a new object
if (theCompound.IsNull()) return NULL;
//Add a new object
- Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(G
etDocID(), G
EOM_COMPOUND);
+ Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GEOM_COMPOUND);
//Add a new BlocksComp function
Handle(GEOM_Function) aFunction =
//Add a new BlocksComp function
Handle(GEOM_Function) aFunction =
@@
-615,9
+607,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-865,9
+856,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdge
anArray->SetValue(1, anIndices.FindIndex(anEdge));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
anArray->SetValue(1, anIndices.FindIndex(anEdge));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- } catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ } catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-926,9
+916,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1067,9
+1056,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByPoints
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1190,9
+1178,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByEdges
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1258,9
+1245,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetOppositeFace
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1448,9
+1434,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceNearPoint
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1576,9
+1561,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByNormale
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1701,9
+1685,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetShapesNearPoint
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-1769,9
+1752,8
@@
Standard_Boolean GEOMImpl_IBlocksOperations::IsCompoundOfBlocks
}
}
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return isCompOfBlocks;
}
return isCompOfBlocks;
}
@@
-2089,7
+2071,7
@@
Standard_Boolean HasAnyConnection (const Standard_Integer theBlockIndex,
*/
//=============================================================================
TCollection_AsciiString GEOMImpl_IBlocksOperations::PrintBCErrors
*/
//=============================================================================
TCollection_AsciiString GEOMImpl_IBlocksOperations::PrintBCErrors
-
(Handle(GEOM_Object) theCompound
,
+
(Handle(GEOM_Object) /*theCompound*/
,
const std::list<BCError>& theErrors)
{
TCollection_AsciiString aDescr;
const std::list<BCError>& theErrors)
{
TCollection_AsciiString aDescr;
@@
-2430,7
+2412,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
- Handle(GEOM_Object) aCopy = GetEngine()->AddObject(G
etDocID(), G
EOM_COPY);
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
//Add a function
Handle(GEOM_Function) aFunction =
@@
-2451,9
+2433,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-2482,7
+2463,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
- Handle(GEOM_Object) aCopy = GetEngine()->AddObject(G
etDocID(), G
EOM_COPY);
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
//Add a function
Handle(GEOM_Function) aFunction =
@@
-2502,9
+2483,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-2532,7
+2512,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
- Handle(GEOM_Object) aCopy = GetEngine()->AddObject(G
etDocID(), G
EOM_COPY);
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
//Add a function
Handle(GEOM_Function) aFunction =
@@
-2556,9
+2536,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-2628,9
+2607,8
@@
Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::ExplodeCompound
}
}
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aBlocks;
}
return aBlocks;
}
@@
-2813,9
+2791,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockNearPoint
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
}
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-2928,9
+2905,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockByParts
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
- } catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ } catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-3054,9
+3030,8
@@
Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::GetBlocksByPart
}
}
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-3091,7
+3066,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
- Handle(GEOM_Object) aCopy = GetEngine()->AddObject(G
etDocID(), G
EOM_COPY);
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
//Add a translate function
Handle(GEOM_Function) aFunction =
@@
-3114,9
+3089,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
@@
-3150,7
+3124,7
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
- Handle(GEOM_Object) aCopy = GetEngine()->AddObject(G
etDocID(), G
EOM_COPY);
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
//Add a translate function
Handle(GEOM_Function) aFunction =
@@
-3176,9
+3150,8
@@
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
return NULL;
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}