mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-13 06:37:18 +08: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:
@@ -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++ ) {
|
||||
|
||||
Reference in New Issue
Block a user