X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMAlgo%2FGEOMAlgo_Tools.cxx;h=296b6928b286e0b4e56249e9ee99c273be9bb968;hb=357991964c4929ef01edcf1d55eddd67f8512c29;hp=414dfa09af1fd7afbbb961913feb7b0307592bea;hpb=aa829b078e5ae308a86fe8c28de055a3e29131e6;p=modules%2Fgeom.git diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cxx b/src/GEOMAlgo/GEOMAlgo_Tools.cxx index 414dfa09a..296b6928b 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cxx @@ -25,6 +25,11 @@ #include +#include +#include + +#include + #include #include #include @@ -60,9 +65,6 @@ #include #include -#include -#include - static void GetCount(const TopoDS_Shape& aS, Standard_Integer& iCnt); @@ -115,9 +117,13 @@ void GetCount(const TopoDS_Shape& aS, //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; @@ -177,10 +183,14 @@ void GetCount(const TopoDS_Shape& aS, //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; @@ -253,7 +263,11 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, 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; @@ -291,7 +305,11 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, 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; @@ -313,7 +331,11 @@ Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1, 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; @@ -326,7 +348,11 @@ Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1, 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(); @@ -488,7 +514,11 @@ Standard_Integer 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; @@ -553,7 +583,11 @@ Standard_Integer 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();