for (i = 1; i <= udegree+1; i++) {
for (j = 1; j <= vdegree+1; j++) {
- if (!compact) OS << "\n "<<setw(2)<<i<<", "<<setw(2)<<j<<" : ";
+ if (!compact) OS << "\n "<<std::setw(2)<<i<<", "<<std::setw(2)<<j<<" : ";
Print(S->Pole(i,j),OS,compact);
if (urational || vrational)
OS << " " << S->Weight(i,j);
if (!compact) OS << "\n Poles :\n";
for (i = 1; i <= nbupoles; i++) {
for (j = 1; j <= nbvpoles; j++) {
- if (!compact) OS << "\n "<<setw(2)<<i<<", "<<setw(2)<<j<<" : ";
+ if (!compact) OS << "\n "<<std::setw(2)<<i<<", "<<std::setw(2)<<j<<" : ";
Print(S->Pole(i,j),OS,compact);
if (urational || vrational)
OS << " " << S->Weight(i,j);
OS << "\n";
if (!compact) OS << "\n UKnots :\n";
for (i = 1; i <= nbuknots; i++) {
- if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
+ if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
OS << S->UKnot(i) << " " << S->UMultiplicity(i) <<"\n";
}
OS << "\n";
if (!compact) OS << "\n VKnots :\n";
for (i = 1; i <= nbvknots; i++) {
- if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
+ if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
OS << S->VKnot(i) << " " << S->VMultiplicity(i) <<"\n";
}
OS << "\n";
//if (!compact)
// OS << "***** Unknown Surface ********\n";
//else
- // cout << "***** Unknown Surface ********"<<endl;
+ // std::cout << "***** Unknown Surface ********"<<std::endl;
}
}
OS << "\n -------\n\n";
for (i = 1; i <= nbsurf; i++) {
- OS << setw(4) << i << " : ";
+ OS << std::setw(4) << i << " : ";
PrintSurface(Handle(Geom_Surface)::DownCast(myMap(i)),OS,Standard_False);
}
}
Handle(Geom_SurfaceOfLinearExtrusion)& S)
{
gp_Dir D(1.,0.,0.);
- Handle(Geom_Curve) C;
IS >> D;
- GeomTools_CurveSet::ReadCurve(IS,C);
+ Handle(Geom_Curve) C = GeomTools_CurveSet::ReadCurve(IS);
S = new Geom_SurfaceOfLinearExtrusion(C,D);
return IS;
}
{
gp_Pnt P(0.,0.,0.);
gp_Dir D(1.,0.,0.);
- Handle(Geom_Curve) C;
IS >> P >> D;
- GeomTools_CurveSet::ReadCurve(IS,C);
+ Handle(Geom_Curve) C = GeomTools_CurveSet::ReadCurve(IS);
S = new Geom_SurfaceOfRevolution(C,gp_Ax1(P,D));
return IS;
}
GeomTools::GetReal(IS, U2);
GeomTools::GetReal(IS, V1);
GeomTools::GetReal(IS, V2);
- Handle(Geom_Surface) BS;
- GeomTools_SurfaceSet::ReadSurface(IS,BS);
+ Handle(Geom_Surface) BS = GeomTools_SurfaceSet::ReadSurface(IS);
S = new Geom_RectangularTrimmedSurface(BS,U1,U2,V1,V2);
return IS;
}
{
Standard_Real O=0.;
GeomTools::GetReal(IS, O);
- Handle(Geom_Surface) BS;
- GeomTools_SurfaceSet::ReadSurface(IS,BS);
+ Handle(Geom_Surface) BS = GeomTools_SurfaceSet::ReadSurface(IS);
S = new Geom_OffsetSurface(BS,O,Standard_True);
return IS;
}
//purpose :
//=======================================================================
-Standard_IStream& GeomTools_SurfaceSet::ReadSurface(Standard_IStream& IS,
- Handle(Geom_Surface)& S)
+Handle(Geom_Surface) GeomTools_SurfaceSet::ReadSurface(Standard_IStream& IS)
{
Standard_Integer stype;
+ Handle(Geom_Surface) S;
try {
OCC_CATCH_SIGNALS
IS >> stype;
break;
}
}
- catch(Standard_Failure) {
+ catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
- Handle(Standard_Failure) anExc = Standard_Failure::Caught();
- cout <<"EXCEPTION in GeomTools_SurfaceSet::ReadSurface(..)!!!" << endl;
- cout << anExc << endl;
+ std::cout <<"EXCEPTION in GeomTools_SurfaceSet::ReadSurface(..)!!!" << std::endl;
+ std::cout << anException << std::endl;
#endif
- S = NULL;
+ (void)anException;
}
- return IS;
+ return S;
}
//=======================================================================
char buffer[255];
IS >> buffer;
if (strcmp(buffer,"Surfaces")) {
- cout << "Not a surface table"<<endl;
+ std::cout << "Not a surface table"<<std::endl;
return;
}
- Handle(Geom_Surface) S;
Standard_Integer i, nbsurf;
IS >> nbsurf;
//OCC19559
Handle(Message_ProgressIndicator) progress = GetProgress();
Message_ProgressSentry PS(progress, "Surfaces", 0, nbsurf, 1);
for (i = 1; i <= nbsurf && PS.More(); i++, PS.Next()) {
- GeomTools_SurfaceSet::ReadSurface(IS,S);
+ Handle(Geom_Surface) S = GeomTools_SurfaceSet::ReadSurface (IS);
myMap.Add(S);
}
}