From 01cd54d814252ecd33d96e5917ed85a3cae4f902 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 10 Feb 2017 14:05:59 +0300 Subject: [PATCH] Porting to DEV version of OpenCASCADE --- src/GEOMImpl/GEOMImpl_Fillet1d.cxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_Fillet1d.cxx b/src/GEOMImpl/GEOMImpl_Fillet1d.cxx index 7ac4978e6..f25690b5a 100644 --- a/src/GEOMImpl/GEOMImpl_Fillet1d.cxx +++ b/src/GEOMImpl/GEOMImpl_Fillet1d.cxx @@ -22,6 +22,8 @@ #include "GEOMImpl_Fillet1d.hxx" +#include + #include #include #include @@ -39,6 +41,8 @@ #include #include +#include + /** * This function returns Standard_True if it is possible to divide edge, i.e. @@ -156,8 +160,8 @@ static Standard_Boolean isRadiusIntersected(const Handle(Geom2d_Curve)& theCurve { const Standard_Real aTol = Precision::Confusion(); const Standard_Real anAngTol = Precision::Angular(); - Geom2dAPI_InterCurveCurve anInter(theCurve, new Geom2d_Line(theStart, - gp_Dir2d(gp_Vec2d(theStart, theEnd))), aTol); + Handle(Geom2d_Line) aRadiusLine = new Geom2d_Line (theStart, gp_Dir2d(gp_Vec2d(theStart, theEnd))); + Geom2dAPI_InterCurveCurve anInter (theCurve, aRadiusLine, aTol); Standard_Integer a; gp_Pnt2d aPoint; for(a = anInter.NbPoints(); a > 0; a--) @@ -173,6 +177,16 @@ static Standard_Boolean isRadiusIntersected(const Handle(Geom2d_Curve)& theCurve Handle(Geom2d_Curve) aCurve; for(a = anInter.NbSegments(); a > 0; a--) { + // Porting to DEV version of OCCT 10.02.2017 BEGIN +#if OCC_VERSION_LARGE > 0x07010000 + Standard_NotImplemented::Raise("The treatment of tangential intersection is not implemented"); +#else + // This piece of code seems never worked, because: + // 1. In case of two curves intersection + // method Segment with TWO output curves HAS TO be used. + // 2. Method Segment with ONE output curve (as below) just raises + // Standard_NotImplemented exception since 05.03.2012 (at least) + // and that is why has been eliminated 03.02.2017. anInter.Segment(a, aCurve); aPoint = aCurve->Value(aCurve->FirstParameter()); if (aPoint.Distance(theStart) < aTol) @@ -190,6 +204,8 @@ static Standard_Boolean isRadiusIntersected(const Handle(Geom2d_Curve)& theCurve return Standard_True; if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol)) return Standard_True; +#endif + // Porting to DEV version of OCCT 10.02.2017 END } return Standard_False; } -- 2.39.2