From: eap Date: Tue, 3 Oct 2017 16:42:46 +0000 (+0300) Subject: Improve the returned plane vector X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=869b4c84f2c596e07be508283809230c4a1832b5;p=modules%2Fsmesh.git Improve the returned plane vector --- diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 981458a6a..671218aeb 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -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