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:
@@ -159,7 +159,7 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
|
||||
}
|
||||
else {
|
||||
//Mixed not finished!
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout <<" faces locally mixed"<<endl;
|
||||
#endif
|
||||
I.Type(BRepOffset_Convex);
|
||||
@@ -266,7 +266,7 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
mapEdgeType(E).Append(Inter);
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout <<"edge shared by more than two faces"<<endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@ static void EdgeInter(const TopoDS_Face& F,
|
||||
Standard_Real aT2 = ResParamsOnE2(i); //ponc2.Parameter();
|
||||
if (Precision::IsInfinite(aT1) || Precision::IsInfinite(aT2))
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout << "Inter2d : Solution rejected due to infinite parameter"<<endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -376,7 +376,7 @@ static void EdgeInter(const TopoDS_Face& F,
|
||||
dist1 = Max( dist1, dist3 );
|
||||
B.UpdateVertex( aNewVertex, dist1 );
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
|
||||
{
|
||||
cout << "out of limit"<<endl;
|
||||
@@ -412,7 +412,7 @@ static void EdgeInter(const TopoDS_Face& F,
|
||||
if (E1.Orientation() == TopAbs_REVERSED) V1or.Reverse();
|
||||
if (E2.Orientation() == TopAbs_REVERSED) V2or.Reverse();
|
||||
Standard_Real CrossProd = V2or ^ V1;
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if (Abs(CrossProd) <= gp::Resolution())
|
||||
cout<<endl<<"CrossProd = "<<CrossProd<<endl;
|
||||
#endif
|
||||
@@ -623,7 +623,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
Standard_Real aT2 = ResParamsOnE2(i); //ponc2.Parameter();
|
||||
if (Precision::IsInfinite(aT1) || Precision::IsInfinite(aT2))
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout << "Inter2d : Solution rejected due to infinite parameter"<<endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -644,7 +644,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
dist1 = Max( dist1, dist3 );
|
||||
B.UpdateVertex( aNewVertex, dist1 );
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
|
||||
{
|
||||
cout << "out of limit"<<endl;
|
||||
@@ -680,7 +680,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
if (E1.Orientation() == TopAbs_REVERSED) V1or.Reverse();
|
||||
if (E2.Orientation() == TopAbs_REVERSED) V2or.Reverse();
|
||||
Standard_Real CrossProd = V2or ^ V1;
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if (Abs(CrossProd) <= gp::Resolution())
|
||||
cout<<endl<<"CrossProd = "<<CrossProd<<endl;
|
||||
#endif
|
||||
@@ -1146,7 +1146,7 @@ static void ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const Standard_Real
|
||||
Projector.Init( P1, C3d );
|
||||
if (Projector.NbPoints() > 0)
|
||||
f = Projector.LowerDistanceParameter();
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
else
|
||||
cout<<"ProjectPointOnCurve not done"<<endl;
|
||||
#endif
|
||||
@@ -1159,7 +1159,7 @@ static void ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const Standard_Real
|
||||
Projector.Init( P2, C3d );
|
||||
if (Projector.NbPoints() > 0)
|
||||
l = Projector.LowerDistanceParameter();
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
else
|
||||
cout<<"ProjectPointOnCurve not done"<<endl;
|
||||
#endif
|
||||
|
@@ -796,14 +796,14 @@ void BRepOffset_MakeOffset::MakeThickSolid()
|
||||
YaResult = 1;
|
||||
Glue.Add (exp.Current().Reversed());
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if(YaResult == 0)
|
||||
{
|
||||
cout << "OffsetShape does not contain a FACES." << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
else
|
||||
{
|
||||
cout << "OffsetShape is null!" << endl;
|
||||
|
@@ -1140,7 +1140,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
Edge3 = TopoDS::Edge(aLocalEdge);
|
||||
// Edge3 = TopoDS::Edge(FirstEdge.Oriented(TopAbs_FORWARD));
|
||||
TopExp::Vertices(Edge3,VVf,VVl);
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
// si firstedge n est pas nul, il faut que les vertex soient partages
|
||||
if ( !VVf.IsSame(V1f) && !VVf.IsSame(V2f) ) {
|
||||
cout << "Attention Vertex non partages !!!!!!" << endl;
|
||||
@@ -1204,7 +1204,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
Edge4 = TopoDS::Edge(aLocalEdge);
|
||||
// Edge4 = TopoDS::Edge(LastEdge.Oriented(TopAbs_FORWARD));
|
||||
TopExp::Vertices(Edge4,VVf,VVl);
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
// si lastedge n est pas nul, il faut que les vertex soient partages
|
||||
if ( !VVf.IsSame(V1l) && !VVf.IsSame(V2l) ) {
|
||||
cout << "Attention Vertex non partages !!!!!!" << endl;
|
||||
|
@@ -1883,7 +1883,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(eseq(i));
|
||||
BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
|
||||
Standard_Real EdgeTol = BRep_Tool::Tolerance(anEdge);
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout<<"Tolerance of glued E = "<<EdgeTol<<endl;
|
||||
#endif
|
||||
if (EdgeTol > 1.e-2)
|
||||
@@ -1893,7 +1893,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
|
||||
{
|
||||
ReconstructPCurves(anEdge);
|
||||
BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout<<"After projection tol of E = "<<BRep_Tool::Tolerance(anEdge)<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -2428,7 +2428,7 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F,
|
||||
Standard_Real U1on2 = IntP2.ParamOnFirst();
|
||||
Standard_Real U2on1 = IntP1.ParamOnSecond();
|
||||
Standard_Real U2on2 = IntP2.ParamOnSecond();
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
cout << " BRepOffset_Tool::Inter2d SEGMENT d intersection" << endl;
|
||||
cout << " ===> Parametres sur Curve1 : ";
|
||||
cout << U1on1 << " " << U1on2 << endl;
|
||||
@@ -2486,7 +2486,7 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F,
|
||||
LV.Clear();LV.Append(VF); LV.Append(VL);
|
||||
}
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef BREPOFFSET_DEB
|
||||
if (!YaSol) {
|
||||
cout <<"Inter2d : Pas de solution"<<endl;
|
||||
#ifdef DRAW
|
||||
|
Reference in New Issue
Block a user