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

@@ -77,7 +77,7 @@ static void ProjectOnSegments (const Adaptor3d_Curve& AC, const gp_Pnt& P3D,
}
if (aHasChanged)
distmin = Sqrt (distmin2);
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout<<"ShapeAnalysis_Geom:Project, param="<<param<<" -> distmin="<<distmin<<endl;
#endif
@@ -245,7 +245,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
}
catch(Standard_Failure) {
OK = Standard_False;
#ifdef DEB //:s5
#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Curve::ProjectAct(): Exception in Extrema_ExtPC: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -481,25 +481,25 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
if (First < cf) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
#endif
First = cf;
}
else if (First > cl) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
#endif
First = cl;
}
if (Last < cf) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
#endif
Last = cf;
}
else if (Last > cl) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
#endif
Last = cl;
@@ -531,7 +531,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
if ( theCurve->Value(First).Distance(theCurve->Value(cf)) < preci ) First = cf;
if ( theCurve->Value(Last).Distance(theCurve->Value(cl)) < preci ) Last = cl;
if ( First > Last ) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = First;
@@ -559,7 +559,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
// illegal sur une courbe fermee non periodique
// on inverse quand meme les parametres !!!!!!
else {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = First;
@@ -569,7 +569,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
}
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
else if ( First > Last ) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
First = theCurve->ReversedParameter ( First );
@@ -583,7 +583,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
}
}
else {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "UpdateParam3d Failed" << endl;
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
cout << " - Param 1 : " << First << endl;
@@ -591,7 +591,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
#endif
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
if ( First > Last ) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
First = theCurve->ReversedParameter ( First );

View File

@@ -473,7 +473,7 @@ static Handle(Geom_Curve) ComputeIso
}
catch(Standard_Failure) {
iso.Nullify();
#ifdef DEB //:s5
#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Surface, ComputeIso(): Exception in UVIso(): ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -968,12 +968,12 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
gp_Pnt2d prev(S,T);
gp_Pnt2d solution;
if (SurfaceNewton(prev,P3D,preci,solution)) {
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout <<"Newton found point on conic extrusion"<<endl;
#endif
return solution;
}
#ifdef DEBUG
#ifdef SHAPEANALYSIS_DEB
cout <<"Newton failed point on conic extrusion"<<endl;
#endif
uf = -500;
@@ -1089,7 +1089,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
}
else {
#ifdef DEB
#ifdef SHAPEANALYSIS_DEB
cout << "Warning: ShapeAnalysis_Surface::ValueOfUV(): Extrema failed, doing Newton" << endl;
#endif
// on essai sur les bords
@@ -1127,7 +1127,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
//szv#4:S4163:12Mar99 optimized
S = (Precision::IsInfinite(uf))? 0 : (uf+ul) / 2.;
T = (Precision::IsInfinite(vf))? 0 : (vf+vl) / 2.;
#ifdef DEB //:s5
#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Surface::ValueOfUV(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -1325,7 +1325,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d,const Standard_
} // fin try RAJOUT
catch(Standard_Failure) {
theMin = RealLast(); // theMin de depart
#ifdef DEB //:s5
#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Curve::UVFromIso(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif