Table of Contents

CadStandardResult

from OpenCAD2D import CadStandardResult

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

What CadStandards.Check found: a score for each rule the standard runs, the total, and every violation in an order that does not depend on how the drawing was walked (by rule, then handle, then the other handle, space, value and sentence).

Properties and fields

Boxes

.NET

@property
def Boxes(self) -> System.Array[float]

Gets the places of the violations, four numbers each in the order of CadStandardResult.Violations (min X, min Y, max X, max Y); NaN for a violation with no place. The array is the result's own: read it, do not change it.

Name

.NET

@property
def Name(self) -> str

Gets the name of the standard that was checked.

Rules

.NET

@property
def Rules(self) -> System.Collections.Generic.IReadOnlyList[CadRuleScore]

Gets the score of each rule the standard runs, in the order of CadStandards.RuleIds.

Total

.NET

@property
def Total(self) -> float

Gets the total score, from 0 to 1: the sum of each rule's weight times its score over the sum of the weights of the rules run; 1 where no rule ran or every weight is nought.

Violations

.NET

@property
def Violations(self) -> System.Collections.Generic.IReadOnlyList[CadViolation]

Gets the violations, sorted.

Methods

ScoreOf

.NET

def ScoreOf(self, rule: str) -> float

Gets the score of a rule.