DiscussionsIssue archiveOther usage issues

Archived discussion

AdvApprox_ApproxAFunction::Approximation returns with wrong error code.

Other usage issuesWed, 02/20/2008 - 15:052 replies

Browse this forum
QuestionAuthor

Hello,

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
ErrorCode=-1;
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.

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Commenter-2,

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

Regards.
Commenter-1

02Commenter-2

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 - http://dev.opencascade.org/index.php?q=home/get_involved.
Regards