Table of Contents

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__

.NET

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

.NET

@property
def Bounds(self) -> DisplayBox

Gets the box that holds the item.

Cx

.NET

@property
def Cx(self) -> float

Gets the X of the centre.

Cy

.NET

@property
def Cy(self) -> float

Gets the Y of the centre.

IsCircle

.NET

@property
def IsCircle(self) -> bool

Gets whether the arc is a whole circle.

Radius

.NET

@property
def Radius(self) -> float

Gets the radius.

Start

.NET

@property
def Start(self) -> float

Gets the angle of the start in radians.

Sweep

.NET

@property
def Sweep(self) -> float

Gets the angle swept in radians, positive counter-clockwise.

Methods

CoversDirection

.NET

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

.NET

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

.NET

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

.NET

def PointAt(self, angle: float) -> tuple[float, float]

Gets the point of the arc at an angle.

Touches

.NET

def Touches(self, box: DisplayBox) -> bool

Gets whether any part of the item touches a box, as a crossing selection asks.