CFx SDK Documentation
2022 SP0
|
#include <GeTorus.h>
Public Member Functions | |
OdGeTorus () | |
OdGeTorus (double majorRadius, double minorRadius, const OdGePoint3d ¢er, const OdGeVector3d &axisOfSymmetry) | |
OdGeTorus (double majorRadius, double minorRadius, const OdGePoint3d ¢er, const OdGeVector3d &axisOfSymmetry, const OdGeVector3d &refAxis, double startAngleU, double endAngleU, double startAngleV, double endAngleV) | |
OdGeTorus (const OdGeTorus &source) | |
double | majorRadius () const |
double | minorRadius () const |
void | getAnglesInU (double &startAngleU, double &endAngleU) const |
void | getAnglesInV (double &startAngleV, double &endAngleV) const |
OdGePoint3d | center () const |
OdGeVector3d | axisOfSymmetry () const |
OdGeVector3d | refAxis () const |
bool | isOuterNormal () const |
OdGeTorus & | setMajorRadius (double radius) |
OdGeTorus & | setMinorRadius (double radius) |
OdGeTorus & | setAnglesInU (double startAngleU, double endAngleU) |
OdGeTorus & | setAnglesInV (double startAngleV, double endAngleV) |
OdGeTorus & | set (double majorRadius, double minorRadius, const OdGePoint3d ¢er, const OdGeVector3d &axisOfSymmetry) |
OdGeTorus & | set (double majorRadius, double minorRadius, const OdGePoint3d ¢er, const OdGeVector3d &axisOfSymmetry, const OdGeVector3d &refAxis, double startAngleU, double endAngleU, double startAngleV, double endAngleV) |
OdGeTorus & | operator= (const OdGeTorus &torus) |
bool | intersectWith (const OdGeLinearEnt3d &linEnt, int &numInt, OdGePoint3d &p1, OdGePoint3d &p2, OdGePoint3d &p3, OdGePoint3d &p4, const OdGeTol &tol=OdGeContext::gTol) const |
bool | isLemon () const |
bool | isApple () const |
bool | isVortex () const |
bool | isDoughnut () const |
bool | isDegenerate () const |
bool | isHollow () const |
bool | isReverseV () const |
void | setReverseV (bool isReverseV) |
Public Member Functions inherited from OdGeSurface | |
OdGePoint2d | paramOf (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const |
TD_USING (OdGeEntity3d::isOn) | |
bool | isOn (const OdGePoint3d &point, OdGePoint2d ¶mPoint, const OdGeTol &tol=OdGeContext::gTol) const |
OdGePoint3d | closestPointTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const |
void | getClosestPointTo (const OdGePoint3d &point, OdGePointOnSurface &pntOnSurface, const OdGeTol &tol=OdGeContext::gTol) const |
double | distanceTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const |
bool | isNormalReversed () const |
OdGeSurface & | reverseNormal () |
void | getEnvelope (OdGeInterval &intrvlU, OdGeInterval &intrvlV) const |
bool | isClosedInU (const OdGeTol &tol=OdGeContext::gTol) const |
bool | isClosedInV (const OdGeTol &tol=OdGeContext::gTol) const |
OdGePoint3d | evalPoint (const OdGePoint2d ¶m) const |
OdGePoint3d | evalPoint (const OdGePoint2d ¶m, int numDeriv, OdGeVector3dArray &derivatives) const |
OdGePoint3d | evalPoint (const OdGePoint2d ¶m, int numDeriv, OdGeVector3dArray &derivatives, OdGeVector3d &normal) const |
OdGeSurface & | operator= (const OdGeSurface &surf) |
bool | project (const OdGePoint3d &p, OdGePoint3d &projP, const OdGeTol &tol=OdGeContext::gTol) const |
bool | getReparameterization (bool &swapUV, double &uCoeffA, double &vCoeffA, double &uCoeffB, double &vCoeffB) const |
void | setReparameterization (bool swapUV=false, double uCoeffA=1., double vCoeffA=1., double uCoeffB=0., double vCoeffB=0.) |
void | getImplicitEnvelope (OdGeInterval &implicitIntrvlU, OdGeInterval &implicitIntrvlV) const |
bool | setEnvelope (const OdGeInterval &realIntrvlU, const OdGeInterval &realIntrvlV) |
Public Member Functions inherited from OdGeEntity3d | |
ODRX_HEAP_OPERATORS () | |
~OdGeEntity3d () | |
bool | isKindOf (OdGe::EntityId entType) const |
OdGe::EntityId | type () const |
OdGeEntity3d * | copy () const |
OdGeEntity3d & | operator= (const OdGeEntity3d &entity) |
bool | operator== (const OdGeEntity3d &entity) const |
bool | operator!= (const OdGeEntity3d &entity) const |
bool | isEqualTo (const OdGeEntity3d &object, const OdGeTol &tol=OdGeContext::gTol) const |
OdGeEntity3d & | transformBy (const OdGeMatrix3d &xfm) |
OdGeEntity3d & | translateBy (const OdGeVector3d &translateVec) |
OdGeEntity3d & | rotateBy (double angle, const OdGeVector3d &vect, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin) |
OdGeEntity3d & | mirror (const OdGePlane &plane) |
OdGeEntity3d & | scaleBy (double scaleFactor, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin) |
bool | isOn (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const |
Additional Inherited Members | |
Protected Member Functions inherited from OdGeSurface | |
OdGeSurface () | |
OdGeSurface (const OdGeSurface &surf) | |
Protected Member Functions inherited from OdGeEntity3d | |
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 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 U.
Parameter v parameterizes the circular tube, which for a closed circle defaults to the range [-OdaPI, OdaPI). Applying the right hand rule along the refAxis X-axisOfSymmetry defines the increasing direction for v.
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.html, Working with Toruses>
OdGeTorus::OdGeTorus | ( | ) |
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. |
source | [in] Object to be cloned. |
OdGeTorus::OdGeTorus | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry | ||
) |
OdGeTorus::OdGeTorus | ( | double | majorRadius, |
double | minorRadius, | ||
const OdGePoint3d & | center, | ||
const OdGeVector3d & | axisOfSymmetry, | ||
const OdGeVector3d & | refAxis, | ||
double | startAngleU, | ||
double | endAngleU, | ||
double | startAngleV, | ||
double | endAngleV | ||
) |
OdGeTorus::OdGeTorus | ( | const OdGeTorus & | source | ) |
OdGeVector3d OdGeTorus::axisOfSymmetry | ( | ) | const |
Returns the Axis of symmetry (rotation).
OdGePoint3d OdGeTorus::center | ( | ) | const |
Returns the center of this torus.
void OdGeTorus::getAnglesInU | ( | double & | startAngleU, |
double & | endAngleU | ||
) | const |
Returns the start and end angles about 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 |
Returns the start and end angles about 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 |
Returns True if the torus intersects with the specified line entity, and returns the number of intersections and the points of intersection.
lineEnt | [in] Any 3D line 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 |
Returns true if and only if (0 < majorRadius < minorRadius), creating a solid with dimples at the axis of symmetry.
bool OdGeTorus::isDegenerate | ( | ) | const |
Returns true if and only if (minorRadius <= 0) OR (majorRadius <= -minorRadius)
bool OdGeTorus::isDoughnut | ( | ) | const |
Returns true if and only if (minorRadius < majorRadius), creating a solid with a hole in the middle.
bool OdGeTorus::isHollow | ( | ) | const |
Returns true if and only if there is a hole in the torus.
bool OdGeTorus::isLemon | ( | ) | const |
Returns true if and only if (majorRadius < 0) and (|majorRadius| < minorRadius), producing a solid with points along the axis of symmetry.
bool OdGeTorus::isOuterNormal | ( | ) | const |
Returns true if and only if the normal to this surface is pointing outward.
bool OdGeTorus::isReverseV | ( | ) | const |
Returns true if and only if the v-parameter is measured counterclockwise about the torus normal, rather than clockwise.
bool OdGeTorus::isVortex | ( | ) | const |
Returns true if and only if (minorRadius == majorRadius), producing a donut. 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.
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.
majorRadius | [in] The major radius of this torus. |
OdGeTorus& OdGeTorus::setMinorRadius | ( | double | radius | ) |
Sets the minor radius of this torus.
minorRadius | [in] The minor radius of this torus. |
void OdGeTorus::setReverseV | ( | bool | isReverseV | ) |
Sets ReverseV according to the parameter.
isReverseV | [in] Sets ReverseV. |