1
0
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:
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

@@ -862,7 +862,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
}
}
}
#if DEB
#if BREPFILL_DEB
else {
cout << "BRepFill::SearchOrigine : Echec Distance" << endl;
}

View File

@@ -269,14 +269,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myWire = MW.Wire();
}
else {
#if DEB
#if BREPFILL_DEB
cout << "Error in MakeWire" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
}
}
else {
#if DEB
#if BREPFILL_DEB
cout << "No Free Borders !" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
@@ -828,7 +828,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myShape = solid;
}
}
#if DEB
#if BREPFILL_DEB
else cout << "Draft : No assembly !" << endl;
#endif
return Ok;

View File

@@ -178,7 +178,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
gp_Ax1 axe(gp::Origin(), cross.XYZ());
N2.Rotate(axe, alpha);
#if DEB
#if BREPFILL_DEB
if (N2.Dot(T1) > 1.e-9) {
cout << "Inprecision in TransformInCompatibleLaw" << endl;
cout << "--- T1.R(N2) = " << N2.Dot(T1) << endl;
@@ -616,7 +616,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
}
else {
W.Nullify();
#if DEB
#if BREPFILL_DEB
cout << "BRepFill_LocationLaw::D0 : Attention position out of limits"
<< endl;
#endif

View File

@@ -622,7 +622,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
Dist = TheU.Circle().Radius();
}
else {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "MultiLine : D1 = D2 and the Curve is not a circle" << endl;
cout << " ---> ValueOnFace failed at parameter U = " << U << endl;
#endif
@@ -675,7 +675,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
Geom2dInt_GInter Intersector(Cu1,Cu2,TolConf,Tol);
if ( !Intersector.IsDone()) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "Intersector not done" << endl;
cout << " ---> ValueonFace failed at parameter U = " << U << endl;
#endif
@@ -695,7 +695,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
VV = Alp*(VS2 - VS1) + VS1;
}
else {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "Intersector done, but no points found" << endl;
cout << " ---> ValueonFace failed at parameter U = " << U << endl;
#endif

View File

@@ -662,9 +662,11 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset,
{
myShape.Nullify();
myIsDone = Standard_False;
#ifdef BREPFILL_DEB
cout<<"An exception was caught in BRepFill_OffsetWire::Perform : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
#endif
return;
}

View File

@@ -373,7 +373,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
Standard_False, 20);
if (!Bof) Bof = Concat.Add(TC, 200*epsV,
Standard_True, Standard_False, 20);
#if DEB
#if BREPFILL_DEB
if (!Bof)
cout << "BRepFill_ShapeLaw::ConcatenedLaw INCOMPLET !!!"
<< endl;

View File

@@ -352,7 +352,7 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
Approx_SameParameter sp( HC3d, Pcurv, S, tol3d );
if(sp.IsDone() && !sp.IsSameParameter()) Pcurv = sp.Curve2d();
else if(!sp.IsDone() && !sp.IsSameParameter()){
#ifdef DEB
#ifdef BREPFILL_DEB
cout<<"echec SameParameter"<<endl;
#endif
return Standard_False;
@@ -360,7 +360,7 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
ResTol = sp.TolReached();
if(ResTol > tolreached ){
#ifdef DEB
#ifdef BREPFILL_DEB
cout<<"SameParameter : Tolerance not reached!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtained : "<<ResTol<<endl;
#endif
@@ -2412,7 +2412,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Max(myTol3d, TabErr(isec,ipath)));
}
if (Degenerated(isec, ipath)) {
#if DEB
#if BREPFILL_DEB
cout << "Sweep : Degenerated case" << endl;
#endif
hasdegen = Standard_True;
@@ -2984,7 +2984,7 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
t2 = M.Column(3);
if (t1.Angle(t2) < myAngMin) {
#if DEB
#if BREPFILL_DEB
cout << "BRepFill_Sweep::PerformCorner : This is not a corner !" << endl;
#endif
return;
@@ -3077,7 +3077,7 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
}
else if ((TheTransition == BRepFill_Right) ||
aTrim.HasSection() ) {
#if DEB
#if BREPFILL_DEB
cout << "Fail of TrimCorner" << endl;
#endif
return; // Nothing is touched
@@ -3145,7 +3145,7 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
if (ii==1) BordFirst = Bord1;
}
}
#if DEB
#if BREPFILL_DEB
else cout << "PerformCorner : Unsymmetry of free border" << endl;
#endif
}

View File

@@ -362,7 +362,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
&& ( Points2.Length() != Params.Length() ||
(Points2.Length() == 0 && Params.Length() == 0) ) ) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: incoherent intersection. Try with a greater tolerance" << endl;
#endif
@@ -376,7 +376,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
SeanceDeRattrapage++;
}
#ifdef DEB
#ifdef BREPFILL_DEB
if(SeanceDeRattrapage != 0) cout << "SeanceDeRattrapage = " << SeanceDeRattrapage << endl;
if(SeanceDeRattrapage == nn) {
cout << "BRepFill_TrimEdgeTool: incoherent intersection" << endl;
@@ -452,11 +452,11 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
Standard_Real P1xP2x=Abs( P1.X() - P2.X());
if ( P1xP2x > Tol ) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl;
#endif
if(P1xP2x>TolInit) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl;
#endif
i++;
@@ -523,7 +523,7 @@ const
}
if (ToProj) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << " project extremity bissectrice on parallel."<<endl;
#endif
@@ -537,25 +537,25 @@ const
Geom2dAPI_ProjectPointOnCurve Projector2(PBis,C2,f2,l2);
if (Projector1.NbPoints() == 0) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector1.NearestPoint().IsEqual(PBis,Tol)) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout <<"Incorrect solution in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (Projector2.NbPoints() == 0) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector2.NearestPoint().IsEqual(PBis,Tol)) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout <<" Mauvaisesolution dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;

View File

@@ -273,7 +273,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
NbSegments = Intersector.NbSegments();
if (NbSegments > 0) {
#ifdef DEB
#ifdef BREPFILL_DEB
cout << " IntersectWith : " << NbSegments
<< " Segments of intersection" << endl;
#endif
@@ -468,11 +468,8 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
// evaluate the projection of the point on the curve.
Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d);
#ifdef DEB
Standard_Real Dist =
#endif
Projector.LowerDistance();
#ifdef DEB
#ifdef BREPFILL_DEB
Standard_Real Dist = Projector.LowerDistance();
if ( Dist > Precision::Confusion() ) {
cout << " *** WARNING TrimSurfaceTool: *** " << endl;
cout << " --> the point is not on the edge" <<endl;