Table of Contents

Method Check

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Check(CadDocument, CadStandard, double, Tolerance)

Checks every space of a drawing against a standard. A rule scores 1 minus the share of the things it looked at that offend (see CadRuleScore); the total is the weighted mean of the rules the standard runs. Words are measured on paper: in a layout by the layout's own units, in model space through each viewport that shows them at the viewport's scale (annotative objects at the annotation scale the viewport draws them at); where no layout has a viewport, or a scale is given, model space is measured at that scale, a drawing of millimetres plotted 1:1 where none is given. A word seen through two viewports of two scales is checked at both and reported at the worse.

public static CadStandardResult Check(CadDocument document, CadStandard standard, double modelScale, Tolerance tolerance)

Parameters

document CadDocument

The drawing.

standard CadStandard

The standard.

modelScale double

The paper length in millimetres of one unit of model space, where model space is checked on its own (0.01 for 1:100 in millimetres); 0 for none, which leaves model space to its viewports, or to 1:1 where it has none.

tolerance Tolerance

The tolerance of the comparisons, in millimetres on paper (EqualPoint): a gap within it of the allowed one is not a violation. Pass the tolerance, never a global.

Returns

CadStandardResult

The scores and the violations.

Exceptions

ArgumentNullException

Thrown when the document or the standard is null.

ArgumentOutOfRangeException

Thrown when the model scale is below nought or not a number.