// Created on: 1996-04-22
// Created by: Herve LOUESSARD
// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
// Modified: Sergey ZERCHANINOV
//------------------------------------------------------------------------------
static Standard_Boolean TRI_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol, const gp_Pnt& Pt)
{
- const Standard_Integer Nbsol = SeqSol.Length();
- for (Standard_Integer i = 1; i <= Nbsol; i++)
+ for (BRepExtrema_SeqOfSolution::iterator anIt = SeqSol.begin(); anIt != SeqSol.end(); anIt++)
{
- const Standard_Real dst = SeqSol.Value(i).Point().Distance(Pt);
- if (dst <= Precision::Confusion()) return Standard_False;
+ const Standard_Real dst = anIt->Point().Distance(Pt);
+ if (dst <= Precision::Confusion())
+ {
+ return Standard_False;
+ }
}
return Standard_True;
}
BRepExtrema_SeqOfSolution& seqSol1,
BRepExtrema_SeqOfSolution& seqSol2)
{
- const Standard_Integer nbSol = SeqSol1.Length();
- for (Standard_Integer i = 1; i <= nbSol; i++)
+ for (BRepExtrema_SeqOfSolution::iterator anIt1 = SeqSol1.begin(), anIt2 = SeqSol2.begin();
+ anIt1 != SeqSol1.end();
+ anIt1++, anIt2++)
{
- const Standard_Real dst1 = SeqSol1.Value(i).Dist();
+ const Standard_Real dst1 = anIt1->Dist();
if (fabs(dst1 - DstRef) < Eps)
- {
- seqSol1.Append(SeqSol1.Value(i));
- seqSol2.Append(SeqSol2.Value(i));
- }
+ {
+ seqSol1.Append(*anIt1);
+ seqSol2.Append(*anIt2);
+ }
}
}
Perform( V1, F2, B1, B2 );
break;
}
+ default:
+ break;
}
break;
}
Perform( E1, F2, B1, B2 );
break;
}
+ default:
+ break;
}
break;
}
Perform( F1, F2, B1, B2 );
break;
}
+ default:
+ break;
}
break;
}
+ default:
+ break;
}
}
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt);
BRepExtrema_ExtPF ExtPF(V1,S2);
- const Standard_Integer NbExtrema = ExtPF.IsDone()? ExtPF.NbExt() : 0;
- if ( NbExtrema > 0 )
+ const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0;
+ if (NbExtremaPF > 0 )
{
// Search minimum distance Dstmin
Standard_Integer ii;
Standard_Real Dstmin = ExtPF.SquareDistance(1);
- for (ii = 2; ii <= NbExtrema; ii++)
+ for (ii = 2; ii <= NbExtremaPF; ii++)
{
const Standard_Real sDst = ExtPF.SquareDistance(ii);
if (sDst<Dstmin)
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps))
{
- for (ii = 1; ii <= NbExtrema; ii++)
+ for (ii = 1; ii <= NbExtremaPF; ii++)
{
if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps)
{
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt);
BRepExtrema_ExtPF ExtPF(V1,S1);
- const Standard_Integer NbExtrema = ExtPF.IsDone()? ExtPF.NbExt() : 0;
- if ( NbExtrema > 0 )
+ const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0;
+ if (NbExtremaPF > 0 )
{
// Search minimum distance Dstmin
Standard_Integer ii;
Standard_Real Dstmin = ExtPF.SquareDistance(1);
- for (ii = 2; ii <= NbExtrema; ii++)
+ for (ii = 2; ii <= NbExtremaPF; ii++)
{
const Standard_Real sDst = ExtPF.SquareDistance(ii);
if (sDst<Dstmin)
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps))
{
- for (ii = 1; ii <= NbExtrema; ii++)
+ for (ii = 1; ii <= NbExtremaPF; ii++)
{
if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps)
{