mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -862,7 +862,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
|
||||
}
|
||||
}
|
||||
}
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << "BRepFill::SearchOrigine : Echec Distance" << endl;
|
||||
}
|
||||
|
@@ -125,7 +125,7 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
|
||||
// Standard_Integer MaxDeg = 0;
|
||||
|
||||
if ( NbCurves == 0) {
|
||||
#ifdef DEBUG_EVOLVED
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << " TrimSurfaceTool : Approx echoue, on met les polygones" << endl;
|
||||
#endif
|
||||
|
||||
|
@@ -63,7 +63,7 @@
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
|
||||
#ifdef DEB_EFV
|
||||
#ifdef OCCT_DEBUG_EFV
|
||||
static void EdgesFromVertex (const TopoDS_Wire& W,
|
||||
const TopoDS_Vertex& V,
|
||||
TopoDS_Edge& E1,
|
||||
@@ -468,7 +468,7 @@ static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1,
|
||||
isol = iss;
|
||||
}
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
gp_Pnt Psol =
|
||||
#endif
|
||||
DSS.PointOnShape2(isol);
|
||||
@@ -1700,7 +1700,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
newwire.Orientation( TopAbs_FORWARD );
|
||||
myWork(i) = newwire;
|
||||
}
|
||||
#ifdef DEB_EFV
|
||||
#ifdef OCCT_DEBUG_EFV
|
||||
|
||||
for ( i=ideb; i<=myWork.Length(); i++) {
|
||||
|
||||
@@ -1852,7 +1852,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
EdgesFromVertex(wire,Vmini,E1,E2);
|
||||
|
||||
TopExp::Vertices(E1,V1,V2,Standard_True);
|
||||
#ifndef DEB
|
||||
#ifndef OCCT_DEBUG
|
||||
Standard_Real U1=0, U2=0;
|
||||
#else
|
||||
Standard_Real U1, U2;
|
||||
|
@@ -186,7 +186,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
|
||||
r = V.Magnitude()/l;
|
||||
|
||||
Standard_Integer ii, Ind;
|
||||
//#ifndef DEB
|
||||
//#ifndef OCCT_DEBUG
|
||||
Standard_Integer Nb = (Standard_Integer) (4+(10*r));
|
||||
//#else
|
||||
// Standard_Integer Nb = 4+(10*r);
|
||||
@@ -269,14 +269,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
|
||||
myWire = MW.Wire();
|
||||
}
|
||||
else {
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error in MakeWire" << endl;
|
||||
#endif
|
||||
Standard_ConstructionError::Raise("BRepFill_Draft");
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Draft : No assembly !" << endl;
|
||||
#endif
|
||||
return Ok;
|
||||
|
@@ -178,7 +178,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
|
||||
gp_Ax1 axe(gp::Origin(), cross.XYZ());
|
||||
N2.Rotate(axe, alpha);
|
||||
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "BRepFill_LocationLaw::D0 : Attention position out of limits"
|
||||
<< endl;
|
||||
#endif
|
||||
|
@@ -622,7 +622,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
|
||||
Dist = TheU.Circle().Radius();
|
||||
}
|
||||
else {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Intersector done, but no points found" << endl;
|
||||
cout << " ---> ValueonFace failed at parameter U = " << U << endl;
|
||||
#endif
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
static Standard_Boolean Affich = 0;
|
||||
#endif
|
||||
|
||||
@@ -374,7 +374,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
|
||||
const Standard_Boolean Build)
|
||||
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( Affich) {
|
||||
#ifdef DRAW
|
||||
Standard_Integer NBSECT = 0;
|
||||
|
@@ -648,7 +648,7 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset,
|
||||
{
|
||||
myShape.Nullify();
|
||||
myIsDone = Standard_False;
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"An exception was caught in BRepFill_OffsetWire::Perform : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
#if DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
static Standard_Boolean myDebug = Standard_False;
|
||||
#endif
|
||||
|
||||
@@ -296,7 +296,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
|
||||
Standard_Real theParam = Place.ParameterOnPath(),
|
||||
eps = Precision::PConfusion();
|
||||
|
||||
#if DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (myDebug) {
|
||||
gp_Pnt P_Path;
|
||||
P_Path = adpPath->Value(theParam);
|
||||
|
@@ -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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (!Bof)
|
||||
cout << "BRepFill_ShapeLaw::ConcatenedLaw INCOMPLET !!!"
|
||||
<< endl;
|
||||
|
@@ -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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"SameParameter : Tolerance not reached!"<<endl;
|
||||
cout<<"tol visee : "<<tol3d<<" tol obtained : "<<ResTol<<endl;
|
||||
#endif
|
||||
@@ -601,7 +601,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
|
||||
thePlane->UReverse();
|
||||
BRepLib_MakeFace MkF( thePlane, WW );
|
||||
if (MkF.Error() != BRepLib_FaceDone) {
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
BRepLib_FaceError Err = MkF.Error();
|
||||
cout << "Planar Face Error :" << Err << endl;
|
||||
#endif
|
||||
@@ -1034,12 +1034,12 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
|
||||
GeomAbs_C1, GeomAbs_C1,
|
||||
8, 8, 2*NbInt, 0);
|
||||
if (!App.HasResult()) {
|
||||
#if DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Filling_Approx : Pas de resultat" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
#if DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Filling_Approx Error 3d = " <<
|
||||
App.MaxError() << endl;
|
||||
#endif
|
||||
@@ -1234,7 +1234,7 @@ static void SetCommonEdgeInFace(BRepTools_Substitution& aSubstitute,
|
||||
Substitute( aSubstitute, OldEdge, NewEdge );
|
||||
}
|
||||
}
|
||||
#if DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (!done) cout << "Substitution of Edge failed" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1705,7 +1705,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
LastShape = Last;
|
||||
|
||||
// It is necessary to check the SameRange on its (PRO13551)
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean issame = Standard_True;
|
||||
#endif
|
||||
BRep_Builder B;
|
||||
@@ -1715,7 +1715,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
if (!BRepLib::CheckSameRange(wexp.Current())) {
|
||||
B.SameRange(wexp.Current(), Standard_False);
|
||||
B.SameParameter(wexp.Current(), Standard_False);
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
issame = Standard_False;
|
||||
#endif
|
||||
}
|
||||
@@ -1727,14 +1727,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
if (!BRepLib::CheckSameRange(wexp.Current())) {
|
||||
B.SameRange(wexp.Current(), Standard_False);
|
||||
B.SameParameter(wexp.Current(), Standard_False);
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
issame = Standard_False;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (!issame)
|
||||
cout<<"Sweep Warning : Edge not SameRange in the limits"<<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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "PerformCorner : Unsymmetry of free border" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -362,7 +362,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
|
||||
&& ( Points2.Length() != Params.Length() ||
|
||||
(Points2.Length() == 0 && Params.Length() == 0) ) ) {
|
||||
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl;
|
||||
#endif
|
||||
if(P1xP2x>TolInit) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl;
|
||||
#endif
|
||||
i++;
|
||||
@@ -523,7 +523,7 @@ const
|
||||
}
|
||||
|
||||
if (ToProj) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
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 BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (!Projector1.NearestPoint().IsEqual(PBis,Tol)) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Incorrect solution in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (Projector2.NbPoints() == 0) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (!Projector2.NearestPoint().IsEqual(PBis,Tol)) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<" Mauvaisesolution dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
|
||||
#endif
|
||||
return;
|
||||
|
@@ -65,7 +65,7 @@
|
||||
#include <DrawTrSurf.hxx>
|
||||
#include <DBRep.hxx>
|
||||
#endif
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
static Standard_Boolean Affich = Standard_False;
|
||||
static Standard_Integer NBCALL = 1;
|
||||
#endif
|
||||
@@ -96,7 +96,7 @@ myInv1(Inv1),
|
||||
myInv2(Inv2),
|
||||
myBis (Bis)
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( Affich) {
|
||||
cout << " ---------->TrimSurfaceTool : NBCALL = " << NBCALL << endl;
|
||||
|
||||
@@ -273,7 +273,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
|
||||
NbSegments = Intersector.NbSegments();
|
||||
|
||||
if (NbSegments > 0) {
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << " IntersectWith : " << NbSegments
|
||||
<< " Segments of intersection" << endl;
|
||||
#endif
|
||||
@@ -468,7 +468,7 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
|
||||
|
||||
// evaluate the projection of the point on the curve.
|
||||
Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d);
|
||||
#ifdef BREPFILL_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Real Dist = Projector.LowerDistance();
|
||||
if ( Dist > Precision::Confusion() ) {
|
||||
cout << " *** WARNING TrimSurfaceTool: *** " << endl;
|
||||
|
Reference in New Issue
Block a user