From 869b4c84f2c596e07be508283809230c4a1832b5 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 3 Oct 2017 19:42:46 +0300 Subject: [PATCH] Improve the returned plane vector --- src/SMESH/SMESH_MeshEditor.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.2