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:
@@ -176,7 +176,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface()
|
||||
split->Append(val);
|
||||
isUSplit = Standard_True;
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -197,7 +197,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface()
|
||||
split->Append(val);
|
||||
isUSplit = Standard_False;
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -155,14 +155,14 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
|
||||
if(Abs(Last-bl) < precision)
|
||||
Last = bl;
|
||||
if(First < bf){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
|
||||
#endif
|
||||
First = bf;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > bl){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
|
||||
#endif
|
||||
Last = bl;
|
||||
|
@@ -138,14 +138,14 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute()
|
||||
if(Abs(Last-bl) < precision)
|
||||
Last = bl;
|
||||
if(First < bf){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
First = bf;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > bl){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
Last = bl;
|
||||
|
@@ -184,7 +184,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
|
||||
else
|
||||
VFilteredJoints.Append(VJoints(i));
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
if(NbVFiltered || NbUFiltered)
|
||||
cout<<"Warning: ShapeUpgrade_ConvertSurfaceToBezierBasis: thin patches dropped."<<endl;
|
||||
#endif
|
||||
@@ -451,7 +451,7 @@ static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
|
||||
bezier->Segment(V1,V2);
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: Resulting path is not surface of revolution basis on bezier curve"<<endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -113,7 +113,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -150,7 +150,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -215,7 +215,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "\nError: Exception in ShapeUpgrade_FaceDivide::Perform(): ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -76,13 +76,13 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
if(Abs(lastPar-lP) < precision)
|
||||
lastPar = lP;
|
||||
if(firstPar < fP){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
firstPar = fP;
|
||||
}
|
||||
if(lastPar > lP){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
lastPar = lP;
|
||||
@@ -171,7 +171,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
Handle(Geom2d_BezierCurve)::DownCast(theNewCurve)->Segment (First, Last);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -224,7 +224,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -105,7 +105,7 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_SplitCurve2dContinuity: criterion C3 for Offset curve" << endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
|
@@ -76,13 +76,13 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
if(Abs(lastPar-lP) < precision)
|
||||
lastPar = lP;
|
||||
if(firstPar < fP){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
firstPar = fP;
|
||||
}
|
||||
if(lastPar > lP){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
lastPar = lP;
|
||||
@@ -163,14 +163,14 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
if(Abs(Last-lastPar) < precision)
|
||||
Last = lastPar;
|
||||
if(First < firstPar){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
First = firstPar;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > lastPar){
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
#endif
|
||||
Last = lastPar;
|
||||
@@ -248,7 +248,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -103,7 +103,7 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : // if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_SplitCurve3dContinuity: criterion C3 for Offset curve" << endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
|
@@ -435,7 +435,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_SplitSurface::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -173,7 +173,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset Surface"<<endl;;
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Warning: ShapeUpgrade_SplitSurfaceContinuity: criterion C3 for Offset surface" << endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
|
@@ -561,7 +561,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
||||
}
|
||||
}
|
||||
if(aChain.Length()<SeqEdges.Length()) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout<<"can not create correct chain..."<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -679,7 +679,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
||||
}
|
||||
}
|
||||
if (j < aChain.Length()) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout<<"null curve3d in edge..."<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -704,14 +704,14 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
||||
break;
|
||||
}
|
||||
if(NeedUnion) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout<<"can not make analitical union => make approximation"<<endl;
|
||||
#endif
|
||||
TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
|
||||
aChain.SetValue(1,E);
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout<<"can not make approximation for such types of curves"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
|
@@ -367,7 +367,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
Handle(TColStd_HSequenceOfReal) revKnots2d = theSplit2dTool->SplitValues();
|
||||
if(revKnots2d->Length()!=theKnots2d->Length()) {
|
||||
isSeam = Standard_False;
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout << "Error: ShapeUpgrade_WireDivide: seam has different splitting values on pcurvesd" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
if ( !theSegments2d.IsNull() ) {
|
||||
Standard_Integer nbc2d = theSegments2d->Length();
|
||||
if (nbc!=nbc2d) {
|
||||
#ifdef DEB
|
||||
#ifdef SHAPEUPGRADE_DEB
|
||||
cout<<"Error: Number of intervals are not equal for 2d 3d. Ignored."<<endl;
|
||||
#endif
|
||||
nbc = Min( nbc,nbc2d);
|
||||
|
Reference in New Issue
Block a user