1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00

0023147: Suspicious if (5)

Removed non-executed parts of code because

   Standard_Boolean s1Point = Standard_False;
   Standard_Boolean s2Point = Standard_False;
   Standard_Boolean vClosed = Standard_False;

and never changed thus some parts of code are non-reachable.
Fixed mistake with 'else' without corresponding 'if'.
Commented unreachable code part.
This commit is contained in:
omy 2012-11-02 15:18:21 +04:00
parent 5768cd55b7
commit 9046e4fc55

View File

@ -519,11 +519,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
Handle(Geom_BSplineSurface) BS; Handle(Geom_BSplineSurface) BS;
if (myRefSurf.IsNull()) { if (myRefSurf.IsNull()) {
Standard_Boolean s1Point = Standard_False;
Standard_Boolean s2Point = Standard_False;
Standard_Boolean vClosed = Standard_False;
Standard_Real myPres3d = 1.e-06;
Standard_Real myPres3d = 1.e-06;
Standard_Integer i,j,jdeb=1,jfin=mySections.Length(); Standard_Integer i,j,jdeb=1,jfin=mySections.Length();
GeomFill_SectionGenerator section; GeomFill_SectionGenerator section;
@ -534,36 +531,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
Standard_Real first = curv->FirstParameter(), Standard_Real first = curv->FirstParameter(),
last = curv->LastParameter(); last = curv->LastParameter();
if (s1Point) {
jdeb++;
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = curv->Value(first);
Extremities(2) = curv->Value(last);
TColStd_Array1OfReal Bounds(1,2);
Bounds(1) = UFirst;
Bounds(2) = ULast;
Standard_Real Deg = 1;
TColStd_Array1OfInteger Mult(1,2);
Mult(1) = (Standard_Integer ) Deg+1;
Mult(2) = (Standard_Integer ) Deg+1;
Handle(Geom_BSplineCurve) BSPoint
= new Geom_BSplineCurve(Extremities,Bounds,Mult,(Standard_Integer ) Deg);
section.AddCurve(BSPoint);
}
if (s2Point) {
jfin--;
}
// Standard_Boolean urat = Standard_True;
for (j=jdeb; j<=jfin; j++) { for (j=jdeb; j<=jfin; j++) {
// cas des sections bouclantes
if (j==jfin && vClosed) {
section.AddCurve(curvBS1);
}
else {
// read the j-th curve // read the j-th curve
curv = mySections(j); curv = mySections(j);
curvTrim = new Geom_TrimmedCurve(curv, curvTrim = new Geom_TrimmedCurve(curv,
@ -580,19 +549,11 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
curvBS->Knots(BSK); curvBS->Knots(BSK);
BSplCLib::Reparametrize(UFirst,ULast,BSK); BSplCLib::Reparametrize(UFirst,ULast,BSK);
curvBS->SetKnots(BSK); curvBS->SetKnots(BSK);
// if (!curvBS->IsRational()) urat = Standard_False;
section.AddCurve(curvBS); section.AddCurve(curvBS);
// cas des sections bouclantes
if (j==jdeb && vClosed) {
curvBS1 = curvBS;
} }
} /*
}
if (s2Point) { if (s2Point) {
curv = mySections(jfin+1); curv = mySections(jfin+1);
first = curv->FirstParameter(); first = curv->FirstParameter();
@ -610,7 +571,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
Handle(Geom_BSplineCurve) BSPoint Handle(Geom_BSplineCurve) BSPoint
= new Geom_BSplineCurve(Extremities,Bounds,Mult,(Standard_Integer ) Deg); = new Geom_BSplineCurve(Extremities,Bounds,Mult,(Standard_Integer ) Deg);
section.AddCurve(BSPoint); section.AddCurve(BSPoint);
} }*/
Standard_Integer Nbcurves = mySections.Length(); Standard_Integer Nbcurves = mySections.Length();
Standard_Integer Nbpar = myParams.Length(); Standard_Integer Nbpar = myParams.Length();