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:
@@ -217,7 +217,7 @@ static void coonscnd(const Standard_Integer nb,
|
||||
if(scal1 > tolang) {
|
||||
Standard_Real killfactor = tolang/scal1;
|
||||
stat[i].DoKill(killfactor);
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
cout<<"pb coons cnd coin : "<<i<<" fact = "<<killfactor<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -561,23 +561,23 @@ void GeomFill_ConstrainedFilling::Build()
|
||||
}
|
||||
nbd3 += ctr[ii];
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
appclock.Start();
|
||||
#endif
|
||||
if(nbd3) PerformApprox();
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
appclock.Stop();
|
||||
#endif
|
||||
}
|
||||
appdone = Standard_True;
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
cstclock.Start();
|
||||
#endif
|
||||
MatchKnots();
|
||||
PerformS0();
|
||||
PerformS1();
|
||||
PerformSurface();
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
cstclock.Stop();
|
||||
totclock.Stop();
|
||||
Standard_Real tottime, apptime, partime, csttime;
|
||||
|
@@ -143,7 +143,7 @@ static void smoothlaw(Handle(Law_BSpline)& Law,
|
||||
if (Ok)
|
||||
tol = (Tol-tol)/2;
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "smooth law echec" << endl;
|
||||
#endif
|
||||
return; // Echec
|
||||
@@ -171,7 +171,7 @@ static void smoothlaw(Handle(Law_BSpline)& Law,
|
||||
Ok = (tol <= Tol);
|
||||
}
|
||||
if (!Ok) {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "smooth law echec" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(
|
||||
NStatus,Normal,OrderU,OrderV);
|
||||
|
||||
if (NStatus != CSLib_Defined) {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << U << ", " << V<< endl;
|
||||
for(i=0;i<=MaxOrder;i++)
|
||||
for(j=0;j<=MaxOrder;j++){
|
||||
|
@@ -296,7 +296,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Frenet::Copy() const
|
||||
mySnglLen->ChangeValue(i) = Min(Sqrt(2*NullTol/norm), MaxSingular);
|
||||
else mySnglLen->ChangeValue(i) = MaxSingular;
|
||||
}
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
for(i = 1; i <= mySngl->Length(); i++) {
|
||||
cout<<"Sngl("<<i<<") = "<<mySngl->Value(i)<<" Length = "<<mySnglLen->Value(i)<<endl;
|
||||
}
|
||||
@@ -323,7 +323,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Frenet::Copy() const
|
||||
mySnglLen->ChangeValue(i) = tmpSeq(i).Y();
|
||||
}
|
||||
}
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout<<"After merging"<<endl;
|
||||
for(i = 1; i <= mySngl->Length(); i++) {
|
||||
cout<<"Sngl("<<i<<") = "<<mySngl->Value(i)<<" Length = "<<mySnglLen->Value(i)<<endl;
|
||||
@@ -511,7 +511,7 @@ Standard_Boolean
|
||||
|
||||
if(RotateTrihedron(Tangent,Normal,BiNormal,aTn) == Standard_False)
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
cout << "Cannot coincide two tangents." << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
|
@@ -121,7 +121,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur
|
||||
Standard_Real Norm = n.Magnitude();
|
||||
if (Norm < 1.e-12) {
|
||||
Norm = 1;
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "GuideTrihedronAC : Normal indefinie" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <DrawTrSurf.hxx>
|
||||
#endif
|
||||
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
static void TracePlan(const Handle(Geom_Surface)& /*Plan*/)
|
||||
{
|
||||
cout << "Pas d'intersection Guide/Plan" << endl;
|
||||
@@ -142,7 +142,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d
|
||||
|
||||
Int.Perform(myTrimG, Pl); // intersection plan / guide
|
||||
if (Int.NbPoints() == 0) {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
TracePlan(Plan);
|
||||
#endif
|
||||
w = (fabs(myGuide->LastParameter() -w) > fabs(myGuide->FirstParameter()-w) ? myGuide->FirstParameter() : myGuide->LastParameter());
|
||||
@@ -179,7 +179,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d
|
||||
}
|
||||
}
|
||||
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (Abs(Diff) > DeltaG) {
|
||||
cout << "Trihedron Plan Diff on Guide : " <<
|
||||
Diff << endl;
|
||||
@@ -254,7 +254,7 @@ void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_HCurve)& C)
|
||||
BiNormal.Normalized();
|
||||
}
|
||||
else { // Erreur...
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "D0 :";
|
||||
// plan ortho a la trajectoire pour determiner Pprime
|
||||
Handle(Geom_Plane) Plan = new (Geom_Plane)(P, Tangent);
|
||||
@@ -349,7 +349,7 @@ void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_HCurve)& C)
|
||||
DTangent.Crossed(Normal));
|
||||
}
|
||||
else {// Erreur...
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "D1 :";
|
||||
// plan ortho a la trajectoire
|
||||
Handle(Geom_Plane) Plan = new (Geom_Plane)(P, Tangent);
|
||||
|
@@ -68,7 +68,7 @@ static Standard_Integer Affich = 0;
|
||||
//function : TraceRevol
|
||||
//purpose : Trace la surface de revolution (Debug)
|
||||
//=======================================================================
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
static void TraceRevol(const Standard_Real t,
|
||||
const Standard_Real s,
|
||||
const Handle(GeomFill_TrihedronWithGuide)& Law,
|
||||
@@ -343,7 +343,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
Standard_Real theU = 0., theV = 0.;
|
||||
|
||||
if (!DistMini.IsDone() || DistMini.NbExt() == 0) {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout <<"LocationGuide : Pas d'intersection"<<endl;
|
||||
TraceRevol(t, U, myLaw, mySec, myCurve, Trans);
|
||||
#endif
|
||||
@@ -362,7 +362,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
|
||||
if (Result.IsDone() &&
|
||||
(Result.FunctionSetErrors().Norm() < TolRes(1)*TolRes(1)) ) {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "Ratrappage Reussi !" << endl;
|
||||
#endif
|
||||
SOS = Standard_True;
|
||||
@@ -373,7 +373,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
theV = PInt.V();
|
||||
}
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "Echec du Ratrappage !" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -419,7 +419,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
}
|
||||
}
|
||||
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (Abs(Diff) > DeltaG) {
|
||||
cout << "Location :: Diff on Guide : " <<
|
||||
Diff << endl;
|
||||
@@ -435,7 +435,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
InGoodPeriod (OldAngle, 2*M_PI, Angle);
|
||||
Diff = Angle - OldAngle;
|
||||
}
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (Abs(Diff) > M_PI/4) {
|
||||
cout << "Diff d'angle trop grand !!" << endl;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
InGoodPeriod (myPoles2d->Value(2, ii-1).Y(), UPeriod, v);
|
||||
}
|
||||
Diff = v - myPoles2d->Value(2, ii-1).Y();
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (Abs(Diff) > (Ul-Uf)/(2+NbKnots)) {
|
||||
cout << "Diff sur section trop grand !!" << endl;
|
||||
}
|
||||
@@ -630,7 +630,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
M.SetCols(n, b, t);
|
||||
}
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "LocationGuide::D0 : No Result !"<<endl;
|
||||
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
|
||||
#endif
|
||||
@@ -702,7 +702,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
M.SetCols(n, b, t);
|
||||
}
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
Standard_Real U = myFirstS + ratio*(Param-myCurve->FirstParameter());
|
||||
cout << "LocationGuide::D0 : No Result !"<<endl;
|
||||
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
|
||||
@@ -801,7 +801,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
Ga.Solve (DEDT.Opposite(), DSDT);// resolution du syst.
|
||||
}//if
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "DEDX = " << DEDX << endl;
|
||||
cout << "DEDT = " << DEDT << endl;
|
||||
#endif
|
||||
@@ -865,7 +865,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
}//if_Result
|
||||
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "LocationGuide::D1 : No Result !!"<<endl;
|
||||
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
|
||||
#endif
|
||||
@@ -1116,7 +1116,7 @@ Standard_Boolean GeomFill_LocationGuide::D2(const Standard_Real Param,
|
||||
|
||||
}//if_result
|
||||
else {
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "LocationGuide::D2 : No Result !!" <<endl;
|
||||
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
|
||||
#endif
|
||||
|
@@ -50,7 +50,7 @@
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
# ifdef DRAW
|
||||
# include <DrawTrSurf.hxx>
|
||||
# endif
|
||||
@@ -58,7 +58,7 @@ static Standard_Boolean Affich = 0;
|
||||
static Standard_Integer NbSurf = 0;
|
||||
#endif
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
// verification des fonctions de derivation D1 et D2 par differences finies
|
||||
Standard_Boolean verifD1(const TColgp_Array1OfPnt& P1,
|
||||
const TColStd_Array1OfReal& W1,
|
||||
@@ -362,7 +362,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
|
||||
if (NullWeight) return Standard_False;
|
||||
|
||||
// verif par diff finies sous debug sauf pour les surfaces periodiques
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
if (!mySurface->IsVPeriodic()) {
|
||||
Standard_Real pas = 1.e-6, wTol = 1.e-4, pTol = 1.e-3;
|
||||
Standard_Real V1,V2;
|
||||
@@ -456,7 +456,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
|
||||
if (NullWeight) return Standard_False;
|
||||
|
||||
// verif par diff finies sous debug sauf pour les surfaces periodiques
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
if (!mySurface->IsVPeriodic()) {
|
||||
Standard_Real V1,V2;
|
||||
Standard_Boolean ok1,ok2;
|
||||
@@ -611,7 +611,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
|
||||
if (mySurface->VDegree()<2) {
|
||||
mySurface->IncreaseDegree(mySurface->UDegree(),2);
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef GEOMFILL_DEB
|
||||
NbSurf++;
|
||||
if (Affich) {
|
||||
#ifdef DRAW
|
||||
|
@@ -498,7 +498,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
|
||||
}
|
||||
|
||||
case GeomFill_IsDarboux :
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
{
|
||||
cout << "Option Darboux: non realisable" << endl;
|
||||
}
|
||||
@@ -875,7 +875,7 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol,
|
||||
myAdpPath->LastParameter(),
|
||||
Tol, Tol, 0., 0.01,
|
||||
TheConti, DegMax, NbMaxSegment);
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
cout << "Tuyau : ";
|
||||
App.Dump(cout);
|
||||
cout << endl;
|
||||
|
@@ -581,7 +581,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
}
|
||||
}
|
||||
*/
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (Intersector.NbPoints() == 0) {
|
||||
Intersector.Dump();
|
||||
}
|
||||
|
@@ -282,7 +282,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location,
|
||||
if (Approx.IsDone()) {
|
||||
Ok = Standard_True;
|
||||
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
Approx.Dump(cout);
|
||||
#endif
|
||||
|
||||
@@ -452,7 +452,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location,
|
||||
Segmax,
|
||||
eval,
|
||||
Preferentiel);
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
Approx.Dump(cout);
|
||||
#endif
|
||||
|
||||
@@ -1034,7 +1034,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
mySurface = new (Geom_RectangularTrimmedSurface)
|
||||
(S,UFirst, ULast, Standard_True);
|
||||
|
||||
#if DEB
|
||||
#if GEOMFILL_DEB
|
||||
if (isUPeriodic && !mySurface->IsUPeriodic())
|
||||
cout<<"Pb de periodicite en U" << endl;
|
||||
if (isUPeriodic && !mySurface->IsUClosed())
|
||||
|
@@ -353,7 +353,9 @@ void GeomFill_SweepSectionGenerator::Perform(const Standard_Boolean Polynomial)
|
||||
}
|
||||
else
|
||||
if (D1Ref.IsOpposite(D1, Precision::Angular()))
|
||||
#ifdef GEOMFILL_DEB
|
||||
cout <<"Que fais-je ???? " << endl;
|
||||
#endif
|
||||
|
||||
// TR is the transformation between (i-1) section and the i-th.
|
||||
TR = Rot * Trans;
|
||||
|
Reference in New Issue
Block a user