diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp index 575a9d49cc..1457e89205 100644 --- a/src/Mod/Part/App/Geometry.cpp +++ b/src/Mod/Part/App/Geometry.cpp @@ -2722,6 +2722,17 @@ Base::Vector3d GeomEllipse::getMajorAxisDir() const return Base::Vector3d(xdir.X(), xdir.Y(), xdir.Z()); } +/*! + * \brief GeomEllipse::getMinorAxisDir + * \return the direction vector (unit-length) of minor axis of the ellipse. + */ +Base::Vector3d GeomEllipse::getMinorAxisDir() const +{ + gp_Dir ydir = myCurve->YAxis().Direction(); + return Base::Vector3d(ydir.X(), ydir.Y(), ydir.Z()); +} + + /*! * \brief GeomEllipse::setMajorAxisDir Rotates the ellipse in its plane, so * that its major axis is as close as possible to the provided direction. diff --git a/src/Mod/Part/App/Geometry.h b/src/Mod/Part/App/Geometry.h index 24a2f16176..d325a5f027 100644 --- a/src/Mod/Part/App/Geometry.h +++ b/src/Mod/Part/App/Geometry.h @@ -538,6 +538,7 @@ public: void setMinorRadius(double Radius); Base::Vector3d getMajorAxisDir() const; void setMajorAxisDir(Base::Vector3d newdir); + Base::Vector3d getMinorAxisDir() const; // Persistence implementer --------------------- virtual unsigned int getMemSize(void) const;