Fix SIGSEGV on imps_09/K0

Not sure about "continue;"
This commit is contained in:
eap 2020-03-10 17:11:19 +03:00
parent deb6fe0827
commit 54db132ba1

View File

@ -836,20 +836,22 @@ SMESH_MeshAlgos::MakeSlot( SMDS_ElemIteratorPtr theSegmentIt,
// 2) // 2)
double minCutDist = theWidth; double minCutDist = theWidth;
gp_XYZ projection, closestProj; gp_XYZ projection, closestProj;
int iCut; int iCut = -1;
for ( size_t iC = 0; iC < closeSeg[iP]->myCuts.size(); ++iC ) for ( size_t iC2 = 0; iC2 < closeSeg[iP]->myCuts.size(); ++iC2 )
{ {
double cutDist = closeSeg[iP]->myCuts[iC].SquareDistance( intPnt[iP].myNode, double cutDist = closeSeg[iP]->myCuts[iC2].SquareDistance( intPnt[iP].myNode,
projection ); projection );
if ( cutDist < minCutDist ) if ( cutDist < minCutDist )
{ {
closestProj = projection; closestProj = projection;
minCutDist = cutDist; minCutDist = cutDist;
iCut = iC; iCut = iC2;
}
if ( minCutDist < tol * tol ) if ( minCutDist < tol * tol )
break; break;
} }
}
if ( iCut < 0 )
continue; // ???
double d1 = SMESH_MeshAlgos::GetDistance( neighborSeg->myEdge, double d1 = SMESH_MeshAlgos::GetDistance( neighborSeg->myEdge,
closeSeg[iP]->myCuts[iCut][0].myNode ); closeSeg[iP]->myCuts[iCut][0].myNode );
double d2 = SMESH_MeshAlgos::GetDistance( neighborSeg->myEdge, double d2 = SMESH_MeshAlgos::GetDistance( neighborSeg->myEdge,