Table of Contents

Class StepColorTerm

Namespace
Hi.MachiningProcs
Assembly
HiNc.dll

One term of a StepColorCondition: a step property, named by its key in the step-property registry, compared against a threshold by Op. The threshold is NaN — none — for HasValue and NoValue, and must be a number for every other operation. Saved as <Term Key Op Threshold/> under a <When> element.

public sealed record StepColorTerm : IEquatable<StepColorTerm>
Inheritance
StepColorTerm
Implements
Inherited Members
Extension Methods

Constructors

StepColorTerm(string, StepColorOp, double)

One term of a StepColorCondition: a step property, named by its key in the step-property registry, compared against a threshold by Op. The threshold is NaN — none — for HasValue and NoValue, and must be a number for every other operation. Saved as <Term Key Op Threshold/> under a <When> element.

public StepColorTerm(string Key, StepColorOp Op, double Threshold = NaN)

Parameters

Key string

The key of the step property compared.

Op StepColorOp

The comparison.

Threshold double

The number compared against; NaN for an operation without one.

Fields

XName

Name for XML IO.

public const string XName = "Term"

Field Value

string

Properties

Key

The key of the step property compared.

public string Key { get; init; }

Property Value

string

Op

The comparison.

public StepColorOp Op { get; init; }

Property Value

StepColorOp

Threshold

The number compared against; NaN for an operation without one.

public double Threshold { get; init; }

Property Value

double

Methods

HasValue(string)

A term that holds when the step has a value under key.

public static StepColorTerm HasValue(string key)

Parameters

key string

Returns

StepColorTerm

NeedsThreshold()

Whether Op compares against Threshold.

public bool NeedsThreshold()

Returns

bool

NeedsThreshold(StepColorOp)

Whether op compares against a threshold: every operation but HasValue and NoValue.

public static bool NeedsThreshold(StepColorOp op)

Parameters

op StepColorOp

Returns

bool

NoValue(string)

A term that holds when the step has no value under key.

public static StepColorTerm NoValue(string key)

Parameters

key string

Returns

StepColorTerm