During the normal vector calculation of a sphere, at the north poles the result is incorrect sometimes:
BRepPrimAPI_MakeSphere S(3);
Eventhough I've increased the deivation the error remained. Finally I've found that, it's related to that, the U,V parameter of the subject point of triangulation is out of the bound (maxu, maxv, minu, minv) and one of the partial derivative is inverted (or sg like that).
Ok, I know, it's an epsilon related question, but i have a fear that, this might occure in other cases as well.
So with a small "hack" the hiding of the actual bug/feature:
In StdPrs_ToolShadedShape::Normal:
if (hasUV && !GS.IsNull()) {
// ...
Standard_Real u1,u2,v1,v2;
GS->Bounds(u1,u2,v1,v2);
const TColgp_Array1OfPnt2d& UVNodes = T->UVNodes();
//if (!S.GetType() == GeomAbs_Plane) { // OCC bug??? gzp
if (S.GetType() != GeomAbs_Plane) {
for (i = UVNodes.Lower(); i
U = UVNodes(i).X();
V = UVNodes(i).Y();
U = min(max(U,u1),u2);
V = min(max(V,v1),v2);
//...