mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation. Macros starting with DEB are changed to start with "OCCT_DEBUG_". Some code cleaned.
This commit is contained in:
@@ -38,7 +38,7 @@ Standard_Boolean ShapeProcess::RegisterOperator (const Standard_CString name,
|
||||
{
|
||||
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
|
||||
if ( dic->HasItem ( name, Standard_True ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: operator with name " << name << " is already registered!" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -57,7 +57,7 @@ Standard_Boolean ShapeProcess::FindOperator (const Standard_CString name,
|
||||
{
|
||||
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
|
||||
if ( ! dic->HasItem ( name, Standard_True ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: no operator with name " << name << " registered!" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -79,7 +79,7 @@ Standard_Boolean ShapeProcess::Perform (const Handle(ShapeProcess_Context)& cont
|
||||
// get description of the sequence
|
||||
TCollection_AsciiString sequence;
|
||||
if ( ! context->GetString ( "exec.op", sequence ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeProcess_Performer::Perform: sequence not defined for " << seq << endl;
|
||||
#endif
|
||||
context->UnSetScope();
|
||||
|
@@ -83,7 +83,7 @@ Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standa
|
||||
}
|
||||
}
|
||||
if ( sRC.IsNull() ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeProcess_Context: Reload Resource_Manager: "
|
||||
<< name.ToCString() << " -> " << file << endl;
|
||||
#endif
|
||||
@@ -166,7 +166,7 @@ Standard_Boolean ShapeProcess_Context::GetString (const Standard_CString param,
|
||||
if ( myRC.IsNull() ) return Standard_False;
|
||||
Handle(TCollection_HAsciiString) pname = MakeName ( myScope, param );
|
||||
if ( ! myRC->Find ( pname->ToCString() ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << pname->ToCString() << " is not defined" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -200,7 +200,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
|
||||
ref.LeftAdjust();
|
||||
ref.RightAdjust();
|
||||
if ( ! myRC->Find ( ref.ToCString() ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -211,7 +211,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Real nor reference to Real";
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -242,7 +242,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
|
||||
ref.LeftAdjust();
|
||||
ref.RightAdjust();
|
||||
if ( ! myRC->Find ( ref.ToCString() ) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -253,7 +253,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Integer nor reference to Integer";
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -274,7 +274,7 @@ Standard_Boolean ShapeProcess_Context::GetBoolean (const Standard_CString param,
|
||||
return Standard_True;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -332,7 +332,7 @@ Standard_CString ShapeProcess_Context::StringVal (const Standard_CString param,
|
||||
return myRC->Value ( MakeName ( myScope, param )->ToCString() );
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -186,7 +186,7 @@ static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context)
|
||||
SDA.SetMaxTolerance ( ctx->RealVal ( "MaxTolerance", 1. ) );
|
||||
|
||||
if ( ! SDA.Perform() && SDA.Status (ShapeExtend_FAIL) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"ShapeDivideAngle failed"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -342,7 +342,7 @@ static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& conte
|
||||
if ( ctx->GetBoolean ( "EdgeMode", EdgeMode ) ) SCB.SetEdgeMode(EdgeMode);
|
||||
|
||||
if ( ! SCB.Perform() && SCB.Status (ShapeExtend_FAIL) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Shape::ShapeConvertToBezier failed"<<endl; // !!!!
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -407,7 +407,7 @@ static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& con
|
||||
if ( ctx->GetReal ( "MaxTolerance", maxTol ) ) tool.SetMaxTolerance(maxTol);
|
||||
|
||||
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"SplitContinuity failed"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -444,7 +444,7 @@ static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& co
|
||||
tool.SetNbSplitPoints(num);
|
||||
tool.SetSurfaceSegmentMode(hasSeg);
|
||||
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Splitting of closed faces failed"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -666,7 +666,7 @@ static Standard_Boolean spltclosededges (const Handle(ShapeProcess_Context)& con
|
||||
tool.SetNbSplitPoints(nbSplits);
|
||||
|
||||
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
|
||||
#ifdef SHAPEPROCESS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Splitting of closed edges failed"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
|
@@ -151,7 +151,7 @@ void ShapeProcess_ShapeContext::SetResult (const TopoDS_Shape &res)
|
||||
//=======================================================================
|
||||
|
||||
/*
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
static void DumpMap (const TopTools_DataMapOfShapeShape &map)
|
||||
{
|
||||
cout << "----" << endl;
|
||||
@@ -230,7 +230,7 @@ void ShapeProcess_ShapeContext::RecordModification (const TopTools_DataMapOfShap
|
||||
if ( repl.Extent() <=0 ) return;
|
||||
RecModif ( myShape, repl, myMap, myUntil );
|
||||
if ( myMap.IsBound(myShape) ) myResult = myMap.Find ( myShape );
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "Modifier: " << endl; DumpMap (myMap);
|
||||
#endif
|
||||
}
|
||||
@@ -303,7 +303,7 @@ void ShapeProcess_ShapeContext::RecordModification (const Handle(ShapeBuild_ReSh
|
||||
myResult = myMap.Find ( myShape );
|
||||
myResult.Location(myShape.Location());
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "ReShape: " << endl; DumpMap (myMap);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user