mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0022623: Use of uninitialized variables in HLRBRep_Curve::UpdateMinMax in debug mode
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// File: HLRBRep_EdgeFaceTool.cxx
|
||||
// Created: Mon Oct 18 19:31:35 1993
|
||||
// Author: Christophe MARION
|
||||
// <cma@nonox>
|
||||
// File: HLRBRep_EdgeFaceTool.cxx
|
||||
// Created: Mon Oct 18 19:31:35 1993
|
||||
// Author: Christophe MARION
|
||||
// Copyright: OPEN CASCADE 2000
|
||||
|
||||
#include <HLRBRep_EdgeFaceTool.ixx>
|
||||
#include <HLRBRep_Curve.hxx>
|
||||
@@ -18,11 +18,11 @@
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue
|
||||
( const Standard_Address F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg)
|
||||
Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue
|
||||
(const Standard_Address F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg)
|
||||
{
|
||||
gp_Pnt P;
|
||||
gp_Vec D1U,D1V,D2U,D2V,D2UV;
|
||||
@@ -45,8 +45,7 @@ Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue
|
||||
Standard_Real D = nmu2 *alfa2 + 2*d1ud1v *alfabeta + nmv2 *beta2;
|
||||
return N/D;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -54,36 +53,34 @@ Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
|
||||
const Standard_Address E,
|
||||
const Standard_Address F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V)
|
||||
Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
|
||||
const Standard_Address E,
|
||||
const Standard_Address F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V)
|
||||
{
|
||||
Standard_Real pfbid,plbid;
|
||||
Standard_Boolean done = Standard_True;
|
||||
if (BRep_Tool::CurveOnSurface
|
||||
(((HLRBRep_Curve *)E)->Curve().Edge(),
|
||||
((HLRBRep_Surface*)F)->Surface().Face(),pfbid,plbid).IsNull()) {
|
||||
((HLRBRep_Surface*)F)->Surface().Face(),pfbid,plbid).IsNull())
|
||||
{
|
||||
BRepExtrema_ExtPF proj
|
||||
(BRepLib_MakeVertex(((HLRBRep_Curve*)E)->Value3D(Par)),
|
||||
((HLRBRep_Surface*)F)->Surface().Face());
|
||||
Standard_Integer index = 0;
|
||||
Standard_Integer i, index = 0;
|
||||
Standard_Real dist2 = RealLast();
|
||||
Standard_Real newdist2;
|
||||
Standard_Integer n = proj.NbExt();
|
||||
|
||||
for (Standard_Integer i = 1; i <= n; i++) {
|
||||
newdist2 = proj.SquareDistance(i);
|
||||
const Standard_Integer n = proj.NbExt();
|
||||
for (i = 1; i <= n; i++) {
|
||||
const Standard_Real newdist2 = proj.SquareDistance(i);
|
||||
if (newdist2 < dist2) {
|
||||
dist2 = newdist2;
|
||||
index = i;
|
||||
dist2 = newdist2;
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
if (index != 0)
|
||||
proj.Parameter(index,U,V);
|
||||
else
|
||||
done = Standard_False;
|
||||
if (index == 0)
|
||||
return Standard_False;
|
||||
|
||||
proj.Parameter(index,U,V);
|
||||
}
|
||||
else {
|
||||
BRepAdaptor_Curve2d PC
|
||||
@@ -94,6 +91,5 @@ Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
|
||||
U = P2d.X();
|
||||
V = P2d.Y();
|
||||
}
|
||||
return done;
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user