-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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 )
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;
}
file.remove();
file.openForWriting();
file.write( text.c_str(), text.size() );
- cout << "exec(open('" << fileName << "', 'rb').read())";
+ std::cout << "exec(open('" << fileName << "', 'rb').read())";
}