Table of Contents

Class MachiningActRunner

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Represents a runner for machining actions that manages milling steps, tool paths, and collision detection.

public class MachiningActRunner : IDisposable
Inheritance
MachiningActRunner
Implements
Inherited Members
Extension Methods

Constructors

MachiningActRunner(SessionMessageHost, MongoClient, Func<MachiningToolHouse>, Func<MachiningEquipment>, IMongoCollection<MillingStepLuggage>, IMongoCollection<Slice>, Action, ICsScriptApi, MachiningActRunnerConfig)

Initializes a new instance.

public MachiningActRunner(SessionMessageHost messageHost, MongoClient mongoClient, Func<MachiningToolHouse> machiningToolHouseGetter, Func<MachiningEquipment> machiningEquipmentGetter, IMongoCollection<MillingStepLuggage> millingStepLuggageCollection, IMongoCollection<Slice> substractionSplicDbCollection, Action resetMillingStepLuggageDbAction, ICsScriptApi shellApi, MachiningActRunnerConfig config = null)

Parameters

messageHost SessionMessageHost

The milling message host.

mongoClient MongoClient

The MongoDB client.

machiningToolHouseGetter Func<MachiningToolHouse>

The getter function for the machining tool house.

machiningEquipmentGetter Func<MachiningEquipment>

The getter function for the machining equipment.

millingStepLuggageCollection IMongoCollection<MillingStepLuggage>

The MongoDB collection for milling step luggage.

substractionSplicDbCollection IMongoCollection<Slice>

The MongoDB collection for subtraction slices.

resetMillingStepLuggageDbAction Action

Action to reset the milling step luggage database.

shellApi ICsScriptApi

The C# script API for the milling session.

config MachiningActRunnerConfig

Optional configuration for the milling act runner.

Properties

ActStateRunner

Gets the act state runner. This property is provided as a member value getter and should not be modified.

public ActStateRunner ActStateRunner { get; }

Property Value

ActStateRunner

ClStrip

Gets the cutter location strip.

public ClStrip ClStrip { get; }

Property Value

ClStrip

Config

Gets or sets the runner configuration.

public MachiningActRunnerConfig Config { get; set; }

Property Value

MachiningActRunnerConfig

EnableSweeping

Gets whether sweeping is enabled based on the motion resolution type.

public bool EnableSweeping { get; }

Property Value

bool

GrpcPostStepAction

Gets or sets the action to be performed after each step for GRPC service. This is for internal use only.

public static Action<MachiningStep> GrpcPostStepAction { get; set; }

Property Value

Action<MachiningStep>

MachiningMotionResolution

Gets or sets the machining motion resolution.

public IMachiningMotionResolution MachiningMotionResolution { get; set; }

Property Value

IMachiningMotionResolution

MachiningToolHouse

Gets or sets the machining tool house.

public MachiningToolHouse MachiningToolHouse { get; }

Property Value

MachiningToolHouse

MachiningVolumeRemovalProc

Gets the machining volume removal processor.

public MachiningVolumeRemovalProc MachiningVolumeRemovalProc { get; }

Property Value

MachiningVolumeRemovalProc

SessionMessageHost

Gets or sets the milling message host.

public SessionMessageHost SessionMessageHost { get; set; }

Property Value

SessionMessageHost

StepPreferredCubeWidth

Gets or sets the preferred cube width for steps.

public double StepPreferredCubeWidth { get; set; }

Property Value

double

XyzabcChain

Gets the XYZABC kinematic chain if the current machining chain supports it; otherwise null.

public IXyzabcChain XyzabcChain { get; }

Property Value

IXyzabcChain

Methods

AdjustAptCutterStlResolutionByNcResolutionAndWorkpieceResolution()

Adjusts the APT cutter STL resolution based on NC resolution and workpiece resolution.

public void AdjustAptCutterStlResolutionByNcResolutionAndWorkpieceResolution()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

ExpandToActMcStep(IAct)

Expands an act into machine control steps.

public IEnumerable<IAct> ExpandToActMcStep(IAct act)

Parameters

act IAct

The act to expand.

Returns

IEnumerable<IAct>

A sequence of machine control steps.

GetMillingActRunner()

Gets the current milling act runner instance.

public MachiningActRunner GetMillingActRunner()

Returns

MachiningActRunner

The current milling act runner instance.

ProcAct(IAct, MachiningSession, IMachiningStepHost, IIndexedFileLine, CancellationToken)

Processes an act with the given parameters.

public IEnumerable<object> ProcAct(IAct act, MachiningSession millingSession, IMachiningStepHost host, IIndexedFileLine sourceCommand, CancellationToken cancellationToken)

Parameters

act IAct

The act to process.

millingSession MachiningSession

The milling session.

host IMachiningStepHost

The milling step host.

sourceCommand IIndexedFileLine

The source command.

cancellationToken CancellationToken

The cancellation token.

Returns

IEnumerable<object>

A sequence of processed objects.

ResetMillingStepLuggageDb()

Resets the milling step luggage database.

public void ResetMillingStepLuggageDb()

ResetStateAndClStrip()

Resets the state and cutter location strip.

public void ResetStateAndClStrip()

UpdateByMachiningChain()

Update By MachiningChain. Internal Use Only.

public void UpdateByMachiningChain()

UpdateByMachiningEquipment()

Update By Hi.MachiningProcs.MachiningActRunner.MachiningEquipment. Internal Use Only.

public void UpdateByMachiningEquipment()

WaitAll()

Waits for all pending operations to complete.

public void WaitAll()

Events

MachiningStepBuilt

event to configure steps. The first parameter is the previous step; the second parameter is the current step. The previous step is null if no previous step exists.

public event MachiningActRunner.MachiningStepBuiltDelegate MachiningStepBuilt

Event Type

MachiningActRunner.MachiningStepBuiltDelegate

UiPostStepAction

Event raised after each step for UI updates. This is for internal use only.

public event Action<MachiningStep> UiPostStepAction

Event Type

Action<MachiningStep>