mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025266: Debug statements in the source are getting flushed on to the console
Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
This commit is contained in:
@@ -215,7 +215,7 @@ Standard_CString AIS_InteractiveContext::DomainOfMainViewer() const
|
||||
void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
|
||||
const Standard_Boolean OnlyFromNeutral) const
|
||||
{
|
||||
#ifdef DEBUG
|
||||
#ifdef AIS_DEB
|
||||
cout<<"AIS_IC::DisplayedObjects"<<endl;
|
||||
#endif
|
||||
|
||||
@@ -233,12 +233,12 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
|
||||
if(It.Value()->GraphicStatus()==AIS_DS_Displayed)
|
||||
theMap.Add(It.Key());
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef AIS_DEB
|
||||
cout<<"\tFrom Neutral Point : "<<theMap.Extent()<<endl;
|
||||
#endif
|
||||
|
||||
//parse all local contexts...
|
||||
#ifdef DEBUG
|
||||
#ifdef AIS_DEB
|
||||
Standard_Integer NbDisp;
|
||||
for(AIS_DataMapIteratorOfDataMapOfILC it1(myLocalContexts);it1.More();it1.Next()){
|
||||
const Handle(AIS_LocalContext)& LC = it1.Value();
|
||||
@@ -1670,7 +1670,7 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1745,7 +1745,7 @@ void AIS_InteractiveContext::SetDeviationCoefficient(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1789,7 +1789,7 @@ void AIS_InteractiveContext::SetHLRDeviationCoefficient(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1832,7 +1832,7 @@ void AIS_InteractiveContext::SetDeviationAngle(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1903,7 +1903,7 @@ void AIS_InteractiveContext::SetHLRAngleAndDeviation(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1945,7 +1945,7 @@ void AIS_InteractiveContext::SetHLRDeviationAngle(
|
||||
NbDisp++;
|
||||
}
|
||||
anIObj->SetRecomputeOk();
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1973,7 +1973,7 @@ void AIS_InteractiveContext::UnsetColor(const Handle(AIS_InteractiveObject)& anI
|
||||
anIObj->Update(ITI.Value(),Standard_False);
|
||||
NbDisp++;
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
anIObj->SetRecomputeOk();
|
||||
@@ -2044,7 +2044,7 @@ void AIS_InteractiveContext::SetWidth(const Handle(AIS_InteractiveObject)& anIOb
|
||||
anIObj->Update(ITI.Value(),Standard_False);
|
||||
NbDisp++;
|
||||
}
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
|
||||
#endif
|
||||
anIObj->SetRecomputeOk();
|
||||
|
@@ -653,7 +653,7 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
|
||||
UpdateCurrentViewer();
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"Nothing Done : Opened Local Context"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -693,7 +693,7 @@ AddOrRemoveCurrentObject(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
UpdateCurrentViewer();
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"Nothing Done : Opened Local Context"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -954,7 +954,7 @@ void AIS_InteractiveContext::SetSelectedCurrent()
|
||||
{
|
||||
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"Not Yet Implemented"<<endl;
|
||||
#endif
|
||||
}
|
||||
@@ -1011,7 +1011,7 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const TopoDS_Shape& aShap,
|
||||
const Standard_Boolean updateviewer)
|
||||
{
|
||||
if(!HasOpenedContext()) {
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<" Attempt to remove a selected shape with no opened local context"<<endl;
|
||||
#endif
|
||||
return;
|
||||
@@ -1030,7 +1030,7 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const Handle(SelectMgr_EntityOw
|
||||
const Standard_Boolean updateviewer)
|
||||
{
|
||||
if(!HasOpenedContext()) {
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
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 DEB
|
||||
#ifdef AIS_DEB
|
||||
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 DEB
|
||||
#ifdef AIS_DEB
|
||||
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 DEB
|
||||
#ifdef AIS_DEB
|
||||
cout << "AIS_InteractiveObject::SetContext DRAWER NUL!" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@@ -1431,7 +1431,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromIO
|
||||
|
||||
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
|
||||
if(Sel.IsNull()) {
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "
|
||||
<<mySelName<<" Nulle "<<endl;
|
||||
#endif
|
||||
@@ -1480,7 +1480,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromShape(const
|
||||
|
||||
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
|
||||
if(Sel.IsNull()) {
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "<<mySelName<<" Nulle "<<endl;
|
||||
#endif
|
||||
return EO;
|
||||
|
@@ -156,10 +156,10 @@ 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 DEB
|
||||
#ifdef AIS_DEB
|
||||
cout << "AIS_Shape::Compute() failed"<< endl;
|
||||
#endif
|
||||
cout << "a Shape should be incorrect : No Compute can be maked on it "<< endl;
|
||||
#endif
|
||||
// presentation of the bounding box is calculated
|
||||
// Compute(aPresentationManager,aPrs,2);
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
||||
StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
#ifdef AIS_DEB
|
||||
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 DEB
|
||||
#ifdef AIS_DEB
|
||||
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 DEB
|
||||
#ifdef AIS_DEB
|
||||
cout <<"AIS_Shape::Compute(Proj) HLR Algorithm failed" << endl;
|
||||
#endif
|
||||
StdPrs_WFShape::Add(aPresentation,SH,myDrawer);
|
||||
|
@@ -78,8 +78,10 @@ void AIS_TexturedShape::SetTextureFileName (const TCollection_AsciiString& theTe
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
std::cout << "Texture " << theTextureFileName << " doesn't exist\n";
|
||||
std::cout << "Using Texture 0 instead ...\n";
|
||||
#endif
|
||||
myPredefTexture = Graphic3d_NameOfTexture2D (0);
|
||||
}
|
||||
myTextureFile = "";
|
||||
@@ -342,7 +344,9 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP
|
||||
myAspect->SetTextureMap (myTexture);
|
||||
if (!myTexture->IsDone())
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
std::cout << "An error occurred while building texture\n";
|
||||
#endif
|
||||
myAspect->SetTextureMapOff();
|
||||
return;
|
||||
}
|
||||
@@ -468,7 +472,9 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
#ifdef AIS_DEB
|
||||
std::cout << "AIS_TexturedShape::Compute() in ShadingMode failed \n";
|
||||
#endif
|
||||
StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user