Table of Contents

CadFrame

from OpenCAD2D import CadFrame

class CadFrame(System.Object) ยท CadFrame in the .NET reference

A rectangle that may be turned: what a word takes on the page (CadMeasurement.Frames), and what a program asks whether it fits (CadSpatial.Fits). It is given by its first corner, the one at the foot of the start of a line of words, its width along the line, its height across it and the angle the line runs at. A word 20 long and 5 high set at (10, 30) and turned 90 degrees has its first corner at (10, 30), its second at (10, 50) and its far corner at (5, 50).

Constructors

__init__

.NET

def __init__(self, x: float, y: float, width: float, height: float, rotation: float) -> None

Makes a frame.

Properties and fields

Box

.NET

@property
def Box(self) -> DisplayBox

Gets the box of the frame in the drawing: its four corners' least and greatest.

Height

.NET

@property
def Height(self) -> float

Gets the height, across it.

Rotation

.NET

@property
def Rotation(self) -> float

Gets the angle the width runs at, in radians.

Width

.NET

@property
def Width(self) -> float

Gets the width, along CadFrame.Rotation.

X

.NET

@property
def X(self) -> float

Gets the X of the first corner.

Y

.NET

@property
def Y(self) -> float

Gets the Y of the first corner.

Methods

FromBox

.NET

@staticmethod
def FromBox(box: DisplayBox) -> CadFrame

Makes the frame of a box that is not turned.