From: eap Date: Mon, 20 Nov 2017 12:40:06 +0000 (+0300) Subject: Fix remeshing using NETGEN of complete_sa_example X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8502f7a4b19e19b96b06e12a89a908d712a11bdc;p=modules%2Fsmesh.git Fix remeshing using NETGEN of complete_sa_example --- diff --git a/src/SMESHUtils/SMESH_FillHole.cxx b/src/SMESHUtils/SMESH_FillHole.cxx index 902cd0363..41705a324 100644 --- a/src/SMESHUtils/SMESH_FillHole.cxx +++ b/src/SMESHUtils/SMESH_FillHole.cxx @@ -176,7 +176,10 @@ namespace void BEdge::ComputeAngle( bool theReverseAngle ) { - myAngleWithPrev = acos( myDir.Dot( myPrev->myDir.Reversed() )); + double dot = myDir.Dot( myPrev->myDir.Reversed() ); + if ( dot >= 1 ) myAngleWithPrev = 0; + else if ( dot <= -1 ) myAngleWithPrev = M_PI; + else myAngleWithPrev = acos( dot ); bool isObtuse; gp_XYZ inFaceDirNew = myDir - myPrev->myDir;