1
0
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:
abv
2014-10-28 12:41:04 +03:00
committed by bugmaster
parent a507ffd9d7
commit 0797d9d30a
700 changed files with 3932 additions and 4250 deletions

View File

@@ -454,7 +454,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
if(ConvertCurve(BasCurve,ResCurve,Standard_False,Max(VF,BasCurve->FirstParameter()),Min(VL,BasCurve->LastParameter()),TolS,Standard_False)) {
Handle(Geom_SurfaceOfRevolution) newRevol = new Geom_SurfaceOfRevolution(ResCurve,Surface->Axis());
aSurf = newRevol;
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout <<" Revolution on offset converted" << endl;
#endif
}
@@ -655,7 +655,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
if (anApprox.MaxError() <= myTol3d && Done) {
nbOfSpan = (anApprox.Surface()->NbUKnots()-1)*(anApprox.Surface()->NbVKnots()-1);
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
if((imax-i+1)!=1) {
cout << " iteration = " << i
<< "\terror = " << anApprox.MaxError()
@@ -702,7 +702,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
}
catch (Standard_Failure) {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -729,7 +729,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
else continue;
}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
#endif
return Standard_False;
@@ -739,7 +739,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
if(MaxDeg < myParameters->GMaxDegree())
{ MaxDeg = myParameters->GMaxDegree(); continue;}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
#endif
return Standard_False;
@@ -992,7 +992,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
(anApprox.MaxError() >= Max(TolCur,myTol3d)))) {
if(MaxSeg < myParameters->GMaxSeg()) { MaxSeg = myParameters->GMaxSeg(); aC =aC1; continue;}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
@@ -1008,7 +1008,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
MaxDeg = myParameters->GMaxDegree(); aC = aC1; continue;
}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
@@ -1025,7 +1025,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
}
}
catch (Standard_Failure) {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Warning: GeomConvert_ApproxCurve Exception: Wrong Coefficient : Decrease continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -1300,7 +1300,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
if(myDeg && ((DegC > MaxDeg) || !Done || ( anApprox.MaxError() >= Max(myTol2d,TolCur)))) {
if(MaxSeg < myParameters->GMaxSeg()) { MaxSeg = myParameters->GMaxSeg(); aC =aC1; continue;}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
@@ -1316,7 +1316,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
MaxDeg = myParameters->GMaxDegree(); aC =aC1; continue;
}
else {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
@@ -1333,7 +1333,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
}
}
catch (Standard_Failure) {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Warning: Geom2dConvert_ApproxCurve Exception: Wrong Cofficient :Decrease Continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif

View File

@@ -104,7 +104,7 @@ Handle(Geom_Curve) ShapeCustom_Curve::ConvertToPeriodic (const Standard_Boolean
converted = Standard_True;
}
}
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
#endif
if ( ! converted ) return newCurve;

View File

@@ -205,7 +205,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re
// CKY 3-FEV-1997 : verification du sens de description
//gp_Dir AXY = aAx3.YDirection(); // AXY not used (skl)
if (aAx3.YDirection().Dot (origD1U) < 0) {
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout<<" Surface Analytique : sens a inverser"<<endl;
#endif
aAx3.YReverse(); // mais X reste !
@@ -304,7 +304,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re
new Geom_ToroidalSurface(aAx3, RR1, RR2);
if (j==2) anObject->UReverse();
anObject->D1 (0.,0.,resPnt,resD1U,resD1V);
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
if (resD1U.Dot(origD1U) < 0 && j != 2)
cout<<" Tore a inverser !"<<endl;
#endif
@@ -510,7 +510,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToPeriodic (const Standard_Bool
}
}
#ifdef SHAPECUSTOM_DEB
#ifdef OCCT_DEBUG
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
#endif
if ( ! converted ) return newSurf;