CFx SDK Documentation
2022 SP0
|
#include <DbEllipse.h>
<group OdDb_Classes>
This class implements the ellipse object (Ellipse entity) in the database. This class inherits the base functionality of entities. The ellipse entity can represent either an elliptical closed figure (ellipse) or unclosed elliptical segment (elliptical arc) in world space. When the start angle coincides with the end angle, the figure is closed and this class represents an ellipse. When the start angle differs from the end angle on 1e-6, the figure is unclosed and this class represents an elliptical arc.
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbCircle, OdDbArc classes
Definition at line 62 of file DbEllipse.h.
OdDbEllipse::OdDbEllipse | ( | ) |
Builds an instance of the ellipse object.
double OdDbEllipse::angleAtParam | ( | double | param | ) | const |
Returns the angle value corresponding to the specified parameter value.
param | [in] Parameter as a Double value in radians. |
OdGePoint3d OdDbEllipse::center | ( | ) | const |
Returns the WCS coordinates of the center for the elliptical figure (ellipse or arc) (DXF 10) as three-dimensional point instance.
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::setCenter() method
|
virtual |
Reads the .dwg file data of this object.
pFiler | [in] Filer object from which data are read. |
This function is called by dwgIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbEntity.
|
virtual |
Writes the .dwg file data of this object.
pFiler | [in] Pointer to the filer to which data are written. |
This function is called by dwgIn() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbEntity.
|
virtual |
Reads the DXF data of this object.
pFiler | [in] Pointer to the filer from which data are read. |
This function is called by dxfIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbEntity.
|
virtual |
Writes the DXF data of this object.
pFiler | [in] Pointer to the filer to which data are to be written. |
This function is called by dxfOut() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbEntity.
double OdDbEllipse::endAngle | ( | ) | const |
Returns the end angle of the elliptical figure (ellipse or arc) in radians (DXF 51).
OdDbEllipse::setEndAngle(), OdDbEllipse::startAngle() methods
void OdDbEllipse::get | ( | OdGePoint3d & | center, |
OdGeVector3d & | unitNormal, | ||
OdGeVector3d & | majorAxis, | ||
double & | radiusRatio, | ||
double & | startAngle, | ||
double & | endAngle | ||
) | const |
{NoAutoLink} Gets the properties for the ellipse entity. This method passes the properties through own arguments.
center | [out] Receives the WCS center. |
unitNormal | [out] Receives the WCS unit normal. |
majorAxis | [out] Receives the WCS major axis. |
radiusRatio | [out] Receives the radius ratio. |
startAngle | [out] Receives the start angle. |
endAngle | [out] Receives the end angle. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
|
virtual |
When an elliptical figure is unclosed, this method returns the area calculated for the closed figure formed by the elliptical arc and a line passed from the end point to the start point. When an elliptical figure is closed, this method returns the area of the ellipse.
vArea | [out] Reference to a variable in which this method must save the area as a Double value. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Reimplemented from OdDbCurve.
|
virtual |
Computes the distance along the elliptical figure (ellipse or arc) measured from the start point to the point on the elliptical curve specified the parameter.
param | [in] Parameter value specifying the point on the elliptical curve as a Double value in radians. |
dist | [out] Reference to a variable in which this method must save the distance value as a Double value in drawing units. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Gets the end parameter value of the elliptical figure (ellipse or arc). The OdDbEllipse::setEndParam() method sets this value. Parameter is an angle measured counterclockwise from the major axis in the range 0 to 2PI radians as if the elliptical figure was a circular figure with a major radius.
endParam | [out] Reference to a variable in which this method must save the end parameter value as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
OdDbEllipse::setEndParam(), OdDbEllipse::getStartParam() methods
Implements OdDbCurve.
|
virtual |
Computes the WCS coordinates of the end point on the elliptical figure (ellipse or arc) for which the parameter equals the end value. When the elliptical figure is closed, the end point coincides with the start point. When the elliptical figure is unclosed, the end point corresponds to the end angle.
endPoint | [out] Reference to a variable in which this method must save the end point as three-dimensional point instance. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Computes the first derivative for the specified parameter of the elliptical figure (ellipse or arc) and returns the three-dimensional vector instance.
param | [in] Parameter value specifying the point on the elliptical curve as a Double value in radians. |
firstDeriv | [out] Reference to a variable in which this method must save the first derivative as three-dimensional vector instance. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Returns an OdGeCurve3d that is geometrically identical to this OdDbCurve.
pGeCurve | [out] Receives a pointer to an OdGeCurve3d object that is geometrically identical to this OdDbCurve. The caller of this function is responsible for deleting this OdGeCurve3d object. |
tol | [in] Optional tolerance. |
Reimplemented from OdDbCurve.
|
virtual |
Computes the parameter at the distance along the elliptical figure (ellipse or arc). Parameter is an angle measured counterclockwise from the major axis in the range
0 to 2PI radians as if the elliptical figure was a circular figure with a major radius.
dist | [in] Distance value along the elliptical curve as a Double value in drawing units. |
param | [out] Reference to a variable in which this method must save the parameter value as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Computes the parameter at the point placed on the elliptical figure (ellipse or arc). Parameter is an angle measured counterclockwise from the major axis in the range 0 to 2PI radians as if the elliptical figure was a circular figure with a major radius.
pointOnCurve | [in] Three-dimensional point instance which specifies the point on the elliptical curve. |
param | [out] Reference to a variable in which this method must save the parameter value as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Gets a plane in which the ellipse entity places. This method is inherited from the
OdDbEntity class.
gePlane | [out] Reference to a variable in which this method must save the plane parameters as a plane instance. |
gePlanarity | [out] Reference to a variable in which this method must save the plane type (returns kPlanar - planar entity). |
OdDbCircle::isPlanar(), OdDbEntity::getPlane() methods
Reimplemented from OdDbEntity.
|
virtual |
Computes the WCS coordinates of the point on the elliptical figure (ellipse or arc)
at the specified parameter value. Parameter is an angle measured counterclockwise
from the major axis in the range 0 to 2PI radians as if the elliptical figure was
a circular figure with a major radius.
param | [in] Parameter value specifying the point on the elliptical curve as a Double value in radians. |
pointOnCurve | [out] Reference to a variable in which this method must save the three-dimensional point instance corresponding to the parameter. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Computes the second derivative for the specified parameter of the elliptical figure
(ellipse or arc) and returns the three-dimensional vector instance.
param | [in] Parameter value specifying the point on the elliptical curve as a Double value in radians. |
secondDeriv | [out] Reference to a variable in which this method must save the second derivative as three-dimensional vector instance. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Reimplemented from OdDbCurve.
|
virtual |
Gets the start parameter value of the elliptical figure (ellipse or arc). The OdDbEllipse::setStartParam() method sets this value. Parameter is an angle measured counterclockwise from the major axis in the range 0 to 2PI radians as if the elliptical figure was a circular figure with a major radius.
startParam | [out] Reference to a variable in which this method must save the start parameter value as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
OdDbEllipse::setStartParam(), OdDbEllipse::getEndParam() methods
Implements OdDbCurve.
|
virtual |
Computes the WCS coordinates of the start point on the elliptical figure (ellipse or arc) for which the parameter equals the start value. When the elliptical figure is closed, the end point coincides with the start point. When the elliptical figure is unclosed, the start point corresponds to the start angle.
startPoint | [out] Reference to a variable in which this method must save the start point as three-dimensional point instance. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
Implements OdDbCurve.
|
virtual |
Returns true if and only if this Curve object is closed.
Reimplemented from OdDbCurve.
|
virtual |
Returns true if and only if this Curve object is periodic.
Reimplemented from OdDbCurve.
|
virtual |
Determines whether the elliptical figure is planar as a Boolean value and returns True. This method is inherited from the OdDbEntity class.
OdDbEllipse::getPlane(), OdDbEntity::isPlanar() methods
Reimplemented from OdDbEntity.
OdGeVector3d OdDbEllipse::majorAxis | ( | ) | const |
Returns the WCS major axis vector for the elliptical figure (ellipse or arc). The major axis defines the major radius and rotation of the elliptical figure in the plane.
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::minorAxis(), OdDbEllipse::radiusRatio() methods
OdGeVector3d OdDbEllipse::minorAxis | ( | ) | const |
Returns the WCS minor axis vector for the elliptical figure (ellipse or arc). The minor axis defines the minor radius. The minor axis is perpendicular to the major axis. The minor radius less than or equal the major radius.
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::majorAxis(), OdDbEllipse::radiusRatio() methods
OdGeVector3d OdDbEllipse::normal | ( | ) | const |
Returns the WCS unit vector which is the normal to the plane of the ellipse entity (DXF 210). The normal defines the orientation of the ellipse plane in world space.
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::ODDB_DECLARE_MEMBERS | ( | OdDbEllipse | ) |
double OdDbEllipse::paramAtAngle | ( | double | angle | ) | const |
Returns the parameter value corresponding to the specified angle value.
angle | [in] Angle as a Double value in radians. |
double OdDbEllipse::radiusRatio | ( | ) | const |
Returns the ratio of the minor radius to the major radius for the elliptical figure (ellipse or arc). The radius ratio is in the range [1e-6 to 1.0].
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::minorAxis(), OdDbEllipse::minorAxis(), OdDbEllipse::setRadiusRatio() methods
void OdDbEllipse::set | ( | const OdGePoint3d & | center, |
const OdGeVector3d & | unitNormal, | ||
const OdGeVector3d & | majorAxis, | ||
double | radiusRatio, | ||
double | startAngle = 0.0 , |
||
double | endAngle = Oda2PI |
||
) |
{NoAutoLink} Sets the properties for the ellipse entity.
center | [in] WCS center. |
unitNormal | [in] WCS unit normal. |
majorAxis | [in] WCS major axis. |
radiusRatio | [in] Radius ratio. |
startAngle | [in] Start angle. |
endAngle | [in] End angle. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
void OdDbEllipse::setCenter | ( | const OdGePoint3d & | center | ) |
Sets the center of the elliptical figure (ellipse or arc) (DXF 10) in WCS. The initial value is (0,0,0) by default.
center | [in] Three-dimensional point instance to set the center. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::center() method
void OdDbEllipse::setEndAngle | ( | double | endAngle | ) |
Sets the end angle for the elliptical figure (ellipse or arc) in the range �2PI radians (DXF 51). A positive value specifies the angle measured from the major axis counterclockwise. A negative value specifies the angle measured from the major axis clockwise. The initial value is 2PI by default.
endAngle | [in] End angle as a Double value. |
OdDbEllipse::endAngle(), OdDbEllipse::setStartAngle() methods
void OdDbEllipse::setEndParam | ( | double | endParam | ) |
Sets the end parameter for the elliptical figure (ellipse or arc) (DXF 42). Parameter is an angle measured from the major axis in the range 0 to 2PI radians as if the elliptical figure was a circular figure with a major radius. A positive value specifies the end parameter measured counterclockwise A negative value specifies the end parameter measured clockwise. The initial value is 2PI by default.
endParam | [in] End parameter as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
OdDbEllipse::getEndParam(), OdDbEllipse::setStartParam() methods
|
virtual |
Takes an OdGeCurve3d and sets this OdDbCurve to be geometrically identical to the OdGeCurve3d.
geCurve | [in] reference to an OdGeCurve3d. |
normal | [in] Optional normal vector. If this parameter is supplied then it must be a valid vector that is perpendicular to the input geCurve, and this vector will become the normal vector of the output pDbCurve. If this parameter is not supplied, then this function will compute the normal vector itself. |
tol | [in] Optional tolerance. |
Reimplemented from OdDbCurve.
void OdDbEllipse::setRadiusRatio | ( | double | radiusRatio | ) |
Sets the ratio of the minor radius to the major radius for the elliptical figure (ellipse or arc) in the range [1e-6 to 1.0]. The initial value is 1.0 by default.
radiusRatio | [in] Radius ratio as a Double value. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
OdDbEllipse::minorAxis(), OdDbEllipse::minorAxis(), OdDbEllipse::radiusRatio() methods
void OdDbEllipse::setStartAngle | ( | double | startAngle | ) |
Sets the start angle for the elliptical figure (ellipse or arc) in the range �2PI
radians (DXF 50). A positive value specifies the angle measured from the major axis
counterclockwise. A negative value specifies the angle measured from the major axis
clockwise. The initial value is zero by default.
startAngle | [in] Start angle as a Double. |
OdDbEllipse::startAngle(), OdDbEllipse::setEndAngle() methods
void OdDbEllipse::setStartParam | ( | double | startParam | ) |
Sets the start parameter for the elliptical figure (ellipse or arc) (DXF 41). Parameter is an angle measured from the major axis in the range 0 to 2PI radians as if the elliptical figure was a circular figure with a major radius. A positive value specifies the start parameter measured counterclockwise A negative value specifies the start parameter measured clockwise. The initial value is zero by default.
startParam | [in] Start parameter as a Double value in radians. |
<link db_elliptical_arc_sample.html, Example of Working with the Elliptical Arc>
<link db_elliptical_arc_specific.html, Specific Elliptical Arc Properties>
OdDbEllipse::getStartParam(), OdDbEllipse::setEndParam() methods
double OdDbEllipse::startAngle | ( | ) | const |
Returns the start angle of the elliptical figure (ellipse or arc) in radians (DXF 50).
OdDbEllipse::setStartAngle(), OdDbEllipse::endAngle() methods
Reimplemented from OdDbEntity.
|
virtual |
Reimplemented from OdDbEntity.
|
virtual |
Reimplemented from OdDbEntity.
|
virtual |
Reimplemented from OdDbEntity.
OdDbEllipse::TD_USING | ( | OdDbCurve::getFirstDeriv | ) |
OdDbEllipse::TD_USING | ( | OdDbCurve::getSecondDeriv | ) |