Salome HOME
Update copyright information
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.cxx
index e46396bb67014609e3e5532ad387a30a8390a2e5..b0fd1351a89e21a14adeadee55e6f3d1ff56ee4f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -114,7 +114,7 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
 {
   SMESHDS_Mesh* meshDS = GetMeshDS();
   // we can create quadratic elements only if all elements
-  // created on subshapes of given shape are quadratic
+  // created on sub-shapes of given shape are quadratic
   // also we have to fill myTLinkNodeMap
   myCreateQuadratic = true;
   mySeamShapeIds.clear();
@@ -279,7 +279,7 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
 //function : GetNodeUVneedInFaceNode
 //purpose  : Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
 //           Return true if the face is periodic.
-//           If F is Null, answer about subshape set through IsQuadraticSubMesh() or
+//           If F is Null, answer about sub-shape set through IsQuadraticSubMesh() or
 //           * SetSubShape()
 //=======================================================================
 
@@ -948,8 +948,8 @@ std::pair<int, TopAbs_ShapeEnum> SMESH_MesherHelper::GetMediumPos(const SMDS_Mes
     {
       TopoDS_Shape V1 = GetSubShapeByNode( n1, GetMeshDS() );
       TopoDS_Shape V2 = GetSubShapeByNode( n2, GetMeshDS() );
-      shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_FACE );
-      if ( shape.IsNull() ) shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_EDGE );
+      shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_EDGE );
+      if ( shape.IsNull() ) shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_FACE );
     }
     else // VERTEX and EDGE
     {
@@ -1695,7 +1695,7 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap &            theParam2
     double f, l;
     BRep_Tool::Range( *edge, f, l );
     if ( edge->Orientation() == TopAbs_REVERSED ) std::swap( f, l );
-    const double coeff = 1. / ( l - f ) / length[iE] / fullLen;
+    const double coeff = 1. / ( l - f ) * length[iE] / fullLen;
     const double prevPar = theParam2ColumnMap.empty() ? 0 : theParam2ColumnMap.rbegin()->first;
     map< double, const SMDS_MeshNode*>::iterator u_n = sortedBaseNodes.begin();
     for ( ; u_n != sortedBaseNodes.end(); u_n++ )