Part: Geometry - function to get the conic axis direction
This commit is contained in:
committed by
abdullahtahiriyo
parent
7db925d991
commit
6a06f60ee3
@@ -1796,6 +1796,14 @@ void GeomConic::setCenter(const Base::Vector3d& Center)
|
||||
}
|
||||
}
|
||||
|
||||
Base::Vector3d GeomConic::getAxisDirection(void) const
|
||||
{
|
||||
Handle(Geom_Conic) conic = Handle(Geom_Conic)::DownCast(handle());
|
||||
gp_Ax1 axis = conic->Axis();
|
||||
const gp_Dir& dir = axis.Direction();
|
||||
return Base::Vector3d( dir.X(),dir.Y(),dir.Z());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GeomConic::getAngleXU
|
||||
* \return The angle between ellipse's major axis (in direction to focus1) and
|
||||
@@ -2045,6 +2053,15 @@ void GeomArcOfConic::setLocation(const Base::Vector3d& Center)
|
||||
}
|
||||
}
|
||||
|
||||
Base::Vector3d GeomArcOfConic::getAxisDirection(void) const
|
||||
{
|
||||
Handle(Geom_TrimmedCurve) curve = Handle(Geom_TrimmedCurve)::DownCast(handle());
|
||||
Handle(Geom_Conic) conic = Handle(Geom_Conic)::DownCast(curve->BasisCurve());
|
||||
gp_Ax1 axis = conic->Axis();
|
||||
const gp_Dir& dir = axis.Direction();
|
||||
return Base::Vector3d( dir.X(),dir.Y(),dir.Z());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GeomArcOfConic::isReversed
|
||||
* \return tests if an arc that lies in XY plane is reversed (i.e. drawn from
|
||||
|
||||
Reference in New Issue
Block a user