From 8502f7a4b19e19b96b06e12a89a908d712a11bdc Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 20 Nov 2017 15:40:06 +0300 Subject: [PATCH] Fix remeshing using NETGEN of complete_sa_example --- src/SMESHUtils/SMESH_FillHole.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2