PythonConverter: Extend for Hyperbola/Parabola/BSpline

This commit is contained in:
Paddle
2023-11-16 11:58:47 +01:00
committed by abdullahtahiriyo
parent aa901520b5
commit 30e2a109e6
6 changed files with 168 additions and 20 deletions

View File

@@ -2957,6 +2957,18 @@ Base::Vector3d GeomArcOfEllipse::getMajorAxisDir() const
return Base::Vector3d(xdir.X(), xdir.Y(), xdir.Z());
}
/*!
* \brief GeomArcOfEllipse::getMinorAxisDir
* \return the direction vector (unit-length) of minor axis of the ellipse.
*/
Base::Vector3d GeomArcOfEllipse::getMinorAxisDir() const
{
Handle(Geom_Ellipse) c = Handle(Geom_Ellipse)::DownCast(myCurve->BasisCurve());
assert(!c.IsNull());
gp_Dir ydir = c->YAxis().Direction();
return Base::Vector3d(ydir.X(), ydir.Y(), ydir.Z());
}
/*!
* \brief GeomArcOfEllipse::setMajorAxisDir Rotates the ellipse in its plane, so
* that its major axis is as close as possible to the provided direction.
@@ -3387,6 +3399,18 @@ Base::Vector3d GeomArcOfHyperbola::getMajorAxisDir() const
return Base::Vector3d(xdir.X(), xdir.Y(), xdir.Z());
}
/*!
* \brief GeomArcOfHyperbola::getMinorAxisDir
* \return the direction vector (unit-length) of minor axis of the hyperbola.
*/
Base::Vector3d GeomArcOfHyperbola::getMinorAxisDir() const
{
Handle(Geom_Hyperbola) c = Handle(Geom_Hyperbola)::DownCast( myCurve->BasisCurve() );
assert(!c.IsNull());
gp_Dir ydir = c->YAxis().Direction();
return Base::Vector3d(ydir.X(), ydir.Y(), ydir.Z());
}
/*!
* \brief GeomArcOfHyperbola::setMajorAxisDir Rotates the hyperbola in its plane, so
* that its major axis is as close as possible to the provided direction.