1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
tiv
2019-08-02 10:32:16 +03:00
committed by bugmaster
parent 3977d18aca
commit 0423218095
972 changed files with 8554 additions and 8550 deletions

View File

@@ -222,7 +222,7 @@ static Standard_Integer deform(Draw_Interpretor& di,Standard_Integer n,const cha
// TopoDS_Shape S = DBRep::Get(a[i]);
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull()) {
//cout << a[2] << " is not a valid shape" << endl;
//std::cout << a[2] << " is not a valid shape" << std::endl;
di << a[2] << " is not a valid shape\n";
}
else {
@@ -268,9 +268,9 @@ static Standard_Integer tcopy(Draw_Interpretor& di,Standard_Integer n,const char
}
if (n < 3 || (n - iFirst) % 2) {
cout << "Use: " << a[0] << " [-n(ogeom)] [-m(esh)] shape1 copy1 [shape2 copy2 [...]]" << endl;
cout << "Option -n forbids copying of geometry (it will be shared)" << endl;
cout << "Option -m forces copying of mesh (disabled by default)" << endl;
std::cout << "Use: " << a[0] << " [-n(ogeom)] [-m(esh)] shape1 copy1 [shape2 copy2 [...]]" << std::endl;
std::cout << "Option -n forbids copying of geometry (it will be shared)" << std::endl;
std::cout << "Option -m forces copying of mesh (disabled by default)" << std::endl;
return 1;
}
@@ -297,7 +297,7 @@ static Standard_Integer nurbsconvert(Draw_Interpretor& di,Standard_Integer n,con
for (Standard_Integer i=0; i<(n-1)/2; i++) {
TopoDS_Shape S = DBRep::Get(a[2*i+2]);
if (S.IsNull()) {
//cout << a[2*i+2] << " is not a valid shape" << endl;
//std::cout << a[2*i+2] << " is not a valid shape" << std::endl;
di << a[2*i+2] << " is not a valid shape\n";
}
else {
@@ -899,7 +899,7 @@ static Standard_Integer findplane(Draw_Interpretor& di,Standard_Integer n,const
BRepBuilderAPI_FindPlane a_plane_finder(S,
tolerance) ;
if (a_plane_finder.Found()) {
//cout << " a plane is found " ;
//std::cout << " a plane is found " ;
di << " a plane is found \n";
const Handle(Geom_Geometry)& aSurf = a_plane_finder.Plane(); // to avoid ambiguity
DrawTrSurf::Set(a[2],aSurf) ;
@@ -916,7 +916,7 @@ static Standard_Integer precision(Draw_Interpretor& di,Standard_Integer n,const
n--;
if ( n == 0) {
//cout << " Current Precision = " << BRepBuilderAPI::Precision() << endl;
//std::cout << " Current Precision = " << BRepBuilderAPI::Precision() << std::endl;
di << " Current Precision = " << BRepBuilderAPI::Precision() << "\n";
}
else {
@@ -941,7 +941,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar
const char *id1 = a[1];
TopoDS_Shape TheShape1 = DBRep::Get(id1);
//cout << "Pick positions with button "<<endl;
//std::cout << "Pick positions with button "<<std::endl;
di << "Pick positions with button \n";
Standard_Integer id,X,Y,b;
gp_Trsf T;
@@ -963,7 +963,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar
Inter.Perform(Axe,-RealLast(),RealLast());
//cout<<"\n --> ";
//std::cout<<"\n --> ";
di <<"\n --> ";
if(Inter.NbPnt()) {
for(Standard_Integer i=1; i<=Inter.NbPnt(); i++) {
@@ -974,7 +974,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar
ExF.Next(),numface++) {
TopoDS_Face Face=TopoDS::Face(ExF.Current());
if(Face.IsEqual(Inter.Face(i))) {
//cout<<" "<<a[1]<<"_"<<numface;
//std::cout<<" "<<a[1]<<"_"<<numface;
di<<" "<<a[1]<<"_"<<numface;
continue;
}
@@ -982,7 +982,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar
const gp_Pnt& P = Inter.Pnt(i);
Standard_Real PMin = Inter.WParameter(i);
if(details) {
//cout<<" w:"<<PMin<<endl;
//std::cout<<" w:"<<PMin<<std::endl;
di<<" w:"<<PMin<< "\n";
}
if(Inter.Transition(i) == IntCurveSurface_In) {
@@ -1009,7 +1009,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar
}
}
}
//cout<<endl;
//std::cout<<std::endl;
di << "\n";
return(0);
}
@@ -1071,10 +1071,10 @@ static Standard_Integer maxtolerance(Draw_Interpretor& theCommands,
sss << "\n## Tolerances on the shape " << a[1] << " (nbFaces:" << nbF
<< " nbEdges:" << nbE << " nbVtx:" << nbV << ")\n" ;
sss.precision(5);
sss.setf(ios::scientific);
if(TmF<=TMF) sss << "\n Face : Min " << setw(8) << TmF <<" Max " << setw(8) << TMF << " \n ";
if(TmE<=TME) sss << "\n Edge : Min " << setw(8) << TmE <<" Max " << setw(8) << TME << " \n ";
if(TmV<=TMV) sss << "\n Vertex : Min " << setw(8) << TmV <<" Max " << setw(8) << TMV << " \n ";
sss.setf(std::ios::scientific);
if(TmF<=TMF) sss << "\n Face : Min " << std::setw(8) << TmF <<" Max " << std::setw(8) << TMF << " \n ";
if(TmE<=TME) sss << "\n Edge : Min " << std::setw(8) << TmE <<" Max " << std::setw(8) << TME << " \n ";
if(TmV<=TMV) sss << "\n Vertex : Min " << std::setw(8) << TmV <<" Max " << std::setw(8) << TMV << " \n ";
theCommands << sss;
return 0;
@@ -1082,7 +1082,7 @@ static Standard_Integer maxtolerance(Draw_Interpretor& theCommands,
static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char** ) {
//cout << "Pick positions with button "<<endl;
//std::cout << "Pick positions with button "<<std::endl;
di << "Pick positions with button \n";
Standard_Integer id,X,Y,b;
@@ -1133,16 +1133,16 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char*
Handle(Draw_Segment3D) d = new Draw_Segment3D(P1,PP1,Draw_blanc);
dout << d;
dout.Flush();
//cout<<"\nttran "<<PP1.X()-P1.X()<<" "<<PP1.Y()-P1.Y()<<" "<<PP1.Z()-P1.Z()<<endl;
//std::cout<<"\nttran "<<PP1.X()-P1.X()<<" "<<PP1.Y()-P1.Y()<<" "<<PP1.Z()-P1.Z()<<std::endl;
di <<"\nttran "<<PP1.X()-P1.X()<<" "<<PP1.Y()-P1.Y()<<" "<<PP1.Z()-P1.Z()<< "\n";
static Standard_Integer nboxvecdp=0;
//cout<<"\nbox b"<<++nboxvecdp<<" "<<Min(P1.X(),PP1.X())<<" "<<Min(P1.Y(),PP1.Y())<<" "<<Min(PP1.Z(),P1.Z());
//cout<<" "<<Abs(PP1.X()-P1.X())<<" "<<Abs(PP1.Y()-P1.Y())<<" "<<Abs(PP1.Z()-P1.Z())<<endl;
//std::cout<<"\nbox b"<<++nboxvecdp<<" "<<Min(P1.X(),PP1.X())<<" "<<Min(P1.Y(),PP1.Y())<<" "<<Min(PP1.Z(),P1.Z());
//std::cout<<" "<<Abs(PP1.X()-P1.X())<<" "<<Abs(PP1.Y()-P1.Y())<<" "<<Abs(PP1.Z()-P1.Z())<<std::endl;
//cout<<"\nDistance :"<<sqrt( (PP1.X()-P1.X())*(PP1.X()-P1.X())
//std::cout<<"\nDistance :"<<sqrt( (PP1.X()-P1.X())*(PP1.X()-P1.X())
// +(PP1.Y()-P1.Y())*(PP1.Y()-P1.Y())
// +(PP1.Z()-P1.Z())*(PP1.Z()-P1.Z()))<<endl;
// +(PP1.Z()-P1.Z())*(PP1.Z()-P1.Z()))<<std::endl;
di <<"\nbox b"<<++nboxvecdp<<" "<<Min(P1.X(),PP1.X())<<" "<<Min(P1.Y(),PP1.Y())<<" "<<Min(PP1.Z(),P1.Z());
di <<" "<<Abs(PP1.X()-P1.X())<<" "<<Abs(PP1.Y()-P1.Y())<<" "<<Abs(PP1.Z()-P1.Z())<< "\n";
@@ -1220,7 +1220,7 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char*
TopTools_ListOfShape Wire;
Standard_Boolean IsWire=OrtProj.BuildWire(Wire);
if (IsWire) {
//cout << " BuildWire OK " << endl;
//std::cout << " BuildWire OK " << std::endl;
di << " BuildWire OK \n";
}
DBRep::Set(a[1], OrtProj.Shape());

View File

@@ -76,7 +76,7 @@ static Standard_Integer chamf_throat_with_penetration(Draw_Interpretor& di,
// compute the chamfer and display the result
if (aMCh.NbContours() == 0 )
{
//cout<<"No suitable edges to chamfer"<<endl;
//std::cout<<"No suitable edges to chamfer"<<std::endl;
di<<"No suitable edges to chamfer\n";
return 1;
}
@@ -87,7 +87,7 @@ static Standard_Integer chamf_throat_with_penetration(Draw_Interpretor& di,
return 0;
}
else {
//cout<<"compute of chamfer failed"<<endl;
//std::cout<<"compute of chamfer failed"<<std::endl;
di<<"compute of chamfer failed\n";
return 1;
}
@@ -132,7 +132,7 @@ static Standard_Integer chamf_throat(Draw_Interpretor& di,
// compute the chamfer and display the result
if (aMCh.NbContours() == 0 )
{
//cout<<"No suitable edges to chamfer"<<endl;
//std::cout<<"No suitable edges to chamfer"<<std::endl;
di<<"No suitable edges to chamfer\n";
return 1;
}
@@ -143,7 +143,7 @@ static Standard_Integer chamf_throat(Draw_Interpretor& di,
return 0;
}
else {
//cout<<"compute of chamfer failed"<<endl;
//std::cout<<"compute of chamfer failed"<<std::endl;
di<<"compute of chamfer failed\n";
return 1;
}
@@ -235,7 +235,7 @@ static Standard_Integer chamfer(Draw_Interpretor& di,
// compute the chamfer and display the result
if (aMCh.NbContours() == 0 )
{
//cout<<"No suitable edges to chamfer"<<endl;
//std::cout<<"No suitable edges to chamfer"<<std::endl;
di<<"No suitable edges to chamfer\n";
return 1;
}
@@ -246,7 +246,7 @@ static Standard_Integer chamfer(Draw_Interpretor& di,
return 0;
}
else {
//cout<<"compute of chamfer failed"<<endl;
//std::cout<<"compute of chamfer failed"<<std::endl;
di<<"compute of chamfer failed\n";
return 1;
}

View File

@@ -257,7 +257,7 @@ static Standard_Integer computetolerance(Draw_Interpretor& di,
Standard_Integer narg, const char** a)
{
if (narg < 2) {
//cout << "Usage: computetolerance shape" << endl;
//std::cout << "Usage: computetolerance shape" << std::endl;
di << "Usage: computetolerance shape\n";
return 1;
}
@@ -266,7 +266,7 @@ static Standard_Integer computetolerance(Draw_Interpretor& di,
if (S.ShapeType() == TopAbs_EDGE) {
BRepCheck_Edge bce(TopoDS::Edge(S));
tol=bce.Tolerance();
//cout<< "Tolerance de " << (void*) &(*S.TShape()) << " : " << tol << endl;
//std::cout<< "Tolerance de " << (void*) &(*S.TShape()) << " : " << tol << std::endl;
Standard_SStream aSStream1;
aSStream1<< "Tolerance de " << (void*) &(*S.TShape()) << " : " << tol << "\n";
di << aSStream1;
@@ -278,13 +278,13 @@ static Standard_Integer computetolerance(Draw_Interpretor& di,
if (theEdges.Add(exp.Current())) {
BRepCheck_Edge bce(TopoDS::Edge(exp.Current()));
tol=bce.Tolerance();
//cout<< "Tolerance de " << (void*) &(*exp.Current().TShape()) << " : " << tol << "\n";
//std::cout<< "Tolerance de " << (void*) &(*exp.Current().TShape()) << " : " << tol << "\n";
Standard_SStream aSStream2;
aSStream2<< "Tolerance de " << (void*) &(*exp.Current().TShape()) << " : " << tol << "\n";
di << aSStream2;
}
}
//cout << endl;
//std::cout << std::endl;
di << "\n";
}
return 0;
@@ -323,7 +323,7 @@ static Standard_Integer checksection(Draw_Interpretor& di,
if (!theVertices.Add(exp.Current()))
theVertices.Remove(exp.Current());
}
//cout << " nb alone Vertices : " << theVertices.Extent() << endl;
//std::cout << " nb alone Vertices : " << theVertices.Extent() << std::endl;
di << " nb alone Vertices : " << theVertices.Extent() << "\n";
if (aCompareValue >= 0)
@@ -346,10 +346,10 @@ static Standard_Integer checksection(Draw_Interpretor& di,
ipp++;
Sprintf(Name,"alone_%d",ipp);
DBRep::Set(Name, itvx.Key());
//cout << Name << " " ;
//std::cout << Name << " " ;
di << Name << " " ;
}
//cout << endl;
//std::cout << std::endl;
di << "\n";
return 0;
}
@@ -367,13 +367,13 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
if (narg==2) {
Standard_Integer bcrtrace=Draw::Atoi(a[narg-1]);
bcrtrace=BRepCheck_Trace(bcrtrace);
//cout << "BRepCheck_Trace : " << bcrtrace << endl;
//std::cout << "BRepCheck_Trace : " << bcrtrace << std::endl;
di << "BRepCheck_Trace : " << bcrtrace << "\n";
//cout << syntaxe << endl;
//std::cout << syntaxe << std::endl;
di << syntaxe << "\n";
return 0;
}
//cout << syntaxe << endl;
//std::cout << syntaxe << std::endl;
di << syntaxe << "\n";
return 1;
}
@@ -384,7 +384,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
TopoDS_Shape resu = DBRep::Get(a[narg-1]);
if (resu.IsNull()) {
if (narg < 4) {
//cout << syntaxe << endl;
//std::cout << syntaxe << std::endl;
di << syntaxe << "\n";
return 1;
}
@@ -393,7 +393,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
lastArg=narg-3;
if (resu.IsNull()) {
if (narg < 5) {
//cout << syntaxe << endl;
//std::cout << syntaxe << std::endl;
di << syntaxe << "\n";
return 1;
}
@@ -402,7 +402,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
resu = DBRep::Get(a[narg-3]);
lastArg=narg-4;
if (resu.IsNull()) {
//cout << syntaxe << endl;
//std::cout << syntaxe << std::endl;
di << syntaxe << "\n";
return 1;
}
@@ -415,10 +415,10 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
}
if (BRepAlgo::IsValid(lesArgs, resu, closedSolid, geomCtrl)) {
//cout << "Difference is Valid." << endl;
//std::cout << "Difference is Valid." << std::endl;
di << "Difference is Valid.\n";
} else {
//cout << "error : Difference is Not Valid !" << endl;
//std::cout << "error : Difference is Not Valid !" << std::endl;
di << "error : Difference is Not Valid !\n";
}
@@ -444,7 +444,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
// TopoDS_Shape S = DBRep::Get(a[1]);
// if (S.IsNull()) {
// cout<<"not a topological shape"<<endl;
// std::cout<<"not a topological shape"<<std::endl;
// return 1;
// }
@@ -464,11 +464,11 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
// theMap.Clear();
// if (doprint) {
// Print(cout,ana,S);
// cout<<"\n";
// std::cout<<"\n";
// theMap.Clear();
// if (nbfaulty !=0)
// cout<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
// cout<<endl;
// std::cout<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
// std::cout<<std::endl;
// }
// else {
// theCommands<<"This shape has faulty shapes";
@@ -496,15 +496,15 @@ void ContextualDump(Draw_Interpretor& theCommands,
Standard_SStream aSStream;
Print(aSStream, theAna, theShape);
theCommands << aSStream;
//cout<<"\n";
//std::cout<<"\n";
theCommands<<"\n";
theMap.Clear();
if (nbfaulty !=0)
theCommands<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
//cout<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
//std::cout<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
//cout<<endl;
//std::cout<<std::endl;
theCommands<<"\n";
}
@@ -638,10 +638,10 @@ void StructuralDump(Draw_Interpretor& theCommands,
const TopoDS_Shape &theShape)
{
Standard_Integer i;
//cout << "StructuralDump" << endl;
//cout << " -- The Shape " << ShName << " has problems :"<<endl;
//cout<<" Check Count"<<endl;
//cout<<" ------------------------------------------------"<<endl;
//std::cout << "StructuralDump" << std::endl;
//std::cout << " -- The Shape " << ShName << " has problems :"<<std::endl;
//std::cout<<" Check Count"<<std::endl;
//std::cout<<" ------------------------------------------------"<<std::endl;
theCommands << " -- The Shape " << ShName << " has problems :\n";
theCommands<<" Check Count\n";
theCommands<<" ------------------------------------------------\n";
@@ -835,7 +835,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_v",Pref);
DBRep::Set(aName,comp);
//cout<<"VERTEX : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"VERTEX : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"VERTEX : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -850,7 +850,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_e",Pref);
DBRep::Set(aName,comp);
//cout<<"EDGE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"EDGE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"EDGE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -865,7 +865,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_w",Pref);
DBRep::Set(aName,comp);
//cout<<"WIRE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"WIRE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"WIRE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -880,7 +880,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_f",Pref);
DBRep::Set(aName,comp);
//cout<<"FACE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"FACE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"FACE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -895,7 +895,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_s",Pref);
DBRep::Set(aName,comp);
//cout<<"SHELL : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"SHELL : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"SHELL : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -910,7 +910,7 @@ void StructuralDump(Draw_Interpretor& theCommands,
char aName[20];
Sprintf(aName,"%s_o",Pref);
DBRep::Set(aName,comp);
//cout<<"SOLID : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
//std::cout<<"SOLID : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<std::endl;
if (nb > 9)
theCommands<<"SOLID : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
@@ -927,15 +927,15 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
Standard_Integer narg, const char** a)
{
if (narg == 1) {
//cout << endl;
//cout << "Usage : checkshape [-top] shape [result] [-short]" << endl;
//cout << endl;
//cout << "Where :" << endl;
//cout << " -top - check topology only." << endl;
//cout << " shape - the name of the shape to test." << endl;
//cout << " result - the prefix of the output shape names. If it is used, structural" << endl;
//cout << " output style will be used. Otherwise - contextual one." << endl;
//cout << " -short - short description of check." << endl;
//std::cout << std::endl;
//std::cout << "Usage : checkshape [-top] shape [result] [-short]" << std::endl;
//std::cout << std::endl;
//std::cout << "Where :" << std::endl;
//std::cout << " -top - check topology only." << std::endl;
//std::cout << " shape - the name of the shape to test." << std::endl;
//std::cout << " result - the prefix of the output shape names. If it is used, structural" << std::endl;
//std::cout << " output style will be used. Otherwise - contextual one." << std::endl;
//std::cout << " -short - short description of check." << std::endl;
theCommands << "\n";
theCommands << "Usage : checkshape [-top] shape [result] [-short]\n";
theCommands << "\n";
@@ -950,8 +950,8 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
}
if (narg > 5) {
//cout << "Invalid number of args!!!" << endl;
//cout << "No args to have help." << endl;
//std::cout << "Invalid number of args!!!" << std::endl;
//std::cout << "No args to have help." << std::endl;
theCommands << "Invalid number of args!!!\n";
theCommands << "No args to have help.\n";
@@ -967,8 +967,8 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
}
if (aCurInd > narg - 1) {
//cout << "Invalid number of args!!!" << endl;
//cout << "No args to have help." << endl;
//std::cout << "Invalid number of args!!!" << std::endl;
//std::cout << "No args to have help." << std::endl;
theCommands << "Invalid number of args!!!\n";
theCommands << "No args to have help.\n";
@@ -979,7 +979,7 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
TopoDS_Shape aShape = DBRep::Get(aShapeName);
if (aShape.IsNull()) {
//cout << a[aCurInd] << " is not a topological shape!!!" << endl;
//std::cout << a[aCurInd] << " is not a topological shape!!!" << std::endl;
theCommands << a[aCurInd] << " is not a topological shape!!!\n";
return 1;
@@ -997,8 +997,8 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
}
if (aCurInd < aBackInd - 1) {
//cout << "Invalid number of args!!!" << endl;
//cout << "No args to have help." << endl;
//std::cout << "Invalid number of args!!!" << std::endl;
//std::cout << "No args to have help." << std::endl;
theCommands << "Invalid number of args!!!\n";
theCommands << "No args to have help.\n";
@@ -1170,12 +1170,12 @@ static Standard_Integer shapeG1continuity (Draw_Interpretor& di, Standard_Intege
}
while ((nb<nbeval)&& isdone );
//if (!isdone) { cout<<" Problem in computation "<<endl; return 1;}
//if (!isdone) { std::cout<<" Problem in computation "<<std::endl; return 1;}
//if (ISG1)
// {cout<<" the continuity is G1 "<<endl;}
//else { cout<<" the continuity is not G1 "<<endl;}
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
//cout<<"MaxG1Angle:"<< MaxG1Angle << endl;
// {std::cout<<" the continuity is G1 "<<std::endl;}
//else { std::cout<<" the continuity is not G1 "<<std::endl;}
//std::cout<<"MaxG0Value :"<< MaxG0Value << std::endl;
//std::cout<<"MaxG1Angle:"<< MaxG1Angle << std::endl;
if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG1)
{di<<" the continuity is G1 \n";}
@@ -1293,12 +1293,12 @@ static Standard_Integer shapeG0continuity (Draw_Interpretor& di, Standard_Intege
}
while ((nb<nbeval)&& isdone );
//f (!isdone) { cout<<" Problem in computation "<<endl; return 1;}
//f (!isdone) { std::cout<<" Problem in computation "<<std::endl; return 1;}
//if (ISG0)
// {cout<<" the continuity is G0 "<<endl;}
// {std::cout<<" the continuity is G0 "<<std::endl;}
//else { cout<<" the continuity is not G0 "<<endl;}
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
//else { std::cout<<" the continuity is not G0 "<<std::endl;}
//std::cout<<"MaxG0Value :"<< MaxG0Value << std::endl;
if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG0)
{di<<" the continuity is G0 \n";}
@@ -1432,13 +1432,13 @@ static Standard_Integer shapeG2continuity (Draw_Interpretor& di, Standard_Intege
}
while ((nb<nbeval)&& isdone );
//if (!isdone) { cout<<" Problem in computation "<<endl; return 1;}
//if (!isdone) { std::cout<<" Problem in computation "<<std::endl; return 1;}
//if (ISG2)
//cout<<" the continuity is G2 "<<endl;
//else cout<<" the continuity is not G2 "<<endl;
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
//cout<<"MaxG1Angle:"<< MaxG1Angle << endl;
//cout<<"MaxG2Curvature:"<<MaxG2Curvature<<endl;
//std::cout<<" the continuity is G2 "<<std::endl;
//else std::cout<<" the continuity is not G2 "<<std::endl;
//std::cout<<"MaxG0Value :"<< MaxG0Value << std::endl;
//std::cout<<"MaxG1Angle:"<< MaxG1Angle << std::endl;
//std::cout<<"MaxG2Curvature:"<<MaxG2Curvature<<std::endl;
if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG2)
di<<" the continuity is G2 \n";
@@ -1460,7 +1460,7 @@ static Standard_Integer clintedge(Draw_Interpretor& di,
char newname[255];
if (narg < 2) {
//cout << "Usage: clintedge shape" << endl;
//std::cout << "Usage: clintedge shape" << std::endl;
di << "Usage: clintedge shape\n";
return 1;
}
@@ -1471,7 +1471,7 @@ static Standard_Integer clintedge(Draw_Interpretor& di,
Standard_Integer nbedges = mypurgealgo.NbEdges();
if (nbedges > 0)
{
//cout<<nbedges<<" internal (or external) edges to be removed"<<endl;
//std::cout<<nbedges<<" internal (or external) edges to be removed"<<std::endl;
di<<nbedges<<" internal (or external) edges to be removed\n";
Standard_Integer i = 1;
@@ -1479,15 +1479,15 @@ static Standard_Integer clintedge(Draw_Interpretor& di,
Sprintf(newname,"%s_%d",a[1],i);
DBRep::Set(temp,mypurgealgo.Shape());
//cout<<newname<<" ";
//std::cout<<newname<<" ";
di<<newname<<" ";
//cout<<endl;
//std::cout<<std::endl;
di<<"\n";
}
else
di << "no internal (or external) edges\n";
//cout << "no internal (or external) edges"<<endl;
//std::cout << "no internal (or external) edges"<<std::endl;
return 0;
}
@@ -1503,7 +1503,7 @@ static Standard_Integer facintedge(Draw_Interpretor& di,
char newname[255];
if (narg < 2) {
//cout << "Usage: facintedge shape" << endl;
//std::cout << "Usage: facintedge shape" << std::endl;
di << "Usage: facintedge shape\n";
return 1;
}
@@ -1520,12 +1520,12 @@ static Standard_Integer facintedge(Draw_Interpretor& di,
for (itFacEdg.Initialize(mymap); itFacEdg.More(); itFacEdg.Next()) {
Sprintf(newname,"%s_%d",a[1],i);
DBRep::Set(temp,itFacEdg.Key());
//cout<<newname<<" ";
//std::cout<<newname<<" ";
di<<newname<<" ";
i++;
}
//cout<<endl;
//std::cout<<std::endl;
di<<"\n";
return 0;
@@ -1541,7 +1541,7 @@ static Standard_Integer fuseedge(Draw_Interpretor& di,
char newname[255];
if (narg < 2) {
//cout << "Usage: fuseedge shape" << endl;
//std::cout << "Usage: fuseedge shape" << std::endl;
di << "Usage: fuseedge shape\n";
return 1;
}
@@ -1556,7 +1556,7 @@ static Standard_Integer fuseedge(Draw_Interpretor& di,
if (nbvertices > 0) {
//cout<<nbvertices<<" vertices to be removed"<<endl;
//std::cout<<nbvertices<<" vertices to be removed"<<std::endl;
di<<nbvertices<<" vertices to be removed\n";
Standard_Integer i = 1;
@@ -1564,15 +1564,15 @@ static Standard_Integer fuseedge(Draw_Interpretor& di,
Sprintf(newname,"%s_%d",a[1],i);
DBRep::Set(temp,myfusealgo.Shape());
//cout<<newname<<" ";
//std::cout<<newname<<" ";
di<<newname<<" ";
//cout<<endl;
//std::cout<<std::endl;
di<<"\n";
}
else
di << "no vertices to remove\n";
//cout << "no vertices to remove"<<endl;
//std::cout << "no vertices to remove"<<std::endl;
return 0;
}
@@ -1588,7 +1588,7 @@ static Standard_Integer listfuseedge(Draw_Interpretor& di,
char newname[255];
if (narg < 2) {
//cout << "Usage: listfuseedge shape" << endl;
//std::cout << "Usage: listfuseedge shape" << std::endl;
di << "Usage: listfuseedge shape\n";
return 1;
}
@@ -1610,14 +1610,14 @@ static Standard_Integer listfuseedge(Draw_Interpretor& di,
for (itEdg.Initialize(LmapEdg); itEdg.More(); itEdg.Next()) {
Sprintf(newname,"%s_%d_%d",a[1],iLst,i);
DBRep::Set(temp,itEdg.Value());
//cout<<newname<<" ";
//std::cout<<newname<<" ";
di<<newname<<" ";
i++;
}
}
//cout<<endl;
//std::cout<<std::endl;
di<<"\n";
return 0;

View File

@@ -170,7 +170,7 @@ static Standard_Integer trim(Draw_Interpretor& di, Standard_Integer n, const cha
DBRep::Set(a[1],ne);
}
else {
//cout <<"Error creating edge"<<endl;
//std::cout <<"Error creating edge"<<std::endl;
di <<"Error creating edge\n";
}
return 0;
@@ -255,7 +255,7 @@ static Standard_Integer wire(Draw_Interpretor& di, Standard_Integer n, const cha
}
if (!MW.IsDone()) {
//cout << "Wire not done" << endl;
//std::cout << "Wire not done" << std::endl;
di << "Wire not done with an error:\n";
switch (MW.Error())
{
@@ -288,7 +288,7 @@ static Standard_Integer mkedge(Draw_Interpretor& di, Standard_Integer n, const c
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]);
Handle(Geom2d_Curve) C2d = DrawTrSurf::GetCurve2d(a[2]);
if (C.IsNull() && C2d.IsNull()) {
//cout << a[2] << " is not a curve" << endl;
//std::cout << a[2] << " is not a curve" << std::endl;
di << a[2] << " is not a curve\n";
return 1;
}
@@ -369,7 +369,7 @@ static Standard_Integer mkcurve(Draw_Interpretor& di, Standard_Integer n, const
Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(S),L,f,l);
if (C.IsNull()) {
//cout << a[2] << " has no 3d curve" << endl;
//std::cout << a[2] << " has no 3d curve" << std::endl;
di << a[2] << " has no 3d curve\n";
return 1;
}
@@ -455,8 +455,8 @@ static Standard_Integer mk2dcurve(Draw_Interpretor& di,
}
if (C.IsNull()) {
//cout << a[2] << " has no 2d curve"; if (na == 4) cout << " on " << a[3];
//cout << endl;
//std::cout << a[2] << " has no 2d curve"; if (na == 4) std::cout << " on " << a[3];
//std::cout << std::endl;
di << a[2] << " has no 2d curve";
if (hasFace)
@@ -569,35 +569,35 @@ static Standard_Integer profile(Draw_Interpretor& di,
if (n == 1) {
// print help
//cout << "profile name [code values] [code values] ...\n";
//cout << " Build a profile in the XY plane from a moving point and direction\n";
//cout << " The original point and direction are 0 0 and 1 0\n";
//cout << " Codes and values describe the point or direction change\n";
//cout << " When the point change the direction becomes the tangent\n";
//cout << " All angles are in degree (may be negative)\n";
//cout << " By default the profile is closed and a face is built\n";
//cout << "\n";
//cout << " Instruction Parameters Action\n";
//cout << " O X Y Z Set the origin of the plane\n";
//cout << " P DX DY DZ UX UY UZ Set the normal and X of the plane\n";
//cout << " S Face Set the Plane (Face must be a Face)\n";
//cout << " F X Y Set the first point\n";
//cout << " X DX Translate point along X\n";
//cout << " Y DY Translate point along Y\n";
//cout << " L DL Translate point along direction\n";
//cout << " XX X Set point X coordinate\n";
//cout << " YY Y Set point Y coordinate\n";
//cout << " T DX DY Translate point\n";
//cout << " TT X Y Set point\n";
//cout << " R Angle Rotate direction\n";
//cout << " RR Angle Set direction\n";
//cout << " D DX DY Set direction\n";
//cout << " IX X Intersect with vertical\n";
//cout << " IY Y Intersect with horizontal\n";
//cout << " C Radius Angle Arc of circle tangent to direction\n";
//cout << " W Make a closed wire\n";
//cout << " WW Make an open wire\n";
//cout << endl;
//std::cout << "profile name [code values] [code values] ...\n";
//std::cout << " Build a profile in the XY plane from a moving point and direction\n";
//std::cout << " The original point and direction are 0 0 and 1 0\n";
//std::cout << " Codes and values describe the point or direction change\n";
//std::cout << " When the point change the direction becomes the tangent\n";
//std::cout << " All angles are in degree (may be negative)\n";
//std::cout << " By default the profile is closed and a face is built\n";
//std::cout << "\n";
//std::cout << " Instruction Parameters Action\n";
//std::cout << " O X Y Z Set the origin of the plane\n";
//std::cout << " P DX DY DZ UX UY UZ Set the normal and X of the plane\n";
//std::cout << " S Face Set the Plane (Face must be a Face)\n";
//std::cout << " F X Y Set the first point\n";
//std::cout << " X DX Translate point along X\n";
//std::cout << " Y DY Translate point along Y\n";
//std::cout << " L DL Translate point along direction\n";
//std::cout << " XX X Set point X coordinate\n";
//std::cout << " YY Y Set point Y coordinate\n";
//std::cout << " T DX DY Translate point\n";
//std::cout << " TT X Y Set point\n";
//std::cout << " R Angle Rotate direction\n";
//std::cout << " RR Angle Set direction\n";
//std::cout << " D DX DY Set direction\n";
//std::cout << " IX X Intersect with vertical\n";
//std::cout << " IY Y Intersect with horizontal\n";
//std::cout << " C Radius Angle Arc of circle tangent to direction\n";
//std::cout << " W Make a closed wire\n";
//std::cout << " WW Make an open wire\n";
//std::cout << std::endl;
di << "profile name [code values] [code values] ...\n";
di << " Build a profile in the XY plane from a moving point and direction\n";
di << " The original point and direction are 0 0 and 1 0\n";
@@ -974,15 +974,15 @@ static Standard_Integer bsplineprof(Draw_Interpretor& di,
if (n == 1) {
// print help
//cout << " bsplineprof name [S face] [W WW] " << endl;
//cout << " for an edge : <digitizes> ... <mouse button 2> " << endl ;
//cout << " to end profile : <mouse button 3> " << endl ;
//cout << " Build a profile in the XY plane from digitizes" << endl ;
//cout << " By default the profile is closed and a face is built\n";
//cout << "\n";
//cout << " W Make a closed wire\n";
//cout << " WW Make an open wire\n";
//cout << endl;
//std::cout << " bsplineprof name [S face] [W WW] " << std::endl;
//std::cout << " for an edge : <digitizes> ... <mouse button 2> " << std::endl ;
//std::cout << " to end profile : <mouse button 3> " << std::endl ;
//std::cout << " Build a profile in the XY plane from digitizes" << std::endl ;
//std::cout << " By default the profile is closed and a face is built\n";
//std::cout << "\n";
//std::cout << " W Make a closed wire\n";
//std::cout << " WW Make an open wire\n";
//std::cout << std::endl;
di << " bsplineprof name [S face] [W WW] " << "\n";
di << " for an edge : <digitizes> ... <mouse button 2> " << "\n";
di << " to end profile : <mouse button 3> " << "\n";
@@ -1215,31 +1215,31 @@ static Standard_Integer profile2d(Draw_Interpretor& di,
if (n == 1) {
// print help
//cout << "profile name [code values] [code values] ...\n";
//cout << " Build a profile in the UV plane from a moving point and direction\n";
//cout << " The original point and direction are 0 0 and 1 0\n";
//cout << " Codes and values describe the point or direction change\n";
//cout << " When the point change the direction becomes the tangent\n";
//cout << " All angles are in degree (may be negative)\n";
//cout << " By default the profile is closed \n";
//cout << "\n";
//cout << " Instruction Parameters Action\n";
//cout << " F X Y Set the first point\n";
//cout << " X DX Translate point along X\n";
//cout << " Y DY Translate point along Y\n";
//cout << " L DL Translate point along direction\n";
//cout << " XX X Set point X coordinate\n";
//cout << " YY Y Set point Y coordinate\n";
//cout << " T DX DY Translate point\n";
//cout << " TT X Y Set point\n";
//cout << " R Angle Rotate direction\n";
//cout << " RR Angle Set direction\n";
//cout << " D DX DY Set direction\n";
//cout << " IX X Intersect with vertical\n";
//cout << " IY Y Intersect with horizontal\n";
//cout << " C Radius Angle Arc of circle tangent to direction\n";
//cout << " W Make a closed wire\n";
//cout << endl;
//std::cout << "profile name [code values] [code values] ...\n";
//std::cout << " Build a profile in the UV plane from a moving point and direction\n";
//std::cout << " The original point and direction are 0 0 and 1 0\n";
//std::cout << " Codes and values describe the point or direction change\n";
//std::cout << " When the point change the direction becomes the tangent\n";
//std::cout << " All angles are in degree (may be negative)\n";
//std::cout << " By default the profile is closed \n";
//std::cout << "\n";
//std::cout << " Instruction Parameters Action\n";
//std::cout << " F X Y Set the first point\n";
//std::cout << " X DX Translate point along X\n";
//std::cout << " Y DY Translate point along Y\n";
//std::cout << " L DL Translate point along direction\n";
//std::cout << " XX X Set point X coordinate\n";
//std::cout << " YY Y Set point Y coordinate\n";
//std::cout << " T DX DY Translate point\n";
//std::cout << " TT X Y Set point\n";
//std::cout << " R Angle Rotate direction\n";
//std::cout << " RR Angle Set direction\n";
//std::cout << " D DX DY Set direction\n";
//std::cout << " IX X Intersect with vertical\n";
//std::cout << " IY Y Intersect with horizontal\n";
//std::cout << " C Radius Angle Arc of circle tangent to direction\n";
//std::cout << " W Make a closed wire\n";
//std::cout << std::endl;
di << "profile name [code values] [code values] ...\n";
di << " Build a profile in the UV plane from a moving point and direction\n";
di << " The original point and direction are 0 0 and 1 0\n";
@@ -1705,7 +1705,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
EInter.Perform (E[0],E[1],reducesegments);
if (EInter.IsEmpty()) {
//cout << " No intersection found" << endl;
//std::cout << " No intersection found" << std::endl;
di << " No intersection found\n";
return 0;
}
@@ -1745,13 +1745,13 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
else if (P2D.Transition(i).Before() == TopAbs_OUT) {
OO = TopAbs_FORWARD;
}
//cout << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
//std::cout << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
di << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
if (OO == TopAbs_FORWARD) {
//cout << "FORWARD" << endl;
//std::cout << "FORWARD" << std::endl;
di << "FORWARD\n";
} else {
//cout << "REVERSED" << endl;
//std::cout << "REVERSED" << std::endl;
di << "REVERSED\n";
}
}
@@ -1820,7 +1820,7 @@ Standard_Integer build3d(Draw_Interpretor& di,
{
if ( (n <2) || (n>3) ) {
//cout << " 1 or 2 arguments expected" << endl;
//std::cout << " 1 or 2 arguments expected" << std::endl;
di << " 1 or 2 arguments expected\n";
return 1;
}
@@ -1831,7 +1831,7 @@ Standard_Integer build3d(Draw_Interpretor& di,
if (n==2) { Ok = BRepLib::BuildCurves3d(S); }
else { Ok = BRepLib::BuildCurves3d(S,Draw::Atof(a[2])); }
//if (!Ok) {cout << " one of the computation failed" << endl;}
//if (!Ok) {std::cout << " one of the computation failed" << std::endl;}
if (!Ok) {di << " one of the computation failed\n";}
return 0;
@@ -1852,7 +1852,7 @@ Standard_Integer reducepcurves(Draw_Interpretor& di,
{
TopoDS_Shape aShape = DBRep::Get(a[i]);
if (aShape.IsNull())
//cout << a[i] << " is not a valid shape" << endl;
//std::cout << a[i] << " is not a valid shape" << std::endl;
di << a[i] << " is not a valid shape\n";
else
BRepTools::RemoveUnusedPCurves(aShape);

View File

@@ -102,7 +102,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands,
if ((narg<15)||((narg)%9 != 6)) return 1;
TopoDS_Shape V = DBRep::Get(a[2]);
if ( V.IsNull()) {
//cout << a[2] << " is not a Shape" << endl;
//std::cout << a[2] << " is not a Shape" << std::endl;
theCommands << a[2] << " is not a Shape\n";
return 1;
}
@@ -122,7 +122,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands,
// F = TopoDS::Face(DBRep::Get(a[9*ii+6],TopAbs_FACE));
if ( F.IsNull()) {
//cout << a[9*ii+6] << " is not a face" << endl;
//std::cout << a[9*ii+6] << " is not a face" << std::endl;
theCommands << a[9*ii+6] << " is not a face\n";
return 1;
}
@@ -208,11 +208,11 @@ static Standard_Integer draft (Draw_Interpretor& di,
if (Internal) {
MkDraft.SetDraft(Internal);
di << "Internal Draft : \n";
//cout << "Internal Draft : " << endl;
//std::cout << "Internal Draft : " << std::endl;
}
else
di << "External Draft : \n";
//cout << "External Draft : " << endl;
//std::cout << "External Draft : " << std::endl;
TopoDS_Shape Stop = DBRep::Get(a[7]);//shape d'arret
if (!Stop.IsNull()) {

View File

@@ -58,7 +58,7 @@ static Standard_Integer distance (Draw_Interpretor& di,
gp_Pnt P1,P2;
Standard_Real D;
if (!BRepExtrema_Poly::Distance(S1,S2,P1,P2,D)) return 1;
//cout << " distance : " << D << endl;
//std::cout << " distance : " << D << std::endl;
di << " distance : " << D << "\n";
TopoDS_Edge E = BRepLib_MakeEdge(P1,P2);
DBRep::Set("distance",E);
@@ -82,7 +82,7 @@ static Standard_Integer distmini(Draw_Interpretor& di, Standard_Integer n, const
if (dst.IsDone())
{
#ifdef OCCT_DEBUG
//dst.Dump(cout);
//dst.Dump(std::cout);
di << "*** Dump of \"BRepExtrema_DistShapeShape\" in DEBUG mode (begin) *****\n";
Standard_SStream aSStream;
dst.Dump(aSStream);

View File

@@ -544,7 +544,7 @@ static Standard_Integer PRW(Draw_Interpretor& theCommands,
}
else {
// il faudrait inverser V et appeler PerfomFromEnd...
//cout << "Not Implemented" << endl;
//std::cout << "Not Implemented" << std::endl;
theCommands << "Not Implemented\n";
}
}
@@ -709,7 +709,7 @@ static Standard_Integer PRF(Draw_Interpretor& theCommands,
}
else { //FUntil.IsNull()
// il faudrait inverser V et appeler PerfomFromEnd...
//cout << "Not Implemented" << endl;
//std::cout << "Not Implemented" << std::endl;
theCommands << "Not Implemented\n";
}
}
@@ -737,16 +737,16 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
if (narg < 3)
{
cout << "Invalid number of arguments. Should be : splitshape result shape [splitedges] \
std::cout << "Invalid number of arguments. Should be : splitshape result shape [splitedges] \
[face wire/edge/compound [wire/edge/compound ...] \
[face wire/edge/compound [wire/edge/compound...] ...] \
[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]" << endl;
[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]" << std::endl;
return 1;
}
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull())
{
cout << "Invalid input shape " << a[2]<<endl;
std::cout << "Invalid input shape " << a[2]<<std::endl;
return 1;
}
BRepFeat_SplitShape Spls(S);
@@ -773,7 +773,7 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
TopoDS_Shape aSh = DBRep::Get(a[i]);
if (aSh.IsNull())
{
cout << "Invalid input shape " <<a[i]<<endl;
std::cout << "Invalid input shape " <<a[i]<<std::endl;
return 1;
}
@@ -852,7 +852,7 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
TopoDS_Shape aSh = DBRep::Get(a[i]);
if (aSh.IsNull())
{
cout << "Invalid input shape " <<a[i]<< endl;
std::cout << "Invalid input shape " <<a[i]<< std::endl;
return 1;
}
TopExp_Explorer aExpE(aSh, TopAbs_EDGE, TopAbs_FACE);
@@ -861,10 +861,10 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
}
else
{
cout << "Invalid input arguments. Should be : splitshape result shape [splitedges] \
std::cout << "Invalid input arguments. Should be : splitshape result shape [splitedges] \
[face wire/edge/compound [wire/edge/compound ...] \
[face wire/edge/compound [wire/edge/compound...] ...] \
[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]"<<endl;
[@ edgeonshape edgeonwire [edgeonshape edgeonwire...]]"<<std::endl;
return 1;
}
}
@@ -887,7 +887,7 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
Ew = TopoDS::Edge(aLocalShape);
// Ew = TopoDS::Edge(DBRep::Get(a[i+1],TopAbs_EDGE));
if (Ew.IsNull()) {
cout << "Invalid input shape " <<a[i+1]<< endl;
std::cout << "Invalid input shape " <<a[i+1]<< std::endl;
return 1;
}
Spls.Add(TopoDS::Edge(Ew),TopoDS::Edge(Es));
@@ -1612,7 +1612,7 @@ static Standard_Integer DEFIN(Draw_Interpretor& theCommands,
theRF.Init(Sbase, W, P, ax1, H1, H2, Fuse, Modify);
if (!theRF.IsDone()) {
se = theRF.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -1637,7 +1637,7 @@ static Standard_Integer DEFIN(Draw_Interpretor& theCommands,
theLF.Init(Sbase, W, P, Direct, gp_Vec(X,Y,Z), Fuse,Modify);
if (!theLF.IsDone()) {
se = theLF.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2010,7 +2010,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 1:
if (!thePrism.IsDone()) {
se = thePrism.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2022,7 +2022,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 2:
if (!theRevol.IsDone()) {
se = theRevol.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2034,7 +2034,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 3:
if (!thePipe.IsDone()) {
se = thePipe.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2046,7 +2046,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 4:
if (!theDPrism.IsDone()) {
se = theDPrism.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2058,7 +2058,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 5:
if (!theLF.IsDone()) {
se = theLF.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";
@@ -2070,7 +2070,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
case 6:
if (!theRF.IsDone()) {
se = theRF.CurrentStatusError();
//BRepFeat::Print(se,cout) << endl;
//BRepFeat::Print(se,std::cout) << std::endl;
Standard_SStream aSStream;
BRepFeat::Print(se,aSStream);
theCommands << aSStream << "\n";

View File

@@ -70,21 +70,21 @@ static char name[100];
static Standard_Integer contblend(Draw_Interpretor& di, Standard_Integer narg, const char** a)
{
if(narg ==1) {
//cout<<"tolerance angular of approximation : "<< tapp_angle <<endl;
//cout<<"internal continuity : ";
//std::cout<<"tolerance angular of approximation : "<< tapp_angle <<std::endl;
//std::cout<<"internal continuity : ";
di<<"tolerance angular of approximation : "<< tapp_angle <<"\n";
di<<"internal continuity : ";
switch (blend_cont) {
case GeomAbs_C0:
//cout << ""<<endl;
//std::cout << ""<<std::endl;
di << "C0\n";
break;
case GeomAbs_C1:
//cout << "C1"<<endl;
//std::cout << "C1"<<std::endl;
di << "C1\n";
break;
case GeomAbs_C2:
//cout << "C2"<<endl;
//std::cout << "C2"<<std::endl;
di << "C2\n";
break;
default:
@@ -112,12 +112,12 @@ static Standard_Integer contblend(Draw_Interpretor& di, Standard_Integer narg, c
static void printtolblend(Draw_Interpretor& di)
{
//cout<<"tolerance ang : "<<ta<<endl;
//cout<<"tolerance 3d : "<<t3d<<endl;
//cout<<"tolerance 2d : "<<t2d<<endl;
//cout<<"fleche : "<<fl<<endl;
//std::cout<<"tolerance ang : "<<ta<<std::endl;
//std::cout<<"tolerance 3d : "<<t3d<<std::endl;
//std::cout<<"tolerance 2d : "<<t2d<<std::endl;
//std::cout<<"fleche : "<<fl<<std::endl;
//cout<<"tolblend "<<ta<<" "<<t3d<<" "<<t2d<<" "<<fl<<endl;
//std::cout<<"tolblend "<<ta<<" "<<t3d<<" "<<t2d<<" "<<fl<<std::endl;
di<<"tolerance ang : "<<ta<<"\n";
di<<"tolerance 3d : "<<t3d<<"\n";
@@ -220,12 +220,12 @@ static Standard_Integer CheckHist(Draw_Interpretor& di,
const char** )
{
if(Rakk == 0) {
//cout<<"No active Builder"<<endl;
//std::cout<<"No active Builder"<<std::endl;
di<<"No active Builder\n";
return 1;
}
if(!Rakk->IsDone()) {
//cout<<"Active Builder Not Done"<<endl;
//std::cout<<"Active Builder Not Done"<<std::endl;
di<<"Active Builder Not Done\n";
return 1;
}
@@ -247,7 +247,7 @@ static Standard_Integer CheckHist(Draw_Interpretor& di,
It.Initialize(Rakk->Generated(curshape));
PrintHist(curshape,It,nbgen);
}
//cout<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }"<<endl;
//std::cout<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }"<<std::endl;
di<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }\n";
return 0;
}
@@ -282,7 +282,7 @@ static Standard_Integer UPDATEVOL(Draw_Interpretor& di,
const char** a)
{
if(Rake == 0){
//cout << "MakeFillet not initialized"<<endl;
//std::cout << "MakeFillet not initialized"<<std::endl;
di << "MakeFillet not initialized\n";
return 1 ;
}
@@ -306,7 +306,7 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di,
const char**)
{
if(Rake == 0){
//cout << "MakeFillet not initialized"<<endl;
//std::cout << "MakeFillet not initialized"<<std::endl;
di << "MakeFillet not initialized\n";
return 1 ;
}
@@ -333,7 +333,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const
printtolblend(di);
if(narg < 5)
{
cout << "Use <command name> result shape1 shape2 radius [-d]" << endl;
std::cout << "Use <command name> result shape1 shape2 radius [-d]" << std::endl;
return 1;
}
@@ -466,16 +466,16 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
//if (Rakk.IsDone()==FilletSurf_IsNotOk)
// { FilletSurf_ErrorTypeStatus err=Rakk.StatusError();
// if (err==FilletSurf_EmptyList) cout<< "StatusError=EmptyList"<<endl;
// else if (err==FilletSurf_EdgeNotG1) cout<< "StatusError=NotG1"<<endl;
// else if (err==FilletSurf_FacesNotG1) cout<< "StatusError=facesNotG1"<<endl;
// if (err==FilletSurf_EmptyList) std::cout<< "StatusError=EmptyList"<<std::endl;
// else if (err==FilletSurf_EdgeNotG1) std::cout<< "StatusError=NotG1"<<std::endl;
// else if (err==FilletSurf_FacesNotG1) std::cout<< "StatusError=facesNotG1"<<std::endl;
// else if (err==FilletSurf_EdgeNotOnShape)
// cout<< "StatusError=edgenotonshape"<<endl;
// else if (err==FilletSurf_NotSharpEdge ) cout<< "StatusError=notsharpedge"<<endl;
// else if (err==FilletSurf_PbFilletCompute) cout <<"StatusError=PBFillet"<<endl;
// std::cout<< "StatusError=edgenotonshape"<<std::endl;
// else if (err==FilletSurf_NotSharpEdge ) std::cout<< "StatusError=notsharpedge"<<std::endl;
// else if (err==FilletSurf_PbFilletCompute) std::cout <<"StatusError=PBFillet"<<std::endl;
// }
// else {
// if (Rakk.IsDone()==FilletSurf_IsPartial) cout <<"resultat partiel"<<endl;
// if (Rakk.IsDone()==FilletSurf_IsPartial) std::cout <<"resultat partiel"<<std::endl;
if (aRakk.IsDone()==FilletSurf_IsNotOk)
{ FilletSurf_ErrorTypeStatus err=aRakk.StatusError();
if (err==FilletSurf_EmptyList) di<< "StatusError=EmptyList\n";
@@ -498,11 +498,11 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
if (!simul)
{
//if (Rakk.StartSectionStatus()==FilletSurf_NoExtremityOnEdge)
// {cout<<" type deb conges = WLBLOUT"<<endl;}
// {std::cout<<" type deb conges = WLBLOUT"<<std::endl;}
//else if (Rakk.StartSectionStatus()==FilletSurf_OneExtremityOnEdge )
// { cout<<" type deb conges = WLBLSTOP"<<endl;}
// { std::cout<<" type deb conges = WLBLSTOP"<<std::endl;}
//else if (Rakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// {cout<<" type deb conges = WLBLEND"<<endl;}
// {std::cout<<" type deb conges = WLBLEND"<<std::endl;}
if (aRakk.StartSectionStatus()==FilletSurf_NoExtremityOnEdge)
{di<<" type start fillets = WLBLOUT\n";}
else if (aRakk.StartSectionStatus()==FilletSurf_OneExtremityOnEdge)
@@ -511,11 +511,11 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
{di<<" type start fillets = WLBLEND\n";}
//if (Rakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
// {cout<<" type fin conges = WLBLOUT"<<endl;}
// {std::cout<<" type fin conges = WLBLOUT"<<std::endl;}
//else if (Rakk.EndSectionStatus()==FilletSurf_OneExtremityOnEdge)
// {cout<<" type fin conges = WLBLSTOP"<<endl;}
// {std::cout<<" type fin conges = WLBLSTOP"<<std::endl;}
//else if (Rakk.EndSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// { cout<<" type fin conges = WLBLEND"<<endl;}
// { std::cout<<" type fin conges = WLBLEND"<<std::endl;}
if (aRakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
{di<<" type end fillets = WLBLOUT\n";}
else if (aRakk.EndSectionStatus()==FilletSurf_OneExtremityOnEdge)
@@ -525,13 +525,13 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
Standard_Real f,l;
f = aRakk.FirstParameter();
l = aRakk.LastParameter();
//cout<<"parameter on edge start : "<<f<<endl;
//cout<<"parameter on edge end : "<<l<<endl;
//std::cout<<"parameter on edge start : "<<f<<std::endl;
//std::cout<<"parameter on edge end : "<<l<<std::endl;
di<<"parametre on edge start : "<<f<<"\n";
di<<"parametre on edge end : "<<l<<"\n";
for (i=1;i<=nb;i++){
//precision
//cout<<"precision "<< i << "= "<<Rakk.TolApp3d(i)<<endl;
//std::cout<<"precision "<< i << "= "<<Rakk.TolApp3d(i)<<std::endl;
di<<"precision "<< i << "= "<<aRakk.TolApp3d(i)<<"\n";
// display resulting surfaces
@@ -628,7 +628,7 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
TopoDS_Face F1 = TopoDS::Face(aLocalFace);
// TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull()) {
//cout << " Stop face not referenced." << endl;
//std::cout << " Stop face not referenced." << std::endl;
di << " Stop face not referenced.\n";
return 1;
}
@@ -640,7 +640,7 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
// TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
i++;
if ( !strcmp(a[i],"@")) {
//cout << " Even number of ball support faces is required " << endl;
//std::cout << " Even number of ball support faces is required " << std::endl;
di << " Even number of ball support faces is required \n";
return 1;
}
@@ -648,7 +648,7 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
TopoDS_Face F2 = TopoDS::Face(aLocalFace);
// TopoDS_Face F2 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull() || F2.IsNull()) {
//cout << " Support face not referenced." << endl;
//std::cout << " Support face not referenced." << std::endl;
di << " Support face not referenced.\n";
return 1;
}
@@ -659,7 +659,7 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
TopoDS_Edge E = TopoDS::Edge(aLocalShape);
// TopoDS_Edge E = TopoDS::Edge(DBRep::Get(a[i],TopAbs_EDGE));
if ( E.IsNull()) {
//cout << " Edge not referenced." << endl;
//std::cout << " Edge not referenced." << std::endl;
di << " Edge not referenced.\n";
return 1;
}
@@ -678,8 +678,8 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
for (Standard_Integer i = 1; i <= NbBranches; i++) {
Standard_Integer From,To;
Roll.IndicesOfBranche(i,From,To);
//cout << " Indexes of the " << i << "th Branch : ";
//cout << " " << From << " " << To << endl;
//std::cout << " Indexes of the " << i << "th Branch : ";
//std::cout << " " << From << " " << To << std::endl;
di << " Indexes of the " << i << "th Branch : ";
di << " " << From << " " << To << "\n";
for (Standard_Integer j = From; j <= To; j++) {

View File

@@ -174,7 +174,7 @@ static Standard_Integer plate (Draw_Interpretor & di,Standard_Integer n,const ch
Henri.Perform();
Standard_Real ErrG0 = 1.1*Henri.G0Error();
//cout<<" dist. max = "<<Henri.G0Error()<<" ; angle max = "<<Henri.G1Error()<<endl;
//std::cout<<" dist. max = "<<Henri.G0Error()<<" ; angle max = "<<Henri.G1Error()<<std::endl;
di<<" dist. max = "<<Henri.G0Error()<<" ; angle max = "<<Henri.G1Error()<<"\n";
BRepBuilderAPI_MakeWire MW;
@@ -375,7 +375,7 @@ static Standard_Integer approxplate (Draw_Interpretor & di,Standard_Integer n,co
Standard_Real dmax = Henri.G0Error(),
anmax = Henri.G1Error();
//cout<<" dist. max = "<<dmax<<" ; angle max = "<<anmax<<endl;
//std::cout<<" dist. max = "<<dmax<<" ; angle max = "<<anmax<<std::endl;
di<<" dist. max = "<<dmax<<" ; angle max = "<<anmax<<"\n";
Tol3d = Draw::Atof(a[3*NbCurFront+4]);
@@ -507,7 +507,7 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
{
if (F.IsNull())
{
//cout<<endl<<"Wrong parameters"<<endl<<endl;
//std::cout<<std::endl<<"Wrong parameters"<<std::endl<<std::endl;
di<<"\nWrong parameters\n\n";
return 1;
}
@@ -526,7 +526,7 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
E = TopoDS::Edge( DBRep::Get(a[i++], TopAbs_EDGE) );
if (E.IsNull())
{
//cout<<"Wrong parameters"<<endl;
//std::cout<<"Wrong parameters"<<std::endl;
di<<"Wrong parameters\n";
return 1;
}
@@ -558,7 +558,7 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
F = TopoDS::Face( DBRep::Get(a[i++], TopAbs_FACE));
if (F.IsNull())
{
//cout<<"Wrong parameters"<<endl;
//std::cout<<"Wrong parameters"<<std::endl;
di<<"Wrong parameters\n";
return 1;
}
@@ -571,7 +571,7 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
MakeFilling.Build();
if (! MakeFilling.IsDone())
{
//cout<<"filling failed"<<endl;
//std::cout<<"filling failed"<<std::endl;
di<<"filling failed\n";
return 0;
}
@@ -579,7 +579,7 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
Standard_Real dmax = MakeFilling.G0Error(),
angmax = MakeFilling.G1Error(),
curvmax = MakeFilling.G2Error();
//cout<<" dist. max = "<<dmax<<" ; angle max = "<<angmax<<" ; diffcurv max = "<<curvmax<<endl;
//std::cout<<" dist. max = "<<dmax<<" ; angle max = "<<angmax<<" ; diffcurv max = "<<curvmax<<std::endl;
di<<" dist. max = "<<dmax<<" ; angle max = "<<angmax<<" ; diffcurv max = "<<curvmax<<"\n";
TopoDS_Face ResFace= TopoDS::Face( MakeFilling.Shape() );
@@ -589,8 +589,8 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
Chrono.Stop();
Standard_Real Tps;
Chrono.Show(Tps);
//cout<<"*** FIN DE FILLING ***"<<endl;
//cout<<"Temps de calcul : "<<Tps<<endl;
//std::cout<<"*** FIN DE FILLING ***"<<std::endl;
//std::cout<<"Temps de calcul : "<<Tps<<std::endl;
di<<"*** FIN DE FILLING ***\n";
di<<"Temps de calcul : "<<Tps<<"\n";
#endif
@@ -602,12 +602,12 @@ static Standard_Integer fillingparam( Draw_Interpretor & di, Standard_Integer n,
{
if ( n == 1) {
//cout << "fillingparam : options are" <<endl;
//cout << "-l : to list current values" << endl;
//cout << "-i : to set default values" << endl;
//cout << "-r deg nbPonC nbIt anis : to set filling options" <<endl;
//cout << "-c t2d t3d tang tcur : to set tolerances" << endl;
//cout << "-a maxdeg maxseg : Approximation option" << endl;
//std::cout << "fillingparam : options are" <<std::endl;
//std::cout << "-l : to list current values" << std::endl;
//std::cout << "-i : to set default values" << std::endl;
//std::cout << "-r deg nbPonC nbIt anis : to set filling options" <<std::endl;
//std::cout << "-c t2d t3d tang tcur : to set tolerances" << std::endl;
//std::cout << "-a maxdeg maxseg : Approximation option" << std::endl;
di << "fillingparam : options are" <<"\n";
di << "-l : to list current values\n";
di << "-i : to set default values" << "\n";
@@ -622,19 +622,19 @@ static Standard_Integer fillingparam( Draw_Interpretor & di, Standard_Integer n,
const char* flag = AS.ToCString();
if (strcmp( flag, "-l" ) == 0 && n == 2)
{
//cout<<endl;
//cout<<"Degree = "<<Degree<<endl;
//cout<<"NbPtsOnCur = "<<NbPtsOnCur<<endl;
//cout<<"NbIter = "<<NbIter<<endl;
//cout<<"Anisotropie = "<<Anisotropie<<endl<<endl;
//std::cout<<std::endl;
//std::cout<<"Degree = "<<Degree<<std::endl;
//std::cout<<"NbPtsOnCur = "<<NbPtsOnCur<<std::endl;
//std::cout<<"NbIter = "<<NbIter<<std::endl;
//std::cout<<"Anisotropie = "<<Anisotropie<<std::endl<<std::endl;
//
//cout<<"Tol2d = "<<Tol2d<<endl;
//cout<<"Tol3d = "<<Tol3d<<endl;
//cout<<"TolAng = "<<TolAng<<endl;
//cout<<"TolCurv = "<<TolCurv<<endl<<endl;
//std::cout<<"Tol2d = "<<Tol2d<<std::endl;
//std::cout<<"Tol3d = "<<Tol3d<<std::endl;
//std::cout<<"TolAng = "<<TolAng<<std::endl;
//std::cout<<"TolCurv = "<<TolCurv<<std::endl<<std::endl;
//
//cout<<"MaxDeg = "<<MaxDeg<<endl;
//cout<<"MaxSegments = "<<MaxSegments<<endl<<endl;
//std::cout<<"MaxDeg = "<<MaxDeg<<std::endl;
//std::cout<<"MaxSegments = "<<MaxSegments<<std::endl<<std::endl;
di<<"\n";
di<<"Degree = "<<Degree<<"\n";
di<<"NbPtsOnCur = "<<NbPtsOnCur<<"\n";
@@ -685,7 +685,7 @@ static Standard_Integer fillingparam( Draw_Interpretor & di, Standard_Integer n,
}
else
{
//cout<<"Wrong parameters"<<endl;
//std::cout<<"Wrong parameters"<<std::endl;
di<<"Wrong parameters\n";
return 1;
}

View File

@@ -120,36 +120,36 @@ Standard_Integer props(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
Standard_SStream aSStream1;
aSStream1 << "\n\n";
aSStream1 << "Mass : " << setw(15) << G.Mass() << "\n\n";
if(witheps && *a[0] != 'l') aSStream1 << "Relative error of mass computation : " << setw(15) << eps << "\n\n";
aSStream1 << "Mass : " << std::setw(15) << G.Mass() << "\n\n";
if(witheps && *a[0] != 'l') aSStream1 << "Relative error of mass computation : " << std::setw(15) << eps << "\n\n";
aSStream1 << "Center of gravity : \n";
aSStream1 << "X = " << setw(15) << P.X() << "\n";
aSStream1 << "Y = " << setw(15) << P.Y() << "\n";
aSStream1 << "Z = " << setw(15) << P.Z() << "\n";
aSStream1 << "X = " << std::setw(15) << P.X() << "\n";
aSStream1 << "Y = " << std::setw(15) << P.Y() << "\n";
aSStream1 << "Z = " << std::setw(15) << P.Z() << "\n";
aSStream1 << "\n";
aSStream1 << "Matrix of Inertia : \n";
aSStream1 << setw(15) << I(1,1);
aSStream1 << " " << setw(15) << I(1,2);
aSStream1 << " " << setw(15) << I(1,3) << "\n";
aSStream1 << setw(15) << I(2,1);
aSStream1 << " " << setw(15) << I(2,2);
aSStream1 << " " << setw(15) << I(2,3) << "\n";
aSStream1 << setw(15) << I(3,1);
aSStream1 << " " << setw(15) << I(3,2);
aSStream1 << " " << setw(15) << I(3,3) << "\n";
aSStream1 << std::setw(15) << I(1,1);
aSStream1 << " " << std::setw(15) << I(1,2);
aSStream1 << " " << std::setw(15) << I(1,3) << "\n";
aSStream1 << std::setw(15) << I(2,1);
aSStream1 << " " << std::setw(15) << I(2,2);
aSStream1 << " " << std::setw(15) << I(2,3) << "\n";
aSStream1 << std::setw(15) << I(3,1);
aSStream1 << " " << std::setw(15) << I(3,2);
aSStream1 << " " << std::setw(15) << I(3,3) << "\n";
aSStream1 << "\n";
aSStream1 << ends;
aSStream1 << std::ends;
di << aSStream1;
Standard_SStream aSStream2;
aSStream2 << "Moments : \n";
aSStream2 << "IX = " << setw(15) << Ix << "\n";
aSStream2 << "IY = " << setw(15) << Iy << "\n";
aSStream2 << "IZ = " << setw(15) << Iz << "\n";
aSStream2 << "IX = " << std::setw(15) << Ix << "\n";
aSStream2 << "IY = " << std::setw(15) << Iy << "\n";
aSStream2 << "IZ = " << std::setw(15) << Iz << "\n";
aSStream2 << "\n";
aSStream2 << ends;
aSStream2 << std::ends;
di << aSStream2;
}
else
@@ -249,9 +249,9 @@ Standard_Integer vpropsgk(Draw_Interpretor& di, Standard_Integer n, const char**
aSStream0.precision(15);
aSStream0 << "\n\n";
aSStream0 << "Mass : " << setw(anOutWidth) << G.Mass() << "\n\n";
aSStream0 << "Relative error of mass computation : " << setw(anOutWidth) << eps << "\n\n";
aSStream0 << ends;
aSStream0 << "Mass : " << std::setw(anOutWidth) << G.Mass() << "\n\n";
aSStream0 << "Relative error of mass computation : " << std::setw(anOutWidth) << eps << "\n\n";
aSStream0 << std::ends;
di << aSStream0;
if(CGFlag || IFlag) {
@@ -269,27 +269,27 @@ Standard_Integer vpropsgk(Draw_Interpretor& di, Standard_Integer n, const char**
aSStream1.precision(15);
aSStream1 << "Center of gravity : \n";
aSStream1 << "X = " << setw(anOutWidth) << P.X() << "\n";
aSStream1 << "Y = " << setw(anOutWidth) << P.Y() << "\n";
aSStream1 << "Z = " << setw(anOutWidth) << P.Z() << "\n";
aSStream1 << "X = " << std::setw(anOutWidth) << P.X() << "\n";
aSStream1 << "Y = " << std::setw(anOutWidth) << P.Y() << "\n";
aSStream1 << "Z = " << std::setw(anOutWidth) << P.Z() << "\n";
aSStream1 << "\n";
if(IFlag) {
gp_Mat I = G.MatrixOfInertia();
aSStream1 << "Matrix of Inertia : \n";
aSStream1 << setw(anOutWidth) << I(1,1);
aSStream1 << " " << setw(anOutWidth) << I(1,2);
aSStream1 << " " << setw(anOutWidth) << I(1,3) << "\n";
aSStream1 << setw(anOutWidth) << I(2,1);
aSStream1 << " " << setw(anOutWidth) << I(2,2);
aSStream1 << " " << setw(anOutWidth) << I(2,3) << "\n";
aSStream1 << setw(anOutWidth) << I(3,1);
aSStream1 << " " << setw(anOutWidth) << I(3,2);
aSStream1 << " " << setw(anOutWidth) << I(3,3) << "\n";
aSStream1 << std::setw(anOutWidth) << I(1,1);
aSStream1 << " " << std::setw(anOutWidth) << I(1,2);
aSStream1 << " " << std::setw(anOutWidth) << I(1,3) << "\n";
aSStream1 << std::setw(anOutWidth) << I(2,1);
aSStream1 << " " << std::setw(anOutWidth) << I(2,2);
aSStream1 << " " << std::setw(anOutWidth) << I(2,3) << "\n";
aSStream1 << std::setw(anOutWidth) << I(3,1);
aSStream1 << " " << std::setw(anOutWidth) << I(3,2);
aSStream1 << " " << std::setw(anOutWidth) << I(3,3) << "\n";
aSStream1 << "\n";
}
aSStream1 << ends;
aSStream1 << std::ends;
di << aSStream1;
}
@@ -305,12 +305,12 @@ Standard_Integer vpropsgk(Draw_Interpretor& di, Standard_Integer n, const char**
aSStream2.precision(15);
aSStream2 << "Moments : \n";
aSStream2 << "IX = " << setw(anOutWidth) << Ix << "\n";
aSStream2 << "IY = " << setw(anOutWidth) << Iy << "\n";
aSStream2 << "IZ = " << setw(anOutWidth) << Iz << "\n";
aSStream2 << "IX = " << std::setw(anOutWidth) << Ix << "\n";
aSStream2 << "IY = " << std::setw(anOutWidth) << Iy << "\n";
aSStream2 << "IZ = " << std::setw(anOutWidth) << Iz << "\n";
aSStream2 << "\n";
aSStream2 << "\n";
aSStream2 << ends;
aSStream2 << std::ends;
di << aSStream2;
gp_Ax2 axes(P,Pr.ThirdAxisOfInertia(),Pr.FirstAxisOfInertia());

View File

@@ -277,7 +277,7 @@ Standard_Integer brepintcs(Draw_Interpretor& di, Standard_Integer n, const char*
{
if (n <= 2)
{
cout<<"Invalid input arguments. Should be: curve1 [curve2 ...] shape [result] [tol]"<<endl;
std::cout<<"Invalid input arguments. Should be: curve1 [curve2 ...] shape [result] [tol]"<<std::endl;
return 1;
}
Standard_Integer indshape = 2;
@@ -290,7 +290,7 @@ Standard_Integer brepintcs(Draw_Interpretor& di, Standard_Integer n, const char*
}
if (S.IsNull())
{
cout<<"Invalid input shape"<<endl;
std::cout<<"Invalid input shape"<<std::endl;
return 1;
}

View File

@@ -75,7 +75,7 @@ static Standard_Integer mkface(Draw_Interpretor& , Standard_Integer n, const cha
Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[2]);
if (S.IsNull()) {
cout << a[2] << " is not a surface" << endl;
std::cout << a[2] << " is not a surface" << std::endl;
return 1;
}
@@ -254,7 +254,7 @@ static Standard_Integer pcurve(Draw_Interpretor& , Standard_Integer n, const cha
const Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface
(TopoDS::Edge(ex.Current()),TopoDS::Face(S),f,l);
if ( c.IsNull() ) {
cout << "Error: Edge " << i << " does not have pcurve" << endl;
std::cout << "Error: Edge " << i << " does not have pcurve" << std::endl;
continue;
}
col = DBRep_ColorOrientation(ex.Current().Orientation());
@@ -504,7 +504,7 @@ Standard_Integer fastsewing (Draw_Interpretor& theDI,
{
theDI << "Error: There are some problems while adding (" <<
(static_cast<Standard_Integer>(aStatus)) << ")\n";
aFS.GetStatuses(&cout);
aFS.GetStatuses(&std::cout);
}
aFS.Perform();
@@ -515,7 +515,7 @@ Standard_Integer fastsewing (Draw_Interpretor& theDI,
{
theDI << "Error: There are some problems while performing (" <<
(static_cast<Standard_Integer>(aStatus)) << ")\n";
aFS.GetStatuses(&cout);
aFS.GetStatuses(&std::cout);
}
DBRep::Set(theArgVal[1], aFS.GetResult());
@@ -580,7 +580,7 @@ static Standard_Integer getedgeregul
{
if( argc < 3)
{
cout<<"Invalid number of arguments. Should be: checkedgeregularity edge face1 [face2]"<<endl;
std::cout<<"Invalid number of arguments. Should be: checkedgeregularity edge face1 [face2]"<<std::endl;
return 1;
}
@@ -589,7 +589,7 @@ static Standard_Integer getedgeregul
TopoDS_Shape aFace2 = (argc > 3 ? DBRep::Get(argv[3],TopAbs_FACE) : aFace1);
if( anEdge.IsNull() || aFace1.IsNull() || aFace2.IsNull())
{
cout<<"Invalid number of arguments. Should be: getedgeregularity edge face1 [face2]"<<endl;
std::cout<<"Invalid number of arguments. Should be: getedgeregularity edge face1 [face2]"<<std::endl;
return 1;
}

View File

@@ -244,7 +244,7 @@ static Standard_Integer geompipe(Draw_Interpretor&,
aPipe.Perform(Standard_True);
if (!aPipe.IsDone())
{
cout << "GeomFill_Pipe cannot make a surface" << endl;
std::cout << "GeomFill_Pipe cannot make a surface" << std::endl;
return 1;
}
Handle(Geom_Surface) Sur = aPipe.Surface();
@@ -516,7 +516,7 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char*
BRepTest_Objects::SetHistory(Generator->Wires(), *Generator);
}
else {
cout << "Algorithm is not done" << endl;
std::cout << "Algorithm is not done" << std::endl;
}
return 0;
@@ -546,16 +546,16 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
Standard_Integer n, const char** a)
{
if (n == 1) {
//cout << "setsweep options [arg1 [arg2 [...]]] : options are :" << endl;
//cout << " -FR : Tangent and Normal are given by Frenet trihedron" <<endl;
//cout << " -CF : Tangente is given by Frenet," << endl;
//cout << " the Normal is computed to minimize the torsion " << endl;
//cout << " -DX Surf : Tangent and Normal are given by Darboux trihedron,"
// <<endl;
//cout << " Surf have to be a shell or a face" <<endl;
//cout << " -CN dx dy dz : BiNormal is given by dx dy dz" << endl;
//cout << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed" <<endl;
//cout << " -G guide 0|1(ACR|Plan) 0|1(contact|no contact) : with guide"<<endl;
//std::cout << "setsweep options [arg1 [arg2 [...]]] : options are :" << std::endl;
//std::cout << " -FR : Tangent and Normal are given by Frenet trihedron" <<std::endl;
//std::cout << " -CF : Tangente is given by Frenet," << std::endl;
//std::cout << " the Normal is computed to minimize the torsion " << std::endl;
//std::cout << " -DX Surf : Tangent and Normal are given by Darboux trihedron,"
// <<std::endl;
//std::cout << " Surf have to be a shell or a face" <<std::endl;
//std::cout << " -CN dx dy dz : BiNormal is given by dx dy dz" << std::endl;
//std::cout << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed" <<std::endl;
//std::cout << " -G guide 0|1(ACR|Plan) 0|1(contact|no contact) : with guide"<<std::endl;
di << "setsweep options [arg1 [arg2 [...]]] : options are :\n";
di << " -FR : Tangent and Normal are given by Frenet trihedron\n";
di << " -CF : Tangente is given by Frenet,\n";
@@ -570,7 +570,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
}
if (Sweep == 0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
//std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
@@ -585,14 +585,14 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
}
else if (!strcmp(a[1], "-DX")) {
if (n != 3) {
//cout << "bad arguments !" << endl;
//std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
TopoDS_Shape Surf;
Surf = DBRep::Get(a[2], TopAbs_SHAPE);
if (Surf.IsNull()) {
//cout << a[2] <<"is not a shape !" << endl;
//std::cout << a[2] <<"is not a shape !" << std::endl;
di << a[2] << "is not a shape !\n";
return 1;
}
@@ -600,7 +600,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
}
else if (!strcmp(a[1], "-CN")) {
if (n != 5) {
//cout << "bad arguments !" << endl;
//std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
@@ -609,7 +609,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
}
else if (!strcmp(a[1], "-FX")) {
if ((n != 5) && (n != 8)) {
//cout << "bad arguments !" << endl;
//std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
@@ -628,7 +628,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
{
if (n != 5)
{
//cout << "bad arguments !" << endl;
//std::cout << "bad arguments !" << std::endl;
di << "bad arguments !\n";
return 1;
}
@@ -644,7 +644,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
}
else {
//cout << "The option "<< a[1] << " is unknown !" << endl;
//std::cout << "The option "<< a[1] << " is unknown !" << std::endl;
di << "The option " << a[1] << " is unknown !\n";
return 1;
}
@@ -659,11 +659,11 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
Standard_Integer n, const char** a)
{
if (n == 1) {
//cout << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :" << endl;
//cout << " -T : the wire/vertex have to be translated to assume contact"<< endl;
//cout << " with the spine" <<endl;
//cout << " -R : the wire have to be rotated to assume orthogonality"<<endl;
//cout << " with the spine's tangent" << endl;
//std::cout << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :" << std::endl;
//std::cout << " -T : the wire/vertex have to be translated to assume contact"<< std::endl;
//std::cout << " with the spine" <<std::endl;
//std::cout << " -R : the wire have to be rotated to assume orthogonality"<<std::endl;
//std::cout << " with the spine's tangent" << std::endl;
di << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :\n";
di << " -T : the wire/vertex have to be translated to assume contact\n";
di << " with the spine\n";
@@ -673,7 +673,7 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
}
if (Sweep == 0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
//std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
@@ -687,7 +687,7 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
(Section.ShapeType() != TopAbs_WIRE &&
Section.ShapeType() != TopAbs_VERTEX))
{
//cout << a[1] <<"is not a wire and is not a vertex!" << endl;
//std::cout << a[1] <<"is not a wire and is not a vertex!" << std::endl;
di << a[1] << " is not a wire and is not a vertex!\n";
return 1;
}
@@ -723,7 +723,7 @@ static Standard_Integer addsweep(Draw_Interpretor& di,
if (n > cur) {
Standard_Integer nbreal = n - cur;
if ((nbreal < 4) || (nbreal % 2 != 0)) {
//cout << "bad arguments ! :" <<a[cur] << endl;
//std::cout << "bad arguments ! :" <<a[cur] << std::endl;
di << "bad arguments ! :" << a[cur] << "\n";
}
else { //law of interpolation
@@ -766,7 +766,7 @@ static Standard_Integer deletesweep(Draw_Interpretor& di,
Section = TopoDS::Wire(InputShape);
// Section = TopoDS::Wire(DBRep::Get(a[1],TopAbs_SHAPE));
if (Section.IsNull()) {
//cout << a[1] <<"is not a wire !" << endl;
//std::cout << a[1] <<"is not a wire !" << std::endl;
di << a[1] << "is not a wire !\n";
return 1;
}
@@ -783,14 +783,14 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
Standard_Integer n, const char** a)
{
if (n == 1) {
//cout << "build sweep result [-M/-C/-R] [-S] [tol] : options are" << endl;
//cout << " -M : Discontinuities are treated by Modfication of"<< endl;
//cout << " the sweeping mode : it is the default" <<endl;
//cout << " -C : Discontinuities are treated like Right Corner" << endl;
//cout << " Treatement is Extent && Intersect" << endl;
//cout << " -R : Discontinuities are treated like Round Corner" << endl;
//cout << " Treatement is Intersect and Fill" << endl;
//cout << " -S : To build a Solid" << endl;
//std::cout << "build sweep result [-M/-C/-R] [-S] [tol] : options are" << std::endl;
//std::cout << " -M : Discontinuities are treated by Modfication of"<< std::endl;
//std::cout << " the sweeping mode : it is the default" <<std::endl;
//std::cout << " -C : Discontinuities are treated like Right Corner" << std::endl;
//std::cout << " Treatement is Extent && Intersect" << std::endl;
//std::cout << " -R : Discontinuities are treated like Round Corner" << std::endl;
//std::cout << " Treatement is Intersect and Fill" << std::endl;
//std::cout << " -S : To build a Solid" << std::endl;
di << "build sweep result [-M/-C/-R] [-S] [tol] : options are\n";
di << " -M : Discontinuities are treated by Modfication of\n";
di << " the sweeping mode : it is the default\n";
@@ -804,13 +804,13 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
Standard_Boolean mksolid = Standard_False;
if (Sweep == 0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
//std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
if (!Sweep->IsReady()) {
//cout << "You have forgotten the <<addsweep>> command !"<< endl;
//std::cout << "You have forgotten the <<addsweep>> command !"<< std::endl;
di << "You have forgotten the <<addsweep>> command !\n";
return 1;
}
@@ -837,15 +837,15 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
// Calcul le resultat
Sweep->Build();
if (!Sweep->IsDone()) {
//cout << "Buildsweep : Not Done" << endl;
//std::cout << "Buildsweep : Not Done" << std::endl;
di << "Buildsweep : Not Done\n";
BRepBuilderAPI_PipeError Stat = Sweep->GetStatus();
if (Stat == BRepBuilderAPI_PlaneNotIntersectGuide) {
//cout << "Buildsweep : One Plane not intersect the guide" << endl;
//std::cout << "Buildsweep : One Plane not intersect the guide" << std::endl;
di << "Buildsweep : One Plane not intersect the guide\n";
}
if (Stat == BRepBuilderAPI_ImpossibleContact) {
//cout << "BuildSweep : One section can not be in contact with the guide" << endl;
//std::cout << "BuildSweep : One section can not be in contact with the guide" << std::endl;
di << "BuildSweep : One section can not be in contact with the guide\n";
}
}
@@ -853,7 +853,7 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
if (mksolid) {
Standard_Boolean B;
B = Sweep->MakeSolid();
//if (!B) cout << " BuildSweep : It is impossible to make a solid !" << endl;
//if (!B) std::cout << " BuildSweep : It is impossible to make a solid !" << std::endl;
if (!B) di << " BuildSweep : It is impossible to make a solid !\n";
}
result = Sweep->Shape();
@@ -899,13 +899,13 @@ static Standard_Integer simulsweep(Draw_Interpretor& di,
if ((n != 3) && (n != 4)) return 1;
if (Sweep == 0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
//std::cout << "You have forgotten the <<mksweep>> command !"<< std::endl;
di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
if (!Sweep->IsReady()) {
//cout << "You have forgotten the <<addsweep>> command !"<< endl;
//std::cout << "You have forgotten the <<addsweep>> command !"<< std::endl;
di << "You have forgotten the <<addsweep>> command !\n";
return 1;
}

View File

@@ -118,7 +118,7 @@ static Standard_Integer section(Draw_Interpretor& , Standard_Integer n, const ch
Sec.Approximation(Standard_True);
else if (strcasecmp(a[i], "-p"))
{
cout << "Unknown option: " << a[i] << endl;
std::cout << "Unknown option: " << a[i] << std::endl;
return 1;
}
}
@@ -170,7 +170,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
if ( Face.IsNull()) {
TopoDS_Shape Shell = DBRep::Get(a[2],TopAbs_SHELL);
if (Shell.IsNull()) {
//cout << a[2] << " must be a face or a shell" << endl;
//std::cout << a[2] << " must be a face or a shell" << std::endl;
di << a[2] << " must be a face or a shell\n";
return 1;
}
@@ -180,7 +180,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
DBRep::Set(a[1],Half.Solid());
}
else {
//cout << " HalfSpace NotDone" << endl;
//std::cout << " HalfSpace NotDone" << std::endl;
di << " HalfSpace NotDone\n";
return 1;
}
@@ -192,7 +192,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di,
DBRep::Set(a[1],Half.Solid());
}
else {
//cout << " HalfSpace NotDone" << endl;
//std::cout << " HalfSpace NotDone" << std::endl;
di << " HalfSpace NotDone\n";
return 1;
}