#include <GEOMAlgo_Tools.ixx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
#include <gp.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <BOPTools_Tools2D.hxx>
#include <IntTools_Context.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
static
void GetCount(const TopoDS_Shape& aS,
Standard_Integer& iCnt);
//function : RefineSDShapes
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
- const Standard_Real aTol,
- IntTools_Context& aCtx)
+Standard_Integer GEOMAlgo_Tools::RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
+ const Standard_Real aTol,
+#if OCC_VERSION_LARGE > 0x06050200
+ const Handle(IntTools_Context)& aCtx)
+#else
+ IntTools_Context& aCtx)
+#endif
{
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
//function : FindSDShapes
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
- IntTools_Context& aCtx)
+Standard_Integer GEOMAlgo_Tools::FindSDShapes (const TopTools_ListOfShape& aLE,
+ const Standard_Real aTol,
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
+#if OCC_VERSION_LARGE > 0x06050200
+ const Handle(IntTools_Context)& aCtx)
+#else
+ IntTools_Context& aCtx)
+#endif
{
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
TopTools_ListOfShape aLESD;
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
+#if OCC_VERSION_LARGE > 0x06050200
+ const Handle(IntTools_Context)& aCtx)
+#else
IntTools_Context& aCtx)
+#endif
{
Standard_Boolean bIsDone;
Standard_Real aTol2, aD2;
Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS,
gp_Pnt& aP2,
+#if OCC_VERSION_LARGE > 0x06050200
+ const Handle(IntTools_Context)& aCtx)
+#else
IntTools_Context& aCtx)
+#endif
{
Standard_Boolean bIsDone = Standard_False;
Standard_Real aT2;
if (aC3D.IsNull()) {
return Standard_True;
}
+#if OCC_VERSION_LARGE > 0x06050200
+ bIsDone = aCtx->ProjectPointOnEdge(aP1, aE2, aT2);
+#else
bIsDone = aCtx.ProjectPointOnEdge(aP1, aE2, aT2);
+#endif
}
if (!bIsDone) {
return bIsDone;
case TopAbs_FACE:
{
const TopoDS_Face& aF2 = TopoDS::Face(aS);
+#if OCC_VERSION_LARGE > 0x06050200
+ GeomAPI_ProjectPointOnSurf& aProj = aCtx->ProjPS(aF2);
+#else
GeomAPI_ProjectPointOnSurf& aProj = aCtx.ProjPS(aF2);
+#endif
//
aProj.Perform(aP1);
bIsDone = aProj.IsDone();
GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew,
const TopoDS_Face& aF,
+#if OCC_VERSION_LARGE > 0x06050200
+ const Handle(IntTools_Context)& aCtx)
+#else
IntTools_Context& aCtx)
+#endif
{
Standard_Boolean bIsClosed, bUClosed, bHasOld;
Standard_Integer iRet, aNbPoints;
aS=BRep_Tool::Surface(aF);
aS->D0(aUS1, aVS1, aP);
//
+#if OCC_VERSION_LARGE > 0x06050200
+ GeomAPI_ProjectPointOnCurve& aProjPC=aCtx->ProjPC(aEnew);
+#else
GeomAPI_ProjectPointOnCurve& aProjPC=aCtx.ProjPC(aEnew);
+#endif
//
aProjPC.Perform(aP);
aNbPoints=aProjPC.NbPoints();