OpenLexocad
27.0
|
#include <Circ2d.h>
Public Member Functions | |
Circ2d () | |
creates an indefinite circle. More... | |
Circ2d (const Ax2d &XAxis, const double Radius, const bool Sense=true) | |
Circ2d (const Ax22d &Axis, const double Radius) | |
void | SetLocation (const Pnt2d &P) |
Changes the location point (center) of the circle. More... | |
void | SetXAxis (const Ax2d &A) |
Changes the X axis of the circle. More... | |
void | SetAxis (const Ax22d &A) |
Changes the X axis of the circle. More... | |
void | SetYAxis (const Ax2d &A) |
Changes the Y axis of the circle. More... | |
void | SetRadius (const double Radius) |
double | Area () const |
Computes the area of the circle. More... | |
void | Coefficients (double &A, double &B, double &C, double &D, double &E, double &F) const |
bool | Contains (const Pnt2d &P, const double LinearTolerance) const |
double | Distance (const Pnt2d &P) const |
double | SquareDistance (const Pnt2d &P) const |
Computes the square distance between <me> and the point P. More... | |
double | Length () const |
computes the circumference of the circle. More... | |
const Pnt2d & | Location () const |
Returns the location point (center) of the circle. More... | |
double | Radius () const |
Returns the radius value of the circle. More... | |
const Ax22d & | Axis () const |
returns the position of the circle. More... | |
const Ax22d & | Position () const |
returns the position of the circle. Idem Axis(me). More... | |
Ax2d | XAxis () const |
returns the X axis of the circle. More... | |
Ax2d | YAxis () const |
Returns the Y axis of the circle. //! Reverses the direction of the circle. More... | |
void | Reverse () |
Circ2d | Reversed () const |
bool | IsDirect () const |
void | Mirror (const Pnt2d &P) |
Circ2d | Mirrored (const Pnt2d &P) const |
void | Mirror (const Ax2d &A) |
Circ2d | Mirrored (const Ax2d &A) const |
void | Rotate (const Pnt2d &P, const double Ang) |
Circ2d | Rotated (const Pnt2d &P, const double Ang) const |
void | Scale (const Pnt2d &P, const double S) |
Circ2d | Scaled (const Pnt2d &P, const double S) const |
void | Transform (const Trsf2d &T) |
Circ2d | Transformed (const Trsf2d &T) const |
Transforms a circle with the transformation T from class Trsf2d. More... | |
void | Translate (const Vec2d &V) |
Circ2d | Translated (const Vec2d &V) const |
void | Translate (const Pnt2d &P1, const Pnt2d &P2) |
Circ2d | Translated (const Pnt2d &P1, const Pnt2d &P2) const |
Translates a circle from the point P1 to the point P2. More... | |
const Ax22d & | _CSFDB_GetCirc2dpos () const |
double | _CSFDB_GetCirc2dradius () const |
void | _CSFDB_SetCirc2dradius (const double p) |
Describes a circle in the plane (2D space).
A circle is defined by its radius and positioned in the
plane with a coordinate system (a Ax22d object) as follows:
Geom::Circ2d::Circ2d | ( | ) |
creates an indefinite circle.
Geom::Circ2d::Circ2d | ( | const Ax2d & | XAxis, |
const double | Radius, | ||
const bool | Sense = true |
||
) |
The location point of XAxis is the center of the circle.
Warnings :
It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0.
//! Raised if Radius < 0.0.
Geom::Circ2d::Circ2d | ( | const Ax22d & | Axis, |
const double | Radius | ||
) |
Axis defines the Xaxis and Yaxis of the circle which defines
the origin and the sense of parametrization.
The location point of Axis is the center of the circle.
Warnings :
It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0.
//! Raised if Radius < 0.0.
|
inline |
|
inline |
|
inline |
double Geom::Circ2d::Area | ( | ) | const |
Computes the area of the circle.
const Ax22d& Geom::Circ2d::Axis | ( | ) | const |
returns the position of the circle.
void Geom::Circ2d::Coefficients | ( | double & | A, |
double & | B, | ||
double & | C, | ||
double & | D, | ||
double & | E, | ||
double & | F | ||
) | const |
Returns the normalized coefficients from the implicit equation
of the circle :
A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.0
bool Geom::Circ2d::Contains | ( | const Pnt2d & | P, |
const double | LinearTolerance | ||
) | const |
Does <me> contain P ?
Returns True if the distance between P and any point on
the circumference of the circle is lower of equal to
<LinearTolerance>.
double Geom::Circ2d::Distance | ( | const Pnt2d & | P | ) | const |
Computes the minimum of distance between the point P and any
point on the circumference of the circle.
bool Geom::Circ2d::IsDirect | ( | ) | const |
Returns true if the local coordinate system is direct
and false in the other case.
double Geom::Circ2d::Length | ( | ) | const |
computes the circumference of the circle.
const Pnt2d& Geom::Circ2d::Location | ( | ) | const |
Returns the location point (center) of the circle.
void Geom::Circ2d::Mirror | ( | const Pnt2d & | P | ) |
void Geom::Circ2d::Mirror | ( | const Ax2d & | A | ) |
Performs the symmetrical transformation of a circle with respect
to the point P which is the center of the symmetry
Performs the symmetrical transformation of a circle with respect
to an axis placement which is the axis of the symmetry.
const Ax22d& Geom::Circ2d::Position | ( | ) | const |
returns the position of the circle. Idem Axis(me).
double Geom::Circ2d::Radius | ( | ) | const |
Returns the radius value of the circle.
void Geom::Circ2d::Reverse | ( | ) |
Reverses the orientation of the local coordinate system
of this circle (the "Y Direction" is reversed) and therefore
changes the implicit orientation of this circle.
Reverse assigns the result to this circle,
Circ2d Geom::Circ2d::Reversed | ( | ) | const |
Reverses the orientation of the local coordinate system
of this circle (the "Y Direction" is reversed) and therefore
changes the implicit orientation of this circle.
Reversed creates a new circle.
void Geom::Circ2d::Rotate | ( | const Pnt2d & | P, |
const double | Ang | ||
) |
Rotates a circle. P is the center of the rotation.
Ang is the angular value of the rotation in radians.
void Geom::Circ2d::Scale | ( | const Pnt2d & | P, |
const double | S | ||
) |
Scales a circle. S is the scaling value.
Warnings :
If S is negative the radius stay positive but
the "XAxis" and the "YAxis" are reversed as for
an ellipse.
void Geom::Circ2d::SetAxis | ( | const Ax22d & | A | ) |
Changes the X axis of the circle.
void Geom::Circ2d::SetLocation | ( | const Pnt2d & | P | ) |
Changes the location point (center) of the circle.
void Geom::Circ2d::SetRadius | ( | const double | Radius | ) |
Modifies the radius of this circle.
This class does not prevent the creation of a circle where
Radius is null.
Exceptions
Standard_ConstructionError if Radius is negative.
void Geom::Circ2d::SetXAxis | ( | const Ax2d & | A | ) |
Changes the X axis of the circle.
void Geom::Circ2d::SetYAxis | ( | const Ax2d & | A | ) |
Changes the Y axis of the circle.
double Geom::Circ2d::SquareDistance | ( | const Pnt2d & | P | ) | const |
Computes the square distance between <me> and the point P.
void Geom::Circ2d::Transform | ( | const Trsf2d & | T | ) |
Transforms a circle with the transformation T from class Trsf2d.
void Geom::Circ2d::Translate | ( | const Vec2d & | V | ) |
Translates a circle in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.
Translates a circle from the point P1 to the point P2.
Ax2d Geom::Circ2d::XAxis | ( | ) | const |
returns the X axis of the circle.
Ax2d Geom::Circ2d::YAxis | ( | ) | const |
Returns the Y axis of the circle.
//! Reverses the direction of the circle.