mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -180,7 +180,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface()
|
||||
isUSplit = Standard_True;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
|
||||
else std::cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface()
|
||||
isUSplit = Standard_False;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
|
||||
else std::cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -160,14 +160,14 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
|
||||
Last = bl;
|
||||
if(First < bf){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the pcurve domain" <<std::endl;
|
||||
#endif
|
||||
First = bf;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > bl){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the pcurve domain" <<std::endl;
|
||||
#endif
|
||||
Last = bl;
|
||||
mySplitValues->SetValue(mySplitValues->Length(),Last);
|
||||
|
@@ -144,14 +144,14 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute()
|
||||
Last = bl;
|
||||
if(First < bf){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
First = bf;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > bl){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
Last = bl;
|
||||
mySplitValues->SetValue(mySplitValues->Length(),Last);
|
||||
|
@@ -189,7 +189,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if(NbVFiltered || NbUFiltered)
|
||||
cout<<"Warning: ShapeUpgrade_ConvertSurfaceToBezierBasis: thin patches dropped."<<endl;
|
||||
std::cout<<"Warning: ShapeUpgrade_ConvertSurfaceToBezierBasis: thin patches dropped."<<std::endl;
|
||||
#endif
|
||||
|
||||
TColGeom_Array2OfBezierSurface Surfaces(1, nbUPatches, 1, nbVPatches);
|
||||
@@ -455,7 +455,7 @@ static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: Resulting path is not surface of revolution basis on bezier curve"<<endl;
|
||||
std::cout <<"Warning: Resulting path is not surface of revolution basis on bezier curve"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
if(Abs(U1-Umin) < Precision::PConfusion() &&
|
||||
|
@@ -82,8 +82,8 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
return Standard_False;
|
||||
@@ -119,8 +119,8 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
return Standard_False;
|
||||
@@ -157,8 +157,8 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
return Standard_False;
|
||||
|
@@ -45,7 +45,7 @@ ShapeUpgrade_SplitCurve::ShapeUpgrade_SplitCurve() : myStatus(0)
|
||||
const Standard_Real Last)
|
||||
{
|
||||
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
|
||||
// if (ShapeUpgrade::Debug()) cout << "SplitCurve::Init"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << "SplitCurve::Init"<<std::endl;
|
||||
|
||||
myNbCurves = 1;
|
||||
// mySplitValues.Clear();
|
||||
|
@@ -61,7 +61,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
const Standard_Real First,
|
||||
const Standard_Real Last)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout << "SplitCurve2d::Init"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << "SplitCurve2d::Init"<<std::endl;
|
||||
Handle(Geom2d_Curve) CopyOfC = Handle(Geom2d_Curve)::DownCast(C->Copy());
|
||||
myCurve = CopyOfC;
|
||||
|
||||
@@ -81,13 +81,13 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
lastPar = lP;
|
||||
if(firstPar < fP){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
firstPar = fP;
|
||||
}
|
||||
if(lastPar > lP){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
lastPar = lP;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
ShapeUpgrade_SplitCurve::Init (firstPar, lastPar);
|
||||
|
||||
// first, we make a copy of C to prevent modification:
|
||||
// if (ShapeUpgrade::Debug()) cout << ". copy of the curve"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << ". copy of the curve"<<std::endl;
|
||||
|
||||
myNbCurves = 1;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
|
||||
void ShapeUpgrade_SplitCurve2d::Build(const Standard_Boolean Segment)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout<<"ShapeUpgrade_SplitCurve2d::Build"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<"ShapeUpgrade_SplitCurve2d::Build"<<std::endl;
|
||||
Standard_Real First = mySplitValues->Value(1);
|
||||
Standard_Real Last = mySplitValues->Value(mySplitValues->Length());
|
||||
//PrepareKnots();
|
||||
@@ -176,8 +176,8 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
theNewCurve = new Geom2d_TrimmedCurve(Handle(Geom2d_Curve)::DownCast(myCurve->Copy()),First,Last);
|
||||
@@ -230,8 +230,8 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
theNewCurve = new Geom2d_TrimmedCurve(Handle(Geom2d_Curve)::DownCast(myCurve->Copy()),Firstt,Lastt);
|
||||
|
@@ -105,9 +105,9 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
|
||||
default :
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) std::cout<<". this criterion is not suitable for a Offset curve"<<std::endl;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_SplitCurve2dContinuity: criterion C3 for Offset curve" << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_SplitCurve2dContinuity: criterion C3 for Offset curve" << std::endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
}
|
||||
@@ -129,14 +129,14 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
|
||||
|
||||
Handle(Geom2d_BSplineCurve) MyBSpline = Handle(Geom2d_BSplineCurve)::DownCast (myCurve);
|
||||
if (MyBSpline.IsNull()) {
|
||||
// if (ShapeUpgrade::Debug()) cout<<". curve is not a Bspline"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". curve is not a Bspline"<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
myNbCurves=1;
|
||||
Standard_Integer Deg=MyBSpline->Degree();
|
||||
Standard_Integer NbKnots= MyBSpline->NbKnots();
|
||||
// if (ShapeUpgrade::Debug()) cout<<". NbKnots="<<NbKnots<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". NbKnots="<<NbKnots<<std::endl;
|
||||
if (NbKnots <= 2) {
|
||||
return;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
|
||||
}
|
||||
if (corrected) {
|
||||
// at this knot, the continuity is now C1. Nothing else to do.
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Correction at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Correction at Knot "<<iknot<<std::endl;
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
}
|
||||
else {
|
||||
@@ -179,7 +179,7 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute()
|
||||
// this knot will be a splitting value.
|
||||
mySplitValues->InsertBefore(j++,MyBSpline->Knot(iknot));
|
||||
myNbCurves++;
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Splitting at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Splitting at Knot "<<iknot<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
const Standard_Real First,
|
||||
const Standard_Real Last)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout << "SplitCurve3d::Init"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << "SplitCurve3d::Init"<<std::endl;
|
||||
Handle(Geom_Curve) CopyOfC = Handle(Geom_Curve)::DownCast(C->Copy());
|
||||
myCurve = CopyOfC;
|
||||
Standard_Real precision = Precision::PConfusion();
|
||||
@@ -80,13 +80,13 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
lastPar = lP;
|
||||
if(firstPar < fP){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
firstPar = fP;
|
||||
}
|
||||
if(lastPar > lP){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
lastPar = lP;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
ShapeUpgrade_SplitCurve::Init (firstPar, lastPar);
|
||||
|
||||
// first, we make a copy of C to prevent modification:
|
||||
// if (ShapeUpgrade::Debug()) cout << ". copy of the curve"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << ". copy of the curve"<<std::endl;
|
||||
|
||||
myNbCurves = 1;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
|
||||
void ShapeUpgrade_SplitCurve3d::Build(const Standard_Boolean Segment)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout<<"ShapeUpgrade_SplitCurve3d::Build"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<"ShapeUpgrade_SplitCurve3d::Build"<<std::endl;
|
||||
Standard_Real First = mySplitValues->Value(1);
|
||||
Standard_Real Last = mySplitValues->Value(mySplitValues->Length());
|
||||
|
||||
@@ -167,14 +167,14 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
Last = lastPar;
|
||||
if(First < firstPar){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
First = firstPar;
|
||||
mySplitValues->SetValue(1,First);
|
||||
}
|
||||
if(Last > lastPar){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
|
||||
std::cout <<"Warning: The range of the edge exceeds the curve domain" <<std::endl;
|
||||
#endif
|
||||
Last = lastPar;
|
||||
mySplitValues->SetValue(mySplitValues->Length(),Last);
|
||||
@@ -203,8 +203,8 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
|
||||
Standard_Failure::Caught()->Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
theNewCurve = new Geom_TrimmedCurve(Handle(Geom_Curve)::DownCast(myCurve->Copy()),First,Last);
|
||||
}
|
||||
@@ -252,8 +252,8 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
theNewCurve = new Geom_TrimmedCurve(Handle(Geom_Curve)::DownCast(myCurve->Copy()),Firstt,Lastt);
|
||||
|
@@ -104,9 +104,9 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
|
||||
default :
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : // if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
|
||||
case GeomAbs_C3 : // if (ShapeUpgrade::Debug()) std::cout<<". this criterion is not suitable for a Offset curve"<<std::endl;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_SplitCurve3dContinuity: criterion C3 for Offset curve" << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_SplitCurve3dContinuity: criterion C3 for Offset curve" << std::endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
}
|
||||
@@ -129,16 +129,16 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
|
||||
|
||||
Handle(Geom_BSplineCurve) MyBSpline = Handle(Geom_BSplineCurve)::DownCast (myCurve);
|
||||
if (MyBSpline.IsNull()) {
|
||||
// if (ShapeUpgrade::Debug()) cout<<". curve is not a Bspline"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". curve is not a Bspline"<<std::endl;
|
||||
return ;
|
||||
}
|
||||
// it is a BSplineCurve
|
||||
// if (ShapeUpgrade::Debug()) cout<<". curve is a Bspline"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". curve is a Bspline"<<std::endl;
|
||||
|
||||
myNbCurves=1;
|
||||
Standard_Integer Deg=MyBSpline->Degree();
|
||||
Standard_Integer NbKnots= MyBSpline->NbKnots();
|
||||
// if (ShapeUpgrade::Debug()) cout<<". NbKnots="<<NbKnots<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". NbKnots="<<NbKnots<<std::endl;
|
||||
if (NbKnots <= 2) {
|
||||
return;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
|
||||
}
|
||||
if (corrected) {
|
||||
// at this knot, the continuity is now C1. Nothing else to do.
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Correction at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Correction at Knot "<<iknot<<std::endl;
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
if(newMultiplicity == 0) {
|
||||
//in case if knot is completelly removed
|
||||
@@ -188,7 +188,7 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute()
|
||||
// this knot will be a splitting value.
|
||||
mySplitValues->InsertBefore(j++,MyBSpline->Knot(iknot));
|
||||
myNbCurves++;
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Splitting at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Splitting at Knot "<<iknot<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -412,8 +412,8 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
|
||||
for(Standard_Integer icol = 2; icol <= myVSplitValues->Length(); icol++) {
|
||||
V2 = myVSplitValues->Value(icol);
|
||||
// if (ShapeUpgrade::Debug()) {
|
||||
// cout<<".. bounds ="<<U1 <<","<<U2 <<","<<V1 <<","<<V2 <<endl;
|
||||
// cout<<".. -> pos ="<<irow <<","<<icol<<endl;
|
||||
// std::cout<<".. bounds ="<<U1 <<","<<U2 <<","<<V1 <<","<<V2 <<std::endl;
|
||||
// std::cout<<".. -> pos ="<<irow <<","<<icol<<std::endl;
|
||||
// }
|
||||
// creates a copy of theSurf before to segment:
|
||||
Handle(Geom_Surface) theNew = Handle(Geom_Surface)::DownCast ( mySurface->Copy() );
|
||||
@@ -439,8 +439,8 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
|
||||
}
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_SplitSurface::Build(): Exception in Segment :";
|
||||
anException.Print(cout); cout << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_SplitSurface::Build(): Exception in Segment :";
|
||||
anException.Print(std::cout); std::cout << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
Handle(Geom_Surface) theNewSurf = theNew;
|
||||
@@ -471,7 +471,7 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
|
||||
for(i = 1; i <= nbV; i++)
|
||||
VJoints(i) = myVSplitValues->Value(i);
|
||||
myResSurfaces->Init(Surfaces,UJoints,VJoints);
|
||||
// if (ShapeUpgrade::Debug()) cout<<"SplitSurface::Build - end"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<"SplitSurface::Build - end"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -94,7 +94,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
Standard_Real VFirst = myVSplitValues->Value(1);
|
||||
Standard_Real VLast = myVSplitValues->Value(myVSplitValues->Length());
|
||||
Standard_Real precision = Precision::Confusion();
|
||||
// if (ShapeUpgrade::Debug()) cout << "SplitSurfaceContinuity::Build" << endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << "SplitSurfaceContinuity::Build" << std::endl;
|
||||
if(mySurface->Continuity() < myCriterion)
|
||||
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2);
|
||||
if (myUSplitValues->Length() >2 || myVSplitValues->Length() >2 )
|
||||
@@ -176,9 +176,9 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
default :
|
||||
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
|
||||
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset Surface"<<endl;;
|
||||
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) std::cout<<". this criterion is not suitable for a Offset Surface"<<std::endl;;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: ShapeUpgrade_SplitSurfaceContinuity: criterion C3 for Offset surface" << endl;
|
||||
std::cout << "Warning: ShapeUpgrade_SplitSurfaceContinuity: criterion C3 for Offset surface" << std::endl;
|
||||
#endif
|
||||
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
|
||||
|
||||
@@ -207,7 +207,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
if(mySurface->IsKind(STANDARD_TYPE(Geom_BSplineSurface)))
|
||||
MyBSpline = Handle(Geom_BSplineSurface)::DownCast(mySurface->Copy());
|
||||
if (MyBSpline.IsNull()) {
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Surface is not a Bspline"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Surface is not a Bspline"<<std::endl;
|
||||
return;
|
||||
}
|
||||
if(mySurface->Continuity() >= myCriterion) {
|
||||
@@ -224,7 +224,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
VLastInd = MyBSpline->LastVKnotIndex()-1;
|
||||
Standard_Integer NbVKnots= MyBSpline->NbVKnots();
|
||||
|
||||
// if (ShapeUpgrade::Debug()) cout<<". NbUKnots="<<NbUKnots<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". NbUKnots="<<NbUKnots<<std::endl;
|
||||
if (NbUKnots>2) {
|
||||
// Only the internal knots are checked.
|
||||
Standard_Integer iknot= UFirstInd;
|
||||
@@ -248,7 +248,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
}
|
||||
if (corrected) {
|
||||
// at this knot, the continuity is now C1. Nothing else to do.
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Correction at UKnot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Correction at UKnot "<<iknot<<std::endl;
|
||||
// PTV 15.05.2002 decrease iknot and ULastIndex values if knot removed
|
||||
if (newMultiplicity ==0) { iknot--; ULastInd--; }
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
@@ -259,14 +259,14 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
Standard_Real u=MyBSpline->UKnot(iknot);
|
||||
myUSplitValues->InsertBefore(j++,u);
|
||||
myNbResultingRow++;
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Splitting at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Splitting at Knot "<<iknot<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
UFirst = ULast;
|
||||
}
|
||||
}
|
||||
// if (ShapeUpgrade::Debug()) cout<<". NbVKnots="<<NbVKnots<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". NbVKnots="<<NbVKnots<<std::endl;
|
||||
if (NbVKnots>2) {
|
||||
// Only the internal knots are checked.
|
||||
Standard_Integer iknot=VFirstInd;
|
||||
@@ -289,7 +289,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
}
|
||||
if (corrected ) {
|
||||
// at this knot, the continuity is now Criterion. Nothing else to do.
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Correction at VKnot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Correction at VKnot "<<iknot<<std::endl;
|
||||
// PTV 15.05.2002 decrease iknot and ULastIndex values if knot removed
|
||||
if (newMultiplicity ==0) { iknot--; VLastInd--; }
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
@@ -299,7 +299,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
Standard_Real v=MyBSpline->VKnot(iknot);
|
||||
myVSplitValues->InsertBefore(j1++,v);
|
||||
myNbResultingCol++;
|
||||
// if (ShapeUpgrade::Debug()) cout<<". Splitting at Knot "<<iknot<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout<<". Splitting at Knot "<<iknot<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1450,7 +1450,7 @@ static Standard_Boolean MergeSubSeq(const TopTools_SequenceOfShape& theChain,
|
||||
}
|
||||
if(NeedUnion) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"can not make analitical union => make approximation"<<endl;
|
||||
std::cout<<"can not make analitical union => make approximation"<<std::endl;
|
||||
#endif
|
||||
TopoDS_Edge E = GlueEdgesWithPCurves(theChain, VF, VL);
|
||||
OutEdge = E;
|
||||
@@ -1458,7 +1458,7 @@ static Standard_Boolean MergeSubSeq(const TopTools_SequenceOfShape& theChain,
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"can not make approximation for such types of curves"<<endl;
|
||||
std::cout<<"can not make approximation for such types of curves"<<std::endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_WireDivide,ShapeUpgrade_Tool)
|
||||
ShapeUpgrade_WireDivide::ShapeUpgrade_WireDivide():
|
||||
ShapeUpgrade_Tool(), myStatus(0)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout <<"ShapeUpgrade_WireDivide"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout <<"ShapeUpgrade_WireDivide"<<std::endl;
|
||||
mySplitCurve3dTool = new ShapeUpgrade_SplitCurve3d;
|
||||
mySplitCurve2dTool = new ShapeUpgrade_SplitCurve2d;
|
||||
myTransferParamTool = new ShapeAnalysis_TransferParametersProj;
|
||||
@@ -89,7 +89,7 @@ ShapeUpgrade_WireDivide::ShapeUpgrade_WireDivide():
|
||||
void ShapeUpgrade_WireDivide::Init(const TopoDS_Wire& W,
|
||||
const TopoDS_Face& F)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout <<"ShapeUpgrade_WireDivide::Init with Wire, Face"<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout <<"ShapeUpgrade_WireDivide::Init with Wire, Face"<<std::endl;
|
||||
myWire = W;
|
||||
myFace = F;
|
||||
myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
|
||||
@@ -103,7 +103,7 @@ void ShapeUpgrade_WireDivide::Init(const TopoDS_Wire& W,
|
||||
void ShapeUpgrade_WireDivide::Init(const TopoDS_Wire& W,
|
||||
const Handle(Geom_Surface)& S)
|
||||
{
|
||||
// if (ShapeUpgrade::Debug()) cout <<"ShapeUpgrade_WireDivide::Init with Wire, Surface "<<endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout <<"ShapeUpgrade_WireDivide::Init with Wire, Surface "<<std::endl;
|
||||
myWire = W;
|
||||
BRepLib_MakeFace mkf(S, Precision::Confusion());
|
||||
myFace = mkf.Face();
|
||||
@@ -275,7 +275,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
|
||||
myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK );
|
||||
|
||||
// if (ShapeUpgrade::Debug()) cout << "ShapeUpgrade_WireDivide::Perform" << endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << "ShapeUpgrade_WireDivide::Perform" << std::endl;
|
||||
|
||||
BRep_Builder B;
|
||||
ShapeAnalysis_Edge sae;
|
||||
@@ -302,7 +302,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
TopoDS_Shape sh = Context()->Apply(ItW.Value(),TopAbs_SHAPE);
|
||||
for(TopExp_Explorer exp(sh,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
||||
// if (ShapeUpgrade::Debug()) cout << ".. Edge " << (void*) &(*E.TShape()) << endl;
|
||||
// if (ShapeUpgrade::Debug()) std::cout << ".. Edge " << (void*) &(*E.TShape()) << std::endl;
|
||||
|
||||
// skip degenerated edges (and also INTERNAL/EXTERNAL, to avoid failures)
|
||||
if ( E.Orientation() == TopAbs_INTERNAL || E.Orientation() == TopAbs_EXTERNAL ) {
|
||||
@@ -380,7 +380,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
if(revKnots2d->Length()!=theKnots2d->Length()) {
|
||||
isSeam = Standard_False;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: ShapeUpgrade_WireDivide: seam has different splitting values on pcurvesd" << endl;
|
||||
std::cout << "Error: ShapeUpgrade_WireDivide: seam has different splitting values on pcurvesd" << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -460,7 +460,7 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
Standard_Integer nbc2d = theSegments2d->Length();
|
||||
if (nbc!=nbc2d) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Error: Number of intervals are not equal for 2d 3d. Ignored."<<endl;
|
||||
std::cout<<"Error: Number of intervals are not equal for 2d 3d. Ignored."<<std::endl;
|
||||
#endif
|
||||
nbc = Min( nbc,nbc2d);
|
||||
}
|
||||
@@ -597,9 +597,9 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
else V = V2;
|
||||
// else V2;
|
||||
// }
|
||||
// if (ShapeUpgrade::Debug()) cout <<"... New intermediate Vertex ("
|
||||
// if (ShapeUpgrade::Debug()) std::cout <<"... New intermediate Vertex ("
|
||||
// <<P.X()<<","<<P.Y()<<","<<P.Z()<<") :"<<(void*) &(*V.TShape())
|
||||
// <<" with Tolerance "<<TolEdge <<endl;
|
||||
// <<" with Tolerance "<<TolEdge <<std::endl;
|
||||
}
|
||||
//else V = V2;
|
||||
|
||||
@@ -728,10 +728,10 @@ void ShapeUpgrade_WireDivide::Perform ()
|
||||
n--;
|
||||
}
|
||||
|
||||
// if (ShapeUpgrade::Debug()) cout <<"... New Edge "
|
||||
// if (ShapeUpgrade::Debug()) std::cout <<"... New Edge "
|
||||
// <<(void*) &(*newEdge.TShape())<<" on vertices "
|
||||
// <<(void*) &(*V1.TShape())<<", " <<(void*) &(*V.TShape())
|
||||
// <<" with Tolerance "<<TolEdge <<endl;
|
||||
// <<" with Tolerance "<<TolEdge <<std::endl;
|
||||
B.Add ( resWire, newEdge );
|
||||
B.Add ( newWire, newEdge );
|
||||
numE++;
|
||||
|
Reference in New Issue
Block a user