Table of Contents

Interface IMachiningService

Namespace
Hi.MachiningSteps
Assembly
HiMech.dll

The host of the machining steps: the project-level surface a step and the run-ops reach for the equipment, the tool house, the strip, the session and the stored per-step luggage.

public interface IMachiningService : IGetMachiningEquipment
Inherited Members
Extension Methods

Properties

ActiveNcRunner

Gets the active NC control runner.

INcRunner ActiveNcRunner { get; }

Property Value

INcRunner

BaseDirectory

Gets the project base directory (relative-path root).

string BaseDirectory { get; }

Property Value

string

ClRunner

Gets the NX-CL (CLSF) control runner.

INcRunner ClRunner { get; }

Property Value

INcRunner

ClStrip

Gets the cutter location strip containing the machining steps.

ClStrip ClStrip { get; }

Property Value

ClStrip

CsvRunner

Gets the CSV runner.

INcRunner CsvRunner { get; }

Property Value

INcRunner

DictionaryColorGuide

Gets the color guide for dictionary-based coloring.

DictionaryColorGuide DictionaryColorGuide { get; }

Property Value

DictionaryColorGuide

EnablePauseOnFailure

Gets whether playback pauses on a failure.

bool EnablePauseOnFailure { get; }

Property Value

bool

IsCollisionDetectionEnabled

Gets whether collision detection is currently enabled.

bool IsCollisionDetectionEnabled { get; }

Property Value

bool

MachiningActRunner

Gets the act runner that expands and processes acts.

MachiningActRunner MachiningActRunner { get; }

Property Value

MachiningActRunner

MachiningEquipment

Gets the milling equipment used for machining operations.

MachiningEquipment MachiningEquipment { get; }

Property Value

MachiningEquipment

MachiningSession

Gets the current machining session.

MachiningSession MachiningSession { get; }

Property Value

MachiningSession

MachiningToolHouse

Gets the tool house containing milling tools.

MachiningToolHouse MachiningToolHouse { get; }

Property Value

MachiningToolHouse

NcDiagnosticProgress

Gets the NC-pipeline diagnostic sink on the IMessage channel.

NcDiagnosticProgress NcDiagnosticProgress { get; }

Property Value

NcDiagnosticProgress

NcManipulationDiagnosticProgress

Gets the NC-manipulation diagnostic sink — the second diagnostic home, for operations that rework an already-played NC/CL program (writeback conversion, NC optimization) as opposed to the play-time pipeline diagnostics in NcDiagnosticProgress. Keeping the two scenarios in separate homes lets a play reset clear run diagnostics without discarding manipulation results, and vice versa; each manipulation run clears this home at its start so it always holds the latest run.

NcDiagnosticProgress NcManipulationDiagnosticProgress { get; }

Property Value

NcDiagnosticProgress

PacePlayer

Gets the pace player controlling execution pace.

PacePlayer PacePlayer { get; }

Property Value

PacePlayer

StepDiagnosticProgress

Gets the step-aligned IMessage-channel sink.

StepDiagnosticProgress StepDiagnosticProgress { get; }

Property Value

StepDiagnosticProgress

TimeMapping

Gets the time mapping for synchronization.

TimeMapping TimeMapping { get; }

Property Value

TimeMapping

Methods

BeginNcRunner()

Readies the meshed geometry for an NC run (idempotent): builds it when absent, and gives a tree a stopped geometry Diff left partly bare its plain base back before a step cuts it. Called at the start of every run (RunNcLines(INcRunner, string, IEnumerable<string>, CancellationToken)), a nested one included, before the run's first line; IsNestedNcLines tells the host which it is, so what a stopped run left on the host is dropped at an outermost run's start only. A host reviewing a recorded play result throws InvalidOperationException here (the strip is the result's: a run would build on it), and the run ends as a fault with no line played.

void BeginNcRunner()

CheckStrokeLimitOnStep(int)

Checks the stroke limit on the machine pose a step act left the chain in, once per act, right after the act runner answered it; a report is anchored to stepIndex. True when within limits, or when the check is off or unconfigured.

bool CheckStrokeLimitOnStep(int stepIndex)

Parameters

stepIndex int

The built step's index (its strip position's), or, for a step act that built no step, the index the next built step takes.

Returns

bool

EnsureExecutionEquipment()

Ensures the runtime MachiningEquipment reflects the authored setup face — re-materialising it when setup edits are pending (equipment split: follow = rebuild at session boundaries). Default: no-op, for hosts without a setup face (e.g. test stubs).

void EnsureExecutionEquipment()

GetSessionShell()

Returns the session shell that exposes the runtime surface of the active machining session.

ISessionShell GetSessionShell()

Returns

ISessionShell

RefreshDrawing()

Refreshes the visual display.

void RefreshDrawing()

TryGetLayerMillingEngagement(int, out LayerMillingEngagement)

Reads the engagement of a step's row from the step cache.

bool TryGetLayerMillingEngagement(int stepIndex, out LayerMillingEngagement engagement)

Parameters

stepIndex int

The step index.

engagement LayerMillingEngagement

The stored engagement, null for a NULL column.

Returns

bool

true when the store holds the step's row.

TryGetMillingForceBrief(int, out MillingForceBrief)

Reads the force brief of a step's briefs' row from the step cache.

bool TryGetMillingForceBrief(int stepIndex, out MillingForceBrief brief)

Parameters

stepIndex int

The step index.

brief MillingForceBrief

The stored force brief, null when the physics did not run on the step.

Returns

bool

true when the store holds the step's briefs' row.

TryGetMillingForceLuggage(int, out MillingForceLuggage)

Reads the per-rotation force arrays of a step's row from the step cache.

bool TryGetMillingForceLuggage(int stepIndex, out MillingForceLuggage luggage)

Parameters

stepIndex int

The step index.

luggage MillingForceLuggage

The stored force luggage, null for a NULL column.

Returns

bool

true when the store holds the step's row.

TryGetSeqPhysicsBrief(int, out SeqPhysicsState)

Former name of TryGetSeqPhysicsState(int, out SeqPhysicsState) (the type was SeqPhysicsBrief until 2026-10-27), kept so a script written against it still compiles.

[Obsolete("Renamed to TryGetSeqPhysicsState.")]
bool TryGetSeqPhysicsBrief(int stepIndex, out SeqPhysicsState brief)

Parameters

stepIndex int

The step index.

brief SeqPhysicsState

The stored sequential physics state; never null when the row exists.

Returns

bool

true when the store holds the step's briefs' row.

TryGetSeqPhysicsState(int, out SeqPhysicsState)

Reads the sequential physics state of a step's briefs' row from the step cache.

bool TryGetSeqPhysicsState(int stepIndex, out SeqPhysicsState brief)

Parameters

stepIndex int

The step index.

brief SeqPhysicsState

The stored sequential physics state; never null when the row exists.

Returns

bool

true when the store holds the step's briefs' row.

TryGetStepVariable(int, string, out object)

Reads the value written onto a step under a key from the step cache.

bool TryGetStepVariable(int stepIndex, string key, out object value)

Parameters

stepIndex int

The step index.

key string

The step variable's key.

value object

The stored value, a double or a string; null without a row.

Returns

bool

true when the store holds the step's row under the key.

TryGetSubstraction(int, out Substraction)

Reads the removal geometry of a step's row from the step cache.

bool TryGetSubstraction(int stepIndex, out Substraction substraction)

Parameters

stepIndex int

The step index.

substraction Substraction

The stored substraction, null for a NULL column.

Returns

bool

true when the store holds the step's row.

UpdateIdealMillingToolOffsetTableByToolHouse()

Refreshes the ideal milling-tool offset table from the tool house.

void UpdateIdealMillingToolOffsetTableByToolHouse()

WriteStepVariable(int, string, object)

Writes one value onto one step's row under a key (INSERT OR REPLACE; null deletes the row). A value that is not a number or a string is reported once per key and not stored.

void WriteStepVariable(int stepIndex, string key, object value)

Parameters

stepIndex int

The step index.

key string

The step variable's key.

value object

The value; null takes the key back off the step.

WriteStepVariables(IReadOnlyList<StepVariableWrite>)

Writes a batch of values onto steps, one transaction for the batch (a null value deletes its row; a value that is not a number or a string is reported once per key and not stored). A caller with many writes hands them over a segment at a time (SegmentLength).

void WriteStepVariables(IReadOnlyList<StepVariableWrite> writes)

Parameters

writes IReadOnlyList<StepVariableWrite>

The writes of the batch.