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

Search the Forums
See All Topics

AdvApprox_ApproxAFunction::Approximation returns with wrong error code.

AdvApprox_ApproxAFunction::Approximation returns with wrong error code.
Christian R. Krug 2008/02/20 13:05

I found a bug in AdvApprox_ApproxAFunction::Approximation(...). The last parameter of this function, namely 'ErrorCode', should propagate an error state if the approximation was not successfull.
But line 560 which read in OCC version 5.2
is now commented out
     // pour l'instant ErrorCode=-1;

This has the effect that e.g. in Geom2dConvert_ApproxCurve the IsDone() method always returns true, even when the approximation did not succeed, i.e. when MaxError is greater than the specified Tol2d.

After I restored the original ErrorCode statement in AdvApprox_ApproxAFunction the Geom2dConvert_ApproxCurve behaves as it should: if MaxError > Tol2d, then IsDone() == Standard_False. So far I could not detect any side effects.

Kind regards, Kris.
Mauro Mariotti 2012/11/21 13:20
Forum supervisor,

this fix sounds right.
Has it been integrated in the official OCC ?

Forum supervisor 2012/11/21 14:13
Dear Mauro,
As I see this line (now it has number #575) is still commented out.
The previous description has no any reproducer.
But if you can reproduce it I suggest you to register the issue in Mantis Bugtracker which is available via the Collaborative portal -
Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

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