1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025266: Debug statements in the source are getting flushed on to the console

Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
This commit is contained in:
dbv
2014-10-08 19:00:20 +04:00
committed by abv
parent 7aa1b65c2a
commit 63c629aa3a
370 changed files with 1634 additions and 1639 deletions

View File

@@ -131,7 +131,7 @@
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
#ifdef DEB
#ifdef STEPCONTROL_DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
@@ -287,12 +287,12 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer
Handle(TCollection_HAsciiString) aPPVersion = aFileNameEntity->PreprocessorVersion();
if(aPPVersion.IsNull())
continue;
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Preprocessor version detected: " << aPPVersion->ToCString() << endl;
#endif
Standard_Integer anIDeasResult = aPPVersion->Search("I-DEAS");
if (anIDeasResult != -1) {
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Recognized as I-DEAS STP" << endl;
#endif
myNMTool.SetIDEASCase(Standard_True);
@@ -783,7 +783,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) {
isManifold = Standard_False;
NM_DETECTED = Standard_True;
#ifdef DEB
#ifdef STEPCONTROL_DEB
Standard_Integer NMSSRItemsLen = sr->Items()->Length();
cout << "NMSSR with " << NMSSRItemsLen << " items detected" << endl;
#endif
@@ -794,11 +794,11 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
if (isNMMode && myNMTool.IsIDEASCase() && isIDeasMode) {
isManifold = Standard_False;
NM_DETECTED = Standard_True;
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "I-DEAS post processing for non-manifold topology ENABLED" << endl;
#endif
}
#ifdef DEB
#ifdef STEPCONTROL_DEB
else if ( myNMTool.IsIDEASCase() )
cout << "I-DEAS post processing for non-manifold topology DISABLED" << endl;
#endif
@@ -910,7 +910,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
TP->Bind(sr, shbinder);
#ifdef DEB
#ifdef STEPCONTROL_DEB
DumpWhatIs(comp);
#endif
@@ -1775,7 +1775,7 @@ TopoDS_Shell STEPControl_ActorRead::closeIDEASShell(const TopoDS_Shell& shell,
if (subCheckStatus != BRepCheck_NoError)
brepBuilder.Add(result, currentFace);
else {
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Redundant closing face detected: REMOVED from shell";
#endif
}

View File

@@ -120,7 +120,7 @@
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
#ifdef DEB
#ifdef STEPCONTROL_DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
@@ -194,7 +194,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
aBrepBuilder.Add(aDirectShapes, aDirectChild);
}
#ifdef DEB
#ifdef STEPCONTROL_DEB
DumpWhatIs(aDirectShapes);
#endif
@@ -202,7 +202,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
TopExp::MapShapesAndAncestors(aDirectShapes, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
Standard_Integer aNbEdges = aMapEdgeFaces.Extent();
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Checking whether the topology passed is manifold..." << endl;
#endif
@@ -218,7 +218,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
}
}
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Check result: "
<< (aResult ? "TRUE" : "FALSE") << endl;
#endif
@@ -279,13 +279,13 @@ Handle(StepShape_NonManifoldSurfaceShapeRepresentation) STEPControl_ActorWrite::
}
if ( aResult.IsNull() ) {
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "\nNew NMSSR created" << endl;
#endif
aResult = new StepShape_NonManifoldSurfaceShapeRepresentation;
isNMSSRCreated = Standard_True;
} else {
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "\nExisting NMSSR is used" << endl;
#endif
isNMSSRCreated = Standard_False;
@@ -628,7 +628,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran
//:abv 20.05.02: writing box & face from it (shared) in one compound
// as assembly - while face already translated, it should be
// re-translated to break sharing
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Warning: STEPControl_ActorWrite::TransferShape(): shape already translated" << endl;
#endif
// return binder;
@@ -1294,7 +1294,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(T
BRep_Builder aB;
aB.MakeCompound(aCompOfVrtx);
#ifdef DEB
#ifdef STEPCONTROL_DEB
if (!isManifold)
cout << "Exploding Solids to Shells if any..." << endl;
#endif

View File

@@ -150,7 +150,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
break;
}
if (iSexclude) {
#ifdef DEB
#ifdef STEPCONTROL_DEB
cout << "Warning: STEPControl_Reader::NbRootsForTransfer exclude PDWAD from roots" << endl;
#endif
continue;