Adds a small convenience function to get arc of circle angle.
This commit is contained in:
@@ -2428,11 +2428,24 @@ void GeomArcOfCircle::setRadius(double Radius)
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GeomArcOfCircle::getAngle
|
||||
* \param emulateCCWXY: if true, the arc will pretend to be a CCW arc in XY plane.
|
||||
* For this to work, the arc must lie in XY plane (i.e. Axis is either +Z or -Z).
|
||||
*/
|
||||
double GeomArcOfCircle::getAngle(bool emulateCCWXY) const
|
||||
{
|
||||
double startangle, endangle;
|
||||
getRange(startangle, endangle, emulateCCWXY);
|
||||
double angle = endangle - startangle;
|
||||
return angle;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GeomArcOfCircle::getRange
|
||||
* \param u [out] start angle of the arc, in radians.
|
||||
* \param v [out] end angle of the arc, in radians.
|
||||
* \param emulateCCWXY: if true, the arc will pretent to be a CCW arc in XY plane.
|
||||
* \param emulateCCWXY: if true, the arc will pretend to be a CCW arc in XY plane.
|
||||
* For this to work, the arc must lie in XY plane (i.e. Axis is either +Z or -Z).
|
||||
* Additionally, arc's rotation as a whole will be included in the returned u,v
|
||||
* (ArcOfCircle specific).
|
||||
|
||||
@@ -502,6 +502,8 @@ public:
|
||||
double getRadius() const;
|
||||
void setRadius(double Radius);
|
||||
|
||||
double getAngle(bool emulateCCWXY) const;
|
||||
|
||||
void getRange(double& u, double& v, bool emulateCCWXY) const override;
|
||||
void setRange(double u, double v, bool emulateCCWXY) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user