mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -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 DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
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 DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
if((imax-i+1)!=1) {
|
||||
cout << " iteration = " << i
|
||||
<< "\terror = " << anApprox.MaxError()
|
||||
@@ -696,17 +696,13 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
|
||||
return Standard_True;
|
||||
}
|
||||
else {
|
||||
//#ifdef DEB
|
||||
// cout<< " iteration = " << imax-i+1
|
||||
// << "\terror = " << anApprox.MaxError() <<endl;
|
||||
//#endif
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -733,7 +729,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
|
||||
else continue;
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -743,7 +739,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
|
||||
if(MaxDeg < myParameters->GMaxDegree())
|
||||
{ MaxDeg = myParameters->GMaxDegree(); continue;}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -996,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 DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
|
||||
#endif
|
||||
if(IsConvert) {
|
||||
@@ -1012,7 +1008,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
|
||||
MaxDeg = myParameters->GMaxDegree(); aC = aC1; continue;
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
|
||||
#endif
|
||||
if(IsConvert) {
|
||||
@@ -1029,7 +1025,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Warning: GeomConvert_ApproxCurve Exception: Wrong Coefficient : Decrease continuity ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -1304,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 DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
|
||||
#endif
|
||||
if(IsConvert) {
|
||||
@@ -1320,7 +1316,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
|
||||
MaxDeg = myParameters->GMaxDegree(); aC =aC1; continue;
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
|
||||
#endif
|
||||
if(IsConvert) {
|
||||
@@ -1337,7 +1333,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Warning: Geom2dConvert_ApproxCurve Exception: Wrong Cofficient :Decrease Continuity ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -104,7 +104,7 @@ Handle(Geom_Curve) ShapeCustom_Curve::ConvertToPeriodic (const Standard_Boolean
|
||||
converted = Standard_True;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
|
||||
#endif
|
||||
if ( ! converted ) return newCurve;
|
||||
|
@@ -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 DEBUG
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
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 DEBUG
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
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 DEBUG
|
||||
#ifdef SHAPECUSTOM_DEB
|
||||
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
|
||||
#endif
|
||||
if ( ! converted ) return newSurf;
|
||||
|
Reference in New Issue
Block a user