-// Copyright (C) 2007-2016 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
if ( theObjectIndex > 0 ) {
TopExp::MapShapes( shape, anIndices );
shape = anIndices.FindKey(theObjectIndex);
+ anIndices.Clear();
}
if ( theSubObjectIndex > 0 ) {
TopExp::MapShapes( subShape, anIndices );
subShape = anIndices.FindKey(theSubObjectIndex);
+ anIndices.Clear();
}
TopExp::MapShapes( shape, anIndices );
gp_Pnt P2 = C1->Value(U); //Compute a point on two thirds of the edge's length
C2 = new Geom_TrimmedCurve(C2, U21, U22);
+ // vsr 04/10/2018: 0023312 - As curve may be periodic, its parameters may be normalized
+ // so, we re-take them from trimmed curve
+ U21 = C2->FirstParameter();
+ U22 = C2->LastParameter();
if(!GeomLib_Tool::Parameter(C2, P1, MAX_TOLERANCE, U) || U < U21 || U > U22)
return false;