Class MachiningSession
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
Represents a machining session that manages the execution and optimization of machining operations. Provides functionality for controlling the machining process, handling optimization options, and managing session state. Implements IDisposable to clean up SessionWriters on session end.
public class MachiningSession : IDisposable
- Inheritance
-
MachiningSession
- Implements
- Inherited Members
- Extension Methods
Properties
CurrentSourceCommand
Gets or sets the current source command being processed.
public IIndexedFileLine CurrentSourceCommand { get; set; }
Property Value
Data
Gets or sets the data dictionary for the player session.
public Dictionary<object, object> Data { get; set; }
Property Value
IsNcOptOptionListUpdatedByStep
Internal Use Only.
public bool IsNcOptOptionListUpdatedByStep { get; set; }
Property Value
NcOptOption
Gets or sets the NC optimization options for UI operations.
public NcOptOption NcOptOption { get; set; }
Property Value
PacePlayee
Internal set only.
public PacePlayee PacePlayee { get; set; }
Property Value
PostBlockScripts
Per-line scripts injected externally (without modifying NC files). Key: FileLineIndex of the NC block. Value: C# script text to execute after the NC block. Consumed by CsScriptEndSemantic.
public Dictionary<FileLineIndex, string> PostBlockScripts { get; }
Property Value
PreBlockScripts
Per-line scripts injected externally (without modifying NC files). Key: FileLineIndex of the NC block. Value: C# script text to execute before the NC block. Consumed by CsScriptBeginSemantic.
public Dictionary<FileLineIndex, string> PreBlockScripts { get; }
Property Value
SessionWriters
StreamWriters registered during the session (e.g. by diagnostic output methods). Key: relative output file path. Disposed automatically when the session ends.
public Dictionary<string, StreamWriter> SessionWriters { get; }
Property Value
StepIndexToNcOptOptionSortedList
Gets or sets the mapping of step indices to NC optimization options. For internal use only. Takes effect during internal optimization process.
public SortedList<int, NcOptOption> StepIndexToNcOptOptionSortedList { get; set; }
Property Value
StepTaskBundle
Gets or sets the current step task bundle.
public MachiningParallelProc.StepTaskBundle StepTaskBundle { get; set; }
Property Value
Methods
BeginPreserve()
Begins a preserve section in the optimization process.
public void BeginPreserve()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
EndPreserve()
Ends a preserve section in the optimization process.
public void EndPreserve()
Preserve()
Preserves one line of NC code in the optimization process.
public void Preserve()
RunMachiningStepBuilt(MachiningStep, MachiningStep)
Internal use only. Invokes MachiningStepBuilt.
public void RunMachiningStepBuilt(MachiningStep preStep, MachiningStep curStep)
Parameters
preStepMachiningStepcurStepMachiningStep
RunMachiningStepSelected(MachiningStep)
Internal use only. Invokes MachiningStepSelected.
public void RunMachiningStepSelected(MachiningStep machiningStep)
Parameters
machiningStepMachiningStep
RunSourcedActEntry(SourcedActEntry)
Internal use only. Invokes SourcedActEntry.
public void RunSourcedActEntry(SourcedActEntry entry)
Parameters
entrySourcedActEntry
RunSyntaxPieceRan(SyntaxPiece)
Internal use only. Invokes SyntaxPieceRan.
public void RunSyntaxPieceRan(SyntaxPiece syntaxPiece)
Parameters
syntaxPieceSyntaxPiece
UpdateNcOptOptionMapIfNeeded(int)
Updates the NC optimization option map if needed. Internal use only.
public bool UpdateNcOptOptionMapIfNeeded(int stepIndex)
Parameters
stepIndexintThe index of the step to update.
Returns
- bool
True if the map was updated; otherwise, false.
Events
MachiningStepBuilt
Event triggered when a machining step is built.
public event MachiningActRunner.MachiningStepBuiltDelegate MachiningStepBuilt
Event Type
MachiningStepSelected
Event triggered when a machining step is selected.
public event Action<MachiningStep> MachiningStepSelected
Event Type
OnCurrentLineEnd
Event raised when the current line ends. The event buffer is cleared on every line change.
public event Action<CancellationToken> OnCurrentLineEnd
Event Type
SourcedActEntry
Event triggered for each SourcedActEntry produced during NC/CSV execution.
public event Action<SourcedActEntry> SourcedActEntry
Event Type
SyntaxPieceRan
Event triggered when a syntax piece has been executed.
public event Action<SyntaxPiece> SyntaxPieceRan