]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Improve the returned plane vector
authoreap <eap@opencascade.com>
Tue, 3 Oct 2017 16:42:46 +0000 (19:42 +0300)
committereap <eap@opencascade.com>
Tue, 3 Oct 2017 16:42:46 +0000 (19:42 +0300)
src/SMESH/SMESH_MeshEditor.cxx

index 981458a6a8362b66dd24e4693e79fb5859d01f1b..671218aeb768ff0d0ccf82d0173e92a0594b2182 100644 (file)
@@ -13231,13 +13231,17 @@ void SMESH_MeshEditor::MakePolyLine( TListOfPolySegments&   theSegments,
       if ( polySeg.myMidProjPoint.Distance( pMid ) < Precision::Confusion() )
       {
         SMESH_MeshAlgos::FaceNormal( face, const_cast< gp_XYZ& >( polySeg.myVector.XYZ() ));
-        polySeg.myMidProjPoint = pMid + polySeg.myVector.XYZ();
+        polySeg.myMidProjPoint = pMid + polySeg.myVector.XYZ() * ( p1 - p2 ).Modulus() * 0.333;
       }
       else
       {
         polySeg.myVector = polySeg.myMidProjPoint.XYZ() - pMid;
       }
     }
+    else
+    {
+      polySeg.myVector = plnNorm ^ ( p1 - p2 );
+    }
   }
 
   // assure that inverse elements are constructed, avoid their concurrent building in threads