]> OCCT Git - occt-copy.git/commitdiff
0023021: MeshVS_DataSource::GetNormalsByElement returns Standard_False and gives...
authorPawel <pawel-kowalski@wp.pl>
Fri, 13 Apr 2012 11:38:52 +0000 (13:38 +0200)
committerdbv <dbv@opencascade.com>
Fri, 25 May 2012 11:03:28 +0000 (15:03 +0400)
If all normals are correctly computed using GetNodeNormal the variable 'res' is never set to Standard_True and the normals are not passed to the variable 'Normals' that is supposed to hold the result of the computation.

src/MeshVS/MeshVS_DataSource.cxx

index 020cb794e96f686554847ff5d35a1288c4fbaacc..6f6b5836061bcc9fe408e798c0389cae6fc7958c 100755 (executable)
@@ -206,10 +206,10 @@ Standard_Boolean MeshVS_DataSource::GetNormalsByElement(const Standard_Integer I
     } // switch ( Type )
   } // if ( !allNormals )
 
-  if ( res )
+  if ( res || allNormals )
     Normals = aNormals;
 
-  return res;
+  return ( res || allNormals );
 }
 
 //================================================================