MantisBT - Community
View Issue Details
0023170Community[OCCT] OCCT:Modeling Algorithmspublic2012-05-24 03:272012-11-16 13:16
dingzh 
bugmaster 
normalminor 
closedfixed 
WindowsVC++ 201064 bit
[OCCT] 6.5.3 
[OCCT] 6.5.4[OCCT] 6.5.4 
chl 934 K0
0023170: Bug of creating a full sphere face
Using new OCC6.5.3, I can't create a full sphere face any more like before.
face = BRepBuilderAPI_MakeFace (gp_Sphere(ax2, radius), 0, 6.2831853071795880, -1.5707963267948970, 1.5707963267948970);
it will throw an exception in another sub API:
static Standard_Boolean IsDegenerated(const Handle(Geom_Curve)& theCurve,
const Standard_Real theMaxTol,
Standard_Real& theActTol)
{
GeomAdaptor_Curve AC(theCurve);
Standard_Real aConfusion = Precision::Confusion();
theActTol = aConfusion;
GeomAbs_CurveType Type = AC.GetType();

if (Type == GeomAbs_Circle) {

//exception throwed here
gp_Circ Circ = AC.Circle();
----------------------------------
DRAW script to reproduce (in Debug mode only):

pload MODELING
sphere s 10
mkface f s 0 6.2831853071795880 -1.5707963267948970 1.5707963267948970
No tags attached.
? K0 (543) 2012-05-31 17:11
https://tracker.dev.opencascade.org/
Issue History
2012-05-24 03:27dingzhNew Issue
2012-05-24 03:27dingzhAssigned To => jgv
2012-05-24 09:41abvNote Added: 0020572
2012-05-24 09:41abvAssigned Tojgv => abv
2012-05-24 09:41abvStatusnew => assigned
2012-05-24 09:41abvTarget Version => 6.5.4
2012-05-24 09:41abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3946#r3946
2012-05-24 09:53abvNote Added: 0020573
2012-05-24 09:53abvAssigned Toabv => dingzh
2012-05-24 09:53abvStatusassigned => resolved
2012-05-25 16:47abvAssigned Todingzh => jgv
2012-05-31 12:07jgvNote Added: 0020622
2012-05-31 12:07jgvStatusresolved => reviewed
2012-05-31 12:09mkvAssigned Tojgv => aan
2012-05-31 17:11aanTest case number => chl 934 K0
2012-05-31 17:11aanFile Added: K0
2012-06-01 16:10mkvNote Added: 0020629
2012-06-01 16:11mkvAssigned Toaan => bugmaster
2012-06-01 16:11mkvStatusreviewed => tested
2012-06-04 16:14bugmasterChangeset attached => occt master 5554ac68
2012-06-04 16:14bugmasterStatustested => verified
2012-06-04 16:14bugmasterResolutionopen => fixed
2012-11-16 13:15bugmasterFixed in Version => 6.5.4
2012-11-16 13:16bugmasterStatusverified => closed

Notes
(0020572)
abv   
2012-05-24 09:41   
The problem is not a regression in 6.5.3, but is reproduced in Debug mode only, and only when supplied range by V is greater than 'precise' PI/2 (as in this case, even if it is greater only by double epsilon).

The reason is that the method obtaining V isoline of sphere is not protected against case when |V| > PI/2; it creates circle with negative radius. In the reported case V = PI/2 but negative radius is still computed due to limited precision of floating point representation (the order is ~1e-15).
(0020573)
abv   
2012-05-24 09:53   
The fix is put in Git branch CR23170, please review (see http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff;h=7bbe72d80f28a606e042624259b4c5705aa3189a [^])
(0020622)
jgv   
2012-05-31 12:07   
No remarks
(0020629)
mkv   
2012-06-01 16:10   
Dear BugMaster,
The workbenches
KAS:dev:aan-23170-occt (GIT branch CR23170)
KAS:dev:aan-23170-products (GIT master)
were compiled on Linux platform and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
chl 934 K0 testing case has been created for issue.
Results of execution is successfully.

See results in /QADisk/occttests/results/KAS/dev/aan-23170-products_31052012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120518-opt_19052012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification [^]