From b5b54c59f1badb6d9825a025df8ea11171bb1b74 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 22 Feb 2015 18:41:18 +0100 Subject: [PATCH] + fix for OCC 6.3 --- src/Mod/Part/App/Geometry.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp index c8115748a1..ba544e419d 100644 --- a/src/Mod/Part/App/Geometry.cpp +++ b/src/Mod/Part/App/Geometry.cpp @@ -1154,7 +1154,11 @@ Base::Vector3d GeomEllipse::getMajorAxisDir() const */ void GeomEllipse::setMajorAxisDir(Base::Vector3d newdir) { +#if OCC_VERSION_HEX >= 0x060300 if (newdir.Sqr() < Precision::SquareConfusion()) +#else + if (newdir.Length() < Precision::Confusion()) +#endif return;//zero vector was passed. Keep the old orientation. try { gp_Ax2 pos = myCurve->Position(); @@ -1479,7 +1483,11 @@ void GeomArcOfEllipse::setMajorAxisDir(Base::Vector3d newdir) { Handle_Geom_Ellipse c = Handle_Geom_Ellipse::DownCast( myCurve->BasisCurve() ); assert(!c.IsNull()); +#if OCC_VERSION_HEX >= 0x060300 if (newdir.Sqr() < Precision::SquareConfusion()) +#else + if (newdir.Length() < Precision::Confusion()) +#endif return;//zero vector was passed. Keep the old orientation. try { gp_Ax2 pos = c->Position();