1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +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:
abv
2014-10-28 12:41:04 +03:00
committed by bugmaster
parent a507ffd9d7
commit 0797d9d30a
700 changed files with 3932 additions and 4250 deletions

View File

@@ -126,7 +126,7 @@ TopoDS_Shape DNaming::CurrentShape (const Standard_CString LabelName,
TDF_Label Label;
Standard_Boolean Found = DDF::AddLabel (DF, LabelName, Label);
if (!Found) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout <<"no labels"<<endl;
#endif
return S;
@@ -136,7 +136,7 @@ TopoDS_Shape DNaming::CurrentShape (const Standard_CString LabelName,
Label.FindAttribute(TNaming_NamedShape::GetID(),NS);
S = TNaming_Tool::CurrentShape(NS);
if (S.IsNull())
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout <<"current shape from "<< LabelName <<" is deleted"<<endl;
#endif
return S;
@@ -891,7 +891,7 @@ Standard_Boolean DNaming::ComputeSweepDir (const TopoDS_Shape& theShape,
if (theShape.ShapeType() == TopAbs_FACE) {
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(theShape));
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
Standard_CString s = aSurf->DynamicType()->Name();
cout<<"Surface Dynamic TYPE = "<<s<<endl;
#endif

View File

@@ -104,7 +104,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(TFunction_Logbook& theL
Handle(TNaming_NamedShape) anObjectNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), anObjectNS);
if (anObjectNS.IsNull() || anObjectNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"BooleanOperationDriver:: Object is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -115,7 +115,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(TFunction_Logbook& theL
Handle(TNaming_NamedShape) aToolNS = DNaming::GetObjectValue(aToolObj);
if (aToolNS.IsNull() || aToolNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"BooleanOperationDriver:: Tool is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -125,7 +125,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(TFunction_Logbook& theL
TopoDS_Shape aTOOL = aToolNS->Get();
TopoDS_Shape anOBJECT = anObjectNS->Get();
if (aTOOL.IsNull() || anOBJECT.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"BooleanOperationDriver:: Tool is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -205,7 +205,7 @@ static Standard_Boolean IsValidSurfType(const TopoDS_Face& theFace) {
return Standard_True;
}
*/
#ifdef DEB
#ifdef OCCT_DEBUG
//ModDbgTools_Write(theFace, "Surf");
#endif
return Standard_False;
@@ -262,7 +262,7 @@ void DNaming_BooleanOperationDriver::LoadNamingDS (const TDF_Label& theResultLab
const TopoDS_Shape& ObjSh = MS.Shape1();
const TopoDS_Shape& ToolSh = MS.Shape2();
if (ResSh.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"LoadFuseNamingDS: The result of the boolean operation is null"<<endl;
#endif
return;
@@ -337,7 +337,7 @@ void DNaming_BooleanOperationDriver::LoadSectionNDS (const TDF_Label& theResultL
const TopoDS_Shape& ObjSh = MS.Shape1();
const TopoDS_Shape& ToolSh = MS.Shape2();
if (ResSh.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"LoadSectionNamingDS: The result of the boolean operation is null"<<endl;
#endif
return;
@@ -368,10 +368,6 @@ Standard_Boolean DNaming_BooleanOperationDriver::CheckAndLoad
{
if (theMkOpe.IsDone() && !theMkOpe.Shape().IsNull()) {
#ifdef MDTV_DEB
Standard_CString aFileName = "BoolOp.brep";
Write(theMkOpe.Shape(), aFileName);
#endif
if (theMkOpe.Shape().ShapeType() == TopAbs_COMPOUND) {
TopoDS_Iterator anItr(theMkOpe.Shape());
if(!anItr.More()) {

View File

@@ -78,7 +78,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) cons
Handle(TDataStd_UAttribute) anObject = DNaming::GetObjectArg(aFunction,CYL_AXIS);
Handle(TNaming_NamedShape) aNSAxis = DNaming::GetObjectValue(anObject);
if (aNSAxis->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"CylinderDriver:: Axis is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
@@ -86,7 +86,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) cons
}
TopoDS_Shape aTopoDSAxis = aNSAxis->Get();
if (aTopoDSAxis.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"CylinderDriver:: Axis is null"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
@@ -94,7 +94,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) cons
}
// Creation of gp axis (gp_Ax2):
if (aTopoDSAxis.ShapeType() != TopAbs_EDGE && aTopoDSAxis.ShapeType() != TopAbs_WIRE) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"CylinderDriver:: Wrong axis, ShapeType = " << aTopoDSAxis.ShapeType() <<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
@@ -118,7 +118,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) cons
anAxis.SetLocation(aP1);
}
} else {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"CylinderDriver:: I don't support wires for a while"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);

View File

@@ -79,7 +79,7 @@ Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
Handle(TNaming_NamedShape) aContextNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"FilletDriver:: Context is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -92,7 +92,7 @@ Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
if(aRadius < Precision::Confusion()) {
aFunction->SetFailure(WRONG_ARGUMENT);
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "FilletDriver:: Radius < Precision::Confusion" << endl;
#endif
return -1;
@@ -102,7 +102,7 @@ Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
Handle(TDataStd_UAttribute) aPathObj = DNaming::GetObjectArg(aFunction,FILLET_PATH);
Handle(TNaming_NamedShape) aPathNS = DNaming::GetObjectValue(aPathObj);
if (aPathNS.IsNull() || aPathNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"FilletDriver:: Path is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -112,7 +112,7 @@ Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
TopoDS_Shape aPATH = aPathNS->Get();
TopoDS_Shape aCONTEXT = aContextNS->Get();
if (aPATH.IsNull() || aCONTEXT.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"FilletDriver:: Path or Context is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);

View File

@@ -49,27 +49,7 @@
#include <TFunction_Function.hxx>
#include <DNaming.hxx>
#include <ModelDefinitions.hxx>
#ifdef WNT
#define EXCEPTION ...
#else
#define EXCEPTION Standard_Failure
#endif
//#define MDTV_DEB 1
#ifdef MDTV_DEB
#include <TDF_Tool.hxx>
#include <BRepTools.hxx>
static void Write(const TopoDS_Shape& shape,
const Standard_CString filename)
{
ofstream save;
save.open(filename);
save << "DBRep_DrawableShape" << endl << endl;
if(!shape.IsNull()) BRepTools::Write(shape, save);
save.close();
}
#endif
#include <TDataStd_Name.hxx>
//=======================================================================
//function : DNaming_Line3DDriver
@@ -131,7 +111,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(TFunction_Logbook& theLog) const
aNS1 = DNaming::GetObjectValue(aRefP1);
Handle(TDataStd_UAttribute) aRefP2 = DNaming::GetObjectArg(aFunction, (LINE3D_TYPE + aCounter +1));
aNS2 = DNaming::GetObjectValue(aRefP2);
#ifdef MDTV_DEB
#ifdef OCCT_DEBUG
if(!aNS1->IsEmpty()) {
aShape1 = aNS1->Get();
gp_Pnt aDebPoint = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
@@ -152,7 +132,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(TFunction_Logbook& theLog) const
}
aShape1 = aNS1->Get();
aShape2 = aNS2->Get();
#ifdef MDTV_DEB
#ifdef OCCT_DEBUG
gp_Pnt aDebPoint = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
// cout << aCounter << " X = " << aDebPoint.X() << " Y = " << aDebPoint.Y() << " Z = " << aDebPoint.Z() << endl;
aDebPoint = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
@@ -194,7 +174,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(TFunction_Logbook& theLog) const
try {
LoadNamingDS(aResultLabel, aWire, anArV, isClosed);
} catch (EXCEPTION) {
} catch (Standard_Failure) {
aFunction->SetFailure(NAMING_FAILED);
return -1;
}
@@ -222,7 +202,7 @@ void DNaming_Line3DDriver::LoadNamingDS (const TDF_Label& theResultLabel,
//Wire
TNaming_Builder aWBuilder(theResultLabel);
aWBuilder.Generated(theWire);
#ifdef MDTV_DEB
#ifdef OCCT_DEBUG
TDataStd_Name::Set(theResultLabel, "Line3DCurve");
#endif
Standard_Integer aLength = theArV.Length();

View File

@@ -218,13 +218,13 @@ static Standard_Integer DNaming_AddDriver (Draw_Interpretor& /*theDI*/,
Standard_GUID drvGUID;
if(!GetFuncGUID(theArg[i],drvGUID)) continue;
aFunctionDrvTable->AddDriver(drvGUID, GetDriver(theArg[i]));
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "DNaming_AddDriver : " << theArg[i] << " driver is added" <<endl;
#endif
}
return 0;
}
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "DNaming_AddDriver : Error" << endl;
#endif
return 1;
@@ -503,7 +503,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
goto ERR;
TCollection_AsciiString entry;
TDF_Tool::Entry(FatherLab, entry);
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "DNaming_SolveFlatFrom: Father label = " << entry << endl;
#endif
Standard_Boolean found(Standard_False);
@@ -531,7 +531,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << endl;
return 1;
}
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout <<"DNaming_SolveFlatFrom : function from label " << entry << " is recomputed" << endl;
#endif
} catch (EXCEPTION) {
@@ -559,13 +559,13 @@ static Standard_Integer DNaming_InitLogBook (Draw_Interpretor& /*theDI*/,
Standard_CString aDocS(theArg[1]);
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
if(GetLogBook().IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "DNaming_InitLogBook : is empty" <<endl;
#endif
}
else {
GetLogBook().Clear();
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "DNaming_InitLogBook : cleaned" <<endl;
#endif
}
@@ -630,7 +630,7 @@ static Standard_Integer DNaming_ComputeFun (Draw_Interpretor& /*theDI*/,
cout << "DNaming_ComputeFun : No Driver or Driver failed" << endl;
return 1;
}
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout <<"DNaming_ComputeFun : function from label " << theArg[2] << " is recomputed" << endl;
#endif
return 0;
@@ -688,7 +688,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
if (nb == 7)
aGeometry = (Standard_Boolean) Draw::Atoi(a[6]);
Handle(TNaming_NamedShape) aCont = DNaming::GetObjectValue(aContext);
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
if(aCont.IsNull() || aCont->IsEmpty())
cout <<"Wrong Context ..." <<endl;
#endif
@@ -702,7 +702,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
}
if(!aCont.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
TCollection_AsciiString entry;
TDF_Tool::Entry(aCont->Label(), entry);
cout << "ContextNS Label = " << entry <<endl;
@@ -1043,7 +1043,7 @@ static Standard_Integer DNaming_PTranslateDXYZ (Draw_Interpretor& di,
const char** a)
{
if (nb > 3) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "NB = " << nb <<endl;
#endif
Handle(TDocStd_Document) aDocument;
@@ -1090,7 +1090,7 @@ static Standard_Integer DNaming_PTranslateLine (Draw_Interpretor& di,
const char** a)
{
if (nb > 4) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "NB = " << nb <<endl;
#endif
Handle(TDocStd_Document) aDocument;
@@ -1933,7 +1933,7 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
isFirst = Standard_False;
TCollection_AsciiString entry;
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout << "First Selection function at " << entry <<endl;
#endif
}
@@ -2069,7 +2069,7 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
if(isFirst) {
FirstAuxObj = auxObj;
isFirst = Standard_False;
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
TCollection_AsciiString entry;
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
cout << "First Selection function at " << entry <<endl;

View File

@@ -85,7 +85,7 @@ Standard_Integer DNaming_PointDriver::Execute(TFunction_Logbook& theLog) const
Handle(TDataStd_UAttribute) aRefPnt = DNaming::GetObjectArg(aFunction,PNTRLT_REF);
Handle(TNaming_NamedShape) aRefPntNS = DNaming::GetObjectValue(aRefPnt);
if (aRefPntNS.IsNull() || aRefPntNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"PointDriver:: Ref Point is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);

View File

@@ -81,7 +81,7 @@ Standard_Boolean DNaming_PrismDriver::MustExecute(const TFunction_Logbook&) cons
return Standard_True;
}
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
#include <BRepTools.hxx>
static void Write(const TopoDS_Shape& shape,
const Standard_CString filename)
@@ -175,7 +175,7 @@ Standard_Integer DNaming_PrismDriver::Execute(TFunction_Logbook& theLog) const {
BRepCheck_Analyzer aCheck(aResult);
if (!aCheck.IsValid(aResult)) {
aFunction->SetFailure(RESULT_NOT_VALID);
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
Standard_CString aFileName = "PrismResult.brep";
Write(aResult, aFileName);
#endif

View File

@@ -86,18 +86,6 @@ Standard_Boolean DNaming_RevolutionDriver::MustExecute(const TFunction_Logbook&)
return Standard_True;
}
#ifdef OCC_DEB
#include <BRepTools.hxx>
static void Write(const TopoDS_Shape& shape,
const Standard_CString filename)
{
ofstream save;
save.open(filename);
save << "DBRep_DrawableShape" << endl << endl;
if(!shape.IsNull()) BRepTools::Write(shape, save);
save.close();
}
#endif
//=======================================================================
//function : Execute
//purpose : Executes the function
@@ -180,7 +168,7 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co
}
}
if(!anAxisOK) {
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
cout<<"RevolutionDriver:: Axis is not correct"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -430,7 +418,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
TNaming_Builder aBuilder(theResultLabel.NewChild());
aBuilder.Generated (Vfirst, it.Value());
}
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
else {
if(MS.HasDegenerated())
cout <<"mkRevol has degenerated" <<endl;
@@ -447,7 +435,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
TNaming_Builder aBuilder(theResultLabel.NewChild());
aBuilder.Generated (Vlast, it.Value());
}
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
else {
if(MS.HasDegenerated())
cout <<"mkRevol has degenerated" <<endl;
@@ -516,7 +504,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
TNaming_Builder aBuilder(theResultLabel.NewChild());
aBuilder.Generated (Vfirst, it.Value());
}
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
else {
if(MS.HasDegenerated())
cout <<"mkRevol has degenerated" <<endl;
@@ -532,7 +520,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
TNaming_Builder aBuilder(theResultLabel.NewChild());
aBuilder.Generated (Vlast, it.Value());
}
#ifdef OCC_DEB
#ifdef OCCT_DEBUG
else {
if(MS.HasDegenerated())
cout <<"mkRevol has degenerated" <<endl;

View File

@@ -143,7 +143,7 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM
{
Standard_Boolean extRefFound = Standard_False;
TDF_AttributeMap anExtMap;
#ifdef DEB_SELN
#ifdef OCCT_DEBUG_SELN
TCollection_AsciiString entr1;
TDF_Tool::Entry(theLabel, entr1);
cout<<"\tNaming Attribute at = "<< entr1 <<endl;
@@ -155,14 +155,14 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM
if(!aLabel.IsNull())
aLabel.FindAttribute(TNaming_Naming::GetID(), aNaming);
if(aNaming.IsNull()) continue;
#ifdef DEB_SELN
#ifdef OCCT_DEBUG_SELN
TDF_Tool::Entry(aLabel, entr1);
cout<<"\tNaming Attribute at = "<< entr1 <<endl;
#endif
TDF_Tool::OutReferences(aLabel,anExtMap);
for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) {
Handle(TDF_Attribute) att = attMItr.Key();
#ifdef DEB_SELN
#ifdef OCCT_DEBUG_SELN
TDF_Tool::Entry(att->Label(), entr1);
cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<endl;
#endif
@@ -201,7 +201,7 @@ static Standard_Integer DNaming_SolveSelection (Draw_Interpretor& di, Standard_I
TDF_LabelMap aValidMap;
if(!FillValidMap(L,aValidMap))
di << "Valid map is empty" << "\n";
#ifdef DEB_SELN
#ifdef OCCT_DEBUG_SELN
cout<<"== Valid Label map =="<<endl;
for (TDF_MapIteratorOfLabelMap mapItr(aValidMap);mapItr.More(); mapItr.Next()) {
const TDF_Label& aLab = mapItr.Key();

View File

@@ -28,7 +28,7 @@
#include <ModelDefinitions.hxx>
//#define SEL_DEB 1
#ifdef SEL_DEB
#ifdef OCCT_DEBUG
#include <TDF_Tool.hxx>
#include <TDF_MapIteratorOfLabelMap.hxx>
#endif
@@ -55,7 +55,7 @@ Standard_Boolean DNaming_SelectionDriver::MustExecute(const TFunction_Logbook& )
return Standard_True;
}
#ifdef SEL_DEB
#ifdef OCCT_DEBUG
#include <BRepTools.hxx>
static void Write(const TopoDS_Shape& shape,
const Standard_CString filename)
@@ -104,7 +104,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
TDF_LabelMap aMap;
aMap = theLog.ChangeValid();
#ifdef SEL_DEB
#ifdef OCCT_DEBUG
cout <<"#E_DNaming_SelectionDriver:: Valid Label Map:"<<endl;
TDF_MapIteratorOfLabelMap anItr(aMap);
for (; anItr.More(); anItr.Next()) {
@@ -138,7 +138,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
aNS->Label().EntryDump(cout); cout << endl;
} else {
#ifdef SEL_DEB
#ifdef OCCT_DEBUG
Write(aNS->Get(), "Selection_Result.brep");
Handle(TopoDS_TShape) aTS = aNS->Get().TShape();
cout << "TShape = " << (Standard_Address)aTS <<endl;
@@ -153,7 +153,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
if(aPrevShapeType == aNS->Get().ShapeType()) {
aFunction->SetFailure(DONE);
} else {
#ifdef SEL_DEB
#ifdef OCCT_DEBUG
cout <<"%%%WARNING: DNaming_SelectionDriver::Execute: The Shape after solving changed type = "<<aNS->Get().ShapeType()<< endl;
#endif
aFunction->SetFailure(DONE);

View File

@@ -79,7 +79,7 @@ Standard_Integer DNaming_SphereDriver::Execute(TFunction_Logbook& theLog) const
Handle(TDataStd_UAttribute) anObject = DNaming::GetObjectArg(aFunction,SPHERE_CENTER);
Handle(TNaming_NamedShape) aNSCnt = DNaming::GetObjectValue(anObject);
if (aNSCnt.IsNull() || aNSCnt->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"SphereDriver:: Center point is null or empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
@@ -96,7 +96,7 @@ Standard_Integer DNaming_SphereDriver::Execute(TFunction_Logbook& theLog) const
TopoDS_Shape aCntShape = aNSCnt->Get();
if(aCntShape.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"SphereDriver:: Center point is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);

View File

@@ -60,7 +60,7 @@
#define VERTEX_TAG 3
//#define MDTV_DEB_TRSF
#ifdef MDTV_DEB_TRSF
#ifdef OCCT_DEBUG_TRSF
#include <TCollection_AsciiString.hxx>
#include <BRepTools.hxx>
#include <TDF_Tool.hxx>
@@ -111,7 +111,7 @@ Standard_Integer DNaming_TransformationDriver::Execute(TFunction_Logbook& theLog
Handle(TNaming_NamedShape) aContextNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"TransformationDriver:: Context is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_CONTEXT);
@@ -342,7 +342,7 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
return;
const TopoDS_Shape& aSrcShape = theSourceNS->Get();
if (aSrcShape.IsNull()) {
#ifdef DNAMING_DEB
#ifdef OCCT_DEBUG
cout<<"DNaming_TransformationDriver::LoadNamingDS: The result of the Transform operation is null"<<endl;
#endif
return;
@@ -350,7 +350,7 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
Standard_Boolean isPrimitive(Standard_False);
if(theSourceNS->Evolution() == TNaming_PRIMITIVE) isPrimitive = Standard_True;
const TDF_Label& aSrcLabel = theSourceNS->Label();
#ifdef MDTV_DEB_TRSF
#ifdef OCCT_DEBUG_TRSF
cout <<"TransformationDriver: ";
PrintE(aSrcLabel);
#endif