Arc
===

.. py:module:: rhino3dm

.. py:class:: Arc

   .. py:method:: Arc(circle, angleRadians)

      Initializes a new instance of an arc from a base circle and an angle.

      :param Circle circle: Circle to base arc upon.
      :param float angleRadians: Sweep angle of arc (in radians)

   .. py:method:: Arc(center, radius, angleRadians)

      Initializes a new horizontal arc at the given center point, with a custom radius and angle.

      :param rhino3dm.Point3d center: Center point of arc.
      :param float radius: Radius of arc.
      :param float angleRadians: Sweep angle of arc (in radians)

   .. py:method:: Arc(startPoint, pointOnInterior, endPoint)

      Initializes a new arc through three points. If the points are coincident
      or co-linear, this will result in an Invalid arc.

      :param rhino3dm.Point3d startPoint: Start point of arc.
      :param rhino3dm.Point3d pointOnInterior: Point on arc interior.
      :param rhino3dm.Point3d endPoint: End point of arc.

   .. py:method:: Arc(pointA, tangentA, pointB)

      Initializes a new arc from end points and a tangent vector.
      If the tangent is parallel with the endpoints this will result in an Invalid arc.

      :param rhino3dm.Point3d pointA: Start point of arc.
      :param rhino3dm.Vector3d tangentA: Tangent at start of arc.
      :param rhino3dm.Point3d pointB: End point of arc.

   .. py:attribute:: IsValid

      bool: Gets a value indicating whether or not this arc is valid.
      Detail:
      Radius>0 and 0<AngleRadians()<=2*Math.Pi.

   .. py:attribute:: IsCircle

      bool: Gets a value indicating whether or not this arc is a complete circle.

   .. py:attribute:: Radius

      float: Gets or sets the radius of this arc.

   .. py:attribute:: Diameter

      float: Gets or sets the Diameter of this arc.

   .. py:attribute:: Plane

      rhino3dm.Plane: Gets or sets the plane in which this arc lies.

   .. py:attribute:: Center

      rhino3dm.Point3d: Gets or sets the center point for this arc.

   .. py:attribute:: Circumference

      float: Gets the circumference of the circle that is coincident with this arc.

   .. py:attribute:: Length

      float: Gets the length of the arc. (Length = Radius * (subtended angle in radians)).

   .. py:attribute:: StartPoint

      rhino3dm.Point3d: Gets the start point of the arc.

   .. py:attribute:: MidPoint

      rhino3dm.Point3d: Gets the mid-point of the arc.

   .. py:attribute:: EndPoint

      rhino3dm.Point3d: Gets the end point of the arc.

   .. py:attribute:: AngleDomain

      rhino3dm.Interval: Gets or sets the angle domain (in Radians) of this arc.

   .. py:attribute:: StartAngle

      float: Gets or sets the start angle (in Radians) for this arc segment.

   .. py:attribute:: EndAngle

      float: Gets or sets the end angle (in Radians) for this arc segment.

   .. py:attribute:: AngleRadians


   .. py:attribute:: StartAngleDegrees

      float: Gets or sets the start angle (in Degrees) for this arc segment.

   .. py:attribute:: EndAngleDegrees

      float: Gets or sets the end angle (in Degrees) for this arc segment.

   .. py:attribute:: AngleDegrees

      float: Gets or sets the sweep -or subtended- angle (in Degrees) for this arc segment.

   .. py:method:: Trim(domain)

      Sets arc's angle domain (in Radians) as a sub-domain of the circle.

      :param rhino3dm.Interval domain: 0 < domain[1] - domain[0] <= 2.0 * RhinoMath.Pi.

      :return: True on success, False on failure.

      :rtype: bool

   .. py:method:: BoundingBox()

      Computes the 3D axis aligned bounding box for this arc.

      :return: Bounding box of arc.

      :rtype: rhino3dm.BoundingBox

   .. py:method:: PointAt(t)

      Gets the point at the given arc parameter.

      :param float t: Arc parameter to evaluate.

      :return: The point at the given parameter.

      :rtype: rhino3dm.Point3d

   .. py:method:: TangentAt(t)

      Gets the tangent at the given parameter.

      :param float t: Parameter of tangent to evaluate.

      :return: The tangent at the arc at the given parameter.

      :rtype: rhino3dm.Vector3d

   .. py:method:: ClosestParameter(testPoint)

      Gets parameter on the arc closest to a test point.

      :param rhino3dm.Point3d testPoint: Point to get close to.

      :return: Parameter (in radians) of the point on the arc that \
         is closest to the test point. If testPoint is the center \
         of the arc, then the starting point of the arc is \
         (arc.Domain()[0]) returned. If no parameter could be found, \
         RhinoMath.UnsetValue is returned.

      :rtype: float

   .. py:method:: ClosestPoint(testPoint)

      Computes the point on an arc that is closest to a test point.

      :param rhino3dm.Point3d testPoint: Point to get close to.

      :return: The point on the arc that is closest to testPoint. If testPoint is \
         the center of the arc, then the starting point of the arc is returned. \
         UnsetPoint on failure.

      :rtype: rhino3dm.Point3d

   .. py:method:: Reverse()

      Reverses the orientation of the arc. Changes the domain from [a,b]
      to [-b,-a].


      :rtype: void

   .. py:method:: Transform(xform)

      Transforms the arc using a Transformation matrix.

      :param Transform xform: Transformations to apply. \
         Note that arcs cannot handle non-euclidean transformations.

      :return: True on success, False on failure.

      :rtype: bool

   .. py:method:: ToNurbsCurve()

      Initializes a nurbs curve representation of this arc.
      This amounts to the same as calling NurbsCurve.CreateFromArc().

      :return: A nurbs curve representation of this arc or None if no such representation could be made.

      :rtype: rhino3dm.NurbsCurve
