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:
@@ -215,7 +215,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape,
|
||||
}
|
||||
|
||||
if (!status) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"** SameParameter not complete. On "<<numedge<<" Edges:";
|
||||
if (nbfail > 0) cout<<" "<<nbfail<<" Failed";
|
||||
cout<<endl;
|
||||
@@ -252,7 +252,7 @@ static void EncodeRegularity (const TopoDS_Shape& shape,
|
||||
BRepLib::EncodeRegularity ( S, tolang );
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: Exception in ShapeFix::EncodeRegularity(): ";
|
||||
Standard_Failure::Caught()->Print ( cout );
|
||||
cout << endl;
|
||||
|
@@ -377,7 +377,7 @@ static Standard_Integer ApplyContext (ShapeFix_WireSegment &wire,
|
||||
for ( TopoDS_Iterator it(res); it.More(); it.Next() ) {
|
||||
TopoDS_Edge E = TopoDS::Edge ( it.Value() );
|
||||
if ( ! E.IsNull() ) segw->Add ( E );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Error: ShapeFix_ComposeShell, ApplyContext: wrong mapping of edge" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -394,7 +394,7 @@ static Standard_Integer ApplyContext (ShapeFix_WireSegment &wire,
|
||||
else wire.AddEdge ( index, aE, iumin, iumax, ivmin, ivmax );
|
||||
}
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Warning: ShapeFix_ComposeShell, ApplyContext: edge is to remove - not implemented" << endl;
|
||||
#endif
|
||||
|
||||
@@ -703,7 +703,7 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
|
||||
else if ( code == IOR_BOTH ) { // parity error in intersector
|
||||
code = IOR_LEFT;
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_ComposeShell::ComputeCode: lost intersection point" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -841,7 +841,7 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir
|
||||
if ( nsplit !=1 ) {
|
||||
DistributeSplitPoints ( wire.WireData(), myFace, i, nsplit, indexes, values );
|
||||
if ( nsplit <=0 ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeFix_ComposeShell::SplitWire: edge dismissed" << endl;
|
||||
#endif
|
||||
i--;
|
||||
@@ -1630,7 +1630,7 @@ void ShapeFix_ComposeShell::SplitByLine (ShapeFix_SequenceOfWireSegment &wires,
|
||||
}
|
||||
if ( tanglevel <0 ) {
|
||||
// myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL4 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_ComposeShell::SplitByLine: tangency level <0 !" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1645,7 +1645,7 @@ void ShapeFix_ComposeShell::SplitByLine (ShapeFix_SequenceOfWireSegment &wires,
|
||||
// protection against creating null-length edges
|
||||
if ( SplitLinePar(i) - SplitLinePar(i-1) < ::Precision::PConfusion() ) {
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeFix_ComposeShell::SplitByLine: Short segment ignored" << endl;
|
||||
#endif
|
||||
if ( ! V1.IsSame ( V2 ) ) { // merge coincident vertices
|
||||
@@ -1654,7 +1654,7 @@ void ShapeFix_ComposeShell::SplitByLine (ShapeFix_SequenceOfWireSegment &wires,
|
||||
Context()->Replace ( V1, V.Oriented ( V1.Orientation() ) );
|
||||
Context()->Replace ( V2, V.Oriented ( V2.Orientation() ) );
|
||||
V1 = V2 = V;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeFix_ComposeShell::SplitByLine: Coincided vertices merged" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1697,7 +1697,7 @@ void ShapeFix_ComposeShell::SplitByLine (ShapeFix_SequenceOfWireSegment &wires,
|
||||
}
|
||||
if ( parity % 2 ) {
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL4 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeFix_ComposeShell::SplitByLine: parity error" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1982,7 +1982,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
for ( Standard_Integer k=1; ! myClosedMode && k <= seqw(i).NbEdges(); k++ )
|
||||
if ( ! seqw(i).CheckPatchIndex ( k ) ) {
|
||||
cout << "Warning: ShapeFix_ComposeShell::CollectWires: Wrong patch indices" << endl;
|
||||
@@ -1996,7 +1996,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
( seqw(i).Orientation() == TopAbs_EXTERNAL ||
|
||||
( seqw(i).NbEdges() == 1 && //:abv 13.05.02: OCC320 - remove if degenerated
|
||||
BRep_Tool::Degenerated ( seqw(i).Edge(1) ) ) ) ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeFix_ComposeShell::CollectWires: Short segment ignored" << endl;
|
||||
#endif
|
||||
seqw(i).Orientation ( TopAbs_INTERNAL );
|
||||
@@ -2197,7 +2197,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
IsCoincided ( endPnt, firstPnt, myUResolution, myVResolution, 2.* tol ) ) ) {
|
||||
if ( ! endV.IsSame ( sae.FirstVertex ( firstEdge ) ) ) {
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_ComposeShell::CollectWires: can't close wire" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -2254,7 +2254,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
//pdn add into resulting sequence!
|
||||
ShapeFix_WireSegment s ( wd, TopAbs_FORWARD );
|
||||
wires.Append ( s );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: Short segment processed as separate wire"<<endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -2442,7 +2442,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
|
||||
|
||||
// check for lost wires, and if they are, make them roots
|
||||
if ( roots.Length() <=0 && loops.Length() >0 ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl;
|
||||
#endif
|
||||
for ( Standard_Integer j=1; j <= loops.Length(); j++ ) {
|
||||
@@ -2461,7 +2461,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
|
||||
BRepTopAdaptor_FClass2d clas ( fc, ::Precision::PConfusion() );
|
||||
if ( clas.PerformInfinitePoint() == TopAbs_IN ) {
|
||||
reverse = Standard_True;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_ComposeShell::MakeFacesOnPatch: badly oriented wire" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -2513,7 +2513,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
|
||||
|
||||
// check for lost wires, and if they are, make them roots
|
||||
if ( i == roots.Length() && loops.Length() >0 ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl;
|
||||
#endif
|
||||
for ( j=1; j <= loops.Length(); j++ ) {
|
||||
|
@@ -254,7 +254,7 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf,
|
||||
}
|
||||
*/
|
||||
// Other case not yet implemented
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "TranslatePCurve not performed" << endl;
|
||||
#endif
|
||||
return theNewL2d;//*theL2d;
|
||||
@@ -264,7 +264,7 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf,
|
||||
Handle(Geom2d_BSplineCurve)
|
||||
aBC = Handle(Geom2d_BSplineCurve)::DownCast(aC2d);
|
||||
if (aBC.IsNull()) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Untreated curve type in TranslatePCurve" << endl;
|
||||
#endif
|
||||
return aC2d;
|
||||
@@ -590,7 +590,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
|
||||
} // end try
|
||||
catch(Standard_Failure) {
|
||||
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
|
||||
#ifdef SHAPEFIX_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "Warning: ShapeFix_Edge::FixAddPCurve(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -775,7 +775,7 @@ Standard_Boolean ShapeFix_Edge::FixSameParameter(const TopoDS_Edge& edge,
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "\nWarning: ShapeFix_Edge: Exception in SameParameter: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -99,7 +99,7 @@ void ShapeFix_EdgeProjAux::Compute (const Standard_Real preci)
|
||||
Standard_Real U1 = FirstParam();
|
||||
Standard_Real U2 = LastParam();
|
||||
if (U1>=U2) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Parametres inverses ... " << endl;
|
||||
#endif
|
||||
Standard_Real tmp = U1;
|
||||
@@ -209,7 +209,7 @@ static Standard_Boolean FindParameterWithExt (const gp_Pnt& Pt1,
|
||||
else return Standard_False;
|
||||
} // end try
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB //:s5
|
||||
#ifdef OCCT_DEBUG //:s5
|
||||
cout << "Warning: ShapeFix_EdgeProjAux, FindParameterWithExt(): Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -264,7 +264,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout <<"Other type of deg curve"<<endl;
|
||||
#endif
|
||||
|
||||
@@ -335,7 +335,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
cf=-10000;
|
||||
cl= 10000;
|
||||
//pdn not cutted by bounds
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Infinite Surface"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -344,7 +344,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
//pdn not linear case not managed
|
||||
cf=-10000;
|
||||
cl= 10000;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Some infinite curve"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -391,7 +391,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
myFirstParam = theCurve2d->ReversedParameter(Usup);
|
||||
myLastParam = theCurve2d->ReversedParameter(Uinf);
|
||||
theCurve2d->Reverse();
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_EdgeProjAux: pcurve reversed" << endl;
|
||||
#endif
|
||||
return;
|
||||
@@ -432,7 +432,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
UpdateParam2d(theCurve2d);
|
||||
else {
|
||||
myLastParam+=period;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<" Added"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -441,7 +441,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
|
||||
if(w1 > wmid) {
|
||||
myLastParam -=period;
|
||||
UpdateParam2d(theCurve2d);
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<" Added & Inverted"<<endl;
|
||||
#endif
|
||||
} else if (w2 < wmid) {
|
||||
@@ -554,7 +554,7 @@ void ShapeFix_EdgeProjAux::UpdateParam2d (const Handle(Geom2d_Curve)& theCurve2d
|
||||
if ( Abs ( myFirstParam - cl ) <= preci2d ) myFirstParam = cf;
|
||||
else if ( Abs ( myLastParam - cf ) <= preci2d ) myLastParam = cl;
|
||||
else {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error : curve 2d range crossing non periodic curve origin";
|
||||
cout << endl;
|
||||
#endif
|
||||
@@ -572,7 +572,7 @@ void ShapeFix_EdgeProjAux::UpdateParam2d (const Handle(Geom2d_Curve)& theCurve2d
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : non increasing parameters for 2d curve." << endl;
|
||||
cout << " update parameter 2d uncertain." << endl;
|
||||
#endif
|
||||
|
@@ -105,7 +105,7 @@
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <NCollection_Array1.hxx>
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
#define DEBUG
|
||||
#endif
|
||||
|
||||
@@ -348,7 +348,7 @@ static Standard_Boolean SplitWire(const TopoDS_Face &face, const TopoDS_Wire& wi
|
||||
}
|
||||
|
||||
if(aResWires.Length()>1) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Wire was splitted on "<<aResWires.Length()<<" wires"<< endl;
|
||||
#endif
|
||||
}
|
||||
@@ -992,7 +992,7 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound()
|
||||
BRepTools::Update(myFace);
|
||||
|
||||
/**/
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Natural bound on sphere or torus with holes added"<<endl; // mise au point !
|
||||
#endif
|
||||
SendWarning ( myFace, Message_Msg ( "FixAdvFace.FixOrientation.MSG0" ) );// Face created with natural bounds
|
||||
@@ -1103,7 +1103,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
|
||||
ws.SetValue ( 1, sbdw->Wire() );
|
||||
SendWarning ( sbdw->Wire(), Message_Msg ( "FixAdvFace.FixOrientation.MSG5" ) );// Wire on face was reversed
|
||||
done = Standard_True;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Wire reversed"<<endl; // mise au point !
|
||||
#endif
|
||||
}
|
||||
@@ -1390,7 +1390,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
|
||||
Standard_Integer k =1;
|
||||
for( ; k <= aSeqReversed.Length(); k++ )
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Wire no "<<aSeqReversed.Value(k)<<" of "<<nb<<" reversed"<<endl; // mise au point !
|
||||
#endif
|
||||
}
|
||||
@@ -1554,18 +1554,18 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
|
||||
}
|
||||
else {
|
||||
w2.Reverse();
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( ! isdeg2 ) cout << "Warning: ShapeFix_Face::FixMissingSeam(): wire reversed" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Warning: ShapeFix_Face::FixMissingSeam(): incompatible open wires" << endl;
|
||||
#endif
|
||||
}
|
||||
// else return Standard_False; // abort
|
||||
else {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Face::FixMissingSeam(): more than two open wires detected!" << endl;
|
||||
#endif
|
||||
//:abv 30.08.09: if more than one open wires and more than two of them are
|
||||
@@ -1575,7 +1575,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
|
||||
w1.Nullify();
|
||||
w2.Nullify();
|
||||
i = 0;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Face::FixMissingSeam(): open degenerated wire removed" << endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -1875,12 +1875,12 @@ Standard_Boolean ShapeFix_Face::FixSmallAreaWire()
|
||||
if ( nbRemoved <=0 ) return Standard_False;
|
||||
|
||||
if ( nbWires <=0 ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Face: All wires on a face have small area; left untouched" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Face: " << nbRemoved << " small area wire(s) removed" << endl;
|
||||
#endif
|
||||
if ( ! Context().IsNull() ) Context()->Replace ( myFace, face );
|
||||
@@ -2095,7 +2095,7 @@ Standard_Boolean ShapeFix_Face::FixLoopWire(TopTools_SequenceOfShape& aResWires)
|
||||
Standard_Boolean isDone =(aResWires.Length() && isClosed);
|
||||
if(isDone && aResWires.Length() >1)
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Wire was splitted on "<<aResWires.Length()<<" wires"<< endl;
|
||||
#endif
|
||||
}
|
||||
@@ -2370,7 +2370,7 @@ Standard_Boolean ShapeFix_Face::FixSplitFace(const TopTools_DataMapOfShapeListOf
|
||||
V1=sae.FirstVertex(E1);
|
||||
V2=sae.LastVertex(E2);
|
||||
if(!V1.IsSame(V2)) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"wire not closed --> stop split"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_WireOrder.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#endif
|
||||
|
||||
@@ -167,7 +167,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
|
||||
// Clear the temporary map of free edges
|
||||
theFreeEdges.Clear();
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
//-------------------------------
|
||||
//szv debug - preparation results
|
||||
//-------------------------------
|
||||
@@ -245,7 +245,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
|
||||
|
||||
// Process second face for the pair of different faces only
|
||||
if (theFirstFace.IsSame(theSecondFace)) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Warning: ShapeFix_FaceConnect::Build: Self-connected face"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -343,7 +343,7 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
|
||||
// Clear the temporary map of processed faces
|
||||
theProcessed.Clear();
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
//-------------------------------
|
||||
//szv debug - sewing results
|
||||
//-------------------------------
|
||||
@@ -476,12 +476,12 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
|
||||
TopoDS_Shape tmpReShape = theReShape->Apply(result);
|
||||
result = TopoDS::Shell(tmpReShape);
|
||||
if (theReShape->Status(ShapeExtend_OK)) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Warning: ShapeFix_FaceConnect::Build: Edges not replaced by ReShape"<<endl;
|
||||
#endif
|
||||
}
|
||||
else if (theReShape->Status(ShapeExtend_FAIL1)) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Error: ShapeFix_FaceConnect::Build: ReShape failed on edges"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -631,13 +631,13 @@ ShapeFix_FaceConnect::ShapeFix_FaceConnect() {}
|
||||
result = TopoDS::Shell(tmpshape);
|
||||
|
||||
if (theReShape->Status(ShapeExtend_FAIL1)) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Error: ShapeFix_FaceConnect::Build: ReShape failed on vertices"<<endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
//-------------------------------
|
||||
//szv debug - reshape results
|
||||
//-------------------------------
|
||||
|
@@ -449,7 +449,7 @@ ShapeFix_FixSmallFace::ShapeFix_FixSmallFace()
|
||||
|
||||
}
|
||||
else {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "The face is not strip face" << endl;
|
||||
#endif
|
||||
return theNewEdge;
|
||||
|
@@ -106,7 +106,7 @@ ShapeFix_Solid::ShapeFix_Solid(const TopoDS_Solid& solid)
|
||||
// B.Add(mySolid,TopoDS::Shell(iter.Value()));
|
||||
myShape = solid;
|
||||
}
|
||||
#ifdef DEB_GET_MIDDLE_POINT
|
||||
#ifdef OCCT_DEBUG_GET_MIDDLE_POINT
|
||||
//=======================================================================
|
||||
//function : GetMiddlePoint
|
||||
//purpose :
|
||||
@@ -207,7 +207,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
|
||||
}
|
||||
|
||||
if(numon == 3 && pointstatus ==TopAbs_ON) {
|
||||
#ifdef DEB_GET_MIDDLE_POINT
|
||||
#ifdef OCCT_DEBUG_GET_MIDDLE_POINT
|
||||
gp_Pnt pmid;
|
||||
GetMiddlePoint(aShell2,pmid);
|
||||
bsc3d.Perform(pmid,Precision::Confusion());
|
||||
@@ -223,7 +223,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -294,7 +294,7 @@ static Standard_Boolean CreateSolids(const TopoDS_Shape aShape,TopTools_IndexedM
|
||||
infinstatus = bsc3d.State();
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -553,7 +553,7 @@ TopoDS_Solid ShapeFix_Solid::SolidFromShell (const TopoDS_Shell& shell)
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -566,7 +566,7 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
|
||||
}
|
||||
}
|
||||
if ( seq.Length() >0 ) { // supposed that edge is SP
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Edge going over singularity detected; splitted" << endl;
|
||||
#endif
|
||||
Standard_Boolean isFwd = ( E.Orientation() == TopAbs_FORWARD );
|
||||
@@ -655,7 +655,7 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
|
||||
myFixEdge->Projector()->AdjustOverDegenMode() = Standard_False;
|
||||
myFixEdge->FixAddPCurve ( sbwd->Edge(overdegen), face, sbwd->IsSeam(overdegen), myAnalyzer->Surface(), Precision());
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Edge going over singularity detected; pcurve adjusted" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -860,7 +860,7 @@ Standard_Boolean ShapeFix_Wire::FixSelfIntersection()
|
||||
myStatusSelfIntersection |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
num = ( myClosedMode ? 1 : 2 );
|
||||
nb = sbwd->NbEdges();
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire::FixSelfIntersection: Edge removed" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -889,7 +889,7 @@ Standard_Boolean ShapeFix_Wire::FixSelfIntersection()
|
||||
if ( ! Context().IsNull() ) UpdateWire();
|
||||
myShape.Nullify();
|
||||
}
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (StatusSelfIntersection (ShapeExtend_DONE5))
|
||||
cout<<"Warning: ShapeFix_Wire::FixIntersection: Non-adjacent intersection fixed (split-"
|
||||
<<NbSplit<<", cut-"<<NbCut<<", removed-"<<NbRemoved<<")"<<endl;
|
||||
@@ -936,7 +936,7 @@ Standard_Boolean ShapeFix_Wire::FixSelfIntersection()
|
||||
myStatusSelfIntersection |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL3 );
|
||||
if(isDone)
|
||||
myStatusSelfIntersection |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (StatusSelfIntersection (ShapeExtend_DONE5))
|
||||
cout << "Warning: ShapeFix_Wire::FixSelfIntersection: Non ajacent intersection fixed" << endl;
|
||||
#endif
|
||||
@@ -1282,7 +1282,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
|
||||
vclosed = Standard_True;
|
||||
VRange = aBaseCrv->Period();
|
||||
IsVCrvClosed = Standard_True;
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire::FixShifted set vclosed True for Surface of Revolution" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1444,7 +1444,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
|
||||
UpdateEdgeUVPoints ( edge, Face() );
|
||||
}
|
||||
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeFix_Wire::FixShifted(): bi - meridian case fixed" << endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -1740,14 +1740,14 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
|
||||
if ( ! sae.PCurve ( E, face, c2d, a, b, Standard_False ) )
|
||||
return Standard_False;
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Cut Loop: params (" << t1 << ", " << t2;
|
||||
#endif
|
||||
GeomAdaptor_Curve GAC ( crv, f, l );
|
||||
Standard_Real dt = tolfact * GAC.Resolution(prec);
|
||||
t1 -= dt; //1e-3;//::Precision::PConfusion();
|
||||
t2 += dt; //1e-3;//::Precision::PConfusion();
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << ") -> (" << t1 << ", " << t2 << ")" << endl;
|
||||
#endif
|
||||
|
||||
@@ -1817,7 +1817,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
|
||||
if ( ! TryNewPCurve ( E, face, bs, a, b, newtol ) ) return Standard_False;
|
||||
|
||||
Standard_Real tol = BRep_Tool::Tolerance ( E );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Cut Loop: tol orig " << tol << ", prec " << prec << ", new tol " << newtol << endl;
|
||||
#endif
|
||||
if ( newtol > Max ( prec, tol ) ) return Standard_False;
|
||||
@@ -1927,7 +1927,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
|
||||
TopoDS_Edge &E1,
|
||||
TopoDS_Edge &E2)
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Info: ShapeFix_Wire::FixSelfIntersection : Try insert vertex"<<endl;
|
||||
#endif
|
||||
|
||||
@@ -2681,7 +2681,7 @@ static Standard_Boolean TryBendingPCurve (const TopoDS_Edge &E, const TopoDS_Fac
|
||||
c2d = bs;
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire::FixLacking: Exception in Geom2d_BSplineCurve::Segment()" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -2913,7 +2913,7 @@ Standard_Boolean ShapeFix_Wire::FixLacking (const Standard_Integer num,
|
||||
// insert new edge
|
||||
if ( doAddDegen ) {
|
||||
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire::FixLacking: degenerated edge added" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -2946,7 +2946,7 @@ Standard_Boolean ShapeFix_Wire::FixLacking (const Standard_Integer num,
|
||||
FixSelfIntersectingEdge ( n1 );
|
||||
FixSelfIntersectingEdge ( n2 );
|
||||
FixIntersectingEdges ( n2 ); //skl 24.04.2003 for OCC58
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Info: ShapeFix_Wire::FixLacking: Bending pcurves" << endl;
|
||||
#endif
|
||||
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
|
||||
|
@@ -238,7 +238,7 @@ void ShapeFix_WireSegment::DefineIUMin (const Standard_Integer i,
|
||||
const Standard_Integer iumin)
|
||||
{
|
||||
if ( myIUMin->Value(i) < iumin ) myIUMin->SetValue ( i, iumin );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( myIUMin->Value(i) > myIUMax->Value(i) )
|
||||
cout << "Warning: ShapeFix_WireSegment::DefineIUMin: indexation error" << endl;
|
||||
#endif
|
||||
@@ -253,7 +253,7 @@ void ShapeFix_WireSegment::DefineIUMax (const Standard_Integer i,
|
||||
const Standard_Integer iumax)
|
||||
{
|
||||
if ( myIUMax->Value(i) > iumax ) myIUMax->SetValue ( i, iumax );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iun = myIUMin->Value(i), iux = myIUMax->Value(i);
|
||||
if ( iun > iux )
|
||||
cout << "Warning: ShapeFix_WireSegment::DefineIUMax: indexation error" << endl;
|
||||
@@ -269,7 +269,7 @@ void ShapeFix_WireSegment::DefineIVMin (const Standard_Integer i,
|
||||
const Standard_Integer ivmin)
|
||||
{
|
||||
if ( myIVMin->Value(i) < ivmin ) myIVMin->SetValue ( i, ivmin );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i);
|
||||
if ( ivn > ivx )
|
||||
cout << "Warning: ShapeFix_WireSegment::DefineIVMin: indexation error" << endl;
|
||||
@@ -285,7 +285,7 @@ void ShapeFix_WireSegment::DefineIVMax (const Standard_Integer i,
|
||||
const Standard_Integer ivmax)
|
||||
{
|
||||
if ( myIVMax->Value(i) > ivmax ) myIVMax->SetValue ( i, ivmax );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i);
|
||||
if ( ivn > ivx )
|
||||
cout << "Warning: ShapeFix_WireSegment::DefineIVMax: indexation error" << endl;
|
||||
@@ -319,7 +319,7 @@ Standard_Boolean ShapeFix_WireSegment::CheckPatchIndex (const Standard_Integer i
|
||||
Standard_Integer dU = myIUMax->Value(i) - myIUMin->Value(i);
|
||||
Standard_Integer dV = myIVMax->Value(i) - myIVMin->Value(i);
|
||||
Standard_Boolean ok = ( dU ==0 || dU ==1 ) && ( dV ==0 || dV ==1 );
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( ! ok )
|
||||
cout << "Warning: ShapeFix_WireSegment::CheckPatchIndex: incomplete indexation" << endl;
|
||||
#endif
|
||||
|
@@ -360,7 +360,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve" <<first<<" " <<last<<endl;
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -635,7 +635,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve :"<<endl;
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -943,7 +943,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d" <<first<<" " <<last<<endl;
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -1523,7 +1523,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d :"<<endl;
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -385,7 +385,7 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
|
||||
}
|
||||
catch ( Standard_Failure )
|
||||
{
|
||||
#ifdef SHAPEFIX_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Error: ShapeFix_Wireframe::FixSmallEdges: JoinEdges: Exception in GeomConvert_CompCurveToBSplineCurve: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout<<endl;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user