Table of Contents

CadCalcValue

from OpenCAD2D import CadCalcValue

class CadCalcValue(System.ValueType) ยท CadCalcValue in the .NET reference

A value of the geometry calculator: a whole number, a real number or a vector (a point) of three coordinates, as AutoCAD's CAL keeps them.

Properties and fields

IsInteger

.NET

@property
def IsInteger(self) -> bool

Gets whether the value is a whole number, as 1+2*3 is.

IsVector

.NET

@property
def IsVector(self) -> bool

Gets whether the value is a vector.

Number

.NET

@property
def Number(self) -> float

Gets the number; the X of a vector.

Point

.NET

@property
def Point(self) -> GeoPoint3

Gets the vector as a point; a number gives (number, 0, 0).

X

.NET

@property
def X(self) -> float

Gets the number, or the X of a vector.

Y

.NET

@property
def Y(self) -> float

Gets the Y of a vector; nought for a number.

Z

.NET

@property
def Z(self) -> float

Gets the Z of a vector; nought for a number.

Methods

Integer

.NET

@staticmethod
def Integer(value: int) -> CadCalcValue

Makes a whole number.

Real

.NET

@staticmethod
def Real(value: float) -> CadCalcValue

Makes a real number.

ToInput

.NET

def ToInput(self) -> str

Writes the value as QuickCalc puts it into its input, which CAL reads back: 7, 1.41421, [1,2,0].

ToString

.NET

def ToString(self) -> str

Writes the value as AutoCAD 2021's CAL writes it on the command line, whatever the drawing's units: a whole number as 7, a real number to nine significant digits (6, 0.333333333, 53.1301024, 1e+10), a vector as 120,80,0.

ToTyped

.NET

def ToTyped(self) -> str

Writes the value as the text AutoCAD types into the prompt a transparent CAL answers: the number, or x,y,z, to every digit it holds.

Vector

.NET

@staticmethod
def Vector(x: float, y: float, z: float) -> CadCalcValue

Makes a vector.