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:
@@ -41,7 +41,7 @@ Standard_Boolean AIS_AttributeFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
|
||||
if (Handle(AIS_InteractiveObject)::DownCast(anObj->Selectable()).IsNull()) return Standard_False;
|
||||
Standard_Boolean okstat = Standard_True;
|
||||
|
||||
//#ifndef DEB
|
||||
//#ifndef OCCT_DEBUG
|
||||
Handle(SelectMgr_SelectableObject) aSelectable = anObj->Selectable() ;
|
||||
if( hasC && ((Handle(AIS_InteractiveObject)&) aSelectable)->HasColor() )
|
||||
//#else
|
||||
@@ -49,7 +49,7 @@ Standard_Boolean AIS_AttributeFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
|
||||
//#endif
|
||||
okstat = (myCol == ((Handle(AIS_InteractiveObject)&) anObj)->Color());
|
||||
|
||||
//#ifndef DEB
|
||||
//#ifndef OCCT_DEBUG
|
||||
aSelectable = anObj->Selectable() ;
|
||||
if( hasW && ((Handle(AIS_InteractiveObject)&) aSelectable)->HasWidth() )
|
||||
//#else
|
||||
|
@@ -215,7 +215,7 @@ Standard_CString AIS_InteractiveContext::DomainOfMainViewer() const
|
||||
void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
|
||||
const Standard_Boolean OnlyFromNeutral) const
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"AIS_IC::DisplayedObjects"<<endl;
|
||||
#endif
|
||||
|
||||
@@ -235,7 +235,7 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
|
||||
}
|
||||
|
||||
//parse all local contexts...
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"\tFrom Neutral Point : "<<theMap.Extent()<<endl;
|
||||
Standard_Integer NbDisp;
|
||||
for(AIS_DataMapIteratorOfDataMapOfILC it1(myLocalContexts);it1.More();it1.Next()){
|
||||
@@ -1195,7 +1195,7 @@ void AIS_InteractiveContext::Redisplay(const AIS_KindOfInteractive KOI,
|
||||
Handle(AIS_InteractiveObject) IO = It.Key();
|
||||
// ENDCLE
|
||||
if(IO->Type()== KOI){
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
// Standard_Boolean good = (Sign==-1)? Standard_True :
|
||||
// ((IO->Signature()==Sign)? Standard_True:Standard_False);
|
||||
#endif
|
||||
@@ -1683,13 +1683,13 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
// // pour isg
|
||||
// if(anIObj->Type()==AIS_KOI_Datum && anIObj->Signature()==3){
|
||||
// Handle(AIS_Trihedron) Tr = *((Handle(AIS_Trihedron)*)&anIObj);
|
||||
@@ -1758,7 +1758,7 @@ void AIS_InteractiveContext::SetDeviationCoefficient(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ void AIS_InteractiveContext::SetHLRDeviationCoefficient(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1845,7 +1845,7 @@ void AIS_InteractiveContext::SetDeviationAngle(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1916,7 +1916,7 @@ void AIS_InteractiveContext::SetHLRAngleAndDeviation(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1958,7 +1958,7 @@ void AIS_InteractiveContext::SetHLRDeviationAngle(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1986,7 +1986,7 @@ void AIS_InteractiveContext::UnsetColor(const Handle(AIS_InteractiveObject)& anI
|
||||
anIObj->Update(ITI.Value(),Standard_False);
|
||||
NbDisp++;
|
||||
}
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
anIObj->SetRecomputeOk();
|
||||
@@ -2057,7 +2057,7 @@ void AIS_InteractiveContext::SetWidth(const Handle(AIS_InteractiveObject)& anIOb
|
||||
anIObj->Update(ITI.Value(),Standard_False);
|
||||
NbDisp++;
|
||||
}
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
anIObj->SetRecomputeOk();
|
||||
|
@@ -586,7 +586,7 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
|
||||
UpdateCurrentViewer();
|
||||
}
|
||||
else{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Nothing Done : Opened Local Context"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -626,7 +626,7 @@ AddOrRemoveCurrentObject(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
UpdateCurrentViewer();
|
||||
}
|
||||
else{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Nothing Done : Opened Local Context"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -887,7 +887,7 @@ void AIS_InteractiveContext::SetSelectedCurrent()
|
||||
{
|
||||
|
||||
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Not Yet Implemented"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -944,7 +944,7 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const TopoDS_Shape& aShap,
|
||||
const Standard_Boolean updateviewer)
|
||||
{
|
||||
if(!HasOpenedContext()) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" Attempt to remove a selected shape with no opened local context"<<endl;
|
||||
#endif
|
||||
return;
|
||||
@@ -963,7 +963,7 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const Handle(SelectMgr_EntityOw
|
||||
const Standard_Boolean updateviewer)
|
||||
{
|
||||
if(!HasOpenedContext()) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" Attempt to remove a selected ownr with no opened local context"<<endl;
|
||||
#endif
|
||||
return;
|
||||
|
@@ -81,7 +81,7 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
|
||||
|
||||
NewLocal->MainSelector()->UpdateConversion();
|
||||
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
|
||||
if(UseDisplayedObjects){
|
||||
cout<<"\t\tObjects from Neutral Point loaded"<<endl;
|
||||
@@ -106,7 +106,7 @@ void AIS_InteractiveContext::CloseLocalContext(const Standard_Integer Index,
|
||||
{
|
||||
|
||||
Standard_Boolean debugmode(Standard_False);
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
debugmode = Standard_True;
|
||||
#endif
|
||||
|
||||
|
@@ -146,7 +146,7 @@ void AIS_InteractiveObject::SetContext(const Handle(AIS_InteractiveContext)& aCt
|
||||
return;
|
||||
if (myDrawer.IsNull()) {
|
||||
myDrawer = new AIS_Drawer;
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "AIS_InteractiveObject::SetContext DRAWER NUL!" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@
|
||||
// purpose:
|
||||
//==================================================================
|
||||
//unused
|
||||
/*#ifdef DEB
|
||||
/*#ifdef OCCT_DEBUG
|
||||
static void FindLimits(const Adaptor3d_Curve& aCurve,
|
||||
const Standard_Real aLimit,
|
||||
gp_Pnt& P1,
|
||||
|
@@ -1504,7 +1504,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromIO
|
||||
|
||||
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
|
||||
if(Sel.IsNull()) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "
|
||||
<<mySelName<<" Nulle "<<endl;
|
||||
#endif
|
||||
@@ -1553,7 +1553,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromShape(const
|
||||
|
||||
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
|
||||
if(Sel.IsNull()) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "<<mySelName<<" Nulle "<<endl;
|
||||
#endif
|
||||
return EO;
|
||||
|
@@ -156,7 +156,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
||||
case 0:{
|
||||
try { OCC_CATCH_SIGNALS StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer); }
|
||||
catch (Standard_Failure) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "AIS_Shape::Compute() failed"<< endl;
|
||||
cout << "a Shape should be incorrect : No Compute can be maked on it "<< endl;
|
||||
#endif
|
||||
@@ -189,7 +189,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
||||
StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "AIS_Shape::Compute() in ShadingMode failed"<< endl;
|
||||
#endif
|
||||
StdPrs_WFShape::Add(aPrs,myshape,myDrawer);
|
||||
@@ -268,7 +268,7 @@ void AIS_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
Standard_Boolean isOwnHLRDeviationCoefficient = OwnHLRDeviationCoefficient(newcoeff,prevcoeff);
|
||||
if (((Abs (newangle - prevangle) > Precision::Angular()) && isOwnHLRDeviationAngle) ||
|
||||
((Abs (newcoeff - prevcoeff) > Precision::Confusion()) && isOwnHLRDeviationCoefficient)) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "AIS_Shape : compute"<<endl;
|
||||
cout << "newangle : " << newangle << " # de " << "prevangl : " << prevangle << " OU "<<endl;
|
||||
cout << "newcoeff : " << newcoeff << " # de " << "prevcoeff : " << prevcoeff << endl;
|
||||
@@ -290,7 +290,7 @@ void AIS_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"AIS_Shape::Compute(Proj) HLR Algorithm failed" << endl;
|
||||
#endif
|
||||
StdPrs_WFShape::Add(aPresentation,SH,myDrawer);
|
||||
|
@@ -78,7 +78,7 @@ void AIS_TexturedShape::SetTextureFileName (const TCollection_AsciiString& theTe
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout << "Texture " << theTextureFileName << " doesn't exist\n";
|
||||
std::cout << "Using Texture 0 instead ...\n";
|
||||
#endif
|
||||
@@ -344,7 +344,7 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP
|
||||
myAspect->SetTextureMap (myTexture);
|
||||
if (!myTexture->IsDone())
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout << "An error occurred while building texture\n";
|
||||
#endif
|
||||
myAspect->SetTextureMapOff();
|
||||
@@ -472,7 +472,7 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout << "AIS_TexturedShape::Compute() in ShadingMode failed \n";
|
||||
#endif
|
||||
StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
|
||||
|
@@ -25,7 +25,7 @@ Standard_Boolean AIS_TypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& anObj
|
||||
if(Handle(AIS_InteractiveObject)::DownCast(anObj->Selectable()).IsNull())
|
||||
return Standard_False;
|
||||
|
||||
//#ifndef DEB
|
||||
//#ifndef OCCT_DEBUG
|
||||
Handle(SelectMgr_SelectableObject) aSelectableObject = anObj->Selectable() ;
|
||||
return ((Handle(AIS_InteractiveObject)&) aSelectableObject)->Type()== myKind;
|
||||
//#else
|
||||
|
Reference in New Issue
Block a user