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, IMongoCollection<MillingStepLuggage>, IMongoCollection<Slice>, Action, ICsScriptApi, MillingActRunnerConfig)

Initializes a new instance of the MachiningActRunner class.

public MachiningActRunner(SessionMessageHost messageHost, MongoClient mongoClient, IMongoCollection<MillingStepLuggage> millingStepLuggageCollection, IMongoCollection<Slice> substractionSplicDbCollection, Action resetMillingStepLuggageDbAction, ICsScriptApi shellApi, MillingActRunnerConfig config = null)

Parameters

messageHost SessionMessageHost

The milling message host.

mongoClient MongoClient

The MongoDB client.

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 MillingActRunnerConfig

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

EnableCollisionDetection

Gets or sets whether collision detection is enabled.

public bool EnableCollisionDetection { get; set; }

Property Value

bool

EnableSweeping

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

public bool EnableSweeping { get; }

Property Value

bool

EnableWearEffect

Gets or sets whether to enable coating wear effects. Note: This function is not fully prepared yet. Only affects further wear by the wear coefficient of inner material.

public bool EnableWearEffect { get; set; }

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>

MachiningEquipment

Gets or sets the machining equipment.

public MachiningEquipment MachiningEquipment { get; set; }

Property Value

MachiningEquipment

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; set; }

Property Value

MachiningToolHouse

MachiningVolumeRemovalProc

Gets the machining volume removal processor.

public MachiningVolumeRemovalProc MachiningVolumeRemovalProc { get; }

Property Value

MachiningVolumeRemovalProc

MillingActRunnerConfig

Gets or sets the runner configuration.

public MillingActRunnerConfig MillingActRunnerConfig { get; set; }

Property Value

MillingActRunnerConfig

SessionMessageHost

Gets or sets the milling message host.

public SessionMessageHost SessionMessageHost { get; set; }

Property Value

SessionMessageHost

ShellApi

Gets the C# script API for the milling session.

public ICsScriptApi ShellApi { get; }

Property Value

ICsScriptApi

StepPreferredCubeWidth

Gets or sets the preferred cube width for steps.

public double StepPreferredCubeWidth { get; set; }

Property Value

double

XyzabcChain

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)

Disposes of the resources used by the MachiningActRunner.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True to release both managed and unmanaged resources; false to release only unmanaged resources.

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, ISourceCommand, MachiningSession, CancellationToken, IMachiningStepHost)

Processes an act with the given parameters.

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

Parameters

act IAct

The act to process.

sourceCommand ISourceCommand

The source command.

millingSession MachiningSession

The milling session.

cancellationToken CancellationToken

The cancellation token.

host IMachiningStepHost

The milling step host.

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()

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>