From 4941fff0109010c2f7ac94c56591f3977a23ec39 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 19 Jun 2008 10:56:48 +0000 Subject: [PATCH] IPAL 18631 Remove Extra Messages from the Terminal in case of Release Mode --- src/GEOM/GEOM_Engine.cxx | 2 +- src/GEOM/geom.cxx | 16 +++--- src/GEOMAlgo/BlockFix_UnionEdges.cxx | 7 +-- src/GEOMImpl/GEOMImpl_ILocalOperations.cxx | 12 ++--- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 3 -- src/GEOMImpl/GEOMImpl_PipeDriver.cxx | 54 ++++++++++----------- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 4 +- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 335f53435..2db3accd0 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -447,7 +447,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID, aNode = Itr.Value(); aFunction = GEOM_Function::GetFunction(aNode->Label()); if(aFunction.IsNull()) { - cout << "Null function !!!!" << endl; + MESSAGE ( "Null function !!!!" ); continue; } ProcessFunction(aFunction, aScript, aMap); diff --git a/src/GEOM/geom.cxx b/src/GEOM/geom.cxx index 8ac0deb96..c73e82e77 100644 --- a/src/GEOM/geom.cxx +++ b/src/GEOM/geom.cxx @@ -32,6 +32,8 @@ #include #include +#include "utilities.h" + //================================================================================== // function : main() MAIN // purpose : @@ -70,19 +72,19 @@ int main(int argc, char** argv) orb->destroy(); } catch(CORBA::SystemException&) { - cerr << "Caught CORBA::SystemException." << endl; + INFOS ( "Caught CORBA::SystemException." ); } catch(CORBA::Exception&) { - cerr << "Caught CORBA::Exception." << endl; + INFOS ( "Caught CORBA::Exception." ); } catch(omniORB::fatalException& fe) { - cerr << "Caught omniORB::fatalException:" << endl; - cerr << " file: " << fe.file() << endl; - cerr << " line: " << fe.line() << endl; - cerr << " msg: " << fe.errmsg() << endl; + INFOS ( "Caught omniORB::fatalException:" ); + INFOS ( " file: " << fe.file() ); + INFOS ( " line: " << fe.line() ); + INFOS ( " msg: " << fe.errmsg() ); } catch(...) { - cerr << "Caught unknown exception." << endl; + INFOS ( "Caught unknown exception." ); } return 0; } diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.cxx b/src/GEOMAlgo/BlockFix_UnionEdges.cxx index 667375123..1cdb061a2 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.cxx +++ b/src/GEOMAlgo/BlockFix_UnionEdges.cxx @@ -56,6 +56,7 @@ #include #include +#include "utilities.h" //======================================================================= //function : BlockFix_UnionEdges() @@ -109,7 +110,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, } } if(aChain.Length()1) { // second step: union edges with various curves - cout<<"can not make analitical union => make approximation"< make approximation"); TopoDS_Wire W; B.MakeWire(W); for(j=1; j<=aChain.Length(); j++) { diff --git a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx index 2ec4e5e39..90467d2b9 100644 --- a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx @@ -737,16 +737,16 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges //Add a new Chamfer function Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES); - if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; } + if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL;} //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; } + { MESSAGE ( "Chamfer Driver is NULL!!!" ); return NULL; } GEOMImpl_IChamfer aCI (aFunction); Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); - if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; } + if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;} aCI.SetShape(aRefShape); aCI.SetD1(theD1); @@ -809,16 +809,16 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD //Add a new Chamfer function Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES_AD); - if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; } + if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL; } //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; } + { MESSAGE("Chamfer Driver is NULL!!!"); return NULL;} GEOMImpl_IChamfer aCI (aFunction); Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); - if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; } + if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;} aCI.SetShape(aRefShape); aCI.SetD(theD); diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index cad1b0695..ad976665b 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -2893,9 +2893,6 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) else if ( compType == TopAbs_SOLID || compType == TopAbs_COMPSOLID) iType = TopAbs_SOLID; } else { - //MESSAGE(""); - //MESSAGE("WARNING : the 'GetInPlace' function parameter used to extract a shape is probably of Vertex type !"); - //MESSAGE(""); SetErrorCode("Error: An attempt to extract a shape of not supported type."); return NULL; } diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index df73fdb80..41aec4758 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -146,7 +146,7 @@ static bool FillForOtherEdges(const TopoDS_Shape& F1, ShapeAnalysis_Edge sae; while(1) { if(!aMapVertEdge1.Contains(VS1)) - cout<<" FillForOtherEdges: map aMapVertEdge1 not contains key VS1"<edge for created pipe edges @@ -1506,7 +1506,7 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) //if(nbff!=3) continue; - cout<<" make pipe for "<IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { @@ -1550,12 +1550,12 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) TopoDS_Edge E1 = TopoDS::Edge(anExpE.Current()); //nbee++; if(!FF.Contains(E1)) - cout<<"map FF not contains key E1"<Add(anExp.Current()); } aSewing->Perform(); - cout<<" shell for face "<SewedShape(); //BRepTools::Write(aSewShape,"/dn02/users_Linux/skl/work/Bugs/14857/sew.brep"); if( aSewShape.ShapeType() == TopAbs_SHELL ) { @@ -1810,16 +1810,16 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) B.MakeSolid(aSolid); B.Add(aSolid,aShell); B.Add(aComp,aSolid); - cout<<" solid for face "<GetValue(); if (aShapePath.IsNull()) { - cout<<"Driver : path is null"< ( app->activeStudy() ); if ( !stud ) { - cout << "FAILED to cast active study to SalomeApp_Study" << endl; + MESSAGE ( "FAILED to cast active study to SalomeApp_Study" ); return false; } _PTR(Study) aStudy = stud->studyDS(); @@ -667,7 +667,7 @@ bool GEOMToolsGUI::Export() SalomeApp_Study* stud = dynamic_cast ( app->activeStudy() ); if ( !stud ) { - cout << "FAILED to cast active study to SalomeApp_Study" << endl; + MESSAGE ( "FAILED to cast active study to SalomeApp_Study" ); return false; } _PTR(Study) aStudy = stud->studyDS(); -- 2.39.2