Bug, lucky OCC programmers, or unefficient code ?

In StdPrs_ToolShadedeShape.cxx, lione 73 in function:

void StdPrs_ToolShadedShape::Normal(const TopoDS_Face& aFace,
Poly_Connect& pc,
TColgp_Array1OfDir& Nor)

the original line is:
if (!S.GetType() == GeomAbs_Plane) {

I think it should be sg like:
if (S.GetType() != GeomAbs_Plane) {
... // lots of normal calculation
else {
... //one normal calculation

Forum supervisor's picture

Hello Ernest,

Thank you for noticing and reporting this problem. It is now registered as a bug OCC8563 "Incorrect comparison in StdPrs_ToolShadedShape::Normal". The problem will be fixed in one of the next releases of Open CASCADE Technology - for the list of bugs fixed please check the Release Notes at http://www.opencascade.org/getocc/whatsnew/.

Best regards,
Forum Supervisor