CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
OdGeCircArc2d Class Reference

#include <GeCircArc2d.h>

Inheritance diagram for OdGeCircArc2d:
OdGeCurve2d OdGeEntity2d

Public Member Functions

 OdGeCircArc2d ()
 
 OdGeCircArc2d (const OdGeCircArc2d &source)
 
 OdGeCircArc2d (const OdGePoint2d &center, double radius)
 
 OdGeCircArc2d (const OdGePoint2d &center, double radius, double startAng, double endAng, const OdGeVector2d &refVec=OdGeVector2d::kXAxis, bool isClockWise=false)
 
 OdGeCircArc2d (const OdGePoint2d &startPoint, const OdGePoint2d &secondPoint, const OdGePoint2d &endPoint)
 
 OdGeCircArc2d (const OdGePoint2d &startPoint, const OdGePoint2d &endPoint, double bulge, bool bulgeFlag=true)
 
bool intersectWith (const OdGeLinearEnt2d &line, int &numInt, OdGePoint2d &p1, OdGePoint2d &p2, const OdGeTol &tol=OdGeContext::gTol) const
 
bool intersectWith (const OdGeCircArc2d &circarc, int &numInt, OdGePoint2d &p1, OdGePoint2d &p2, const OdGeTol &tol=OdGeContext::gTol) const
 
bool tangent (const OdGePoint2d &point, OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
bool tangent (const OdGePoint2d &point, OdGeLine2d &line, const OdGeTol &tol, OdGeError &status) const
 
bool isInside (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d center () const
 
double radius () const
 
double startAng () const
 
double endAng () const
 
bool isClockWise () const
 
OdGeVector2d refVec () const
 
OdGePoint2d startPoint () const
 
OdGePoint2d endPoint () const
 
OdGeCircArc2dsetCenter (const OdGePoint2d &center)
 
OdGeCircArc2dsetRadius (double radius)
 
OdGeCircArc2dsetAngles (double startAng, double endAng)
 
OdGeCircArc2dsetToComplement ()
 
OdGeCircArc2dsetRefVec (const OdGeVector2d &vect)
 
OdGeCircArc2dset (const OdGePoint2d &center, double radius)
 
OdGeCircArc2dset (const OdGePoint2d &center, double radius, double startAng, double endAng, const OdGeVector2d &refVec=OdGeVector2d::kXAxis, bool isClockWise=false)
 
OdGeCircArc2dset (const OdGePoint2d &startPoint, const OdGePoint2d &secondPoint, const OdGePoint2d &endPoint)
 
OdGeCircArc2dset (const OdGePoint2d &startPoint, const OdGePoint2d &secondPoint, const OdGePoint2d &endPoint, OdGeError &status)
 
OdGeCircArc2dset (const OdGePoint2d &startPoint, const OdGePoint2d &endPoint, double bulge, bool bulgeFlag=true)
 
OdGeCircArc2dset (const OdGeCurve2d &curve1, const OdGeCurve2d &curve2, double radius, double &param1, double &param2, bool &success)
 
OdGeCircArc2dset (const OdGeCurve2d &curve1, const OdGeCurve2d &curve2, const OdGeCurve2d &curve3, double &param1, double &param2, double &param3, bool &success)
 
OdGeCircArc2doperator= (const OdGeCircArc2d &arc)
 
void getGeomExtents (OdGeExtents2d &extents) const
 
double startAngFromXAxis () const
 
double endAngFromXAxis () const
 
- Public Member Functions inherited from OdGeCurve2d
void getInterval (OdGeInterval &interval) const
 
void getInterval (OdGeInterval &interval, OdGePoint2d &start, OdGePoint2d &end) const
 
OdGeCurve2dreverseParam ()
 
OdGeCurve2dsetInterval ()
 
bool setInterval (const OdGeInterval &interval)
 
double distanceTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGeCurve2d &otherCur, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGeCurve2d &curve2d, OdGePoint2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGeCurve2d &curve2d, OdGePointOnCurve2d &pntOnThisCrv, OdGePointOnCurve2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
bool getNormalPoint (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity2d::isOn)
 
bool isOn (const OdGePoint2d &point, double &param, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isOn (double param, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
void getTrimmedOffset (double distance, OdGeCurve2dPtrArray &offsetCurveList, OdGe::OffsetCrvExtType extensionType=OdGe::kFillet, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isPeriodic (double &period) const
 
bool isLinear (OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
double length (double fromParam, double toParam, double tol=OdGeContext::gTol.equalPoint()) const
 
double length (double tol=OdGeContext::gTol.equalPoint()) const
 
double paramAtLength (double datumParam, double length, bool posParamDir=true, double tol=OdGeContext::gTol.equalPoint()) const
 
bool area (double startParam, double endParam, double &value, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGe::EntityId &degenerateType, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGeEntity2d *&pConvertedEntity, const OdGeTol &tol=OdGeContext::gTol) const
 
void getSplitCurves (double param, OdGeCurve2d *&piece1, OdGeCurve2d *&piece2) const
 
bool explode (OdGeCurve2dPtrArray &explodedCurves, OdGeIntArray &newExplodedCurve, const OdGeInterval *interval=NULL) const
 
void getLocalClosestPoints (const OdGePoint2d &point, OdGePointOnCurve2d &approxPnt, const OdGeInterval *nbhd=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
void getLocalClosestPoints (const OdGeCurve2d &otherCurve, OdGePointOnCurve2d &approxPntOnThisCrv, OdGePointOnCurve2d &approxPntOnOtherCrv, const OdGeInterval *nbhd1=NULL, const OdGeInterval *nbhd2=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeBoundBlock2d boundBlock () const
 
OdGeBoundBlock2d boundBlock (const OdGeInterval &range) const
 
OdGeBoundBlock2d orthoBoundBlock () const
 
OdGeBoundBlock2d orthoBoundBlock (const OdGeInterval &range) const
 
bool hasStartPoint (OdGePoint2d &startPoint) const
 
bool hasEndPoint (OdGePoint2d &endPoint) const
 
OdGePoint2d evalPoint (double param) const
 
OdGePoint2d evalPoint (double param, int numDeriv, OdGeVector2dArray &derivatives) const
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray &paramArray) const
 
void getSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
OdGeCurve2doperator= (const OdGeCurve2d &curve)
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
- Public Member Functions inherited from OdGeEntity2d
 ODRX_HEAP_OPERATORS ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity2dcopy () const
 
OdGeEntity2doperator= (const OdGeEntity2d &entity)
 
bool operator== (const OdGeEntity2d &entity) const
 
bool operator!= (const OdGeEntity2d &entity) const
 
bool isEqualTo (const OdGeEntity2d &other, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity2dtransformBy (const OdGeMatrix2d &xfm)
 
OdGeEntity2dtranslateBy (const OdGeVector2d &translateVec)
 
OdGeEntity2drotateBy (double angle, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
OdGeEntity2dmirror (const OdGeLine2d &line)
 
OdGeEntity2dscaleBy (double scaleFactor, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
bool isOn (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
 ~OdGeEntity2d ()
 

Additional Inherited Members

- Protected Member Functions inherited from OdGeCurve2d
 OdGeCurve2d ()
 
 OdGeCurve2d (const OdGeCurve2d &source)
 
- Protected Member Functions inherited from OdGeEntity2d
 OdGeEntity2d ()
 
 OdGeEntity2d (const OdGeEntity2d &)
 
void connectTo (OdGeEntity2dImpl *)
 

Detailed Description

This class represents arcs and full circles in 2D space.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeCircArc3d.html, Working with Circular Arcs>

Definition at line 46 of file GeCircArc2d.h.

Constructor & Destructor Documentation

◆ OdGeCircArc2d() [1/6]

OdGeCircArc2d::OdGeCircArc2d ( )
Parameters
center[in] Center of arc.
radius[in] Radius of arc.
startAng[in] Starting angle of arc.
endAng[in] Ending angle of arc.
refVec[in] The reference vector defining arc angle 0.
startPoint[in] Startpoint of arc.
secondPoint[in] Second point on a 3-point arc.
endPoint[in] Endpoint of arc.
bulge[in] Specifies the bulge of the arc.
bulgeFlag[in] Specifies how bulge is to be interpreted.
source[in] Object to be cloned.
Remarks
The default constructor creates a circle with a center of (0,0) and a radius of 1.

To construct a circle, set endAng = startAng + Oda2PI

If bulgeFlag == true, then bulge is the maximum distance from the arc perpendicular to a chord between the start and endpoints.

If bulgeFlag == false, the bulge is the tangent of 1/4 the included angle of the arc, measured counterclockwise.

Remarks
All angles are expressed in radians.

startAng must be less than endAng.

◆ OdGeCircArc2d() [2/6]

OdGeCircArc2d::OdGeCircArc2d ( const OdGeCircArc2d source)

◆ OdGeCircArc2d() [3/6]

OdGeCircArc2d::OdGeCircArc2d ( const OdGePoint2d center,
double  radius 
)

◆ OdGeCircArc2d() [4/6]

OdGeCircArc2d::OdGeCircArc2d ( const OdGePoint2d center,
double  radius,
double  startAng,
double  endAng,
const OdGeVector2d refVec = OdGeVector2d::kXAxis,
bool  isClockWise = false 
)

◆ OdGeCircArc2d() [5/6]

OdGeCircArc2d::OdGeCircArc2d ( const OdGePoint2d startPoint,
const OdGePoint2d secondPoint,
const OdGePoint2d endPoint 
)

◆ OdGeCircArc2d() [6/6]

OdGeCircArc2d::OdGeCircArc2d ( const OdGePoint2d startPoint,
const OdGePoint2d endPoint,
double  bulge,
bool  bulgeFlag = true 
)

Member Function Documentation

◆ center()

OdGePoint2d OdGeCircArc2d::center ( ) const

Returns the center of this arc.

◆ endAng()

double OdGeCircArc2d::endAng ( ) const

Returns the ending angle measured from the reference vector in the arc direction.

Remarks
All angles are expressed in radians.

◆ endAngFromXAxis()

double OdGeCircArc2d::endAngFromXAxis ( ) const

Returns the ending angle measured from the X-axis in the arc direction.

Remarks
All angles are expressed in radians.

◆ endPoint()

OdGePoint2d OdGeCircArc2d::endPoint ( ) const

Returns the end point of this arc.

◆ getGeomExtents()

void OdGeCircArc2d::getGeomExtents ( OdGeExtents2d extents) const

Returns the geometric extents of this arc.

Parameters
extents[out] Receives the geometric extents.

◆ intersectWith() [1/2]

bool OdGeCircArc2d::intersectWith ( const OdGeCircArc2d circarc,
int &  numInt,
OdGePoint2d p1,
OdGePoint2d p2,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns True if the specified arc entity intersects the arc entity, and returns the number of intersections and points of intersection.

Parameters
circarc[in] Any 2D arc entity.
numInt[out] Receives the number of intersections with this curve.
p1[out] Receives the first intersection point.
p2[out] Receives the second intersection point.
tol[in] Geometric tolerance.
Remarks
p1 has meaning only if numInt > 0. p2 has meaning only if numInt > 1.

◆ intersectWith() [2/2]

bool OdGeCircArc2d::intersectWith ( const OdGeLinearEnt2d line,
int &  numInt,
OdGePoint2d p1,
OdGePoint2d p2,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns True if the specified linear entity intersects the arc entity, and returns the number of intersections and points of intersection.

Parameters
line[in] Any 2D linear entity.
numInt[out] Receives the number of intersections with this curve.
p1[out] Receives the first intersection point.
p2[out] Receives the second intersection point.
tol[in] Geometric tolerance.
Remarks
p1 has meaning only if numInt > 0. p2 has meaning only if numInt > 1.

◆ isClockWise()

bool OdGeCircArc2d::isClockWise ( ) const

Returns true if and only if this arc is drawn clockwise from start point to end point.

◆ isInside()

bool OdGeCircArc2d::isInside ( const OdGePoint2d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns true if and only if the input point lies within the full circle of this arc.

Parameters
point[in] Any 2D point.
tol[in] Geometric tolerance.

◆ operator=()

OdGeCircArc2d& OdGeCircArc2d::operator= ( const OdGeCircArc2d arc)

◆ radius()

double OdGeCircArc2d::radius ( ) const

Returns the radius of this arc.

◆ refVec()

OdGeVector2d OdGeCircArc2d::refVec ( ) const

Returns the reference vector as a unit vector.

◆ set() [1/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGeCurve2d curve1,
const OdGeCurve2d curve2,
const OdGeCurve2d curve3,
double &  param1,
double &  param2,
double &  param3,
bool &  success 
)

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

Parameters
curve1[in] First curve to define a tangent arc.
curve2[in] Second curve to define a tangent arc.
curve3[in] Third curve to define a tangent arc.
param1[out] Receives the parameter corresponding tangency point on curve1.
param2[out] Receives the parameter corresponding tangency point on curve2.
param3[out] Receives the parameter corresponding tangency point on curve3.
success[out] Receives true if and only if the tan-tan-radius or tan-tan-tan curve could be constructed. If false, this arc is unmodified.

◆ set() [2/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGeCurve2d curve1,
const OdGeCurve2d curve2,
double  radius,
double &  param1,
double &  param2,
bool &  success 
)

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

Parameters
radius[in] Radius of arc.
curve1[in] First curve to define a tangent arc.
curve2[in] Second curve to define a tangent arc.
param1[out] Receives the parameter corresponding tangency point on curve1.
param2[out] Receives the parameter corresponding tangency point on curve2.
success[out] Receives true if and only if the tan-tan-radius or tan-tan-tan curve could be constructed. If false, this arc is unmodified.

◆ set() [3/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGePoint2d center,
double  radius 
)

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

Parameters
center[in] Center of arc.
radius[in] Radius of arc.

◆ set() [4/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGePoint2d center,
double  radius,
double  startAng,
double  endAng,
const OdGeVector2d refVec = OdGeVector2d::kXAxis,
bool  isClockWise = false 
)

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

Parameters
center[in] Center of arc.
radius[in] Radius of arc.
startAng[in] Starting angle of arc.
endAng[in] Ending angle of arc.
refVec[in] The reference vector defining arc angle 0.
isClockWise[in] If true, the arc is drawn clockwise, otherwise, counterclockwise.
Remarks
To construct a circle, set endAng = startAng + Oda2PI
startAng must be less than endAng. All angles are expressed in radians.

◆ set() [5/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGePoint2d startPoint,
const OdGePoint2d endPoint,
double  bulge,
bool  bulgeFlag = true 
)

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

Parameters
startPoint[in] Startpoint of arc.
endPoint[in] Endpoint of arc.
bulge[in] Specifies the bulge of the arc.
bulgeFlag[in] Specifies how bulge is to be interpreted.
Remarks
If bulgeFlag == true, then bulge is the maximum distance from the arc to a chord between the start and endpoints.

If bulgeFlag == false, the bulge is the tangent of 1/4 the included angle of the arc.

◆ set() [6/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGePoint2d startPoint,
const OdGePoint2d secondPoint,
const OdGePoint2d endPoint 
)

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

Parameters
startPoint[in] Startpoint of arc.
secondPoint[in] Second point on a 3-point arc.
endPoint[in] Endpoint of arc.

◆ set() [7/7]

OdGeCircArc2d& OdGeCircArc2d::set ( const OdGePoint2d startPoint,
const OdGePoint2d secondPoint,
const OdGePoint2d endPoint,
OdGeError status 
)

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

Parameters
status[out] Receives the status for this method.
startPoint[in] Startpoint of arc.
secondPoint[in] Second point on a 3-point arc.
endPoint[in] Endpoint of arc.
Remarks
Possible values for status are as follows

@untitled table kEqualArg1Arg2 kEqualArg1Arg3 kEqualArg2Arg3 kLinearlyDependentArg1Arg2Arg3.

◆ setAngles()

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

Sets the starting and ending angles of this arc, and returns a reference to this arc.

Parameters
startAng[in] Starting angle of arc.
endAng[in] Ending angle of arc.
Remarks
All angles are expressed in radians.

◆ setCenter()

OdGeCircArc2d& OdGeCircArc2d::setCenter ( const OdGePoint2d center)

Sets the center of this arc, and returns a reference to this arc.

Parameters
center[in] Center of arc.

◆ setRadius()

OdGeCircArc2d& OdGeCircArc2d::setRadius ( double  radius)

Sets the radius of this arc, and returns a reference to this arc.

Parameters
radius[in] Radius of arc.

◆ setRefVec()

OdGeCircArc2d& OdGeCircArc2d::setRefVec ( const OdGeVector2d vect)

Sets the reference vector of this arc, and returns a reference to this arc.

Parameters
refVec[in] The reference vector defining arc angle 0.

◆ setToComplement()

OdGeCircArc2d& OdGeCircArc2d::setToComplement ( )

Reverses the direction of this arc while maintaining its endpoints, and returns a reference to this arc.

◆ startAng()

double OdGeCircArc2d::startAng ( ) const

Returns the starting angle measured from the reference vector in the arc direction.

Remarks
All angles are expressed in radians.

◆ startAngFromXAxis()

double OdGeCircArc2d::startAngFromXAxis ( ) const

Returns the starting angle measured from the X-axis in the arc direction.

Remarks
All angles are expressed in radians.

◆ startPoint()

OdGePoint2d OdGeCircArc2d::startPoint ( ) const

Returns the start point of this arc.

◆ tangent() [1/2]

bool OdGeCircArc2d::tangent ( const OdGePoint2d point,
OdGeLine2d line,
const OdGeTol tol,
OdGeError status 
) const

Returns true if and only if the specified point is on the full circle of this arc, the tangent at that point, and the status of the query.

Parameters
point[in] The point on the full circle.
line[out] Receives the tangent at that point.
tol[in] Geometric tolerance.
status[out] Receives the status of the query.
Remarks
Possible values for status are as follows:

@untitled table kArg1TooBig kArg1InsideThis kArg1OnThis

◆ tangent() [2/2]

bool OdGeCircArc2d::tangent ( const OdGePoint2d point,
OdGeLine2d line,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns true if and only if the specified point is on the full circle of this arc, the tangent at that point.

Parameters
point[in] The point on the full circle.
line[out] Receives the tangent at that point.
tol[in] Geometric tolerance.

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