diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index 428b94c0e9e0e07a135883fd19c08c7a1a53d477..792673e2f22d6eb98de0863f69255ddbe384cc93 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -1361,9 +1361,9 @@ void GFace::lloyd(int nbiter, int infn) #endif } -void GFace::replaceEdges (std::list<GEdge*> &new_edges) +void GFace::replaceEdges(std::list<GEdge*> &new_edges) { - replaceEdgesInternal (new_edges); + replaceEdgesInternal(new_edges); std::list<GEdge*>::iterator it = l_edges.begin(); std::list<GEdge*>::iterator it2 = new_edges.begin(); std::list<int>::iterator it3 = l_dirs.begin(); diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index e32ee9f325f9a7ec85a332003f312b6a4687f157..b95b90eb9581fe6451d4632aaa7d813942ab2ef9 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -2740,7 +2740,7 @@ static void glueEdgesInFaces(GModel *model, } if (aDifferenceExists){ Msg::Debug("Model Face %d is re-build", f->tag()); - f->replaceEdges (enew); + f->replaceEdges(enew); } } } diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index 08794ede6ad59254312a3353c0cc96d93d494fd7..e588e954890fb2016cf990aa5fa4b5e43e4d076d 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -13,6 +13,7 @@ #if defined(HAVE_OCC) #include "GModelIO_OCC.h" +#include <Standard_Version.hxx> #include <Geom2dLProp_CLProps2d.hxx> #include <Geom_BezierCurve.hxx> #include <Geom_OffsetCurve.hxx> @@ -23,7 +24,11 @@ #include <Geom_Circle.hxx> #include <Geom_Line.hxx> #include <Geom_Conic.hxx> +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 5) #include <BOPTools_Tools.hxx> +#else +#include <BOPTools_AlgoTools.hxx> +#endif OCCEdge::OCCEdge(GModel *m, TopoDS_Edge edge, int num, GVertex *v1, GVertex *v2) : GEdge(m, num, v1, v2), c(edge), trimmed(0) @@ -330,7 +335,11 @@ void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1) _replacement=E; } else { +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 5) BOPTools_Tools::MakeSplitEdge(aEx, aVR1, t1, aVR2, t2, _replacement); +#else + BOPTools_AlgoTools::MakeSplitEdge(aEx, aVR1, t1, aVR2, t2, _replacement); +#endif } TopoDS_Edge temp = c; c = _replacement; diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp index a3dfb968c30c52c321fe9fe8325b9aaf2f4dac5f..f0ad8d11e1849feccb149b46b1a1bd489fb937e5 100644 --- a/Geo/OCCFace.cpp +++ b/Geo/OCCFace.cpp @@ -26,9 +26,16 @@ #include <Geom_Plane.hxx> #include <gp_Pln.hxx> #include <BRepMesh_FastDiscret.hxx> + +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) +#include <BOPInt_Context.hxx> +#include <BOPTools_AlgoTools2D.hxx> +#include <BOPTools_AlgoTools.hxx> +#else #include <IntTools_Context.hxx> #include <BOPTools_Tools2D.hxx> #include <BOPTools_Tools3D.hxx> +#endif OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num) : GFace(m, num), s(_s) @@ -165,7 +172,7 @@ GPoint OCCFace::point(double par1, double par2) const double pp[2] = {par1, par2}; double umin2, umax2, vmin2, vmax2; ShapeAnalysis::GetFaceUVBounds(s, umin2, umax2, vmin2, vmax2); - + double du = umax2 - umin2; double dv = vmax2 - vmin2; @@ -441,7 +448,10 @@ bool OCCFace::buildSTLTriangulation(bool force) void OCCFace::replaceEdgesInternal(std::list<GEdge*> &new_edges) { -#if defined(OCC_VERSION_HEX) && OCC_VERSION_HEX >= 0x060503 + +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) + Handle(BOPInt_Context) myContext = new BOPInt_Context; +#elif defined(OCC_VERSION_HEX) && OCC_VERSION_HEX >= 0x060503 Handle(IntTools_Context) myContext = new IntTools_Context; #else IntTools_Context myContext; @@ -505,7 +515,11 @@ void OCCFace::replaceEdgesInternal(std::list<GEdge*> &new_edges) continue; } else{ - aTx=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) + aTx = BOPTools_AlgoTools2D::IntermediatePoint(aT1, aT2); +#else + aTx = BOPTools_Tools2D::IntermediatePoint(aT1, aT2); +#endif gp_Pnt2d aP2D; aC2D->D0(aTx, aP2D); aUx=aP2D.X(); @@ -517,11 +531,18 @@ void OCCFace::replaceEdgesInternal(std::list<GEdge*> &new_edges) } } } +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) + BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aER, copy_of_s_forward); +#else BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, copy_of_s_forward); - +#endif // orient image Standard_Boolean bIsToReverse = +#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 6) + BOPTools_AlgoTools::IsSplitToReverse(aER, aE, myContext); +#else BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); +#endif if (bIsToReverse) { aER.Reverse(); } diff --git a/Geo/OCC_Connect.cpp b/Geo/OCC_Connect.cpp index e1af53c942990981b6cbc7c6579b512425a086f4..0748b0c9f61ec1e815d6950ea029780094797517 100644 --- a/Geo/OCC_Connect.cpp +++ b/Geo/OCC_Connect.cpp @@ -41,8 +41,6 @@ #include <BRep_Tool.hxx> #include <BRepClass_FaceClassifier.hxx> -#include <IntTools_Context.hxx> - #include <BRepExtrema_DistShapeShape.hxx> #include <BRepOffsetAPI_NormalProjection.hxx> #include <BRepTopAdaptor_FClass2d.hxx>