Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

Potential bug in Adaptor3d_CurveOnSurface.cxx

Potential bug in Adaptor3d_CurveOnSurface.cxx
Cauchy Ding 2012/09/07 18:26
Thread has fixed a bug in Hunt function in Adaptor3d_CurveOnSurface.cxx.

But the logic in Hunt still has some problem especiall when Abs(Coord-Arr(i))==Tol.
The raw Hunt function is:
static void Hunt(const TColStd_Array1OfReal& Arr,
           const Standard_Real Coord,
           Standard_Integer& Iloc)
{//Warning: Hunt is used to find number of knot which equals co-ordinate component,
// when co-ordinate component definitly equals a knot only.
Standard_Real Tol=Precision::PConfusion()/10;
Standard_Integer i=1;

Iloc = i;
if(Abs(Coord-Arr(i))>Tol) Standard_NotImplemented::Raise("Adaptor3d_CurveOnSurface:Hunt");
When Abs(Coord-Arr(i))==Tol, the Iloc has a undefined value, so it may cause crash in release version.

Latest news
  • JT Assistant Linux and CAD Assistant
  • Open CASCADE JT Assistant
  • OCCT Applications

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map