Circle
References[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 136)]
[Serializable]
public struct Circle : IEpsilonComparable<Circle>, ICloneable
Represents a circle in 3D.
The values used are a radius and an orthonormal frame of the plane containing the circle, with origin at the center.
The circle is parameterized by radians from 0 to 2 Pi given by
t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis
where center, xaxis and yaxis define the orthonormal frame of the circle plane.
Remarks: >An IsValid circle has positive radius and an IsValid plane defining the frame.
Constructors
Initializes a circle from an arc.
Initializes a circle with center (0,0,0) in the world XY plane.
Initializes a circle on a plane with a given radius.
Initializes a circle parallel to a given plane with given center and radius.
Initializes a circle parallel to the world XY plane with given center and radius.
Initializes a circle through three 3d points.
Initializes a circle from two 3d points and a tangent at the first point. The start/end of the circle is at point "startPoint".
Remarks: May create an Invalid circle
Properties
Gets the circle's 3d axis aligned bounding box.
Returns: 3d bounding box.
Gets or sets the circumference of this circle.
Gets or sets the diameter (radius * 2.0) of this circle. Diameters should be positive values.
A valid circle has radius larger than 0.0 and a base plane which is must also be valid.
Gets or sets the radius of this circle. Radii should be positive values.
Methods
Gets the parameter on the circle which is closest to a test point.
Returns: true on success, false on failure.
Gets the point on the circle which is closest to a test point.
Returns: The point on the circle that is closest to testPoint or Point3d.Unset on failure.
Determines the value of the Nth derivative at a parameter.
Returns: The derivative of the circle at the given parameter.
Check that all values in other are within epsilon of the values in this
Implements: EpsilonEquals
Evaluates whether or not this circle is co-planar with a given plane.
Returns: true if the circle plane is co-planar with the given plane within tolerance.
Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.
Returns: The point on the circle at the given parameter.
Reverse the orientation of the circle. Changes the domain from [a,b] to [-b,-a].
public void Reverse()
Rotates the circle through a given angle.
Returns: true on success, false on failure.
Rotates the circle through a given angle.
Returns: true on success, false on failure.
Rotates the circle around an axis that starts at the provided point.
Returns: true on success, false on failure.
Rotates the circle around an axis that starts at the base plane origin.
Returns: true on success, false on failure.
Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.
Returns: The tangent at the circle at the given parameter.
Constructs a nurbs curve representation of this circle. This amounts to the same as calling NurbsCurve.CreateFromCircle().
Returns: A nurbs curve representation of this circle or null if no such representation could be made.
Create a uniform non-rational cubic NURBS approximation of a circle.
Returns: NURBS curve approximation of a circle on success
Transforms this circle using an transformation matrix.
Remarks: Circles may not be transformed accurately if the transformation defines a non-euclidean transformation.
Returns: true on success, false on failure.
Moves the circle.
Returns: true on success, false on failure.
Attempt to fit a circle through a set of points.
Returns: true on success, false on failure.
Try to fit a circle to two curves using tangent relationships.
Returns: Valid circle on success, Circle.Unset on failure.
Try to fit a circle to three curves using tangent relationships.
public static Circle TryFitCircleTTT()
c1,
First curve to touch.
c2,
Second curve to touch.
c3,
Third curve to touch.
t1,
Parameter on first curve close to desired solution.
t2,
Parameter on second curve closet to desired solution.
t3
Parameter on third curve close to desired solution.
Returns: Valid circle on success, Circle.Unset on failure.
Attempt to create the smallest circle enclosing a set of planar points.
Returns: true on success, false on failure.