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:
@@ -149,25 +149,6 @@ static
|
||||
Standard_Real& u,
|
||||
Standard_Real& v);
|
||||
|
||||
static
|
||||
Standard_Boolean DoTrim(const TheCurve& curve,
|
||||
const TheSurface& surface);
|
||||
static
|
||||
void DoCurve(const TheCurve& curve,
|
||||
Bnd_Box& boxCurve);
|
||||
|
||||
static
|
||||
void DoCommon(TColStd_Array1OfReal& Coords,
|
||||
Standard_Real& Cmin,
|
||||
Standard_Real& Cmax);
|
||||
|
||||
static
|
||||
void DoCommonBox(const Bnd_Box& boxSurface,
|
||||
const Bnd_Box& boxCurve,
|
||||
TColStd_Array1OfReal& X,
|
||||
TColStd_Array1OfReal& Y,
|
||||
TColStd_Array1OfReal& Z);
|
||||
|
||||
static
|
||||
void ProjectIntersectAndEstLim(const gp_Lin& theLine,
|
||||
const gp_Pln& thePln,
|
||||
@@ -231,91 +212,6 @@ void IntCurveSurface_Inter::DoSurface(const TheSurface& surface,
|
||||
gap = Max(Ures,Vres);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void DoCurve(const TheCurve& curve,
|
||||
Bnd_Box& boxCurve)
|
||||
{
|
||||
Standard_Real CF = TheCurveTool::FirstParameter(curve);
|
||||
Standard_Real CL = TheCurveTool::LastParameter(curve);
|
||||
Standard_Real C = 0., dC = fabs(CL-CF)/50.;
|
||||
Standard_Integer iC = 0;
|
||||
gp_Pnt aPnt;
|
||||
|
||||
for(iC = 0; iC < 50; iC++) {
|
||||
if(iC == 0)
|
||||
C = CF;
|
||||
else if(iC == 49)
|
||||
C = CL;
|
||||
else
|
||||
C = CF + dC *((Standard_Real)iC);
|
||||
|
||||
TheCurveTool::D0(curve,C,aPnt);
|
||||
boxCurve.Add(aPnt);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoCommon
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void DoCommon(TColStd_Array1OfReal& Coords,
|
||||
Standard_Real& Cmin,
|
||||
Standard_Real& Cmax)
|
||||
{
|
||||
Standard_Integer i = 0, j = 0;
|
||||
for(i = 1; i <= 4; i++) {
|
||||
for(j = i+1; j <= 4; j++) {
|
||||
if(Coords(j) > Coords(i)) {
|
||||
Standard_Real c = Coords(i);
|
||||
Coords.SetValue(i,Coords(j));
|
||||
Coords.SetValue(j,c);
|
||||
}
|
||||
}
|
||||
}
|
||||
Cmax = Coords(2);
|
||||
Cmin = Coords(3);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoCommonBox
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static void DoCommonBox(const Bnd_Box& boxSurface,
|
||||
const Bnd_Box& boxCurve,
|
||||
TColStd_Array1OfReal& X,
|
||||
TColStd_Array1OfReal& Y,
|
||||
TColStd_Array1OfReal& Z)
|
||||
{
|
||||
Standard_Real SBXmin = 0., SBYmin = 0., SBZmin = 0.;
|
||||
Standard_Real SBXmax = 0., SBYmax = 0., SBZmax = 0.;
|
||||
boxSurface.Get(SBXmin,SBYmin,SBZmin,SBXmax,SBYmax,SBZmax);
|
||||
|
||||
Standard_Real CBXmin = 0., CBYmin = 0., CBZmin = 0.;
|
||||
Standard_Real CBXmax = 0., CBYmax = 0., CBZmax = 0.;
|
||||
boxCurve.Get(CBXmin,CBYmin,CBZmin,CBXmax,CBYmax,CBZmax);
|
||||
|
||||
TColStd_Array1OfReal Coord(1,4);
|
||||
|
||||
Coord(1) = SBXmin; Coord(2) = SBXmax; Coord(3) = CBXmin; Coord(4) = CBXmax;
|
||||
Standard_Real CXmin = SBXmin, CXmax = SBXmax;
|
||||
DoCommon(Coord,CXmin,CXmax);
|
||||
|
||||
Coord(1) = SBYmin; Coord(2) = SBYmax; Coord(3) = CBYmin; Coord(4) = CBYmax;
|
||||
Standard_Real CYmin = SBYmin, CYmax = SBYmax;
|
||||
DoCommon(Coord,CYmin,CYmax);
|
||||
|
||||
Coord(1) = SBZmin; Coord(2) = SBZmax; Coord(3) = CBZmin; Coord(4) = CBZmax;
|
||||
Standard_Real CZmin = SBZmin, CZmax = SBZmax;
|
||||
DoCommon(Coord,CZmin,CZmax);
|
||||
|
||||
X.SetValue(1,CXmin); X.SetValue(2,CXmax);
|
||||
Y.SetValue(1,CYmin); Y.SetValue(2,CYmax);
|
||||
Z.SetValue(1,CZmin); Z.SetValue(2,CZmax);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoNewBounds
|
||||
//purpose :
|
||||
@@ -2329,77 +2225,3 @@ void EstLimForInfSurf(Standard_Real& U1new,
|
||||
V1new = Max(V1new, -1.e10);
|
||||
V2new = Min(V2new, 1.e10);
|
||||
}
|
||||
//=======================================================================
|
||||
//function : DoTrim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean DoTrim(const TheCurve& curve,
|
||||
const TheSurface& surface)
|
||||
{
|
||||
Standard_Boolean isAnaCurve, isAnaSurface, result;
|
||||
GeomAbs_CurveType aCT;
|
||||
GeomAbs_SurfaceType aST;
|
||||
|
||||
isAnaCurve = Standard_False;
|
||||
isAnaSurface = Standard_False;
|
||||
//
|
||||
aCT=TheCurveTool::GetType(curve);
|
||||
//
|
||||
isAnaCurve= (aCT==GeomAbs_Line ||
|
||||
aCT==GeomAbs_Circle ||
|
||||
aCT==GeomAbs_Ellipse ||
|
||||
aCT==GeomAbs_Hyperbola ||
|
||||
aCT==GeomAbs_Parabola);
|
||||
//
|
||||
aST=TheSurfaceTool::GetType(surface);
|
||||
isAnaSurface=(aST==GeomAbs_Plane ||
|
||||
aST==GeomAbs_Cylinder ||
|
||||
aST==GeomAbs_Cone ||
|
||||
aST==GeomAbs_Sphere ||
|
||||
aST==GeomAbs_Torus);
|
||||
//
|
||||
result = !(isAnaCurve && isAnaSurface);
|
||||
//
|
||||
if(result) {
|
||||
Standard_Boolean isUClosed, isVClosed;
|
||||
|
||||
isUClosed=(TheSurfaceTool::IsUClosed(surface) ||
|
||||
TheSurfaceTool::IsUPeriodic(surface));
|
||||
isVClosed=(TheSurfaceTool::IsVClosed(surface)
|
||||
|| TheSurfaceTool::IsVPeriodic(surface));
|
||||
if(isUClosed && isVClosed) {
|
||||
result =!result;
|
||||
}
|
||||
}
|
||||
//modified by NIZNHY-PKV Wed Apr 04 12:11:01 2012f
|
||||
if (result) {
|
||||
Standard_Real aU0,aU1,aV0,aV1, dU, dV, dA, dB, aR, aTresh;
|
||||
//
|
||||
aTresh=100.;
|
||||
aV0 = TheSurfaceTool::FirstVParameter(surface);
|
||||
aV1 = TheSurfaceTool::LastVParameter(surface);
|
||||
aU0 = TheSurfaceTool::FirstUParameter(surface);
|
||||
aU1 = TheSurfaceTool::LastUParameter(surface);
|
||||
dU=aU1-aU0;
|
||||
dV=aV1-aV0;
|
||||
//
|
||||
dA=dU;
|
||||
dB=dV;
|
||||
if (dV>dU) {
|
||||
dA=dV;
|
||||
dB=dU;
|
||||
}
|
||||
//
|
||||
aR=dA/dB;
|
||||
if (dB<Precision::PConfusion()) {
|
||||
result=!result;
|
||||
return result;
|
||||
}
|
||||
if (aR>aTresh) {
|
||||
result=!result;
|
||||
}
|
||||
|
||||
}
|
||||
//modified by NIZNHY-PKV Wed Apr 04 12:11:03 2012t
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user