Show / Hide Table of Contents

    Class Circle

    A circle. Parameterization of the circle is 0 -> 2PI.

    Inheritance
    System.Object
    Curve
    Circle
    Implements
    ICurve
    ITransformable<Curve>
    IConic
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements.Geometry
    Assembly: Hypar.Elements.dll
    Syntax
    public class Circle : Curve, ICurve, ITransformable<Curve>, IConic

    Constructors

    Circle(Transform, Double)

    Construct a circle.

    Declaration
    public Circle(Transform transform, double radius = 1)
    Parameters
    Type Name Description
    Transform transform
    System.Double radius

    Circle(Vector3, Double)

    Construct a circle.

    Declaration
    [JsonConstructor]
    public Circle(Vector3 center, double radius = 1)
    Parameters
    Type Name Description
    Vector3 center

    The center of the circle.

    System.Double radius

    The radius of the circle.

    Circle(Double)

    Construct a circle.

    Declaration
    public Circle(double radius = 1)
    Parameters
    Type Name Description
    System.Double radius

    The radius of the circle.

    Properties

    Center

    The center of the circle.

    Declaration
    [JsonProperty("Center", Required = Required.AllowNull)]
    public Vector3 Center { get; }
    Property Value
    Type Description
    Vector3

    Radius

    The radius of the circle.

    Declaration
    [JsonProperty("Radius", Required = Required.Always)]
    [Range(0, 1.7976931348623157E+308)]
    public double Radius { get; protected set; }
    Property Value
    Type Description
    System.Double

    Transform

    The coordinate system of the plane containing the circle.

    Declaration
    public Transform Transform { get; protected set; }
    Property Value
    Type Description
    Transform

    Methods

    ParameterAtDistanceFromParameter(Double, Double)

    Get the parameter at a distance from the start parameter along the curve.

    Declaration
    public override double ParameterAtDistanceFromParameter(double distance, double start)
    Parameters
    Type Name Description
    System.Double distance

    The distance from the start parameter.

    System.Double start

    The parameter from which to measure the distance.

    Returns
    Type Description
    System.Double
    Overrides
    Curve.ParameterAtDistanceFromParameter(Double, Double)

    PointAt(Double)

    Return the point at parameter u on the arc.

    Declaration
    public override Vector3 PointAt(double u)
    Parameters
    Type Name Description
    System.Double u

    A parameter on the arc.

    Returns
    Type Description
    Vector3

    A Vector3 representing the point along the arc.

    Overrides
    Curve.PointAt(Double)

    ToPolygon(Int32)

    Create a polygon through a set of points along the circle.

    Declaration
    public Polygon ToPolygon(int divisions = 10)
    Parameters
    Type Name Description
    System.Int32 divisions

    The number of divisions of the circle.

    Returns
    Type Description
    Polygon

    A polygon.

    TransformAt(Double)

    Return transform on the arc at parameter u.

    Declaration
    public override Transform TransformAt(double u)
    Parameters
    Type Name Description
    System.Double u

    A parameter on the arc.

    Returns
    Type Description
    Transform

    A transform with its origin at u along the curve and its Z axis tangent to the curve.

    Overrides
    Curve.TransformAt(Double)

    Transformed(Transform)

    Create a transformed copy of this curve. Use of non-affine transforms (i.e. scale) will result in unpredictable results for curve methods such as Length().

    Declaration
    public override Curve Transformed(Transform transform)
    Parameters
    Type Name Description
    Transform transform

    The transform to apply.

    Returns
    Type Description
    Curve
    Overrides
    Curve.Transformed(Transform)

    Operators

    Implicit(Circle to Arc)

    Convert a circle to a circular arc.

    Declaration
    public static implicit operator Arc(Circle c)
    Parameters
    Type Name Description
    Circle c
    Returns
    Type Description
    Arc

    Implicit(Circle to ModelCurve)

    Convert a circle to a circular model curve.

    Declaration
    public static implicit operator ModelCurve(Circle c)
    Parameters
    Type Name Description
    Circle c

    The bounded curve to convert.

    Returns
    Type Description
    ModelCurve

    Implements

    ICurve
    ITransformable<T>
    IConic