Class Circle
Represents a circle.
The base values of the circle are the radius and a plane, with origin at the center of the circle.
public class Circle : NurbsBase, IGeometry<NurbsBase>, IEquatable<NurbsBase>, ITransformable<NurbsBase>, IGeometry<Circle>, IEquatable<Circle>, ITransformable<Circle>// Initializes a circle from a plane and a radius.
Point3 center = new Point3(85.591741, 24.79606, 1.064717);
Vector3 xDir = new Vector3(-0.687455, 0.703828, -0.178976);
Vector3 yDir = new Vector3(-0.726183, -0.663492, 0.180104);
Plane plane = new Plane(center, xDir, yDir);
_circle2D = new Circle(plane, 23);
// Initializes a circle from 3 points.
Point3 pt1 = new Point3(74.264416, 36.39316, -1.884313);
Point3 pt2 = new Point3(97.679126, 13.940616, 3.812853);
Point3 pt3 = new Point3(100.92443, 30.599893, -0.585116);
_circle3D = new Circle(pt1, pt2, pt3);
Initializes a circle on a plane with a given radius.
public Circle(Plane plane, double radius)| Type | Name | Description | 
|---|---|---|
| Plane | plane | Plane of the circle. Plane origin defines the center of the circle. | 
| System.Double | radius | Radius of the circle. | 
Initializes an circle from three points. https://github.com/sergarrido/random/tree/master/circle3d
public Circle(Point3 pt1, Point3 pt2, Point3 pt3)| Type | Name | Description | 
|---|---|---|
| Point3 | pt1 | Start point of the arc. | 
| Point3 | pt2 | Interior point on arc. | 
| Point3 | pt3 | End point of the arc. | 
Initializes a circle on planeXY with center in 0,0,0 by a given radius.
public Circle(double radius)| Type | Name | Description | 
|---|---|---|
| System.Double | radius | Radius of the circle. | 
Gets the angle domain (in radians) of this circular curve.
public Interval AngleDomain { get; }| Type | Description | 
|---|---|
| Interval | 
Gets the center of the circular curve.
public Point3 Center { get; }| Type | Description | 
|---|---|
| Point3 | 
Gets the end point of the circular curve.
public override Point3 EndPoint { get; }| Type | Description | 
|---|---|
| Point3 | 
Gets the circumference of the circular curve.
public override double Length { get; }| Type | Description | 
|---|---|
| System.Double | 
Gets the mid-point of the circular curve.
public override Point3 MidPoint { get; }| Type | Description | 
|---|---|
| Point3 | 
Gets the plane where the circular curve lays.
public Plane Plane { get; }| Type | Description | 
|---|---|
| Plane | 
Gets the radius of the circular curve.
public double Radius { get; }| Type | Description | 
|---|---|
| System.Double | 
Gets the start point of the circular curve.
public override Point3 StartPoint { get; }| Type | Description | 
|---|---|
| Point3 | 
Gets the parameter on the circular curve which is closest to the test point.
public override double ClosestParameter(Point3 pt)| Type | Name | Description | 
|---|---|---|
| Point3 | pt | The test point to project onto the circular curve. | 
| Type | Description | 
|---|---|
| System.Double | The parameter on the circular curve that is close to the test point. | 
Gets the point on the circular curve which is closest to the test point.
public override Point3 ClosestPoint(Point3 pt)| Type | Name | Description | 
|---|---|---|
| Point3 | pt | The test point to project onto the circular curve. | 
| Type | Description | 
|---|---|
| Point3 | The point on the circular curve that is close to the test point. | 
Determines the value of the Nth derivative at a parameter.
public Vector3 DerivativeAt(double t, int derivative = 0)| Type | Name | Description | 
|---|---|---|
| System.Double | t | Parameter to evaluate derivative. A parameter between 0.0 and angle domain in radians. | 
| System.Int32 | derivative | Which order of derivative is wanted. Valid values are 0,1,2,3. | 
| Type | Description | 
|---|---|
| Vector3 | The derivative of the circle at the given parameter. | 
Determines whether the circle is equal to another. The circles are equal if have the same plane and radius.
public bool Equals(Circle other)| Type | Name | Description | 
|---|---|---|
| Circle | other | The circle to compare to. | 
| Type | Description | 
|---|---|
| System.Boolean | True if the circle are equal, otherwise false. | 
Gets the bounding box of this circular curve.
public override BoundingBox GetBoundingBox()| Type | Description | 
|---|---|
| BoundingBox | 
Computes a hash code for the circle.
public override int GetHashCode()| Type | Description | 
|---|---|
| System.Int32 | A unique hashCode of an circle. | 
Returns the length at a given parameter.
public override double LengthAt(double t)| Type | Name | Description | 
|---|---|---|
| System.Double | t | A parameter between 0.0 and angle domain in radians. | 
| Type | Description | 
|---|---|
| System.Double | The curve length at t. | 
Computes the offset of a circle.
public Circle Offset(double distance)| Type | Name | Description | 
|---|---|---|
| System.Double | distance | The distance of the offset. If negative the offset will be in the opposite side. | 
| Type | Description | 
|---|---|
| Circle | The offset circle. | 
Evaluates the point at the parameter t on the circular curve.
public override Point3 PointAt(double t)| Type | Name | Description | 
|---|---|---|
| System.Double | t | A parameter between 0.0 and angle domain in radians.> | 
| Type | Description | 
|---|---|
| Point3 | Point on the circular curve. | 
Evaluates a point at the specif length.
public override Point3 PointAtLength(double length)| Type | Name | Description | 
|---|---|---|
| System.Double | length | The length where to evaluate the point. | 
| Type | Description | 
|---|---|
| Point3 | The point at the length. | 
Evaluates a point at the normalized length.
public override Point3 PointAtNormalizedLength(double normalizedLength)| Type | Name | Description | 
|---|---|---|
| System.Double | normalizedLength | The length factor is normalized between 0.0 and 1.0. | 
| Type | Description | 
|---|---|
| Point3 | The point at the length. | 
Calculates the tangent at the parameter on the circular curve.
public override Vector3 TangentAt(double t)| Type | Name | Description | 
|---|---|---|
| System.Double | t | A parameter between 0.0 and angle domain in radians. | 
| Type | Description | 
|---|---|
| Vector3 | Unitized tangent vector at the parameter. | 
Evaluates the tangent at the specific length.
public Vector3 TangentAtLength(double length)| Type | Name | Description | 
|---|---|---|
| System.Double | length | The length where to evaluate the tangent. | 
| Type | Description | 
|---|---|
| Vector3 | The unitize tangent at the length. | 
Gets the text representation of an circle.
public override string ToString()| Type | Description | 
|---|---|
| System.String | Text value. | 
Applies a transformation to the plane where the circle is on.
public Circle Transform(TransformMatrix t)| Type | Name | Description | 
|---|---|---|
| TransformMatrix | t | Transformation matrix to apply. | 
| Type | Description | 
|---|---|
| Circle | A transformed arc. |