Circle2d Class

Represents a two dimensional circle.
Public Class Circle2d 
Inherits Geometry2d 
Implements ICircular2d
This language is not supported or no code example is available.
public class Circle2d : Geometry2d
ICircular2d
This language is not supported or no code example is available.
public ref class Circle2d : public Geometry2d^, 
public ICircular2d^
This language is not supported or no code example is available.
public class Circle2d 
extends Geometry2d 
implements ICircular2d
This language is not supported or no code example is available.
Name Description
Public constructor Circle2d() Default constructor creates a unit circle (center at origo, radius=1.0)
Public constructor Circle2d(Circle2d) Copy constructor.
Public constructor Circle2d(Point2d, double) Constructor.
Public constructor Circle2d(double, double, double) Constructor.
Top
Name Description
Public property Area Gets or sets the area of the circle. Setting the area will modify the radius.
Public property Center Sets or gets the circles center. When setting, the point is copied to the circles center point.
Public property Extents Gets the circle bounding box as a new Extents2d.
Public property Length Gets or sets the length of the circles circumference. Setting the length modifies the circles radius to match the wanted length.
Public property Radius Gets or sets the circles radius.
Top
Methods
 
Name Description
Public method ClosestPoint(Point2d) Computes the point on the circles circumference taht is as close as possible to another point.
Public method CommonTangents(Circle2d) Computes the lines thar are common tangents from this circle to another. There might be 0,2 or 4 solutions. If there are 2 solutions, they are external tangents. If there are 4, the two first are external and the second two are internal.
Public method Contains(Point2d) Checks if a point is inside the circle.
Public method Static CreateFrom2Points(Point2d, Point2d) Creates the smallest possible circle passing through two points
Public method Static CreateFrom3Points(Point2d, Point2d, Point2d) Creates a circle that passes through three given points. If the points are on a line an exception will be thrown unless at least two of them are equal.
Public method Static CreateFromCenterAndPoint(Point2d, Point2d) Creates a circle with the specified center passing though a point.
Public method Distance(Point2d) Calculates the distance from a point to the circles circumference.
Public method Flatten(double, FlattenMode) This function computes a Poly2d, in a way that it contains as few linear segments as possible, but never is farther away from the circle than the given tolerance.
Public method Static LeastSquareFit(List<Point2d>, int, double)
Public method Mirror(Point2d, Point2d) Mirrors the circle in-place over a line given by two points.
Public method Quadrant(int) Computes a new point on one of the circles quadrants.
Public method Rotate(double) Rotates the circle in-place around origo.
Public method Rotate(double, Point2d) Rotates the circle around a given point.
Public method Scale(double) Scales the circle in-place using world origo as scale center.
Public method Scale(double, Point2d) Scales the circle in-place using a specified point for scale center.
Public method Split(IEnumerable<Double>) Splits the arc in a list of parameters in the range 0.0-2*PI, with parameter 0.0 beeing the right quadrant point of circle. If all parameters are the same, the result is undefined. Note that there must be at least two parameters in the parameter array.
Public method Split(params double[]) Splits the arc in a list of parameters in the range 0.0-2*PI, with parameter 0.0 beeing the right quadrant point of circle. If all parameters are the same, the result is undefined. Note that there must be at least two parameters in the parameter array.
Public method Split(double, double, out Arc2d, out Arc2d) Splits the circle in two arcs using two parameters. The parameters are in the range 0.0 - 2*PI, with parameter 0.0 beeing the right quadrant of the circle. If the two parameters is equal, two zero length arcs will be computed since an arc cannot have an included angle of 360 degrees.
Public method TangentPoint(Point2d, Side) Computes a point which is the tangent point on the circles circumference seen from a specified point.
Public method ToRegion(double) Converts this circle to an exact region representation.
Public method ToString() Builds a string that's good for debug-purposes.
Public method Transform(Matrix2d) Transforms the circle in-place with a matrix. If the matrix scales the circle diffrenly in x and y so that i will theoretically become an ellipse, the result is undefined.
Public method Translate(double, double) Moves the circle in-place.
Public method WriteAutoCADScript(StreamWriter, int) Writes text to the stream, that are loadable with the script command in AutoCAD.
Top

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition