1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4

Removed obsolete functions from sources.
Some useful debug functions were 'defined' ( put into #ifdef ...#endif )
Removed some redundant code
This commit is contained in:
omy
2013-08-02 09:54:03 +04:00
committed by bugmaster
parent 7ff8f0197e
commit 4e18e72a22
59 changed files with 80 additions and 3093 deletions

View File

@@ -600,131 +600,6 @@ static void GetCurveKnots(const Standard_Real theMin,
}
}
//=======================================================================
//function : GetIntervalNbr
//purpose :
//=======================================================================
static Standard_Integer GetIntervalNbr
(const Standard_Real theParam,
const Handle(TColStd_HArray1OfReal) &theSurfKnots,
const Standard_Integer theIndStart,
const Standard_Integer theIndEnd)
{
Standard_Integer i;
Standard_Real aTol = Precision::Confusion();
for (i = theIndStart + 1; i < theIndEnd; i++) {
if (theSurfKnots->Value(i) > theParam + aTol)
return i - 1;
}
return Min(theIndStart, theIndEnd - 1);
}
//=======================================================================
//function : GetRealCurveKnots
//purpose :
//=======================================================================
static void GetRealCurveKnots
(const Handle(TColStd_HArray1OfReal) &theCurveKnots,
const Handle(TColStd_HArray1OfReal) &theSurfKnots,
const Geom2dAdaptor_Curve &theCurve,
Handle(TColStd_HArray1OfReal) &theTKnots)
{
Standard_Integer i = theCurveKnots->Lower();
Standard_Integer iU = theCurveKnots->Upper();
Standard_Integer aNbIntPnt = 23;
TColStd_SequenceOfReal aSeqKnot;
Standard_Real aTol = Precision::Confusion();
Standard_Real aTParam;
while (i < iU) {
Standard_Real aT1 = theCurveKnots->Value(i++);
Standard_Real aT2 = theCurveKnots->Value(i);
Standard_Real aStep = (aT2 - aT1)/(aNbIntPnt + 1.);
Standard_Integer j;
gp_Pnt2d aValue;
gp_Vec2d aDir;
Standard_Integer aSurfLInd = theSurfKnots->Lower();
Standard_Integer aSurfUInd = theSurfKnots->Upper();
Standard_Integer anIntrvlInd;
Standard_Real aTParamOld;
Standard_Real aVParam;
Standard_Real aVParamOld;
Standard_Real aDiffOld;
Standard_Real aDiff;
// Append the first curve knot of each interval in the sequence of knots.
aSeqKnot.Append(aT1);
aTParamOld = aT1;
theCurve.D0(aTParamOld, aValue);
aVParamOld = aValue.Y();
anIntrvlInd = GetIntervalNbr(aVParamOld, theSurfKnots,
aSurfLInd, aSurfUInd);
aDiffOld = Min(Abs(aVParamOld - theSurfKnots->Value(anIntrvlInd)),
Abs(aVParamOld - theSurfKnots->Value(anIntrvlInd + 1)));
for (j = 1; j <= aNbIntPnt; j++) {
aTParam = aT1 + j*aStep;
theCurve.D1(aTParam, aValue, aDir);
aVParam = aValue.Y();
aDiff = Min(Abs(aVParam - theSurfKnots->Value(anIntrvlInd)),
Abs(aVParam - theSurfKnots->Value(anIntrvlInd + 1)));
// Skip points if the curve goes along V isoline.
if (Abs(aDir.Y()) > aTol) {
Standard_Boolean isLower =
(aVParam - aTol < theSurfKnots->Value(anIntrvlInd));
Standard_Boolean isUpper =
(aVParam + aTol > theSurfKnots->Value(anIntrvlInd + 1));
if (isLower || isUpper) {
if (isLower) {
aSurfLInd = theSurfKnots->Lower();
aSurfUInd = anIntrvlInd - 1;
} else if (isUpper) {
aSurfLInd = anIntrvlInd + 1;
aSurfUInd = theSurfKnots->Upper();
}
// The V interval is changed. Find new interval.
anIntrvlInd = GetIntervalNbr(aVParam, theSurfKnots,
aSurfLInd, aSurfUInd);
// Add the value that is closer to surface knots.
// Check if the previous value is already added.
if (aDiff < aDiffOld)
aSeqKnot.Append(aTParam);
else if (Abs(aSeqKnot.Last() - aTParamOld) > aTol)
aSeqKnot.Append(aTParamOld);
}
}
// Prepare data for the next iteration.
aTParamOld = aTParam;
aVParamOld = aVParam;
aDiffOld = aDiff;
}
}
// Add the last curve knot to the sequence.
aSeqKnot.Append(theCurveKnots->Value(iU));
// Fill the array of knots.
Standard_Integer aKnotsLen = aSeqKnot.Length();
theTKnots = new TColStd_HArray1OfReal(1, aKnotsLen);
for (i = 1; i <= aKnotsLen; i++) {
aTParam = aSeqKnot.Value(i);
theTKnots->SetValue(i, aTParam);
}
}
//=======================================================================
//function : GetUKnots
//purpose :