DisplayArc2
from OpenCAD2D import DisplayArc2
class DisplayArc2(DisplayItem2) ยท DisplayArc2 in the .NET reference
An arc of a circle, or a whole circle; the canvas flattens it to the screen's accuracy.
Constructors
__init__
def __init__(
self,
cx: float,
cy: float,
radius: float,
start: float,
sweep: float,
style: DisplayStyle,
handle: str,
layer: str,
) -> None
Makes an arc.
Properties and fields
Bounds
@property
def Bounds(self) -> DisplayBox
Gets the box that holds the item.
Cx
@property
def Cx(self) -> float
Gets the X of the centre.
Cy
@property
def Cy(self) -> float
Gets the Y of the centre.
IsCircle
@property
def IsCircle(self) -> bool
Gets whether the arc is a whole circle.
Radius
@property
def Radius(self) -> float
Gets the radius.
Start
@property
def Start(self) -> float
Gets the angle of the start in radians.
Sweep
@property
def Sweep(self) -> float
Gets the angle swept in radians, positive counter-clockwise.
Methods
CoversDirection
def CoversDirection(self, x: float, y: float) -> bool
Gets the angle of a point seen from the centre, as the arc measures its own, within the sweep or not.
DistanceTo
def DistanceTo(self, x: float, y: float) -> float
Gets the distance from a point to the item, the shortest to any part that is drawn; the distance to the nearest edge for a fill, nought inside it.
Flatten
def Flatten(self, tolerance: float) -> System.Array[float]
Gets the points of the arc as a chain whose chords stay within a tolerance of it.
PointAt
def PointAt(self, angle: float) -> tuple[float, float]
Gets the point of the arc at an angle.
Touches
def Touches(self, box: DisplayBox) -> bool
Gets whether any part of the item touches a box, as a crossing selection asks.