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:
@@ -80,7 +80,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct::ConvertCurveToBSpline(const Handle(Geo
|
||||
aBSpline = GeomConvert::CurveToBSplineCurve(C3D,Convert_QuasiAngular);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: GeomConvert_ApproxSurface Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -211,7 +211,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
|
||||
Handle(Geom_BSplineCurve) bspl = ConvertCurveToBSpline(basis, VF, VL, Tol3d, cnt, MaxSegments, MaxDegree);
|
||||
gp_Ax1 axis = revol->Axis();
|
||||
Handle(Geom_SurfaceOfRevolution) newRevol = new Geom_SurfaceOfRevolution(bspl,axis);
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<" Revolution on offset converted" << endl;
|
||||
#endif
|
||||
S = newRevol;
|
||||
@@ -228,7 +228,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
|
||||
Standard_Boolean Done = anApprox.IsDone();
|
||||
if (anApprox.MaxError() <= Tol3d && Done) {
|
||||
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer nbOfSpan = (anApprox.Surface()->NbUKnots()-1)*(anApprox.Surface()->NbVKnots()-1);
|
||||
cout << "\terror = " << anApprox.MaxError() << "\tspans = " << nbOfSpan << endl;
|
||||
cout << " Surface is aproximated with continuity " << (GeomAbs_Shape)cnt <<endl;
|
||||
@@ -240,7 +240,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
|
||||
else {
|
||||
if(anApprox.HasResult())
|
||||
errSpl = Handle(Geom_BSplineSurface)::DownCast(anApprox.Surface());
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "\terror = " << anApprox.MaxError() <<endl;
|
||||
#endif
|
||||
break;
|
||||
@@ -248,7 +248,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
|
||||
}
|
||||
|
||||
catch (Standard_Failure) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -352,7 +352,7 @@ Standard_Boolean ShapeConstruct::JoinPCurves(const Handle(TopTools_HSequenceOfSh
|
||||
return (i <= edges->Length());
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Error: ShapeConstruct::JoinPCurves Exception in GeomConvert_CompCurveToBSplineCurve: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout<<endl;
|
||||
#endif
|
||||
|
@@ -158,7 +158,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle(G
|
||||
bspl = GeomConvert::CurveToBSplineCurve(tc);
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in GeomConvert: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -179,7 +179,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle(G
|
||||
return bspl;
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -197,7 +197,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle(G
|
||||
bspl = Conv.Curve();
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -228,7 +228,7 @@ Handle(Geom2d_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle
|
||||
bspl = Geom2dConvert::CurveToBSplineCurve(tc);
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Geom2dConvert: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -249,7 +249,7 @@ Handle(Geom2d_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle
|
||||
return bspl;
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -268,7 +268,7 @@ Handle(Geom2d_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle
|
||||
bspl = Conv.Curve();
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -243,7 +243,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Perform (Handle(Geom_Curv
|
||||
if ( bspl->Knot(i+1) > First && bspl->Knot(i) < Last ) nint++;
|
||||
Standard_Integer minPnt = nint * ( bspl->Degree() + 1 );
|
||||
while ( nbPini < minPnt ) nbPini += NCONTROL - 1;
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( nbPini > NCONTROL )
|
||||
cout << "Warning: number of points for projecting is " << nbPini << endl;
|
||||
#endif
|
||||
@@ -358,12 +358,12 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
|
||||
if ( appr.IsDone() )
|
||||
c2d = appr.Curve2d();
|
||||
}
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else
|
||||
cout<<"Warning: ProjLib cutting pcurve "<< First << " -> " << ubeg <<" ; "<< Last << " -> " << ufin << endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout<<"Warning: ProjLib "<< nbSol << " curves in ProjLib"<<endl;
|
||||
#endif
|
||||
if(c2d.IsNull()) {
|
||||
@@ -377,7 +377,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G
|
||||
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -676,7 +676,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
||||
Standard_Real Up = ul - uf;
|
||||
Standard_Real Vp = vl - vf;
|
||||
Standard_Real dist2d;
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (mySurf->IsUClosed(myPreci) && mySurf->IsVClosed(myPreci)) {//#78 rln 12.03.99 S4135
|
||||
cout << "WARNING : Recadrage incertain sur U & VClosed" << endl;
|
||||
}
|
||||
@@ -829,7 +829,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
||||
pnt2d (i) = newCurr;
|
||||
}
|
||||
// on verifie
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
dist2d = pnt2d (i-1).Distance(pnt2d (i));
|
||||
if (dist2d > ( Vp / 2) ) {
|
||||
cout << "Echec dans le recadrage" << endl;
|
||||
@@ -1030,7 +1030,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
|
||||
return C2d;
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPECONSTRUCT_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
// debug ...
|
||||
Standard_Integer nbp = params->Length();
|
||||
Standard_Integer nb2 = points2d->Length();
|
||||
@@ -1074,7 +1074,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
|
||||
if (myInterPol2d.IsDone()) C2d = myInterPol2d.Curve();
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPECONSTRUCT_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
// // debug ...
|
||||
Standard_Integer nbp = params->Length();
|
||||
Standard_Integer nb2 = points2d->Length();
|
||||
@@ -1116,7 +1116,7 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
C3d.Nullify();
|
||||
#ifdef SHAPECONSTRUCT_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -1163,13 +1163,13 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
if (nbPntDropped == 0)
|
||||
return;
|
||||
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : removing 3d points for interpolation" << endl;
|
||||
#endif
|
||||
// Build new HArrays
|
||||
Standard_Integer newLast = lastElem - nbPntDropped;
|
||||
if ((newLast - firstElem + 1) < 2) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Too many degenerated points for 3D interpolation" << endl;
|
||||
#endif
|
||||
return;
|
||||
@@ -1234,13 +1234,13 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
if (nbPntDropped == 0)
|
||||
return;
|
||||
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : removing 2d points for interpolation" << endl;
|
||||
#endif
|
||||
// Build new HArrays
|
||||
Standard_Integer newLast = lastElem - nbPntDropped;
|
||||
if ((newLast - firstElem + 1) < 2) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Too many degenerated points for 2D interpolation" << endl;
|
||||
#endif
|
||||
//pdn 12.02.99 S4135 Creating pcurve with minimal length.
|
||||
@@ -1259,7 +1259,7 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
Standard_Integer newCurr = 1;
|
||||
for (i = firstElem; i <= lastElem ; i++) {
|
||||
if (tmpParam.Value(i) == 1) {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Point " << i << " : " << points->Value(i).X() << " " << points->Value(i).Y() << " at param " << params->Value(i) << endl;
|
||||
#endif
|
||||
newPnts->SetValue(newCurr, points->Value(i));
|
||||
@@ -1267,7 +1267,7 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
newCurr ++;
|
||||
}
|
||||
else {
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Removed " << i << " : " << points->Value(i).X() << " " << points->Value(i).Y() << " at param " << params->Value(i) << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1516,13 +1516,13 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
|
||||
} // RAJOUT
|
||||
catch(Standard_Failure) {
|
||||
// pb : on affiche ce qu on peut
|
||||
#ifdef SHAPECONSTRUCT_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
for (Standard_Integer numpnt = 1; numpnt <= nbrPnt; numpnt ++) {
|
||||
cout<<"["<<numpnt<<"]param="<<params(numpnt)<<" point=("<<
|
||||
points(numpnt).X()<<" "<<points(numpnt).Y()<<" "<<points(numpnt).Z()<<")"<<endl;
|
||||
}
|
||||
#endif
|
||||
#ifdef SHAPECONSTRUCT_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::IsAnIsoparametric(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user