CFx SDK Documentation 2024 SP0
|
#include <GeTorus.h>
Additional Inherited Members | |
![]() | |
OdGeSurface () | |
OdGeSurface (const OdGeSurface &surf) | |
![]() | |
OdGeEntity3d () | |
OdGeEntity3d (const OdGeEntity3d &) | |
void | connectTo (OdGeEntity3dImpl *) |
This class represents toroidal segments.
The torus is located in space by its center, which is a point on the axis of symmetry.
The center of the circular arc is at a distance of majorRadius from the center of the torus. The radius of the circular arc is the minorRadius.
Parameter U parameterizes the circular tube, which for a closed circle defaults to the range [-OdaPI, OdaPI). Applying the right hand rule along the (axisOfSymmetry X refAxis) defines the increasing direction for U.
Parameter V is the longitude (about the axis of symmetry), which for a closed torus defaults to the range [-OdaPI, OdaPI). Zero corresponds to the refAxis (which is a vector orthogonal to the axis of symmetry). Applying the right hand rule along the symmetric axis defines the increasing direction for V. However, if isReverseV() is true, the increasing direction for V is defined by the left hand rule.
The torus is periodic in U, V with a period of Oda2PI. [umin, umax] x [vmin, vmax] defines a four sided toroidal patch bounded by four circular arcs. Following constraints apply to the definition of a toroidal patch.
umin < umax and |umin - umax| <= Oda2PI. vmin < vmax and |vmin - vmax| <= Oda2PI
Corresponding C++ library: TD_Ge
<group OdGe_Classes>
<link ge_OdGeTorus, Working with Toruses>
OdGeTorus::OdGeTorus | ( | ) |
Default constructor for the OdGeTorus class.
OdGeTorus::OdGeTorus | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry | ||
) |
Constructor for the OdGeTorus class.
majorRadius | [in] The major radius of this torus. The major radius is a distance from origin to the center of circular arc. |
minorRadius | [in] The minor radius of this torus. The minor radius defines a radius of circular arc. |
center | [in] The origin of the this torus. |
axisOfSymmetry | [in] Axis of symmetry (rotation). |
OdGeTorus::OdGeTorus | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry, | ||
const OdGeVector3d & | refAxis, | ||
double | startAngleU, | ||
double | endAngleU, | ||
double | startAngleV, | ||
double | endAngleV | ||
) |
Constructor for the OdGeTorus class.
majorRadius | [in] The major radius of this torus. The major radius is a distance from origin to the center of circular arc. |
minorRadius | [in] The minor radius of this torus. The minor radius defines a radius of circular arc. |
center | [in] The origin of the this torus. |
axisOfSymmetry | [in] Axis of symmetry (rotation). |
refAxis | [in] Vector that indicates the direction of the zero rotation angle of a circular arc of this torus. |
startAngleU | [in] Start angle about the axis of symmetry. Defines the lower bound of the U parameter interval. |
endAngleU | [in] End angle about the axis of symmetry. Defines the upper bound of the U parameter interval. |
startAngleV | [in] Start angle about the tube. Defines the lower bound of the V parameter interval. |
endAngleV | [in] End angle about the tube. Defines the upper bound of the V parameter interval. |
OdGeTorus::OdGeTorus | ( | const OdGeTorus & | source | ) |
Copy constructor for the OdGeTorus class.
source | [in] A torus to be copied. |
OdGeVector3d OdGeTorus::axisOfSymmetry | ( | ) | const |
Returns the axis of symmetry (rotation) of this torus.
OdGePoint3d OdGeTorus::center | ( | ) | const |
Returns the center of this torus.
void OdGeTorus::getAnglesInU | ( | double & | startAngleU, |
double & | endAngleU | ||
) | const |
Retrieves the start and end angles about the axis of symmetry.
startAngleU | [out] Receives the angle about the axis of symmetry. |
endAngleU | [out] Receives the end angle about the axis of symmetry. |
void OdGeTorus::getAnglesInV | ( | double & | startAngleV, |
double & | endAngleV | ||
) | const |
Retrieves the start and end angles about the tube.
startAngleV | [out] Receives the start angle about the tube. |
endAngleV | [out] Receives the end angle about the tube. |
bool OdGeTorus::intersectWith | ( | const OdGeLinearEnt3d & | linEnt, |
int & | numInt, | ||
OdGePoint3d & | p1, | ||
OdGePoint3d & | p2, | ||
OdGePoint3d & | p3, | ||
OdGePoint3d & | p4, | ||
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Checks if the torus intersects with the specified line entity, and returns the number of intersections and the points of intersection.
linEnt | [in] Linear entity. |
numInt | [out] Receives the number of intersections. |
p1 | [out] Receives the first intersection point. |
p2 | [out] Receives the second intersection point. |
p3 | [out] Receives the third intersection point. |
p4 | [out] Receives the fourth intersection point. |
tol | [in] Geometric tolerance. |
bool OdGeTorus::isApple | ( | ) | const |
Checks if (0 < majorRadius < |minorRadius| - OdGeContext::gTol.equalVector()), creating a solid with dimples at the axis of symmetry.
bool OdGeTorus::isDegenerate | ( | ) | const |
Checks if torus is not Doughnut.
bool OdGeTorus::isDoughnut | ( | ) | const |
Checks if (majorRadius >= |minorRadius| - OdGeContext::gTol.equalVector()), creating a solid with a hole in the middle.
bool OdGeTorus::isHollow | ( | ) | const |
Checks if the minor radius of the torus is less than zero.
bool OdGeTorus::isLemon | ( | ) | const |
Checks if (majorRadius <= 0), producing a solid with points along the axis of symmetry.
isApple() isDoughnut() isLemon() isVortex()
bool OdGeTorus::isOuterNormal | ( | ) | const |
Checks if the normal to this surface is pointing outward.
bool OdGeTorus::isReverseV | ( | ) | const |
Checks whether V parameter increases in clockwise direction around axisOfSymmetry.
bool OdGeTorus::isVortex | ( | ) | const |
Checks if (|majorRadius - |minorRadius|| < OdGeContext::gTol.equalVector()), producing a doughnut. with a zero-radius hole.
double OdGeTorus::majorRadius | ( | ) | const |
Returns the major radius of this torus.
double OdGeTorus::minorRadius | ( | ) | const |
Returns the minor radius of this torus.
OdGeVector3d OdGeTorus::refAxis | ( | ) | const |
Returns the reference axis of this torus.
OdGeTorus & OdGeTorus::set | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry | ||
) |
Sets the parameters for this torus according to the arguments.
majorRadius | [in] The major radius of this torus. |
minorRadius | [in] The minor radius of this torus. |
center | [in] The origin of the this torus. |
axisOfSymmetry | [in] Axis of symmetry (rotation). |
OdGeTorus & OdGeTorus::set | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry, | ||
const OdGeVector3d & | refAxis, | ||
double | startAngleU, | ||
double | endAngleU, | ||
double | startAngleV, | ||
double | endAngleV | ||
) |
Sets the parameters for this torus according to the arguments.
majorRadius | [in] The major radius of this torus. |
minorRadius | [in] The minor radius of this torus. |
center | [in] The origin of the this torus. |
axisOfSymmetry | [in] Axis of symmetry (rotation). |
refAxis | [in] defines thegle 0 about the axis of symmetry. |
startAngleU | [in] Start angle about the axis of symmetry. |
endAngleU | [in] End angle about the axis of symmetry. |
startAngleV | [in] Start angle about the tube. |
endAngleV | [in] End angle about the tube. |
OdGeTorus & OdGeTorus::setAnglesInU | ( | double | startAngleU, |
double | endAngleU | ||
) |
Sets the start and end angles about about the axis of symmetry.
startAngleU | [in] Start angle about the axis of symmetry. |
endAngleU | [in] End angle about the axis of symmetry. |
OdGeTorus & OdGeTorus::setAnglesInV | ( | double | startAngleV, |
double | endAngleV | ||
) |
Sets the start and end angles about about the tube.
startAngleV | [in] Start angle about the tube. |
endAngleV | [in] End angle about the tube. |
OdGeTorus & OdGeTorus::setMajorRadius | ( | double | radius | ) |
Sets the major radius of this torus.
radius | [in] The major radius of this torus. |
OdGeTorus & OdGeTorus::setMinorRadius | ( | double | radius | ) |
Sets the minor radius of this torus.
radius | [in] The minor radius of this torus. |
void OdGeTorus::setReverseV | ( | bool | isReverseV | ) |
Specifies whether the V parameter should be measured clockwise around axisOfSymmetry, rather than counterclockwise.
isReverseV | [in] Sets ReverseV. |