Salome HOME
22244: [CEA] Method to compute the normal to a mesh face
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.cxx
index b47ae9b19e261cd1c7ae03d6f169e51d68bbb774..139262a6f38b4f5c2b2938f5bfc29b00ab2535d4 100644 (file)
@@ -4048,7 +4048,8 @@ SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long  elemId,
 //purpose  : Returns three components of normal of given mesh face.
 //=======================================================================
 
 //purpose  : Returns three components of normal of given mesh face.
 //=======================================================================
 
-SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long  elemId)
+SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long    elemId,
+                                                 CORBA::Boolean normalized)
 {
   if ( _preMeshInfo )
     _preMeshInfo->FullLoadFromFile();
 {
   if ( _preMeshInfo )
     _preMeshInfo->FullLoadFromFile();
@@ -4058,7 +4059,7 @@ SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long  elemId)
   if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
   {
     gp_XYZ normal;
   if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
   {
     gp_XYZ normal;
-    if ( SMESH_MeshAlgos::FaceNormal( mesh->FindElement(elemId), normal, /*normalized=*/true ))
+    if ( SMESH_MeshAlgos::FaceNormal( mesh->FindElement(elemId), normal, normalized ))
     {
       aResult->length( 3 );
       aResult[ 0 ] = normal.X();
     {
       aResult->length( 3 );
       aResult[ 0 ] = normal.X();