Salome HOME
bos #20640 EDF 22800 - Adding 3D
authoreap <eap@opencascade.com>
Wed, 27 Jan 2021 13:48:04 +0000 (16:48 +0300)
committereap <eap@opencascade.com>
Wed, 27 Jan 2021 13:48:04 +0000 (16:48 +0300)
src/SMESHUtils/SMESH_MeshAlgos.cxx

index 3bc48ff243dd1b10fae5b9020840507dfed913ce..7a4a0a48127f78e2fe3be0498599b810d9e7a8b3 100644 (file)
@@ -688,6 +688,9 @@ bool SMESH_ElementSearcherImpl::getIntersParamOnLine(const gp_Lin&           lin
     GC_MakeSegment edge( SMESH_TNodeXYZ( face->GetNode( i )),
                          SMESH_TNodeXYZ( face->GetNode( (i+1)%nbNodes) ));
     anExtCC.Init( lineCurve, edge.Value() );
+    if ( !anExtCC.Extrema().IsDone() ||
+         anExtCC.Extrema().IsParallel() )
+      continue;
     if ( anExtCC.NbExtrema() > 0 && anExtCC.LowerDistance() <= tol)
     {
       Standard_Real pl, pe;