Table of Contents

Class vdEllipse

Namespace
VectorDraw.Professional.vdFigures
Assembly
VectorDraw.Professional.dll

Represents an ellipse or an elliptic arc in the drawing.

public class vdEllipse : vdCurve, IDisposable, IVDSerialise, IvdHatchFigure, IBaseObject
Inheritance
vdEllipse
Implements
Inherited Members

Examples

// Create a full ellipse and query its length and sample points
var ell = new VectorDraw.Professional.vdFigures.vdEllipse(document);
ell.Center = new gPoint(0,0,0);
ell.MajorLength = 5.0;
ell.MinorLength = 2.0;
ell.MajorAngle = 0.0;
double len = ell.Length();
var pts = ell.GetSamplePoints(64, 0.0);
document.Model.Entities.AddItem(ell);

Remarks

The vdEllipse class implements an ellipse primitive and elliptic-arc behavior. It stores geometric parameters such as the center, major/minor axis lengths, major axis angle, start and end angles and provides operations common to curve entities:

Many methods are virtual and overridden from vdCurve. Coordinate-space conversions are handled via the entity ECSMatrix and most public API surface expects/returns points in World Coordinate System (WCS).

Constructors

vdEllipse()

Initializes a new instance of the vdEllipse object.

vdEllipse(vdDocument)

Initializes a new instance of the vdEllipse object and registers it to the passed Document.

vdEllipse(vdDocument, gPoint, double, double, double, double, double)

Initializes a new instance of the vdEllipse object and registers it to the passed Document.

Properties

BoundingBox

Gets the Bounding Box of the vdEllipse object in WorldCoordinate System.

Center

Get/Set the Center of the vdEllipse object.

ECSMatrix

Gets the transformation Matrix that converts coordinates from the object's local coordinate system (object coordinate system, OCS) to the World Coordinate System (WCS).

EndAngle

Get/Set the end angle of the vdEllipse object.

HatchProperties

Get/Set the hatch properties of the vdEllipse object.

MajorAngle

Get/Set the MajorAngle of the vdEllipse object.

MajorLength

Get/Set the Major Length of a vdEllipse object.

MinorLength

Get/Set the Minor Length of the vdEllipse object.

StartAngle

Get/Set the start angle of the vdEllipse object.

Methods

Area()

Calculates the enclosed area of the vdEllipse object in Drawing Units.

Break(gPoint, gPoint, out vdFigure)

Breaks the vdArc into two or one subarcs.Deletes the part that is between p1,p2.

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdEllipse object when opening in vdml format.

Draw(vdRender)

Called in order to draw the object in a specified vdRender object.

DrawGrip(int, Box, vdRender)

Overriden function in order to draw the center move grip differently.

Explode()

If the vdEllipse object has hatchproperties the explode method creates a vdPolyhatch object.

GetCompareHash()

Returns a unique 32 bit integer value according to the object type and its properties values

GetGripPoints()

A function returning the grip points of the object.

GetSamplePoints(int, double)

Returns a list of points on the vdEllipse object from the start to the end point.

GetValidGripPointsItems()

Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.

InitializeProperties()

Resets the properties of the vdEllipse object to the Default values.

InternalSetOwner(vdBaseObject)

Internally used only.

Set the object owner

IntersectWith(vdFigure, VdConstInters, gPoints)

Finds the intersection points of an vdEllipse object with another object.

Length()

Calculates the length of the vdEllipse object.

MatchProperties(vdPrimary, vdDocument)

Matches all the common properties from an object and sets them to this object.

MoveGripPointsAt(Int32Array, double, double, double)

This function is intended to be called during a grip edit of the vdEllipse object.

PointOnCurve(gPoint, bool)

Returns if a point belongs to a vdEllipse object.

Serialize(Serializer)

This Function is called when saving the vdEllipse object to vdml format.

Split(gPoint, vdSelection)

Splits the Ellipse into two Ellipses. If the Ellipse is closed and the startangle is 0.0 then one ellipse is returned having start/end angle from the given point.

TestOffsetSide(gPoint)

Tests if a point is inside a vdEllipse or not.

ToMesh(int)

Converts the vdEllipse into a vdPolyface object.

ToString()

Gets a System.String that represents the type of the vdEllipse Object.

Transformby(Matrix)

Transforms all geometrical properties of this object by the specified Matrix.

Update()

Updates the object after change of properties.

fixMajorMinorLength()

Change the ellipse's properties in order MajorLength to be greater than MinorLength.

getDistAtParam(double)

Get the length of the vdEllipse’s segment from the curve’s beginning to the point specified by param.

getDistAtPoint(gPoint)

Get the length of the Ellipse’s segment between the curve’s start point and pt.

getEndParam()

Return the end parameter for the object.

getEndPoint()

Returns the end point of the vdEllipse object in WCS.

getFirstOffsetParam()

Get a value representing the start angle of the object.

getOffsetCurve(double)

Creates a new vdEllipse object at a specified distance and in the same plane with the existing object.

getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints)

Overrrides the getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints).

getParamAtDist(double)

Gets the parameter of the vdEllipse object at the specific distance.

getParamAtPoint(gPoint)

Get the parameter of the vdEllipse at a specified point.

getPointAtDist(double)

Gets a point belonging to the vdEllipse object at the specified distance.

getPointAtParam(double)

Returns a point on the vdEllipse representing a param.

getStartParam()

Returns the start parameter for the object.

getStartPoint()

Returns the start point of the vdEllipse object in WCS.

getTangentAtPoint(gPoint, out gPoint)

Overrides the getTangentAtPoint(gPoint, out gPoint)

isClosed()

Returns true if the ellipse is a full ellipse.

See Also