[Bug] over refined B-spline mesh

Here are a geometry and a program that show the B-spline mesher is still buggy in OCCT 6.5.1. The BRep is a sphere trimmed by a square made of 120 TopoDS_Edge. The program is run with the B-spline mesher and without (thanks to the attached patch). In both cases I give the number of triangles for the sphere as a reference (the optimal mesh), and for the sphere converted to GeomAbs_BSplineSurface.

Without the patch (B-spline mesher):
$ ./a.out
Number of triangles for the sphere geometry: 886
Number of triangles for the nurbs geometry: 46948

With the patch (generic mesher):
$ ./a.out
Number of triangles for the sphere geometry: 886
Number of triangles for the nurbs geometry: 1676

This geometry is not a pathological case as over refined trimming are more than common in real world. I think a mesh 28 time too thin should be concidered as a bug.

See the patch, source code, and geometry attached.

Regards,

Jerome

Attachments: 
Forum supervisor's picture

Dear Jerome,
I would like to inform you that the posted problem is checked and reproduced.
The corresponding issue with ID = 22778 has been registered.
Later you can know if the issue is resolved by checking references to the specified ID in OCCT Release Notes. The analysis of the issue will take some time depending on our technical capability and availability of resources.
Thanks for your contribution.
Forum supervisor