mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -929,7 +929,7 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Couldn't compute angle between derivative vectors" <<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
|
@@ -77,7 +77,7 @@ static void ProjectOnSegments (const Adaptor3d_Curve& AC, const gp_Pnt& P3D,
|
||||
}
|
||||
if (aHasChanged)
|
||||
distmin = Sqrt (distmin2);
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"ShapeAnalysis_Geom:Project, param="<<param<<" -> distmin="<<distmin<<endl;
|
||||
#endif
|
||||
|
||||
@@ -245,7 +245,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
OK = Standard_False;
|
||||
#ifdef SHAPEANALYSIS_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "\nWarning: ShapeAnalysis_Curve::ProjectAct(): Exception in Extrema_ExtPC: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -481,25 +481,25 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
|
||||
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
|
||||
if (First < cf) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
|
||||
#endif
|
||||
First = cf;
|
||||
}
|
||||
else if (First > cl) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
|
||||
#endif
|
||||
First = cl;
|
||||
}
|
||||
if (Last < cf) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
|
||||
#endif
|
||||
Last = cf;
|
||||
}
|
||||
else if (Last > cl) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
|
||||
#endif
|
||||
Last = cl;
|
||||
@@ -531,7 +531,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
if ( theCurve->Value(First).Distance(theCurve->Value(cf)) < preci ) First = cf;
|
||||
if ( theCurve->Value(Last).Distance(theCurve->Value(cl)) < preci ) Last = cl;
|
||||
if ( First > Last ) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
|
||||
#endif
|
||||
Standard_Real tmp = First;
|
||||
@@ -559,7 +559,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
// illegal sur une courbe fermee non periodique
|
||||
// on inverse quand meme les parametres !!!!!!
|
||||
else {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
|
||||
#endif
|
||||
Standard_Real tmp = First;
|
||||
@@ -569,7 +569,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
}
|
||||
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
|
||||
else if ( First > Last ) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: parameter range is bad; curve reversed" << endl;
|
||||
#endif
|
||||
First = theCurve->ReversedParameter ( First );
|
||||
@@ -583,7 +583,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UpdateParam3d Failed" << endl;
|
||||
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
|
||||
cout << " - Param 1 : " << First << endl;
|
||||
@@ -591,7 +591,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
|
||||
#endif
|
||||
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
|
||||
if ( First > Last ) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: parameter range is bad; curve reversed" << endl;
|
||||
#endif
|
||||
First = theCurve->ReversedParameter ( First );
|
||||
|
@@ -473,7 +473,7 @@ static Handle(Geom_Curve) ComputeIso
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
iso.Nullify();
|
||||
#ifdef SHAPEANALYSIS_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "\nWarning: ShapeAnalysis_Surface, ComputeIso(): Exception in UVIso(): ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -968,12 +968,12 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
|
||||
gp_Pnt2d prev(S,T);
|
||||
gp_Pnt2d solution;
|
||||
if (SurfaceNewton(prev,P3D,preci,solution)) {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Newton found point on conic extrusion"<<endl;
|
||||
#endif
|
||||
return solution;
|
||||
}
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Newton failed point on conic extrusion"<<endl;
|
||||
#endif
|
||||
uf = -500;
|
||||
@@ -1089,7 +1089,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
|
||||
|
||||
}
|
||||
else {
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeAnalysis_Surface::ValueOfUV(): Extrema failed, doing Newton" << endl;
|
||||
#endif
|
||||
// on essai sur les bords
|
||||
@@ -1127,7 +1127,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
|
||||
//szv#4:S4163:12Mar99 optimized
|
||||
S = (Precision::IsInfinite(uf))? 0 : (uf+ul) / 2.;
|
||||
T = (Precision::IsInfinite(vf))? 0 : (vf+vl) / 2.;
|
||||
#ifdef SHAPEANALYSIS_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "\nWarning: ShapeAnalysis_Surface::ValueOfUV(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -1325,7 +1325,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d,const Standard_
|
||||
} // fin try RAJOUT
|
||||
catch(Standard_Failure) {
|
||||
theMin = RealLast(); // theMin de depart
|
||||
#ifdef SHAPEANALYSIS_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "\nWarning: ShapeAnalysis_Curve::UVFromIso(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -541,7 +541,7 @@ void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap)
|
||||
|
||||
void ShapeAnalysis_WireOrder::SetCouples(const Standard_Real /*gap*/)
|
||||
{
|
||||
#ifdef SHAPEANALYSIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"ShapeAnalysis_WireOrder:SetCouple not yet implemented"<<endl;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user