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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Potential bug in Adaptor3d_CurveOnSurface.cxx

Potential bug in Adaptor3d_CurveOnSurface.cxx

Potential bug in Adaptor3d_CurveOnSurface.cxx
Cauchy Ding 2012/09/07 18:26
Thread http://www.opencascade.org/org/forum/thread_20187/?forum=3 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;
while((i<=Arr.Upper())&&(Abs(Coord-Arr(i))>Tol)){
i++;}

if(Abs(Coord-Arr(i))<Tol)
Iloc = i;
else
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.

Thanks.
Ding
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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