Class Ellipse
Represents an ellipse EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Ellipse : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceEllipse()
Initializes a new instance of the Ellipse class.
Declaration
public Ellipse()
Ellipse(Vector2, Double, Double)
Initializes a new instance of the Ellipse class.
Declaration
public Ellipse(Vector2 center, double majorAxis, double minorAxis)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | center | Ellipse Vector2 in object coordinates. |
| System.Double | majorAxis | Ellipse major axis. |
| System.Double | minorAxis | Ellipse minor axis. |
Remarks
The center Z coordinate represents the elevation of the arc along the normal.
Ellipse(Vector3, Double, Double)
Initializes a new instance of the Ellipse class.
Declaration
public Ellipse(Vector3 center, double majorAxis, double minorAxis)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | center | Ellipse Vector3 in object coordinates. |
| System.Double | majorAxis | Ellipse major axis. |
| System.Double | minorAxis | Ellipse minor axis. |
Remarks
The center Z coordinate represents the elevation of the arc along the normal.
Properties
| Improve this Doc View SourceCenter
Gets or sets the ellipse Vector3.
Declaration
public Vector3 Center { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Remarks
The center Z coordinate represents the elevation of the arc along the normal.
EndAngle
Gets or sets the ellipse end angle in degrees.
Declaration
public double EndAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
To get a full ellipse set the end angle equal to the start angle.
EndParameter
Declaration
public double EndParameter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
IsFullEllipse
Checks if the actual instance is a full ellipse.
Declaration
public bool IsFullEllipse { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
An ellipse is considered full when its start and end angles are equal.
MajorAxis
Gets or sets the ellipse mayor axis.
Declaration
public double MajorAxis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
MinorAxis
Gets or sets the ellipse minor axis.
Declaration
public double MinorAxis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Rotation
Gets or sets the ellipse local rotation in degrees along its normal.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
StartAngle
Gets or sets the ellipse start angle in degrees.
Declaration
public double StartAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
To get a full ellipse set the start angle equal to the end angle.
StartParameter
Declaration
public double StartParameter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Thickness
Gets or sets the ellipse thickness.
Declaration
public double Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a new Ellipse that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Ellipse that is a copy of this instance. |
Overrides
| Improve this Doc View SourcePolarCoordinateRelativeToCenter(Double)
Calculate the local point on the ellipse for a given angle relative to the center.
Declaration
public Vector2 PolarCoordinateRelativeToCenter(double angle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | angle | Angle in degrees. |
Returns
| Type | Description |
|---|---|
| Vector2 | A local point on the ellipse for the given angle relative to the center. |
PolygonalVertexes(Int32)
Converts the ellipse in a list of vertexes.
Declaration
public List<Vector2> PolygonalVertexes(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Vector2> | A list vertexes that represents the ellipse expressed in object coordinate system. |
ToPolyline(Int32)
Converts the ellipse in a Polyline.
Declaration
public LwPolyline ToPolyline(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| LwPolyline | A new instance of LwPolyline that represents the ellipse. |
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.