Open CASCADE Technology  7.6.0.dev
Public Member Functions

gp_Torus Class Reference

Describes a torus. A torus is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax3 object) as follows: More...

#include <gp_Torus.hxx>

Public Member Functions

 gp_Torus ()
 creates an indefinite Torus. More...
 
 gp_Torus (const gp_Ax3 &theA3, const Standard_Real theMajorRadius, const Standard_Real theMinorRadius)
 a torus centered on the origin of coordinate system theA3, with major radius theMajorRadius and minor radius theMinorRadius, and with the reference plane defined by the origin, the "X Direction" and the "Y Direction" of theA3. Warnings : It is not forbidden to create a torus with theMajorRadius = theMinorRadius = 0.0 Raises ConstructionError if theMinorRadius < 0.0 or if theMajorRadius < 0.0 More...
 
void SetAxis (const gp_Ax1 &theA1)
 Modifies this torus, by redefining its local coordinate system so that: More...
 
void SetLocation (const gp_Pnt &theLoc)
 Changes the location of the torus. More...
 
void SetMajorRadius (const Standard_Real theMajorRadius)
 Assigns value to the major radius of this torus. Raises ConstructionError if theMajorRadius - MinorRadius <= Resolution() More...
 
void SetMinorRadius (const Standard_Real theMinorRadius)
 Assigns value to the minor radius of this torus. Raises ConstructionError if theMinorRadius < 0.0 or if MajorRadius - theMinorRadius <= Resolution from gp. More...
 
void SetPosition (const gp_Ax3 &theA3)
 Changes the local coordinate system of the surface. More...
 
Standard_Real Area () const
 Computes the area of the torus. More...
 
void UReverse ()
 Reverses the U parametrization of the torus reversing the YAxis. More...
 
void VReverse ()
 Reverses the V parametrization of the torus reversing the ZAxis. More...
 
Standard_Boolean Direct () const
 returns true if the Ax3, the local coordinate system of this torus, is right handed. More...
 
const gp_Ax1Axis () const
 returns the symmetry axis of the torus. More...
 
void Coefficients (TColStd_Array1OfReal &theCoef) const
 Computes the coefficients of the implicit equation of the surface in the absolute Cartesian coordinate system: More...
 
const gp_PntLocation () const
 Returns the Torus's location. More...
 
const gp_Ax3Position () const
 Returns the local coordinates system of the torus. More...
 
Standard_Real MajorRadius () const
 returns the major radius of the torus. More...
 
Standard_Real MinorRadius () const
 returns the minor radius of the torus. More...
 
Standard_Real Volume () const
 Computes the volume of the torus. More...
 
gp_Ax1 XAxis () const
 returns the axis X of the torus. More...
 
gp_Ax1 YAxis () const
 returns the axis Y of the torus. More...
 
void Mirror (const gp_Pnt &theP)
 
gp_Torus Mirrored (const gp_Pnt &theP) const
 Performs the symmetrical transformation of a torus with respect to the point theP which is the center of the symmetry. More...
 
void Mirror (const gp_Ax1 &theA1)
 
gp_Torus Mirrored (const gp_Ax1 &theA1) const
 Performs the symmetrical transformation of a torus with respect to an axis placement which is the axis of the symmetry. More...
 
void Mirror (const gp_Ax2 &theA2)
 
gp_Torus Mirrored (const gp_Ax2 &theA2) const
 Performs the symmetrical transformation of a torus with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection). More...
 
void Rotate (const gp_Ax1 &theA1, const Standard_Real theAng)
 
gp_Torus Rotated (const gp_Ax1 &theA1, const Standard_Real theAng) const
 Rotates a torus. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. More...
 
void Scale (const gp_Pnt &theP, const Standard_Real theS)
 
gp_Torus Scaled (const gp_Pnt &theP, const Standard_Real theS) const
 Scales a torus. S is the scaling value. The absolute value of S is used to scale the torus. More...
 
void Transform (const gp_Trsf &theT)
 
gp_Torus Transformed (const gp_Trsf &theT) const
 Transforms a torus with the transformation theT from class Trsf. More...
 
void Translate (const gp_Vec &theV)
 
gp_Torus Translated (const gp_Vec &theV) const
 Translates a torus in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. More...
 
void Translate (const gp_Pnt &theP1, const gp_Pnt &theP2)
 
gp_Torus Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const
 Translates a torus from the point theP1 to the point theP2. More...
 

Detailed Description

Describes a torus. A torus is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax3 object) as follows:

Constructor & Destructor Documentation

◆ gp_Torus() [1/2]

gp_Torus::gp_Torus ( )
inline

creates an indefinite Torus.

◆ gp_Torus() [2/2]

gp_Torus::gp_Torus ( const gp_Ax3 theA3,
const Standard_Real  theMajorRadius,
const Standard_Real  theMinorRadius 
)
inline

a torus centered on the origin of coordinate system theA3, with major radius theMajorRadius and minor radius theMinorRadius, and with the reference plane defined by the origin, the "X Direction" and the "Y Direction" of theA3. Warnings : It is not forbidden to create a torus with theMajorRadius = theMinorRadius = 0.0 Raises ConstructionError if theMinorRadius < 0.0 or if theMajorRadius < 0.0

Member Function Documentation

◆ Area()

Standard_Real gp_Torus::Area ( ) const
inline

Computes the area of the torus.

◆ Axis()

const gp_Ax1& gp_Torus::Axis ( ) const
inline

returns the symmetry axis of the torus.

◆ Coefficients()

void gp_Torus::Coefficients ( TColStd_Array1OfReal theCoef) const

Computes the coefficients of the implicit equation of the surface in the absolute Cartesian coordinate system:

Coef(1) * X^4 + Coef(2) * Y^4 + Coef(3) * Z^4 +
Coef(4) * X^3 * Y + Coef(5) * X^3 * Z + Coef(6) * Y^3 * X +
Coef(7) * Y^3 * Z + Coef(8) * Z^3 * X + Coef(9) * Z^3 * Y +
Coef(10) * X^2 * Y^2 + Coef(11) * X^2 * Z^2 +
Coef(12) * Y^2 * Z^2 + Coef(13) * X^2 * Y * Z +
Coef(14) * X * Y^2 * Z + Coef(15) * X * Y * Z^2 +
Coef(16) * X^3 + Coef(17) * Y^3 + Coef(18) * Z^3 +
Coef(19) * X^2 * Y + Coef(20) * X^2 * Z + Coef(21) * Y^2 * X +
Coef(22) * Y^2 * Z + Coef(23) * Z^2 * X + Coef(24) * Z^2 * Y +
Coef(25) * X * Y * Z +
Coef(26) * X^2 + Coef(27) * Y^2 + Coef(28) * Z^2 +
Coef(29) * X * Y + Coef(30) * X * Z + Coef(31) * Y * Z +
Coef(32) * X + Coef(33) * Y + Coef(34) * Z +
Coef(35) = 0.0

Raises DimensionError if the length of theCoef is lower than 35.

◆ Direct()

Standard_Boolean gp_Torus::Direct ( ) const
inline

returns true if the Ax3, the local coordinate system of this torus, is right handed.

◆ Location()

const gp_Pnt& gp_Torus::Location ( ) const
inline

Returns the Torus's location.

◆ MajorRadius()

Standard_Real gp_Torus::MajorRadius ( ) const
inline

returns the major radius of the torus.

◆ MinorRadius()

Standard_Real gp_Torus::MinorRadius ( ) const
inline

returns the minor radius of the torus.

◆ Mirror() [1/3]

void gp_Torus::Mirror ( const gp_Ax1 theA1)

◆ Mirror() [2/3]

void gp_Torus::Mirror ( const gp_Ax2 theA2)

◆ Mirror() [3/3]

void gp_Torus::Mirror ( const gp_Pnt theP)

◆ Mirrored() [1/3]

gp_Torus gp_Torus::Mirrored ( const gp_Ax1 theA1) const

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

◆ Mirrored() [2/3]

gp_Torus gp_Torus::Mirrored ( const gp_Ax2 theA2) const

Performs the symmetrical transformation of a torus with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).

◆ Mirrored() [3/3]

gp_Torus gp_Torus::Mirrored ( const gp_Pnt theP) const

Performs the symmetrical transformation of a torus with respect to the point theP which is the center of the symmetry.

◆ Position()

const gp_Ax3& gp_Torus::Position ( ) const
inline

Returns the local coordinates system of the torus.

◆ Rotate()

void gp_Torus::Rotate ( const gp_Ax1 theA1,
const Standard_Real  theAng 
)
inline

◆ Rotated()

gp_Torus gp_Torus::Rotated ( const gp_Ax1 theA1,
const Standard_Real  theAng 
) const
inline

Rotates a torus. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.

◆ Scale()

void gp_Torus::Scale ( const gp_Pnt theP,
const Standard_Real  theS 
)
inline

◆ Scaled()

gp_Torus gp_Torus::Scaled ( const gp_Pnt theP,
const Standard_Real  theS 
) const
inline

Scales a torus. S is the scaling value. The absolute value of S is used to scale the torus.

◆ SetAxis()

void gp_Torus::SetAxis ( const gp_Ax1 theA1)
inline

Modifies this torus, by redefining its local coordinate system so that:

  • its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed). Raises ConstructionError if the direction of theA1 is parallel to the "XDirection" of the coordinate system of the toroidal surface.

◆ SetLocation()

void gp_Torus::SetLocation ( const gp_Pnt theLoc)
inline

Changes the location of the torus.

◆ SetMajorRadius()

void gp_Torus::SetMajorRadius ( const Standard_Real  theMajorRadius)
inline

Assigns value to the major radius of this torus. Raises ConstructionError if theMajorRadius - MinorRadius <= Resolution()

◆ SetMinorRadius()

void gp_Torus::SetMinorRadius ( const Standard_Real  theMinorRadius)
inline

Assigns value to the minor radius of this torus. Raises ConstructionError if theMinorRadius < 0.0 or if MajorRadius - theMinorRadius <= Resolution from gp.

◆ SetPosition()

void gp_Torus::SetPosition ( const gp_Ax3 theA3)
inline

Changes the local coordinate system of the surface.

◆ Transform()

void gp_Torus::Transform ( const gp_Trsf theT)
inline

◆ Transformed()

gp_Torus gp_Torus::Transformed ( const gp_Trsf theT) const
inline

Transforms a torus with the transformation theT from class Trsf.

◆ Translate() [1/2]

void gp_Torus::Translate ( const gp_Pnt theP1,
const gp_Pnt theP2 
)
inline

◆ Translate() [2/2]

void gp_Torus::Translate ( const gp_Vec theV)
inline

◆ Translated() [1/2]

gp_Torus gp_Torus::Translated ( const gp_Pnt theP1,
const gp_Pnt theP2 
) const
inline

Translates a torus from the point theP1 to the point theP2.

◆ Translated() [2/2]

gp_Torus gp_Torus::Translated ( const gp_Vec theV) const
inline

Translates a torus in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.

◆ UReverse()

void gp_Torus::UReverse ( )
inline

Reverses the U parametrization of the torus reversing the YAxis.

◆ Volume()

Standard_Real gp_Torus::Volume ( ) const
inline

Computes the volume of the torus.

◆ VReverse()

void gp_Torus::VReverse ( )
inline

Reverses the V parametrization of the torus reversing the ZAxis.

◆ XAxis()

gp_Ax1 gp_Torus::XAxis ( ) const
inline

returns the axis X of the torus.

◆ YAxis()

gp_Ax1 gp_Torus::YAxis ( ) const
inline

returns the axis Y of the torus.


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