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
SessionMessageHostThe milling message host.
mongoClient
MongoClientThe MongoDB client.
millingStepLuggageCollection
IMongoCollection<MillingStepLuggage>The MongoDB collection for milling step luggage.
substractionSplicDbCollection
IMongoCollection<Slice>The MongoDB collection for subtraction slices.
resetMillingStepLuggageDbAction
ActionAction to reset the milling step luggage database.
shellApi
ICsScriptApiThe C# script API for the milling session.
config
MillingActRunnerConfigOptional 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
ClStrip
Gets the cutter location strip.
public ClStrip ClStrip { get; }
Property Value
EnableCollisionDetection
Gets or sets whether collision detection is enabled.
public bool EnableCollisionDetection { get; set; }
Property Value
EnableSweeping
Gets whether sweeping is enabled based on the motion resolution type.
public bool EnableSweeping { get; }
Property Value
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
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
MachiningEquipment
Gets or sets the machining equipment.
public MachiningEquipment MachiningEquipment { get; set; }
Property Value
MachiningMotionResolution
Gets or sets the machining motion resolution.
public IMachiningMotionResolution MachiningMotionResolution { get; set; }
Property Value
MachiningToolHouse
Gets or sets the machining tool house.
public MachiningToolHouse MachiningToolHouse { get; set; }
Property Value
MachiningVolumeRemovalProc
Gets the machining volume removal processor.
public MachiningVolumeRemovalProc MachiningVolumeRemovalProc { get; }
Property Value
MillingActRunnerConfig
Gets or sets the runner configuration.
public MillingActRunnerConfig MillingActRunnerConfig { get; set; }
Property Value
SessionMessageHost
Gets or sets the milling message host.
public SessionMessageHost SessionMessageHost { get; set; }
Property Value
ShellApi
Gets the C# script API for the milling session.
public ICsScriptApi ShellApi { get; }
Property Value
StepPreferredCubeWidth
Gets or sets the preferred cube width for steps.
public double StepPreferredCubeWidth { get; set; }
Property Value
XyzabcChain
public IXyzabcChain XyzabcChain { get; }
Property Value
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
boolTrue 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
IActThe 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
IActThe act to process.
sourceCommand
ISourceCommandThe source command.
millingSession
MachiningSessionThe milling session.
cancellationToken
CancellationTokenThe cancellation token.
host
IMachiningStepHostThe 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
UiPostStepAction
Event raised after each step for UI updates. This is for internal use only.
public event Action<MachiningStep> UiPostStepAction