mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
This commit is contained in:
@@ -133,7 +133,7 @@ TopoDS_Shape DNaming::CurrentShape (const Standard_CString LabelName,
|
||||
Standard_Boolean Found = DDF::AddLabel (DF, LabelName, Label);
|
||||
if (!Found) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"no labels"<<endl;
|
||||
std::cout <<"no labels"<<std::endl;
|
||||
#endif
|
||||
return S;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ TopoDS_Shape DNaming::CurrentShape (const Standard_CString LabelName,
|
||||
S = TNaming_Tool::CurrentShape(NS);
|
||||
if (S.IsNull())
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"current shape from "<< LabelName <<" is deleted"<<endl;
|
||||
std::cout <<"current shape from "<< LabelName <<" is deleted"<<std::endl;
|
||||
#endif
|
||||
return S;
|
||||
}
|
||||
@@ -895,7 +895,7 @@ Standard_Boolean DNaming::ComputeSweepDir (const TopoDS_Shape& theShape,
|
||||
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(theShape));
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_CString s = aSurf->DynamicType()->Name();
|
||||
cout<<"Surface Dynamic TYPE = "<<s<<endl;
|
||||
std::cout<<"Surface Dynamic TYPE = "<<s<<std::endl;
|
||||
#endif
|
||||
if (aSurf->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
|
||||
aSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast (aSurf)->BasisSurface();
|
||||
|
@@ -286,7 +286,7 @@ static Standard_Integer Exploreshape (Draw_Interpretor& di, Standard_Integer n,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//TNaming::Print(NS->Evolution(),cout);
|
||||
//TNaming::Print(NS->Evolution(),std::cout);
|
||||
Standard_SStream aStream;
|
||||
TNaming::Print(NS->Evolution(),aStream);
|
||||
di << aStream << "\n";
|
||||
@@ -461,7 +461,7 @@ static Standard_Integer DNaming_ImportShape (Draw_Interpretor& di,
|
||||
DDF::ReturnLabel(di, L);
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_NewShape : Error" << endl;
|
||||
std::cout << "DNaming_NewShape : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
//=======================================================================
|
||||
|
@@ -109,7 +109,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(Handle(TFunction_Logboo
|
||||
aLab.FindAttribute(TNaming_NamedShape::GetID(), anObjectNS);
|
||||
if (anObjectNS.IsNull() || anObjectNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"BooleanOperationDriver:: Object is empty"<<endl;
|
||||
std::cout<<"BooleanOperationDriver:: Object is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -120,7 +120,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(Handle(TFunction_Logboo
|
||||
|
||||
if (aToolNS.IsNull() || aToolNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"BooleanOperationDriver:: Tool is empty"<<endl;
|
||||
std::cout<<"BooleanOperationDriver:: Tool is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -130,7 +130,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(Handle(TFunction_Logboo
|
||||
TopoDS_Shape anOBJECT = anObjectNS->Get();
|
||||
if (aTOOL.IsNull() || anOBJECT.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"BooleanOperationDriver:: Tool is null"<<endl;
|
||||
std::cout<<"BooleanOperationDriver:: Tool is null"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -267,7 +267,7 @@ void DNaming_BooleanOperationDriver::LoadNamingDS (const TDF_Label& theResultLab
|
||||
const TopoDS_Shape& ToolSh = MS.Shape2();
|
||||
if (ResSh.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"LoadFuseNamingDS: The result of the boolean operation is null"<<endl;
|
||||
std::cout<<"LoadFuseNamingDS: The result of the boolean operation is null"<<std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void DNaming_BooleanOperationDriver::LoadSectionNDS (const TDF_Label& theResultL
|
||||
const TopoDS_Shape& ToolSh = MS.Shape2();
|
||||
if (ResSh.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"LoadSectionNamingDS: The result of the boolean operation is null"<<endl;
|
||||
std::cout<<"LoadSectionNamingDS: The result of the boolean operation is null"<<std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@@ -83,7 +83,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(Handle(TFunction_Logbook)& theL
|
||||
Handle(TNaming_NamedShape) aNSAxis = DNaming::GetObjectValue(anObject);
|
||||
if (aNSAxis->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"CylinderDriver:: Axis is empty"<<endl;
|
||||
std::cout<<"CylinderDriver:: Axis is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_AXIS);
|
||||
return -1;
|
||||
@@ -91,7 +91,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(Handle(TFunction_Logbook)& theL
|
||||
TopoDS_Shape aTopoDSAxis = aNSAxis->Get();
|
||||
if (aTopoDSAxis.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"CylinderDriver:: Axis is null"<<endl;
|
||||
std::cout<<"CylinderDriver:: Axis is null"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_AXIS);
|
||||
return -1;
|
||||
@@ -99,7 +99,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(Handle(TFunction_Logbook)& theL
|
||||
// Creation of gp axis (gp_Ax2):
|
||||
if (aTopoDSAxis.ShapeType() != TopAbs_EDGE && aTopoDSAxis.ShapeType() != TopAbs_WIRE) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"CylinderDriver:: Wrong axis, ShapeType = " << aTopoDSAxis.ShapeType() <<endl;
|
||||
std::cout<<"CylinderDriver:: Wrong axis, ShapeType = " << aTopoDSAxis.ShapeType() <<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_AXIS);
|
||||
return -1;
|
||||
@@ -123,7 +123,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(Handle(TFunction_Logbook)& theL
|
||||
}
|
||||
} else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"CylinderDriver:: I don't support wires for a while"<<endl;
|
||||
std::cout<<"CylinderDriver:: I don't support wires for a while"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_AXIS);
|
||||
return -1;
|
||||
|
@@ -83,7 +83,7 @@ Standard_Integer DNaming_FilletDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
|
||||
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"FilletDriver:: Context is empty"<<endl;
|
||||
std::cout<<"FilletDriver:: Context is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -96,7 +96,7 @@ Standard_Integer DNaming_FilletDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
if(aRadius < Precision::Confusion()) {
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "FilletDriver:: Radius < Precision::Confusion" << endl;
|
||||
std::cout << "FilletDriver:: Radius < Precision::Confusion" << std::endl;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ Standard_Integer DNaming_FilletDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
Handle(TNaming_NamedShape) aPathNS = DNaming::GetObjectValue(aPathObj);
|
||||
if (aPathNS.IsNull() || aPathNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"FilletDriver:: Path is empty"<<endl;
|
||||
std::cout<<"FilletDriver:: Path is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -116,7 +116,7 @@ Standard_Integer DNaming_FilletDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
TopoDS_Shape aCONTEXT = aContextNS->Get();
|
||||
if (aPATH.IsNull() || aCONTEXT.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"FilletDriver:: Path or Context is null"<<endl;
|
||||
std::cout<<"FilletDriver:: Path or Context is null"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
|
@@ -120,16 +120,16 @@ Standard_Integer DNaming_Line3DDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
aShape1 = aNS1->Get();
|
||||
const gp_Pnt aDebPoint = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
|
||||
(void )aDebPoint;
|
||||
// cout << aCounter << " X = " << aDebPoint.X() << " Y = " << aDebPoint.Y() << " Z = " << aDebPoint.Z() << endl;
|
||||
// std::cout << aCounter << " X = " << aDebPoint.X() << " Y = " << aDebPoint.Y() << " Z = " << aDebPoint.Z() << std::endl;
|
||||
} else
|
||||
cout << " Line3DDriver:: NS1 is empty" << endl;
|
||||
std::cout << " Line3DDriver:: NS1 is empty" << std::endl;
|
||||
if(!aNS2->IsEmpty()) {
|
||||
aShape2 = aNS2->Get();
|
||||
const gp_Pnt aDebPoint = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
|
||||
(void )aDebPoint;
|
||||
// cout << aCounter+1 << " X = " << aDebPoint.X() << " Y = " << aDebPoint.Y() << " Z = " << aDebPoint.Z() << endl;
|
||||
// std::cout << aCounter+1 << " X = " << aDebPoint.X() << " Y = " << aDebPoint.Y() << " Z = " << aDebPoint.Z() << std::endl;
|
||||
} else
|
||||
cout << " Line3DDriver:: NS2 is empty" << endl;
|
||||
std::cout << " Line3DDriver:: NS2 is empty" << std::endl;
|
||||
#endif
|
||||
if(aNS1->IsEmpty() || aNS2->IsEmpty() ||
|
||||
aNS1->Get().IsNull() || aNS2->Get().IsNull()) {
|
||||
@@ -141,8 +141,8 @@ Standard_Integer DNaming_Line3DDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
#ifdef OCCT_DEBUG
|
||||
const gp_Pnt aDebPoint1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
|
||||
const gp_Pnt aDebPoint2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
|
||||
// cout << aCounter << " X = " << aDebPoint1.X() << " Y = " << aDebPoint1.Y() << " Z = " << aDebPoint1.Z() << endl;
|
||||
// cout << aCounter+1 << " X = " << aDebPoint2.X() << " Y = " << aDebPoint2.Y() << " Z = " << aDebPoint2.Z() << endl;
|
||||
// std::cout << aCounter << " X = " << aDebPoint1.X() << " Y = " << aDebPoint1.Y() << " Z = " << aDebPoint1.Z() << std::endl;
|
||||
// std::cout << aCounter+1 << " X = " << aDebPoint2.X() << " Y = " << aDebPoint2.Y() << " Z = " << aDebPoint2.Z() << std::endl;
|
||||
(void )aDebPoint1;
|
||||
(void )aDebPoint2;
|
||||
#endif
|
||||
|
@@ -198,7 +198,7 @@ static Handle(TFunction_Driver) GetDriver(const TCollection_AsciiString& name)
|
||||
else if(name == "Section")
|
||||
aDrv = new DNaming_BooleanOperationDriver();
|
||||
else
|
||||
cout << "the specified driver is not supported" <<endl;
|
||||
std::cout << "the specified driver is not supported" <<std::endl;
|
||||
return aDrv;
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -219,13 +219,13 @@ static Standard_Integer DNaming_AddDriver (Draw_Interpretor& /*theDI*/,
|
||||
if(!GetFuncGUID(theArg[i],drvGUID)) continue;
|
||||
aFunctionDrvTable->AddDriver(drvGUID, GetDriver(theArg[i]));
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_AddDriver : " << theArg[i] << " driver is added" <<endl;
|
||||
std::cout << "DNaming_AddDriver : " << theArg[i] << " driver is added" <<std::endl;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_AddDriver : Error" << endl;
|
||||
std::cout << "DNaming_AddDriver : Error" << std::endl;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ static Standard_Integer DNaming_AddBox (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, anObj->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_AddBox : Error" << endl;
|
||||
std::cout << "DNaming_AddBox : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ static Standard_Integer DNaming_BoxDX (Draw_Interpretor& theDI,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_BoxDX : Error" << endl;
|
||||
std::cout << "DNaming_BoxDX : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ static Standard_Integer DNaming_BoxDY (Draw_Interpretor& theDI,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_BoxDY : Error" << endl;
|
||||
std::cout << "DNaming_BoxDY : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ static Standard_Integer DNaming_BoxDZ (Draw_Interpretor& theDI,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_BoxDZ : Error" << endl;
|
||||
std::cout << "DNaming_BoxDZ : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(FatherLab, entry);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_SolveFlatFrom: Father label = " << entry << endl;
|
||||
std::cout << "DNaming_SolveFlatFrom: Father label = " << entry << std::endl;
|
||||
#endif
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(FatherLab);
|
||||
Standard_Boolean found(Standard_False);
|
||||
@@ -515,7 +515,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
|
||||
Handle(TFunction_Function) aFun;
|
||||
funLabel.FindAttribute(TFunction_Function::GetID(), aFun);
|
||||
if(aFun.IsNull()) {
|
||||
cout << "DNaming_SolveFlatFrom:: Null function is found!" << endl;
|
||||
std::cout << "DNaming_SolveFlatFrom:: Null function is found!" << std::endl;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@@ -525,21 +525,21 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
|
||||
logbook->Clear();
|
||||
Standard_Integer aRes = ComputeFunction(aFun, logbook);
|
||||
if(aRes != 0) {
|
||||
cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << endl;
|
||||
std::cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << std::endl;
|
||||
return 1;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"DNaming_SolveFlatFrom : function from label " << entry << " is recomputed" << endl;
|
||||
std::cout <<"DNaming_SolveFlatFrom : function from label " << entry << " is recomputed" << std::endl;
|
||||
#endif
|
||||
} catch (EXCEPTION) {
|
||||
cout <<"DNaming_SolveFlatFrom : Exception computing function at label " << entry << endl;
|
||||
std::cout <<"DNaming_SolveFlatFrom : Exception computing function at label " << entry << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
ERR:
|
||||
cout << "DNaming_SolveFlatFrom : Error" << endl;
|
||||
std::cout << "DNaming_SolveFlatFrom : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -558,18 +558,18 @@ static Standard_Integer DNaming_InitLogBook (Draw_Interpretor& /*theDI*/,
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(aDoc->Main());
|
||||
if(logbook->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_InitLogBook : is empty" <<endl;
|
||||
std::cout << "DNaming_InitLogBook : is empty" <<std::endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
logbook->Clear();
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_InitLogBook : cleaned" <<endl;
|
||||
std::cout << "DNaming_InitLogBook : cleaned" <<std::endl;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_InitLogBook : Error - No document ==> " <<theNb <<endl;
|
||||
std::cout << "DNaming_InitLogBook : Error - No document ==> " <<theNb <<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -587,20 +587,20 @@ static Standard_Integer DNaming_CheckLogBook (Draw_Interpretor& /*theDI*/,
|
||||
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(aDoc->Main());
|
||||
if(logbook->IsEmpty())
|
||||
cout << "DNaming_CheckLogBook : is empty" <<endl;
|
||||
std::cout << "DNaming_CheckLogBook : is empty" <<std::endl;
|
||||
else {
|
||||
const TDF_LabelMap& aMap = logbook->GetValid();
|
||||
TDF_MapIteratorOfLabelMap it(aMap);
|
||||
TCollection_AsciiString entry;
|
||||
cout << "DNaming_CheckLogBook : LogBook current state:" <<endl;
|
||||
std::cout << "DNaming_CheckLogBook : LogBook current state:" <<std::endl;
|
||||
for (;it.More();it.Next()) {
|
||||
TDF_Tool::Entry(it.Key(), entry);
|
||||
cout << entry <<endl;
|
||||
std::cout << entry <<std::endl;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_CheckLogBook : Error - No document ==> " <<theNb <<endl;
|
||||
std::cout << "DNaming_CheckLogBook : Error - No document ==> " <<theNb <<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -626,16 +626,16 @@ static Standard_Integer DNaming_ComputeFun (Draw_Interpretor& /*theDI*/,
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(funLabel);
|
||||
Standard_Integer aRes = ComputeFunction(aFun, logbook);
|
||||
if(aRes != 0) {
|
||||
cout << "DNaming_ComputeFun : No Driver or Driver failed" << endl;
|
||||
std::cout << "DNaming_ComputeFun : No Driver or Driver failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"DNaming_ComputeFun : function from label " << theArg[2] << " is recomputed" << endl;
|
||||
std::cout <<"DNaming_ComputeFun : function from label " << theArg[2] << " is recomputed" << std::endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_ComputeFun : Error" << endl;
|
||||
std::cout << "DNaming_ComputeFun : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
|
||||
Handle(TNaming_NamedShape) aCont = DNaming::GetObjectValue(aContext);
|
||||
#ifdef OCCT_DEBUG
|
||||
if(aCont.IsNull() || aCont->IsEmpty())
|
||||
cout <<"Wrong Context ..." <<endl;
|
||||
std::cout <<"Wrong Context ..." <<std::endl;
|
||||
#endif
|
||||
try{
|
||||
TopoDS_Shape aCONTEXT = aCont->Get();
|
||||
@@ -698,14 +698,14 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
|
||||
return 1;
|
||||
}
|
||||
catch (Standard_Failure const&) {
|
||||
cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
|
||||
std::cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<std::endl;
|
||||
}
|
||||
|
||||
if(!aCont.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(aCont->Label(), entry);
|
||||
cout << "ContextNS Label = " << entry <<endl;
|
||||
std::cout << "ContextNS Label = " << entry <<std::endl;
|
||||
#endif
|
||||
Handle(TFunction_Function) aCntFun;
|
||||
if(aCont->Label().Father().FindAttribute(TFunction_Function::GetID(), aCntFun)) { //Fun:2 ==> result
|
||||
@@ -723,7 +723,7 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
|
||||
}
|
||||
} //###
|
||||
}
|
||||
cout << "DNaming_AttachShape : Error" << endl;
|
||||
std::cout << "DNaming_AttachShape : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -766,7 +766,7 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
|
||||
Handle(TNaming_NamedShape) aCont = DNaming::GetObjectValue(aContext);
|
||||
|
||||
if(aCont.IsNull() || aCont->IsEmpty())
|
||||
cout <<"Wrong Context ..." <<endl;
|
||||
std::cout <<"Wrong Context ..." <<std::endl;
|
||||
else {
|
||||
TopoDS_Shape aCONTEXT = aCont->Get();
|
||||
try{
|
||||
@@ -775,7 +775,7 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
|
||||
return 1;
|
||||
}
|
||||
catch (Standard_Failure const&) {
|
||||
cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
|
||||
std::cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<std::endl;
|
||||
}
|
||||
|
||||
TDF_Reference::Set(aFun->Label().FindChild(FUNCTION_ARGUMENTS_LABEL).FindChild(ATTACH_ARG),
|
||||
@@ -788,7 +788,7 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
|
||||
}
|
||||
}
|
||||
}
|
||||
cout << "DNaming_XAttachShape : Error" << endl;
|
||||
std::cout << "DNaming_XAttachShape : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ static Standard_Integer DNaming_AddCylinder (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, anObj->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_AddCylinder : Error" << endl;
|
||||
std::cout << "DNaming_AddCylinder : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_CylRadius : Error" << endl;
|
||||
std::cout << "DNaming_CylRadius : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -895,7 +895,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DModel_AddFuse : Error" << endl;
|
||||
std::cout << "DModel_AddFuse : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DModel_AddCut : Error" << endl;
|
||||
std::cout << "DModel_AddCut : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DModel_AddComm : Error" << endl;
|
||||
std::cout << "DModel_AddComm : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@ static Standard_Integer DNaming_CylRad (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DModel_AddSection : Error" << endl;
|
||||
std::cout << "DModel_AddSection : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1007,7 +1007,7 @@ static Standard_Integer DNaming_AddFillet (Draw_Interpretor& theDI,
|
||||
const char** theArg)
|
||||
{
|
||||
if (theNb < 5) {
|
||||
cout<<"DNaming_AddFillet(): Wrong number of arguments"<<endl;
|
||||
std::cout<<"DNaming_AddFillet(): Wrong number of arguments"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1045,7 +1045,7 @@ static Standard_Integer DNaming_PTranslateDXYZ (Draw_Interpretor& di,
|
||||
{
|
||||
if (nb > 3) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "NB = " << nb <<endl;
|
||||
std::cout << "NB = " << nb <<std::endl;
|
||||
#endif
|
||||
Handle(TDocStd_Document) aDocument;
|
||||
Standard_CString aDocS(a[1]);
|
||||
@@ -1062,13 +1062,13 @@ static Standard_Integer DNaming_PTranslateDXYZ (Draw_Interpretor& di,
|
||||
|
||||
Standard_Real aDx=0., aDy=0., aDz=0.;
|
||||
aDx = Draw::Atof(a[3]);
|
||||
//cout << "DX = " << aDx<<endl;
|
||||
//std::cout << "DX = " << aDx<<std::endl;
|
||||
if(nb > 4) {
|
||||
aDy = Draw::Atof(a[4]);
|
||||
//cout << "DY = " << aDy<<endl;
|
||||
//std::cout << "DY = " << aDy<<std::endl;
|
||||
if(nb > 5) {
|
||||
aDz = Draw::Atof(a[5]);
|
||||
//cout << "DZ = " << aDz<<endl;
|
||||
//std::cout << "DZ = " << aDz<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1079,7 +1079,7 @@ static Standard_Integer DNaming_PTranslateDXYZ (Draw_Interpretor& di,
|
||||
DDF::ReturnLabel(di, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_Translate : Error" << endl;
|
||||
std::cout << "DNaming_Translate : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1092,7 +1092,7 @@ static Standard_Integer DNaming_PTranslateLine (Draw_Interpretor& di,
|
||||
{
|
||||
if (nb > 4) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "NB = " << nb <<endl;
|
||||
std::cout << "NB = " << nb <<std::endl;
|
||||
#endif
|
||||
Handle(TDocStd_Document) aDocument;
|
||||
Standard_CString aDocS(a[1]);
|
||||
@@ -1118,7 +1118,7 @@ static Standard_Integer DNaming_PTranslateLine (Draw_Interpretor& di,
|
||||
DDF::ReturnLabel(di, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_PTranslateAlongLine : Error" << endl;
|
||||
std::cout << "DNaming_PTranslateAlongLine : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1157,7 +1157,7 @@ static Standard_Integer DNaming_PRotateLine(Draw_Interpretor& di,
|
||||
DDF::ReturnLabel(di, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_PRotateRoundLine : Error" << endl;
|
||||
std::cout << "DNaming_PRotateRoundLine : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1190,7 +1190,7 @@ static Standard_Integer DNaming_PMirrorObject(Draw_Interpretor& di,
|
||||
DDF::ReturnLabel(di, aFun->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_PMirrorObject : Error" << endl;
|
||||
std::cout << "DNaming_PMirrorObject : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1202,7 +1202,7 @@ static Standard_Integer DNaming_AddPrism (Draw_Interpretor& theDI,
|
||||
const char** theArg)
|
||||
{
|
||||
if (theNb < 5 ) {
|
||||
cout<<"DNaming_AddPrism(): Wrong number of arguments"<<endl;
|
||||
std::cout<<"DNaming_AddPrism(): Wrong number of arguments"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
//
|
||||
@@ -1260,7 +1260,7 @@ static Standard_Integer DNaming_PrismHeight (Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
}
|
||||
cout << "DNaming_PrismHeight : Error" << endl;
|
||||
std::cout << "DNaming_PrismHeight : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1275,7 +1275,7 @@ static Standard_Integer DNaming_AddRevol (Draw_Interpretor& theDI,
|
||||
const char** theArg)
|
||||
{
|
||||
if (theNb < 4 ) {
|
||||
cout<<"DNaming_AddRevol(): Wrong number of arguments"<<endl;
|
||||
std::cout<<"DNaming_AddRevol(): Wrong number of arguments"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1352,7 +1352,7 @@ static Standard_Integer DNaming_RevolutionAngle (Draw_Interpretor& theDI,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_RevolutionAngle : Error" << endl;
|
||||
std::cout << "DNaming_RevolutionAngle : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1365,7 +1365,7 @@ static Standard_Integer DNaming_AddSphere (Draw_Interpretor& theDI,
|
||||
const char** theArg)
|
||||
{
|
||||
if (theNb != 4) {
|
||||
cout<<"DNaming_AddSphere(): Wrong number of arguments"<<endl;
|
||||
std::cout<<"DNaming_AddSphere(): Wrong number of arguments"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
Handle(TDocStd_Document) aDocument;
|
||||
@@ -1421,7 +1421,7 @@ static Standard_Integer DNaming_SphereRadius (Draw_Interpretor& theDI,
|
||||
}
|
||||
}
|
||||
|
||||
cout << "DNaming_SphRadius : Error" << endl;
|
||||
std::cout << "DNaming_SphRadius : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1459,7 +1459,7 @@ static Standard_Integer DNaming_AddPoint (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, anObj->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_AddPoint : Error" << endl;
|
||||
std::cout << "DNaming_AddPoint : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1504,7 +1504,7 @@ static Standard_Integer DNaming_AddPointRlt (Draw_Interpretor& theDI,
|
||||
DDF::ReturnLabel(theDI, anObj->Label());
|
||||
return 0;
|
||||
}
|
||||
cout << "DNaming_AddPoint : Error" << endl;
|
||||
std::cout << "DNaming_AddPoint : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1554,11 +1554,11 @@ static Standard_Integer DNaming_PntOffset (Draw_Interpretor& theDI,
|
||||
if(isDX || isDY || isDZ)
|
||||
DDF::ReturnLabel(theDI, objLabel);
|
||||
else
|
||||
cout <<"DNaming_PntOffset : Nothing changed" << endl;
|
||||
std::cout <<"DNaming_PntOffset : Nothing changed" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cout << "DNaming_PntOffset : Error" << endl;
|
||||
std::cout << "DNaming_PntOffset : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1572,7 +1572,7 @@ static Standard_Integer DNaming_Line3D (Draw_Interpretor& theDI,
|
||||
const char** theArg)
|
||||
{
|
||||
if (theNb < 5) {
|
||||
cout<<"DNaming_AddLine3D: Wrong number of arguments"<<endl;
|
||||
std::cout<<"DNaming_AddLine3D: Wrong number of arguments"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
Handle(TDocStd_Document) aDocument;
|
||||
@@ -1698,14 +1698,14 @@ static Standard_Boolean MakeSelection (const Handle(TDataStd_UAttribute)& Obj,
|
||||
if(!aSelector.Select(Selection, aContext, Geometry, KeepOrientation))
|
||||
return Standard_False;
|
||||
}catch (...) {
|
||||
cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
|
||||
std::cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<std::endl;
|
||||
}
|
||||
|
||||
if(!aNS.IsNull()) {
|
||||
|
||||
//TCollection_AsciiString entry;
|
||||
//TDF_Tool::Entry(aNS->Label(), entry);
|
||||
//cout << "ContextNS Label = " << entry <<endl;
|
||||
//std::cout << "ContextNS Label = " << entry <<std::endl;
|
||||
Handle(TFunction_Function) aCntFun;
|
||||
if(aNS->Label().Father().FindAttribute(TFunction_Function::GetID(), aCntFun)) { //Fun:2 ==> result
|
||||
// First argument of Selection function refers to father function (of context object)
|
||||
@@ -1756,14 +1756,14 @@ static Standard_Boolean MakeXSelection (const Handle(TDataStd_UAttribute)& Obj,
|
||||
if(!aSelector.Select(Selection, aContext, Geometry, KeepOrientation))
|
||||
return Standard_False;
|
||||
}catch (...) {
|
||||
cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<endl;
|
||||
std::cout << "EXCEPTION: SELECTION_IMPOSSIBLE" <<std::endl;
|
||||
}
|
||||
|
||||
if(!aNS.IsNull()) {
|
||||
|
||||
//TCollection_AsciiString entry;
|
||||
//TDF_Tool::Entry(aNS->Label(), entry);
|
||||
//cout << "ContextNS Label = " << entry <<endl;
|
||||
//std::cout << "ContextNS Label = " << entry <<std::endl;
|
||||
Handle(TFunction_Function) aCntFun;
|
||||
if(aNS->Label().Father().FindAttribute(TFunction_Function::GetID(), aCntFun)) { //Fun:2 ==> result
|
||||
// First argument of Selection function refers to father function (of context object)
|
||||
@@ -1915,7 +1915,7 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "First Selection function at " << entry <<endl;
|
||||
std::cout << "First Selection function at " << entry <<std::endl;
|
||||
#endif
|
||||
}
|
||||
Standard_Boolean isSelected (Standard_False);
|
||||
@@ -1929,11 +1929,11 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
cout << "%%%INFO:Error: ::TestSingleSelection failed :";
|
||||
cout << anException.GetMessageString() << endl;
|
||||
std::cout << "%%%INFO:Error: ::TestSingleSelection failed :";
|
||||
std::cout << anException.GetMessageString() << std::endl;
|
||||
}
|
||||
catch(...) {
|
||||
cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";
|
||||
std::cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";
|
||||
}
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(auxObj->Label(), entry);
|
||||
@@ -1967,14 +1967,14 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
|
||||
}
|
||||
if(aResult.Length()) {
|
||||
if(aResult.Search("Warning") == -1)
|
||||
cout << "Failed units: " << aResult << " at " << entry << endl;
|
||||
std::cout << "Failed units: " << aResult << " at " << entry << std::endl;
|
||||
else
|
||||
cout << aResult << " at " << entry << endl;
|
||||
std::cout << aResult << " at " << entry << std::endl;
|
||||
TDataStd_Name::Set(auxObj->Label(), aResult);
|
||||
}
|
||||
}
|
||||
if(aFailedList.Extent()) {
|
||||
cout << "Failed units are kept at: ";
|
||||
std::cout << "Failed units are kept at: ";
|
||||
TopTools_ListIteratorOfListOfShape it1(aFailedList);
|
||||
for(; it1.More(); it1.Next()) {
|
||||
const TDF_Label& aLabel = TDF_TagSource::NewChild(aDoc->Main());
|
||||
@@ -1983,7 +1983,7 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
|
||||
B.Generated(it1.Value());
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(aLabel, entry);
|
||||
cout << "\t" <<entry <<endl;
|
||||
std::cout << "\t" <<entry <<std::endl;
|
||||
}
|
||||
}
|
||||
if(!FirstAuxObj.IsNull())
|
||||
@@ -1992,7 +1992,7 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
|
||||
}
|
||||
}
|
||||
|
||||
cout << "DNaming_TestSingle : Error" << endl;
|
||||
std::cout << "DNaming_TestSingle : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2049,7 +2049,7 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
|
||||
#ifdef OCCT_DEBUG
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
|
||||
cout << "First Selection function at " << entry <<endl;
|
||||
std::cout << "First Selection function at " << entry <<std::endl;
|
||||
#endif
|
||||
}
|
||||
Standard_Boolean isSelected (Standard_False);
|
||||
@@ -2063,11 +2063,11 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
cout << "%%%INFO:Error: ::TestSingleSelection failed :";
|
||||
cout << anException.GetMessageString() << endl;
|
||||
std::cout << "%%%INFO:Error: ::TestSingleSelection failed :";
|
||||
std::cout << anException.GetMessageString() << std::endl;
|
||||
}
|
||||
catch(...) {
|
||||
cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";
|
||||
std::cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";
|
||||
}
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(auxObj->Label(), entry);
|
||||
@@ -2100,7 +2100,7 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
|
||||
aFailedList.Append(aCurShape);
|
||||
}
|
||||
if(aResult.Length())
|
||||
cout << "Failed units: " << aResult << endl;
|
||||
std::cout << "Failed units: " << aResult << std::endl;
|
||||
}
|
||||
|
||||
if(aFailedList.Extent()) {
|
||||
@@ -2118,7 +2118,7 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
|
||||
}
|
||||
}
|
||||
|
||||
cout << "DNaming_TestMultiple : Error" << endl;
|
||||
std::cout << "DNaming_TestMultiple : Error" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -89,7 +89,7 @@ Standard_Integer DNaming_PointDriver::Execute(Handle(TFunction_Logbook)& theLog)
|
||||
Handle(TNaming_NamedShape) aRefPntNS = DNaming::GetObjectValue(aRefPnt);
|
||||
if (aRefPntNS.IsNull() || aRefPntNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"PointDriver:: Ref Point is empty"<<endl;
|
||||
std::cout<<"PointDriver:: Ref Point is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
|
@@ -85,9 +85,9 @@ Standard_Boolean DNaming_PrismDriver::MustExecute(const Handle(TFunction_Logbook
|
||||
static void Write(const TopoDS_Shape& shape,
|
||||
const Standard_CString filename)
|
||||
{
|
||||
ofstream save;
|
||||
std::ofstream save;
|
||||
save.open(filename);
|
||||
save << "DBRep_DrawableShape" << endl << endl;
|
||||
save << "DBRep_DrawableShape" << std::endl << std::endl;
|
||||
if(!shape.IsNull()) BRepTools::Write(shape, save);
|
||||
save.close();
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ Standard_Integer DNaming_RevolutionDriver::Execute(Handle(TFunction_Logbook)& th
|
||||
}
|
||||
if(!anAxisOK) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"RevolutionDriver:: Axis is not correct"<<endl;
|
||||
std::cout<<"RevolutionDriver:: Axis is not correct"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -419,8 +419,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
if(MS.HasDegenerated())
|
||||
cout <<"mkRevol has degenerated" <<endl;
|
||||
cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
|
||||
std::cout <<"mkRevol has degenerated" <<std::endl;
|
||||
std::cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -436,8 +436,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
if(MS.HasDegenerated())
|
||||
cout <<"mkRevol has degenerated" <<endl;
|
||||
cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
|
||||
std::cout <<"mkRevol has degenerated" <<std::endl;
|
||||
std::cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -505,8 +505,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
if(MS.HasDegenerated())
|
||||
cout <<"mkRevol has degenerated" <<endl;
|
||||
cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
|
||||
std::cout <<"mkRevol has degenerated" <<std::endl;
|
||||
std::cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -521,8 +521,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
if(MS.HasDegenerated())
|
||||
cout <<"mkRevol has degenerated" <<endl;
|
||||
cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
|
||||
std::cout <<"mkRevol has degenerated" <<std::endl;
|
||||
std::cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -83,12 +83,12 @@ static void DumpNaming (const Handle(TNaming_Naming)& naming, Draw_Interpretor&
|
||||
{
|
||||
TCollection_AsciiString Entry;
|
||||
const TNaming_Name& AName = naming->GetName();
|
||||
//TNaming::Print(AName.Type(),cout);
|
||||
//TNaming::Print(AName.Type(),std::cout);
|
||||
Standard_SStream aStream1;
|
||||
TNaming::Print(AName.Type(),aStream1);
|
||||
di << aStream1;
|
||||
di << " ";
|
||||
//TopAbs::Print(AName.ShapeType(),cout);
|
||||
//TopAbs::Print(AName.ShapeType(),std::cout);
|
||||
Standard_SStream aStream2;
|
||||
TopAbs::Print(AName.ShapeType(),aStream2);
|
||||
di << aStream2;
|
||||
@@ -146,7 +146,7 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM
|
||||
#ifdef OCCT_DEBUG_SELN
|
||||
TCollection_AsciiString entr1;
|
||||
TDF_Tool::Entry(theLabel, entr1);
|
||||
cout<<"\tNaming Attribute at = "<< entr1 <<endl;
|
||||
std::cout<<"\tNaming Attribute at = "<< entr1 <<std::endl;
|
||||
#endif
|
||||
TDF_ChildIterator itr(theLabel, Standard_True);
|
||||
for ( ;itr.More(); itr.Next()) {
|
||||
@@ -157,14 +157,14 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM
|
||||
if(aNaming.IsNull()) continue;
|
||||
#ifdef OCCT_DEBUG_SELN
|
||||
TDF_Tool::Entry(aLabel, entr1);
|
||||
cout<<"\tNaming Attribute at = "<< entr1 <<endl;
|
||||
std::cout<<"\tNaming Attribute at = "<< entr1 <<std::endl;
|
||||
#endif
|
||||
TDF_Tool::OutReferences(aLabel,anExtMap);
|
||||
for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) {
|
||||
Handle(TDF_Attribute) att = attMItr.Key();
|
||||
#ifdef OCCT_DEBUG_SELN
|
||||
TDF_Tool::Entry(att->Label(), entr1);
|
||||
cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<endl;
|
||||
std::cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<std::endl;
|
||||
#endif
|
||||
if (att->Label().IsDifferent(aLabel) && !att->Label().IsDescendant(theLabel)) {
|
||||
theValidMap.Add(att->Label());
|
||||
@@ -195,20 +195,20 @@ static Standard_Integer DNaming_SolveSelection (Draw_Interpretor& di, Standard_I
|
||||
|
||||
Handle(TNaming_Naming) naming;
|
||||
if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {
|
||||
cout <<"DNaming__SolveSelection : not a selection" << endl;
|
||||
std::cout <<"DNaming__SolveSelection : not a selection" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
TDF_LabelMap aValidMap;
|
||||
if(!FillValidMap(L,aValidMap))
|
||||
di << "Valid map is empty\n";
|
||||
#ifdef OCCT_DEBUG_SELN
|
||||
cout<<"== Valid Label map =="<<endl;
|
||||
std::cout<<"== Valid Label map =="<<std::endl;
|
||||
for (TDF_MapIteratorOfLabelMap mapItr(aValidMap);mapItr.More(); mapItr.Next()) {
|
||||
const TDF_Label& aLab = mapItr.Key();
|
||||
|
||||
TCollection_AsciiString entr1;
|
||||
TDF_Tool::Entry(aLab, entr1);
|
||||
cout<<" Label = "<<entr1 <<endl;
|
||||
std::cout<<" Label = "<<entr1 <<std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -64,9 +64,9 @@ Standard_Boolean DNaming_SelectionDriver::MustExecute(const Handle(TFunction_Log
|
||||
static void Write(const TopoDS_Shape& shape,
|
||||
const Standard_CString filename)
|
||||
{
|
||||
ofstream save;
|
||||
std::ofstream save;
|
||||
save.open(filename);
|
||||
save << "DBRep_DrawableShape" << endl << endl;
|
||||
save << "DBRep_DrawableShape" << std::endl << std::endl;
|
||||
if(!shape.IsNull()) BRepTools::Write(shape, save);
|
||||
save.close();
|
||||
}
|
||||
@@ -109,13 +109,13 @@ Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& the
|
||||
TDF_LabelMap aMap;
|
||||
theLog->GetValid(aMap);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"#E_DNaming_SelectionDriver:: Valid Label Map:"<<endl;
|
||||
std::cout <<"#E_DNaming_SelectionDriver:: Valid Label Map:"<<std::endl;
|
||||
TDF_MapIteratorOfLabelMap anItr(aMap);
|
||||
for (; anItr.More(); anItr.Next()) {
|
||||
const TDF_Label& aLabel = anItr.Key();
|
||||
TCollection_AsciiString anEntry;
|
||||
TDF_Tool::Entry(aLabel, anEntry);
|
||||
cout << "\tLabel = " << anEntry << endl;
|
||||
std::cout << "\tLabel = " << anEntry << std::endl;
|
||||
}
|
||||
#endif
|
||||
//***
|
||||
@@ -131,20 +131,20 @@ Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& the
|
||||
theLog->SetValid(aRLabel);
|
||||
Handle(TNaming_NamedShape) aNS;
|
||||
if(!aRLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
|
||||
cout <<"%%%WARNING: DNaming_SelectionDriver::NamedShape is not found"<<endl;
|
||||
std::cout <<"%%%WARNING: DNaming_SelectionDriver::NamedShape is not found"<<std::endl;
|
||||
}
|
||||
else {
|
||||
if(aNS.IsNull()) {
|
||||
cout << "%%%WARNING: DNaming_SelectionDriver::NamedShape is NULL" <<endl;
|
||||
std::cout << "%%%WARNING: DNaming_SelectionDriver::NamedShape is NULL" <<std::endl;
|
||||
} else
|
||||
if(aNS->IsEmpty()) {
|
||||
cout << "%%%WARNING: DNaming_SelectionDriver::NamedShape is EMPTY on Label = ";
|
||||
aNS->Label().EntryDump(cout); cout << endl;
|
||||
std::cout << "%%%WARNING: DNaming_SelectionDriver::NamedShape is EMPTY on Label = ";
|
||||
aNS->Label().EntryDump(std::cout); std::cout << std::endl;
|
||||
|
||||
} else {
|
||||
#ifdef OCCT_DEBUG
|
||||
Write(aNS->Get(), "Selection_Result.brep");
|
||||
cout << "TShape = " << aNS->Get().TShape().get() <<endl;
|
||||
std::cout << "TShape = " << aNS->Get().TShape().get() <<std::endl;
|
||||
#endif
|
||||
if(aIsWire && aNS->Get().ShapeType()== TopAbs_COMPOUND) {
|
||||
TopoDS_Shape aWireShape;
|
||||
@@ -157,7 +157,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& the
|
||||
aFunction->SetFailure(DONE);
|
||||
} else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"%%%WARNING: DNaming_SelectionDriver::Execute: The Shape after solving changed type = "<<aNS->Get().ShapeType()<< endl;
|
||||
std::cout <<"%%%WARNING: DNaming_SelectionDriver::Execute: The Shape after solving changed type = "<<aNS->Get().ShapeType()<< std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(DONE);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& the
|
||||
}
|
||||
else {
|
||||
aFunction->SetFailure(NOTDONE);
|
||||
cout << "%%%WARNING: DNaming_SelectionDriver::Execute: Selection is Not solved !!!" << endl;
|
||||
std::cout << "%%%WARNING: DNaming_SelectionDriver::Execute: Selection is Not solved !!!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -82,7 +82,7 @@ Standard_Integer DNaming_SphereDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
Handle(TNaming_NamedShape) aNSCnt = DNaming::GetObjectValue(anObject);
|
||||
if (aNSCnt.IsNull() || aNSCnt->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"SphereDriver:: Center point is null or empty"<<endl;
|
||||
std::cout<<"SphereDriver:: Center point is null or empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
@@ -99,7 +99,7 @@ Standard_Integer DNaming_SphereDriver::Execute(Handle(TFunction_Logbook)& theLog
|
||||
TopoDS_Shape aCntShape = aNSCnt->Get();
|
||||
if(aCntShape.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"SphereDriver:: Center point is null"<<endl;
|
||||
std::cout<<"SphereDriver:: Center point is null"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_ARGUMENT);
|
||||
return -1;
|
||||
|
@@ -74,7 +74,7 @@ void PrintE(const TDF_Label& label)
|
||||
{
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(label, entry);
|
||||
cout << "LabelEntry = "<< entry << endl;
|
||||
std::cout << "LabelEntry = "<< entry << std::endl;
|
||||
}
|
||||
#endif
|
||||
//=======================================================================
|
||||
@@ -118,7 +118,7 @@ Standard_Integer DNaming_TransformationDriver::Execute(Handle(TFunction_Logbook)
|
||||
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
|
||||
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"TransformationDriver:: Context is empty"<<endl;
|
||||
std::cout<<"TransformationDriver:: Context is empty"<<std::endl;
|
||||
#endif
|
||||
aFunction->SetFailure(WRONG_CONTEXT);
|
||||
return -1;
|
||||
@@ -349,7 +349,7 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
|
||||
const TopoDS_Shape& aSrcShape = theSourceNS->Get();
|
||||
if (aSrcShape.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"DNaming_TransformationDriver::LoadNamingDS: The result of the Transform operation is null"<<endl;
|
||||
std::cout<<"DNaming_TransformationDriver::LoadNamingDS: The result of the Transform operation is null"<<std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
|
||||
if(theSourceNS->Evolution() == TNaming_PRIMITIVE) isPrimitive = Standard_True;
|
||||
const TDF_Label& aSrcLabel = theSourceNS->Label();
|
||||
#ifdef OCCT_DEBUG_TRSF
|
||||
cout <<"TransformationDriver: ";
|
||||
std::cout <<"TransformationDriver: ";
|
||||
PrintE(aSrcLabel);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user