CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGeTorus Class Reference

#include <GeTorus.h>

Inheritance diagram for OdGeTorus:
OdGeSurface OdGeEntity3d

Public Member Functions

 OdGeTorus ()
 
 OdGeTorus (double majorRadius, double minorRadius, const OdGePoint3d &center, const OdGeVector3d &axisOfSymmetry)
 
 OdGeTorus (double majorRadius, double minorRadius, const OdGePoint3d &center, 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
 
OdGeTorussetMajorRadius (double radius)
 
OdGeTorussetMinorRadius (double radius)
 
OdGeTorussetAnglesInU (double startAngleU, double endAngleU)
 
OdGeTorussetAnglesInV (double startAngleV, double endAngleV)
 
OdGeTorusset (double majorRadius, double minorRadius, const OdGePoint3d &center, const OdGeVector3d &axisOfSymmetry)
 
OdGeTorusset (double majorRadius, double minorRadius, const OdGePoint3d &center, const OdGeVector3d &axisOfSymmetry, const OdGeVector3d &refAxis, double startAngleU, double endAngleU, double startAngleV, double endAngleV)
 
OdGeTorusoperator= (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
 
OdGePoint2d paramOf (const OdGePoint3d &point, const OdGeUvBox *uvBox, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity3d::isOn)
 
bool isOn (const OdGePoint3d &point, OdGePoint2d &paramPoint, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, OdGePoint2d *param, const OdGeUvBox *uvBox, 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
 
bool isLeftHanded () const
 
OdGeSurfacereverseNormal ()
 
void getEnvelope (OdGeInterval &intrvlU, OdGeInterval &intrvlV) const
 
void getEnvelope (OdGeUvBox &uvbox) const
 
bool isClosedInU (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosedInV (const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives, OdGeVector3d &normal) const
 
OdGeSurfaceoperator= (const OdGeSurface &surf)
 
OdGeExtents3d getGeomExtents (const OdGeUvBox &range=OdGeUvBox(), const OdGeMatrix3d *coordSystem=NULL) const
 
bool project (const OdGePoint3d &p, OdGePoint3d &projP, const OdGeTol &tol=OdGeContext::gTol) const
 
bool setEnvelope (const OdGeInterval &realIntrvlU, const OdGeInterval &realIntrvlV)
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param) const
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param, const OdGeInterval &interval) const
 
bool getPoles (OdGeDoubleArray *uParams, OdGeDoubleArray *vParams, OdGePoint3dArray *uPoints, OdGePoint3dArray *vPoints, double tol=1e-13) const
 
- Public Member Functions inherited from OdGeEntity3d
 ODRX_HEAP_OPERATORS ()
 
 ~OdGeEntity3d ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity3dcopy () const
 
OdGeEntity3doperator= (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
 
OdGeEntity3dtransformBy (const OdGeMatrix3d &xfm)
 
OdGeEntity3dtranslateBy (const OdGeVector3d &translateVec)
 
OdGeEntity3drotateBy (double angle, const OdGeVector3d &vect, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
OdGeEntity3dmirror (const OdGePlane &plane)
 
OdGeEntity3dscaleBy (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 *)
 

Detailed Description

This class represents toroidal segments.

Remarks
The torus is surface generated by revolving a circular arc about an axis of symmetry, where the plane of the circular arc contains the axis of symmetry

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>

Definition at line 72 of file GeTorus.h.

Constructor & Destructor Documentation

◆ OdGeTorus() [1/4]

OdGeTorus::OdGeTorus ( )

Default constructor for the OdGeTorus class.

Remarks
Constructs a torus with next properties: minorRadius = 0.5, startAng endAng Angles for U parameter -OdaPI OdaPI Angles for V parameter -OdaPI OdaPI

◆ OdGeTorus() [2/4]

OdGeTorus::OdGeTorus ( double  majorRadius,
double  minorRadius,
const OdGePoint3d center,
const OdGeVector3d axisOfSymmetry 
)

Constructor for the OdGeTorus class.

Parameters
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() [3/4]

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.

Parameters
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.
Remarks
All angles are expressed in radians.

◆ OdGeTorus() [4/4]

OdGeTorus::OdGeTorus ( const OdGeTorus source)

Copy constructor for the OdGeTorus class.

Parameters
source[in] A torus to be copied.

Member Function Documentation

◆ axisOfSymmetry()

OdGeVector3d OdGeTorus::axisOfSymmetry ( ) const

Returns the axis of symmetry (rotation) of this torus.

Returns
The axis of symmetry of this torus as an OdGeVector3d instance.

◆ center()

OdGePoint3d OdGeTorus::center ( ) const

Returns the center of this torus.

Returns
The center of this torus as an OdGePoint3d instance.

◆ getAnglesInU()

void OdGeTorus::getAnglesInU ( double &  startAngleU,
double &  endAngleU 
) const

Retrieves the start and end angles about the axis of symmetry.

Parameters
startAngleU[out] Receives the angle about the axis of symmetry.
endAngleU[out] Receives the end angle about the axis of symmetry.

◆ getAnglesInV()

void OdGeTorus::getAnglesInV ( double &  startAngleV,
double &  endAngleV 
) const

Retrieves the start and end angles about the tube.

Parameters
startAngleV[out] Receives the start angle about the tube.
endAngleV[out] Receives the end angle about the tube.

◆ intersectWith()

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.

Parameters
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.
Remarks
p1 is valid if and only if numInt > 0. p2 is valid if and only if numInt > 1. p3 is valid if and only if numInt > 2. p4 is valid if and only if numInt > 3.
Returns
true if and only if the torus intersects with the specified line entity.

◆ isApple()

bool OdGeTorus::isApple ( ) const

Checks if (0 < majorRadius < |minorRadius| - OdGeContext::gTol.equalVector()), creating a solid with dimples at the axis of symmetry.

Remarks
Exactly one of the following functions will be true for a given torus: isApple() isDoughnut() isLemon() isVortex()
Returns
true if and only if (0 < majorRadius <= |minorRadius| - OdGeContext::gTol.equalVector()).

◆ isDegenerate()

bool OdGeTorus::isDegenerate ( ) const

Checks if torus is not Doughnut.

Returns
true if and only if (majorRadius < |minorRadius| + OdGeContext::gTol.equalVector()).

◆ isDoughnut()

bool OdGeTorus::isDoughnut ( ) const

Checks if (majorRadius >= |minorRadius| - OdGeContext::gTol.equalVector()), creating a solid with a hole in the middle.

Remarks
Exactly one of the following functions will be true for a given torus: isApple() isDoughnut() isLemon() isVortex()
Returns
true if and only if (majorRadius >= |minorRadius| + OdGeContext::gTol.equalVector()).

◆ isHollow()

bool OdGeTorus::isHollow ( ) const

Checks if the minor radius of the torus is less than zero.

Returns
true if and only if (|minorRadius| < 0).

◆ isLemon()

bool OdGeTorus::isLemon ( ) const

Checks if (majorRadius <= 0), producing a solid with points along the axis of symmetry.

Remarks
Exactly one of the following functions will be true for a given torus:

isApple() isDoughnut() isLemon() isVortex()

Returns
true if and only if (majorRadius <= 0).

◆ isOuterNormal()

bool OdGeTorus::isOuterNormal ( ) const

Checks if the normal to this surface is pointing outward.

Returns
true if and only if the normal to this surface is pointing outward.

◆ isReverseV()

bool OdGeTorus::isReverseV ( ) const

Checks whether V parameter increases in clockwise direction around axisOfSymmetry.

Returns
true if V parameter increases in clockwise direction around axisOfSymmetry, false otherwise.

◆ isVortex()

bool OdGeTorus::isVortex ( ) const

Checks if (|majorRadius - |minorRadius|| < OdGeContext::gTol.equalVector()), producing a doughnut. with a zero-radius hole.

Remarks
Exactly one of the following functions will be true for a given torus: isApple() isDoughnut() isLemon() isVortex()
Returns
true if and only if (|majorRadius - |minorRadius|| < OdGeContext::gTol.equalVector()).

◆ majorRadius()

double OdGeTorus::majorRadius ( ) const

Returns the major radius of this torus.

Returns
The major radius of this torus as a double value.

◆ minorRadius()

double OdGeTorus::minorRadius ( ) const

Returns the minor radius of this torus.

Remarks
Returns negative value when isNormalReversed() is true.
Returns
The minor radius of this torus as a double value.

◆ operator=()

OdGeTorus & OdGeTorus::operator= ( const OdGeTorus torus)

Assignment operator for the OdGeTorus object.

Parameters
torus[in] A torus to be assigned.
Returns
The reference to this OdGeTorus object.

◆ refAxis()

OdGeVector3d OdGeTorus::refAxis ( ) const

Returns the reference axis of this torus.

Returns
The reference axis of this torus as an OdGeVector3d instance.

◆ set() [1/2]

OdGeTorus & OdGeTorus::set ( double  majorRadius,
double  minorRadius,
const OdGePoint3d center,
const OdGeVector3d axisOfSymmetry 
)

Sets the parameters for this torus according to the arguments.

Parameters
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).
Returns
The reference to this OdGeTorus object.

◆ set() [2/2]

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.

Parameters
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.
Returns
The reference to this OdGeTorus object.

◆ setAnglesInU()

OdGeTorus & OdGeTorus::setAnglesInU ( double  startAngleU,
double  endAngleU 
)

Sets the start and end angles about about the axis of symmetry.

Parameters
startAngleU[in] Start angle about the axis of symmetry.
endAngleU[in] End angle about the axis of symmetry.
Remarks
For Vortex, Apple, Lemon, the angles will be set as the result of the intersection of the natural interval with the one passed to the method.
Returns
The reference to this OdGeTorus object.

◆ setAnglesInV()

OdGeTorus & OdGeTorus::setAnglesInV ( double  startAngleV,
double  endAngleV 
)

Sets the start and end angles about about the tube.

Parameters
startAngleV[in] Start angle about the tube.
endAngleV[in] End angle about the tube.
Returns
The reference to this OdGeTorus object.

◆ setMajorRadius()

OdGeTorus & OdGeTorus::setMajorRadius ( double  radius)

Sets the major radius of this torus.

Parameters
radius[in] The major radius of this torus.
Remarks
Angles along U will be reset to the maximum allowable for the established minorRadius and majorRadius.
Returns
The reference to this OdGeTorus object.

◆ setMinorRadius()

OdGeTorus & OdGeTorus::setMinorRadius ( double  radius)

Sets the minor radius of this torus.

Parameters
radius[in] The minor radius of this torus.
Remarks
Angles along U will be reset to the maximum allowable for the established minorRadius and majorRadius.
Returns
The reference to this OdGeTorus object.

◆ setReverseV()

void OdGeTorus::setReverseV ( bool  isReverseV)

Specifies whether the V parameter should be measured clockwise around axisOfSymmetry, rather than counterclockwise.

Parameters
isReverseV[in] Sets ReverseV.

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