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
|
||||
|
||||
@@ -376,6 +376,8 @@ public:
|
||||
void setAngleXU(double angle);
|
||||
bool isReversed() const;
|
||||
|
||||
Base::Vector3d getAxisDirection(void) const;
|
||||
|
||||
virtual unsigned int getMemSize(void) const = 0;
|
||||
virtual PyObject *getPyObject(void) = 0;
|
||||
|
||||
@@ -443,6 +445,8 @@ public:
|
||||
*/
|
||||
void setCenter(const Base::Vector3d& Center);
|
||||
|
||||
Base::Vector3d getAxisDirection(void) const;
|
||||
|
||||
virtual void getRange(double& u, double& v, bool emulateCCWXY) const = 0;
|
||||
virtual void setRange(double u, double v, bool emulateCCWXY) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user