Table of Contents

CadRuleScore

from OpenCAD2D import CadRuleScore

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

How one rule of a standard fared (CadStandardResult.Rules): the score, from 0 to 1, and the numbers it is made of. The score is 1 - offenders / subjects, and 1 where the rule found nothing to look at: a rule about the text heights of 40 words, 10 of them set at a height the standard does not list, scores 0.75.

Properties and fields

Offenders

.NET

@property
def Offenders(self) -> int

Gets how many of them offend, each counted once however many violations it has.

Rule

.NET

@property
def Rule(self) -> str

Gets the id of the rule, one of CadStandards.RuleIds.

Score

.NET

@property
def Score(self) -> float

Gets the score, from 0 (every subject offends) to 1 (none does, or there was nothing to check).

Subjects

.NET

@property
def Subjects(self) -> int

Gets how many things the rule looked at: objects, or layers and styles for the rules about the tables.

Weight

.NET

@property
def Weight(self) -> float

Gets the weight the standard gives the rule in the total score.