//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// 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.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <IntTools.ixx>
-#include <GProp_GProps.hxx>
-#include <BRepGProp.hxx>
-#include <BRep_Tool.hxx>
-#include <IntTools_Root.hxx>
-#include <IntTools_Array1OfRoots.hxx>
-#include <IntTools_Compare.hxx>
-#include <IntTools_QuickSort.hxx>
-#include <IntTools_Root.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepGProp.hxx>
+#include <gce_ErrorType.hxx>
#include <gce_MakeCirc.hxx>
+#include <GCPnts_QuasiUniformDeflection.hxx>
+#include <Geom_Curve.hxx>
#include <gp_Circ.hxx>
-#include <BRepAdaptor_Curve.hxx>
+#include <gp_Pnt.hxx>
+#include <GProp_GProps.hxx>
+#include <IntTools.hxx>
+#include <IntTools_Array1OfRoots.hxx>
#include <IntTools_CArray1OfReal.hxx>
-#include <TColStd_ListOfReal.hxx>
-#include <GCPnts_QuasiUniformDeflection.hxx>
+#include <IntTools_Root.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
-#include <gce_ErrorType.hxx>
+#include <TColStd_ListOfReal.hxx>
+#include <TopoDS_Edge.hxx>
-#ifdef WNT
-#pragma warning ( disable : 4101 )
-#endif
+#include <algorithm>
//=======================================================================
//function : IntTools::GetRadius
//purpose :
}
if (aCurveType==GeomAbs_BSplineCurve||
aCurveType==GeomAbs_BezierCurve ||
+ aCurveType==GeomAbs_OffsetCurve ||
aCurveType==GeomAbs_Ellipse ||
aCurveType==GeomAbs_OtherCurve) { //modified by NIZNHY-PKV Fri Sep 24 09:52:42 2004ft
continue;
}
}
+//=======================================================================
+
+namespace {
+ // Auxiliary: comparator function for sorting roots
+ bool IntTools_RootComparator (const IntTools_Root& theLeft, const IntTools_Root& theRight)
+ {
+ return theLeft.Root() < theRight.Root();
+ }
+}
+
//=======================================================================
//function : SortRoots
//purpose :
//=======================================================================
void IntTools::SortRoots(IntTools_SequenceOfRoots& mySequenceOfRoots,
- const Standard_Real myEpsT)
+ const Standard_Real /*myEpsT*/)
{
Standard_Integer j, aNbRoots;
aNbRoots=mySequenceOfRoots.Length();
- IntTools_Array1OfRoots anArray1OfRoots(1, aNbRoots);
- IntTools_Compare aComparator(myEpsT);
-
+ IntTools_Array1OfRoots anArray1OfRoots(1, aNbRoots);
for (j=1; j<=aNbRoots; j++) {
anArray1OfRoots(j)=mySequenceOfRoots(j);
}
- IntTools_QuickSort aQS;
- aQS.Sort(anArray1OfRoots, aComparator);
+ std::sort (anArray1OfRoots.begin(), anArray1OfRoots.end(), IntTools_RootComparator);
mySequenceOfRoots.Clear();
for (j=1; j<=aNbRoots; j++) {
}
return 1;
}
-
-#ifdef WNT
-#pragma warning ( default : 4101 )
-#endif