From: eap Date: Thu, 20 Feb 2020 16:28:41 +0000 (+0300) Subject: Fix regression of Extrusion 3D caused by OCCT changes X-Git-Tag: V9_5_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=90741df83406c4a8a2b0e90ebc33319158d7b667;p=modules%2Fsmesh.git Fix regression of Extrusion 3D caused by OCCT changes --- diff --git a/src/SMESHUtils/SMESH_Delaunay.cxx b/src/SMESHUtils/SMESH_Delaunay.cxx index 4771c6da8..92bbc6e3b 100644 --- a/src/SMESHUtils/SMESH_Delaunay.cxx +++ b/src/SMESHUtils/SMESH_Delaunay.cxx @@ -225,11 +225,8 @@ const BRepMesh_Triangle* SMESH_Delaunay::FindTriangle( const gp_XY& gp_XY seg = uv - gc; tria->Edges( linkIDs, ori ); -#if OCC_VERSION_LARGE <= 0x07030000 - int triaID = _triaDS->IndexOf( *tria ); -#else - int triaID = tria - & ( _triaDS->GetElement( 0 )); -#endif + + const BRepMesh_Triangle* prevTria = tria; tria = 0; for ( int i = 0; i < 3; ++i ) @@ -252,7 +249,9 @@ const BRepMesh_Triangle* SMESH_Delaunay::FindTriangle( const gp_XY& double uSeg = ( uv1 - gc ) ^ lin / crossSegLin; if ( 0. <= uSeg && uSeg <= 1. ) { - tria = & _triaDS->GetElement( triIDs.Index( 1 + ( triIDs.Index(1) == triaID ))); + tria = & _triaDS->GetElement( triIDs.Index( 1 )); + if ( tria == prevTria ) + tria = & _triaDS->GetElement( triIDs.Index( 2 )); if ( tria->Movability() != BRepMesh_Deleted ) break; }