Part: Geometry - Add Ellipse minor radio convenience function

This commit is contained in:
Abdullah Tahiri
2022-06-07 20:20:29 +02:00
committed by abdullahtahiriyo
parent 6a06f60ee3
commit cd208c5477
2 changed files with 12 additions and 0 deletions

View File

@@ -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.