OpenLexocad  27.1
Geom::Circ2d Class Reference

#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 Pnt2dLocation () const
 Returns the location point (center) of the circle.
More...
 
double Radius () const
 Returns the radius value of the circle.
More...
 
const Ax22dAxis () const
 returns the position of the circle.
More...
 
const Ax22dPosition () 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)
 

Detailed Description

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:

  • the origin of the coordinate system is the center of the circle, and
  • the orientation (direct or indirect) of the coordinate
    system gives an implicit orientation to the circle (and
    defines its trigonometric sense).
    This positioning coordinate system is the "local <br> coordinate system" of the circle.
    Note: when a Circ2d circle is converted into a
    Geom2d_Circle circle, some implicit properties of the
    circle are used explicitly:
  • the implicit orientation corresponds to the direction in
    which parameter values increase,
  • the starting point for parameterization is that of the "X <br> Axis" of the local coordinate system (i.e. the "X Axis" of the circle).
    See Also
    GccAna and Geom2dGcc packages which provide
    functions for constructing circles defined by geometric constraints
    gce_MakeCirc2d which provides functions for more
    complex circle constructions
    Geom2d_Circle which provides additional functions for
    constructing circles and works, with the parametric
    equations of circles in particular Ax22d

Constructor & Destructor Documentation

◆ Circ2d() [1/3]

Geom::Circ2d::Circ2d ( )

creates an indefinite circle.

◆ Circ2d() [2/3]

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.

◆ Circ2d() [3/3]

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.

Member Function Documentation

◆ _CSFDB_GetCirc2dpos()

const Ax22d& Geom::Circ2d::_CSFDB_GetCirc2dpos ( ) const
inline

◆ _CSFDB_GetCirc2dradius()

double Geom::Circ2d::_CSFDB_GetCirc2dradius ( ) const
inline

◆ _CSFDB_SetCirc2dradius()

void Geom::Circ2d::_CSFDB_SetCirc2dradius ( const double  p)
inline

◆ Area()

double Geom::Circ2d::Area ( ) const

Computes the area of the circle.

◆ Axis()

const Ax22d& Geom::Circ2d::Axis ( ) const

returns the position of the circle.

◆ Coefficients()

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

◆ Contains()

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>.

◆ Distance()

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.

◆ IsDirect()

bool Geom::Circ2d::IsDirect ( ) const

Returns true if the local coordinate system is direct
and false in the other case.

◆ Length()

double Geom::Circ2d::Length ( ) const

computes the circumference of the circle.

◆ Location()

const Pnt2d& Geom::Circ2d::Location ( ) const

Returns the location point (center) of the circle.

◆ Mirror() [1/2]

void Geom::Circ2d::Mirror ( const Pnt2d P)

◆ Mirror() [2/2]

void Geom::Circ2d::Mirror ( const Ax2d A)

◆ Mirrored() [1/2]

Circ2d Geom::Circ2d::Mirrored ( const Pnt2d P) const

Performs the symmetrical transformation of a circle with respect
to the point P which is the center of the symmetry

◆ Mirrored() [2/2]

Circ2d Geom::Circ2d::Mirrored ( const Ax2d A) const

Performs the symmetrical transformation of a circle with respect
to an axis placement which is the axis of the symmetry.

◆ Position()

const Ax22d& Geom::Circ2d::Position ( ) const

returns the position of the circle. Idem Axis(me).

◆ Radius()

double Geom::Circ2d::Radius ( ) const

Returns the radius value of the circle.

◆ Reverse()

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,

◆ Reversed()

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.

◆ Rotate()

void Geom::Circ2d::Rotate ( const Pnt2d P,
const double  Ang 
)

◆ Rotated()

Circ2d Geom::Circ2d::Rotated ( const Pnt2d P,
const double  Ang 
) const

Rotates a circle. P is the center of the rotation.
Ang is the angular value of the rotation in radians.

◆ Scale()

void Geom::Circ2d::Scale ( const Pnt2d P,
const double  S 
)

◆ Scaled()

Circ2d Geom::Circ2d::Scaled ( const Pnt2d P,
const double  S 
) const

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.

◆ SetAxis()

void Geom::Circ2d::SetAxis ( const Ax22d A)

Changes the X axis of the circle.

◆ SetLocation()

void Geom::Circ2d::SetLocation ( const Pnt2d P)

Changes the location point (center) of the circle.

◆ SetRadius()

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.

◆ SetXAxis()

void Geom::Circ2d::SetXAxis ( const Ax2d A)

Changes the X axis of the circle.

◆ SetYAxis()

void Geom::Circ2d::SetYAxis ( const Ax2d A)

Changes the Y axis of the circle.

◆ SquareDistance()

double Geom::Circ2d::SquareDistance ( const Pnt2d P) const

Computes the square distance between <me> and the point P.

◆ Transform()

void Geom::Circ2d::Transform ( const Trsf2d T)

◆ Transformed()

Circ2d Geom::Circ2d::Transformed ( const Trsf2d T) const

Transforms a circle with the transformation T from class Trsf2d.

◆ Translate() [1/2]

void Geom::Circ2d::Translate ( const Vec2d V)

◆ Translate() [2/2]

void Geom::Circ2d::Translate ( const Pnt2d P1,
const Pnt2d P2 
)

◆ Translated() [1/2]

Circ2d Geom::Circ2d::Translated ( const Vec2d V) const

Translates a circle in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.

◆ Translated() [2/2]

Circ2d Geom::Circ2d::Translated ( const Pnt2d P1,
const Pnt2d P2 
) const

Translates a circle from the point P1 to the point P2.

◆ XAxis()

Ax2d Geom::Circ2d::XAxis ( ) const

returns the X axis of the circle.

◆ YAxis()

Ax2d Geom::Circ2d::YAxis ( ) const

Returns the Y axis of the circle.
//! Reverses the direction of the circle.


The documentation for this class was generated from the following file: