Ellipse

References
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 144)] [Serializable] public struct Ellipse : IEpsilonComparable<Ellipse>, ICloneable
Represents the values of a plane and the two semi-axes radii in an ellipse.

Constructors

Ellipse

#Since v5.0
Initializes a new ellipse from base plane and both principal radii.
public Ellipse(
plane,
Base plane of ellipse.
radius1,
Ellipse radius along base plane X direction.
radius2
Ellipse radius along base plane Y direction.
)

Ellipse

#Since v5.0
Initializes a new ellipse from a center point and the two semi-axes intersections.
public Ellipse(
center,
A center for the ellipse. The average of the foci.
second,
The intersection of the ellipse X axis with the ellipse itself.
third
A point that determines the radius along the Y semi-axis.

If the point is at right angle with the (center - second point) vector, it will be the intersection of the ellipse Y axis with the ellipse itself.

)

Properties

Center

#Since v7.16
Gets or sets the center of the ellipse.
public Point3d Center { get; set; }

FocalDistance

#Since v7.16
Gets the distance from the center to a focus.
public double FocalDistance { get; }

IsValid

#Since v6.0
Returns an indication of the validity of this ellipse.
public bool IsValid { get; }

Plane

#Since v5.0
Gets or sets the base plane of the ellipse.
public Plane Plane { get; set; }

Radius1

#Since v5.0
Gets or sets the radius of the ellipse along the base plane X semi-axis.
public double Radius1 { get; set; }

Radius2

#Since v5.0
Gets or sets the radius of the ellipse along the base plane Y semi-axis.
public double Radius2 { get; set; }

Methods

EpsilonEquals

#Since v5.4
Check that all values in other are within epsilon of the values in this
[ConstOperation] public bool EpsilonEquals(
other,
epsilon
)
EpsilonEquals

GetFoci

#Since v7.16
Gets the foci. The foci are two points whose sum of distances from any point on the ellipse is always the same.
public void GetFoci(
out Point3d
F1,
The first focus.
out Point3d
F2
The second focus.
)
Explicit

ICloneable.Clone

#

ToNurbsCurve

#Since v5.0
Constructs a nurbs curve representation of this ellipse.

This is equivalent to calling NurbsCurve.CreateFromEllipse().

[ConstOperation] public NurbsCurve ToNurbsCurve()
A nurbs curve representation of this ellipse or null if no such representation could be made.

TryFitEllipseToPoints

#Since v9.0
Attempt to fit an ellipse through a set of points.
public static bool TryFitEllipseToPoints(
points,
The points through which to fit.
out Ellipse
ellipse
The resulting ellipse on success.
)
true on success, false on failure.