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

#include <GeCone.h>

Inheritance diagram for OdGeCone:
OdGeSurface OdGeEntity3d

Public Member Functions

 OdGeCone ()
 
 OdGeCone (double cosineAngle, double sineAngle, const OdGePoint3d &baseOrigin, double baseRadius, const OdGeVector3d &axisOfSymmetry)
 
 OdGeCone (double cosineAngle, double sineAngle, const OdGePoint3d &baseOrigin, double baseRadius, const OdGeVector3d &axisOfSymmetry, const OdGeVector3d &refAxis, const OdGeInterval &height, double startAng, double endAng)
 
 OdGeCone (const OdGeCone &cone)
 
double baseRadius () const
 
OdGePoint3d baseCenter () const
 
void getAngles (double &startAng, double &endAng) const
 
double halfAngle () const
 
void getHalfAngle (double &cosineAngle, double &sineAngle) const
 
void getHalfAngleSigned (double &cosineAngle, double &sineAngle) const
 
void getHeight (OdGeInterval &height) const
 
double heightAt (double u) const
 
OdGeVector3d axisOfSymmetry () const
 
OdGeVector3d refAxis () const
 
OdGePoint3d apex () const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isOuterNormal () const
 
OdGeConesetBaseRadius (double baseRadius)
 
OdGeConesetAngles (double startAng, double endAng)
 
OdGeConesetHeight (const OdGeInterval &height)
 
double getPoleParam () const
 
OdGeConeset (double cosineAngle, double sineAngle, const OdGePoint3d &baseCenter, double baseRadius, const OdGeVector3d &axisOfSymmetry)
 
OdGeConeset (double cosineAngle, double sineAngle, const OdGePoint3d &baseCenter, double baseRadius, const OdGeVector3d &axisOfSymmetry, const OdGeVector3d &refAxis, const OdGeInterval &height, double startAng, double endAng)
 
OdGeConeoperator= (const OdGeCone &cone)
 
bool intersectWith (const OdGeLinearEnt3d &linEnt, int &numInt, OdGePoint3d &p1, OdGePoint3d &p2, const OdGeTol &tol=OdGeContext::gTol) const
 
double getUParamScale () const
 
void setUParamScale (double uScale=0.0)
 
- 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 right circular cones.

Remarks
A right circular cone is defined by its

axis of symmetry height sine and cosine of the half angle origin (a point on the axis of symmetry) radius at the origin U parameter scale.

The cross section containing the origin is referred to as the base. The radius at the base cannot be zero.
This cone may extend on either side of the base. This cone extends only on one direction from the apex, i.e. it is not a double cone.

The half angle is measured between the symmetric axis and the generating line of this cone. If cosine of the half angle is positive, this cone is convex. If cosine of the half angle is negative, this cone is concave. If cosine and sine of the half angle have the same sign, the apex is on the opposite direction of the symmetric axis and radius increases along the symmetric axis. If cosine and sine of the half angle have different signs, the apex is on the direction of the symmetric axis and radius decreases along the symmetric axis. Both cosine and sine of the half angle can't be zeros.

The height interval of this cone is specified relative to its origin. Height increases in the direction of the symmetric axis. Height interval must be bounded.

Parameter V is the angle of revolution measured from the refAxis (an axis perpendicular to the axis of symmetry). For a closed cone, it defaults to [-OdaPI, OdaPI). The right hand rule applied along the direction of the axis of symmetry defines the positive direction of V. The surface is periodic in V with a period of Oda2PI.

Parameter U varies along the generating line. U is dimensionless, measured in U parameter scale (which equals to the radius by default), multiplied by the absolute value of cosine of the half angle. U increases in the direction of the axis of symmetry. However, if U parameter scale is negative, U decreases in the direction of the axis of symmetry. U = 0 corresponds to the base of this cone.

If cosine and sine of the half angle have the same sign, U and height are less than zero at the apex. If cosine and sine of the half angle have different signs, U and height are greater than zero at the apex.

[umin, umax] x [vmin, vmax] defines a four sided conical patch bounded by two straight lines (at angles vmin and vmax), and two circular arcs (at umin and umax). The following must be observed when defining a cone:

umin < umax |vmax - vmin| <= Oda2PI. baseRadius > 0.0

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeCone, Working with Cones>

Definition at line 107 of file GeCone.h.

Constructor & Destructor Documentation

◆ OdGeCone() [1/4]

OdGeCone::OdGeCone ( )

Default constructor for the OdGeCone class.

Remarks
The default constructor uses a half angle of 45°, a base origin of (0.0, 0.0, 0.0), a base radius of 2.0, an axis of symmetry of (0.0, 1.0, 0.0), and a reference axis of (1.0, 0.0, 0.0).

◆ OdGeCone() [2/4]

OdGeCone::OdGeCone ( double  cosineAngle,
double  sineAngle,
const OdGePoint3d baseOrigin,
double  baseRadius,
const OdGeVector3d axisOfSymmetry 
)

Constructor for the OdGeCone class.

Parameters
cosineAngle[in] The cosine of the angle between the generating line and the axis of symmetry.
sineAngle[in] The sine of the angle between the generating line and the axis of symmetry.
baseOrigin[in] Center of the base.
baseRadius[in] Radius of the base.
axisOfSymmetry[in] Axis of symmetry (rotation).

◆ OdGeCone() [3/4]

OdGeCone::OdGeCone ( double  cosineAngle,
double  sineAngle,
const OdGePoint3d baseOrigin,
double  baseRadius,
const OdGeVector3d axisOfSymmetry,
const OdGeVector3d refAxis,
const OdGeInterval height,
double  startAng,
double  endAng 
)

Constructor for the OdGeCone class.

Parameters
cosineAngle[in] The cosine of the angle between the generating line and the axis of symmetry.
sineAngle[in] The sine of the angle between the generating line and the axis of symmetry.
baseOrigin[in] Center of the base.
baseRadius[in] Radius of the base.
axisOfSymmetry[in] Axis of symmetry (rotation).
refAxis[in] Defines angle 0 of circular base.
height[in] Height interval of the cone.
startAng[in] Start angle.
endAng[in] End angle.
Remarks
All angles are expressed in radians.

◆ OdGeCone() [4/4]

OdGeCone::OdGeCone ( const OdGeCone cone)

Copy constructor for the OdGeCone class.

Parameters
cone[in] Cone to be copied.

Member Function Documentation

◆ apex()

OdGePoint3d OdGeCone::apex ( ) const

Returns the apex of this cone.

Returns
The apex of this cone as an OdGePoint3d instance.

◆ axisOfSymmetry()

OdGeVector3d OdGeCone::axisOfSymmetry ( ) const

Returns the axis of symmetry of this cone.

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

◆ baseCenter()

OdGePoint3d OdGeCone::baseCenter ( ) const

Returns the center of the base.

Returns
The center of the base of this cone as an OdGePoint3d instance.

◆ baseRadius()

double OdGeCone::baseRadius ( ) const

Returns the base radius of this cone.

Returns
The base radius of this cone as a double value.

◆ getAngles()

void OdGeCone::getAngles ( double &  startAng,
double &  endAng 
) const

Retrieves the starting and ending angles of this cone.

Parameters
startAng[out] Receives the start angle.
endAng[out] Receives the end angle.
Remarks
All angles are expressed in radians.

◆ getHalfAngle()

void OdGeCone::getHalfAngle ( double &  cosineAngle,
double &  sineAngle 
) const

Retrieves the cosine and the sine of the angle between the generating line and the axis of symmetry.

Remarks
Absolute value is returned for both functions (i.e. any signs are dropped).
Parameters
cosineAngle[out] Receives the cosine of the angle.
sineAngle[out] Receives the sine of the angle.

◆ getHalfAngleSigned()

void OdGeCone::getHalfAngleSigned ( double &  cosineAngle,
double &  sineAngle 
) const

Retrieves the cosine and the sine of the angle between the generating line and the axis of symmetry.

Remarks
The angle is returned "as is", the signs are preserved.
Parameters
cosineAngle[out] Receives the cosine of the angle.
sineAngle[out] Receives the sine of the angle.

◆ getHeight()

void OdGeCone::getHeight ( OdGeInterval height) const

Retrieves the interval of the axis of symmetry.

Parameters
height[out] Receives the interval.

◆ getPoleParam()

double OdGeCone::getPoleParam ( ) const

Returns U parameter at the pole

Returns
U parameter at the pole of this cone as a double value.

◆ getUParamScale()

double OdGeCone::getUParamScale ( ) const

Retrieves U parameter scale.

Returns
U parameter scale of this cone as a double value.

◆ halfAngle()

double OdGeCone::halfAngle ( ) const

Returns the angle between the generating line and the axis of symmetry.

Returns
The half angle of this cone as a double value.
Remarks
Absolute value is returned (i.e. any signs are dropped). The angle is expressed in radians.

◆ heightAt()

double OdGeCone::heightAt ( double  u) const

Returns the height of this cone corresponding to the specified position on the U-axis.

Remarks
Parameter U varies along the generating line. U is dimensionless, measured in radius of the origin, and increases in the direction of the axis of symmetry.
Parameters
u[in] Position on the U-axis of this cone.
Returns
The height as a double value.

◆ intersectWith()

bool OdGeCone::intersectWith ( const OdGeLinearEnt3d linEnt,
int &  numInt,
OdGePoint3d p1,
OdGePoint3d p2,
const OdGeTol tol = OdGeContext::gTol 
) const

Checks if this cone intersects with a linear 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.
tol[in] Geometric tolerance.
Returns
true if and only if this cone intersects with a line entity, false otherwise.
Remarks
p1 is valid if and only if numInt >= 1. p2 is valid if and only if numInt = 2.

◆ isClosed()

bool OdGeCone::isClosed ( const OdGeTol tol = OdGeContext::gTol) const

Checks if the base of this cone is a full circle within the specified tolerance.

Returns
true if and only if the base of this cone is a full circle within the specified tolerance, false otherwise.
Parameters
tol[in] Geometric tolerance.

◆ isOuterNormal()

bool OdGeCone::isOuterNormal ( ) const

Checks if the normal to this cone is pointing outward.

Returns
true if and only if the normal to this cone is pointing outward, false otherwise.

◆ operator=()

OdGeCone & OdGeCone::operator= ( const OdGeCone cone)

Assignment operator for the OdGeCone object.

Parameters
cone[in] Cone to be assigned.
Returns
A reference to this OdGeCone object.

◆ refAxis()

OdGeVector3d OdGeCone::refAxis ( ) const

Returns the reference axis of this cone.

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

◆ set() [1/2]

OdGeCone & OdGeCone::set ( double  cosineAngle,
double  sineAngle,
const OdGePoint3d baseCenter,
double  baseRadius,
const OdGeVector3d axisOfSymmetry 
)

Sets the parameters for this cone according to the arguments, and returns a reference to this cone.

Parameters
cosineAngle[in] The cosine of the angle between the generating line and the axis of symmetry.
sineAngle[in] The sine of the angle between the generating line and the axis of symmetry.
baseCenter[in] Center of the base.
baseRadius[in] Radius of the base.
axisOfSymmetry[in] Axis of symmetry (rotation).
Returns
A reference to this OdGeCone object.
Remarks
All angles are expressed in radians.

◆ set() [2/2]

OdGeCone & OdGeCone::set ( double  cosineAngle,
double  sineAngle,
const OdGePoint3d baseCenter,
double  baseRadius,
const OdGeVector3d axisOfSymmetry,
const OdGeVector3d refAxis,
const OdGeInterval height,
double  startAng,
double  endAng 
)

Sets the parameters for this cone according to the arguments, and returns a reference to this cone.

Parameters
cosineAngle[in] The cosine of the angle between the generating line and the axis of symmetry.
sineAngle[in] The sine of the angle between the generating line and the axis of symmetry.
baseCenter[in] Center of the base.
baseRadius[in] Radius of the base.
axisOfSymmetry[in] Axis of symmetry (rotation).
refAxis[in] Defines angle 0 of circular base.
height[in] Height interval of this cone.
startAng[in] Start angle.
endAng[in] End angle.
Returns
A reference to this OdGeCone object.
Remarks
All angles are expressed in radians.

◆ setAngles()

OdGeCone & OdGeCone::setAngles ( double  startAng,
double  endAng 
)

Sets the starting and ending angles of this cone.

Parameters
startAng[in] Start angle.
endAng[in] End angle.
Returns
A reference to this OdGeCone object.
Remarks
All angles are expressed in radians.

◆ setBaseRadius()

OdGeCone & OdGeCone::setBaseRadius ( double  baseRadius)

Sets the base radius of this cone.

Returns
A reference to this OdGeCone object.
Parameters
baseRadius[in] Radius of the base.

◆ setHeight()

OdGeCone & OdGeCone::setHeight ( const OdGeInterval height)

Sets the height interval of this cone.

Parameters
height[in] Height interval of this cone.
Returns
A reference to this OdGeCone object.

◆ setUParamScale()

void OdGeCone::setUParamScale ( double  uScale = 0.0)

Sets U parameter scale according to the parameter.

Parameters
uScale[in] U parameter scale.
Remarks
U parameter scale can be negative. If uScale is zero, U parameter scale will be set equal to radius.

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