mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -237,25 +237,25 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
|
||||
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
|
||||
if (w1 < cf) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
|
||||
#endif
|
||||
w1 = cf;
|
||||
}
|
||||
else if (w1 > cl) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
|
||||
#endif
|
||||
w1 = cl;
|
||||
}
|
||||
if (w2 < cf) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
|
||||
#endif
|
||||
w2 = cf;
|
||||
}
|
||||
else if (w2 > cl) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
|
||||
#endif
|
||||
w2 = cl;
|
||||
@@ -284,7 +284,7 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
if ( theCurve->Value(w1).Distance(theCurve->Value(cf)) < preci ) w1 = cf;
|
||||
if ( theCurve->Value(w2).Distance(theCurve->Value(cl)) < preci ) w2 = cl;
|
||||
if ( w1 > w2 ) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
|
||||
#endif
|
||||
Standard_Real tmp = w1;
|
||||
@@ -312,7 +312,7 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
// illegal sur une courbe fermee non periodique
|
||||
// on inverse quand meme les parametres !!!!!!
|
||||
else {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
|
||||
#endif
|
||||
Standard_Real tmp = w1;
|
||||
@@ -322,7 +322,7 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
}
|
||||
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
|
||||
else if ( w1 > w2 ) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: parameter range is bad; curve reversed" << endl;
|
||||
#endif
|
||||
w1 = theCurve->ReversedParameter ( w1 );
|
||||
@@ -336,7 +336,7 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UpdateParam3d Failed" << endl;
|
||||
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
|
||||
cout << " - Param 1 : " << w1 << endl;
|
||||
@@ -344,7 +344,7 @@ Standard_Boolean StepToTopoDS_GeometricTool::UpdateParam3d
|
||||
#endif
|
||||
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
|
||||
if ( w1 > w2 ) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: parameter range is bad; curve reversed" << endl;
|
||||
#endif
|
||||
w1 = theCurve->ReversedParameter ( w1 );
|
||||
|
@@ -163,7 +163,7 @@ Standard_Boolean StepToTopoDS_Tool::IsVertexBound(const Handle(StepGeom_Cartesia
|
||||
void StepToTopoDS_Tool::BindVertex(const Handle(StepGeom_CartesianPoint)& P, const TopoDS_Vertex& V)
|
||||
{
|
||||
myVertexMap.Bind(P, V);
|
||||
#ifdef DEBUG
|
||||
#ifdef OCCT_DEBUG
|
||||
TransferBRep::SetShapeResult (myTransProc,P,V);
|
||||
#endif
|
||||
}
|
||||
|
@@ -192,7 +192,7 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: StepToTopoDS_TranslateCompositeCurve: Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
@@ -229,7 +229,7 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: StepToTopoDS_TranslateCompositeCurve: Exception: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
#endif
|
||||
|
@@ -80,18 +80,20 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge& ME,
|
||||
const Handle(Geom_Curve)& myCurve,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const Standard_Real& /*U1*/,
|
||||
const Standard_Real& /*U2*/,
|
||||
const Standard_Real& U1,
|
||||
const Standard_Real& U2,
|
||||
StepToTopoDS_Tool& aTool,
|
||||
const Handle(StepShape_TopologicalRepresentationItem)& /*tobind*/)
|
||||
{
|
||||
(void)U1, (void)U2; // avoid compiler warning
|
||||
|
||||
Handle(Transfer_TransientProcess) TP = aTool.TransientProcess();
|
||||
// if (!myCurve.IsNull() && !tobind.IsNull()) {
|
||||
// TransferBRep::SetShapeResult
|
||||
// (TP,tobind, MakeEdge(myCurve,V1,V2,U1,U2,BRepAPI::Precision()) );
|
||||
// aTool.Bind (tobind,E); SURTOUT PAS : noter pour debug/erreur
|
||||
// }
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "------------------------------------" << endl;
|
||||
cout << "MakeEdge Error : " << ME.Error()<<" - ";
|
||||
#endif
|
||||
@@ -120,7 +122,7 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge& ME,
|
||||
TP->AddFail(orig," Line through identic Points");
|
||||
break;
|
||||
}
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Original Type : " << orig->DynamicType() << endl;
|
||||
cout << "3D Curve Type : " << myCurve->DynamicType() << endl;
|
||||
cout << "First Parameter : " << U1 << endl;
|
||||
|
@@ -149,7 +149,7 @@ static void CheckPCurves (TopoDS_Wire& aWire, const TopoDS_Face& aFace,
|
||||
|
||||
if (w1 == w2) {
|
||||
RemoveSinglePCurve(myEdge,aFace);
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Removing pcuve w1=w2"<<endl;
|
||||
#endif
|
||||
continue;
|
||||
@@ -420,7 +420,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
||||
|
||||
Standard_Boolean ThereIsLikeSeam = Standard_False;
|
||||
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << " Processing Edge :" << j << endl;
|
||||
#endif
|
||||
|
||||
@@ -695,7 +695,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
||||
}
|
||||
else {
|
||||
RemoveSinglePCurve(edge, Face);
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Removing after prj"<<endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -223,7 +223,7 @@ void StepToTopoDS_TranslateFace::Init
|
||||
|
||||
for (Standard_Integer i = 1; i <= NbBnd; i ++) {
|
||||
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << " Processing Wire : " << i << endl;
|
||||
#endif
|
||||
FaceBound = FS->BoundsValue(i);
|
||||
@@ -368,7 +368,7 @@ void StepToTopoDS_TranslateFace::Init
|
||||
else {
|
||||
// Type not yet implemented or non sens
|
||||
TP->AddFail(Loop," Type of loop not yet implemented");
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << Loop->DynamicType() << endl;
|
||||
#endif
|
||||
continue;
|
||||
|
@@ -82,7 +82,7 @@ void StepToTopoDS_TranslateShell::Init
|
||||
|
||||
Message_ProgressSentry PS ( TP->GetProgress(), "Face", 0, NbFc, 1 );
|
||||
for (Standard_Integer i=1; i<=NbFc && PS.More(); i++, PS.Next()) {
|
||||
#ifdef STEPTOTOPODS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Processing Face : " << i << endl;
|
||||
#endif
|
||||
StepFace = CFS->CfsFacesValue(i);
|
||||
|
Reference in New Issue
Block a user