CadViolation
from OpenCAD2D import CadViolation
class CadViolation(System.Object) ยท CadViolation in the .NET reference
One place a drawing breaks a rule of a standard: which rule, which objects, where, and the number found against the number allowed.
Properties and fields
Allowed
@property
def Allowed(self) -> str
Gets what the standard allows, as a sentence: 2.5, 3.5, 5, 7 mm, at least 0.5 mm.
Box
@property
def Box(self) -> System.Array[float] | None
Gets the place, (min X, min Y, max X, max Y), in the coordinates of CadViolation.Space: the box of the object, or of the gap or the overlap for a rule about two. Null for a record of a table, which has no place.
Handle
@property
def Handle(self) -> str
Gets the handle of the object (or, for a rule about a layer or a style, of its record) that breaks the rule.
Limit
@property
def Limit(self) -> float
Gets the number allowed against CadViolation.Value: the nearest listed height, the least gap, the tolerance of a chain; NaN for a name.
Measured
@property
def Measured(self) -> str
Gets what was found, as a sentence: 3.2 mm, WALL-OLD, color 1.
Other
@property
def Other(self) -> str | None
Gets the handle of the second object where the rule is about two (the line a word is too near, the dimension a chain follows); null where it is about one.
Rule
@property
def Rule(self) -> str
Gets the id of the rule broken (CadStandards.RuleIds).
Space
@property
def Space(self) -> str
Gets the name of the space the object is in: Model, a layout, or an empty text for a record of a table.
Through
@property
def Through(self) -> str | None
Gets the handle of the viewport through which a model-space object was measured on paper, where it was; null where the object was measured in its own space.
Value
@property
def Value(self) -> float
Gets the number found where the rule is about a number (millimetres on paper; the offset of a dimension line from its chain), NaN where it is about a name.