Circle

class rhino3dm.Circle
Circle(radius)

Initializes a circle with center (0,0,0) in the world XY plane.

Parameters:

radius (float) – Radius of circle, should be a positive number.

Circle(center, radius)

Initializes a circle parallel to the world XY plane with given center and radius.

Parameters:
  • center (rhino3dm.Point3d) – Center of circle.

  • radius (float) – Radius of circle (should be a positive value).

IsValid

bool: A valid circle has radius larger than 0.0 and a base plane which is must also be valid.

Radius

float: Gets or sets the radius of this circle. Radii should be positive values.

Diameter

float: Gets or sets the diameter (radius * 2.0) of this circle. Diameters should be positive values.

Plane

rhino3dm.Plane: Gets or sets the plane of the circle.

Center

rhino3dm.Point3d: Gets or sets the center point of this circle.

BoundingBox

rhino3dm.BoundingBox: Gets the circle’s 3d axis aligned bounding box.

Normal

rhino3dm.Vector3d: Gets the normal vector for this circle.

Circumference

float: Gets or sets the circumference of this circle.

IsInPlane(plane, tolerance)

Evaluates whether or not this circle is co-planar with a given plane.

Parameters:
  • plane (rhino3dm.Plane) – Plane.

  • tolerance (float) – Tolerance to use.

Returns:

True if the circle plane is co-planar with the given plane within tolerance.

Return type:

bool

PointAt(t)

Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.

Parameters:

t (float) – Parameter of point to evaluate.

Returns:

The point on the circle at the given parameter.

Return type:

rhino3dm.Point3d

TangentAt(t)

Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.

Parameters:

t (float) – Parameter of tangent to evaluate.

Returns:

The tangent at the circle at the given parameter.

Return type:

rhino3dm.Vector3d

DerivativeAt(derivative, t)

Determines the value of the Nth derivative at a parameter.

Parameters:
  • derivative (int) – Which order of derivative is wanted.

  • t (float) – Parameter to evaluate derivative. Valid values are 0, 1, 2 and 3.

Returns:

The derivative of the circle at the given parameter.

Return type:

rhino3dm.Vector3d

ClosestParameter(testPoint)

Gets the parameter on the circle which is closest to a test point.

Parameters:

testPoint (rhino3dm.Point3d) – Point to project onto the circle.

Returns:

tuple (bool, float)

  • True on success, False on failure.

  • Parameter on circle closes to testPoint.

Return type:

(bool, float)

ClosestPoint(testPoint)

Gets the point on the circle which is closest to a test point.

Parameters:

testPoint (rhino3dm.Point3d) – Point to project onto the circle.

Returns:

The point on the circle that is closest to testPoint or Point3d.Unset on failure.

Return type:

rhino3dm.Point3d

Transform(xform)

Transforms this circle using an transformation matrix.

Parameters:

xform (Transform) – Transformation to apply.

Returns:

True on success, False on failure.

Return type:

bool

Translate(delta)

Moves the circle.

Parameters:

delta (rhino3dm.Vector3d) – Translation vector.

Returns:

True on success, False on failure.

Return type:

bool

Reverse()

Reverse the orientation of the circle. Changes the domain from [a,b] to [-b,-a].

Return type:

void

ToNurbsCurve()

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 None if no such representation could be made.

Return type:

rhino3dm.NurbsCurve

Encode()

[todo] add documentation