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(Action<Exception>, Action<IReadOnlyList<StepConsignment>>, Func<MachiningToolHouse>, Func<MachiningEquipment>, Func<WorkpieceService>, Action)
Initializes a new instance.
public MachiningActRunner(Action<Exception> reportException, Action<IReadOnlyList<StepConsignment>> stepStorageWriter, Func<MachiningToolHouse> machiningToolHouseGetter, Func<MachiningEquipment> machiningEquipmentGetter, Func<WorkpieceService> workpieceServiceGetter, Action resetMillingStepLuggageDbAction)
Parameters
reportExceptionAction<Exception>Error sink for what fails outside any single call, called on background threads: the step-luggage writer's flush, the attachment-memory shrink a tool change starts, the step pipeline's worker (its failure, a step it could not hand on to the luggage writer), the thread that stops a play (the run token's cancel callback), and the application's end as it closes the pipelines left over (CloseLeftOverPipelines()). Request-scoped progress is passed by method argument, not held here.
stepStorageWriterAction<IReadOnlyList<StepConsignment>>The action that writes a batch of step consignments (StepConsignment: a step's luggage, its two briefs and whether the step was published — the briefs' row is written and the ByDb rendezvous visited for a published step, the luggage row alone for a luggage-only consignment) to the step cache, one transaction for the batch (
SqliteStepStorage.InsertStepConsignments). Called on the writer's flush thread; a throw is reported and leaves the batch's creation caches in place.machiningToolHouseGetterFunc<MachiningToolHouse>The getter function for the machining tool house.
machiningEquipmentGetterFunc<MachiningEquipment>The getter function for the machining equipment.
workpieceServiceGetterFunc<WorkpieceService>The getter function for the workpiece runtime service.
resetMillingStepLuggageDbActionActionAction to reset the milling step luggage database.
Fields
InternalMachiningStepBuilt
Internal callback fired when a step is built (same timing as MachiningStepBuilt); used by host services before UI subscribers.
public MachiningActRunner.MachiningStepBuiltDelegate InternalMachiningStepBuilt
Field Value
InternalStepsRevised
Internal Use Only. Fired when the overload run fold (OverloadRunFold) revised the
values of the steps of [begin, end) (half-open): a run of spindle or yielding-stress
overload closed, or a rapid line was reported, so those steps read new values under
SpindleOverloadRevolutions, SpindleOverloadPeakRatio,
YieldingStressOverloadRevolutions or IsRapidCut.
Raised on the thread that revised them — the sequential post-physics stage during a play, the
player thread after WaitAll() at an outermost run's start and end — before the step
that closed the run is handed to InternalMachiningStepBuilt; the host refills those
steps' inspecting slots and recolors them, without moving its slot generation.
public Action<int, int> InternalStepsRevised
Field Value
Properties
ClStrip
Gets the cutter location strip.
public ClStrip ClStrip { get; }
Property Value
Config
Gets or sets the runner configuration.
public MachiningActRunnerConfig Config { get; set; }
Property Value
EnableMotionDependentMachiningResolution
EnableMotionDependentMachiningResolution. It works on feed per cycle and feed per tooth motion resolution. MachiningResolution_mm changed by the LinearResolution_mm.
public bool EnableMotionDependentMachiningResolution { get; set; }
Property Value
EnableSweeping
Gets whether sweeping is enabled based on the motion resolution type.
public bool EnableSweeping { get; }
Property Value
GrpcPostStepAction
Gets or sets the action to be performed after each step for GRPC service, once the step's sequential physics stage has run to completion: the step is null when the stage saw the stop or caught its own exception, and a step whose stage was cancelled by a stop, or faulted, is not posted at all. This is for internal use only.
public static Action<MachiningStep> GrpcPostStepAction { get; set; }
Property Value
IsOnPumpThread
Internal Use Only. Whether the calling thread is the step pipeline's pump thread – the thread a step-built handler
runs on; false with no pipeline, and once the pump has exited (its id is cleared with it). The host refuses on it
what a handler cannot do synchronously (the pipeline's own ThrowIfOnPump covers its acts, waits and
disposals): a player reset, which waits for the pipeline the handler is part of.
public bool IsOnPumpThread { get; }
Property Value
IsPipelineDead
Internal Use Only. Whether the step pipeline's pump died: an exception the per-record processing did not own ended it (its death protocol), and every step submitted since is refused – no position, no step – while the play itself goes on to its end. Cleared by the next runtime reset, which rebuilds the pipeline. The NC play result recording reads it at a file's completion: a play the dead pipeline cut short did not run to its end.
public bool IsPipelineDead { get; }
Property Value
MachiningMotionResolution
Gets or sets the machining motion resolution.
public IMachiningMotionResolution MachiningMotionResolution { get; set; }
Property Value
MachiningResolution_mm
Gets or sets the preferred cube width for steps.
public double MachiningResolution_mm { get; set; }
Property Value
MachiningToolHouse
Gets or sets the machining tool house.
public MachiningToolHouse MachiningToolHouse { get; }
Property Value
MachiningVolumeRemovalProc
Gets the machining volume removal processor.
public MachiningVolumeRemovalProc MachiningVolumeRemovalProc { get; }
Property Value
NcPipelineResetStepIndex
The strip's count as an initialised NC pipeline was first dropped over a strip that held steps since the strip
last started at 0 – the index the first step built after that drop took – or null: no initialised pipeline
was dropped over a non-empty strip since. Noted by NoteNcPipelineReset(), which
ResetNcPipeline() calls (a mission script's PowerReset(), a switch of the NC
runner – a brand or preset switch, a runner suit read – and a session ended with the strip kept); cleared with
the strip (ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>): the runtime reset, and the session begin that finds more stored
rows than positions). The pipeline's drop loses the played layers but not the strip, and the next file's
sentence indices start at 0 again while its steps go on from this count, so from here on the strip's steps were
built under more than one pipeline and the pieces of the layers cannot be matched to them by sentence index:
OptimizeNcFiles(string, string, ICuttingPara, IProgress<IMessage>, CancellationToken, ReadBulkDelegate<StepLuggage>, ReadBulkDelegate<StepBrief>) refuses while this is set
(OptimizeNc–StripSpansPipelineReset). The first drop's count stays: it is where the strip stopped being
one pipeline's.
public int? NcPipelineResetStepIndex { get; }
Property Value
- int?
OverloadRunFold
Folds the built steps into the runs of spindle and yielding-stress overload and records the step ranges of the reported rapid lines: the sparse tables the four step properties SpindleOverloadRevolutions, SpindleOverloadPeakRatio, YieldingStressOverloadRevolutions and IsRapidCut read (step coloring p08). Fed on the sequential post-physics stage beside RapidCutMonitor, flushed by the session at the start and the end of an outermost run, refolded at the end of a step-physics recompute, reset with the state.
public OverloadRunFold OverloadRunFold { get; }
Property Value
PhysicsNoneMonitor
Folds, over the built steps, what the session's two play-end warnings
ask of the physics results on the touched steps (Play-Physics–None,
Play-YieldingStress–None): the touched steps on a tool with a
flute envelope and whether one carries a result, and per tool whether
the yielding stress ratio ever evaluated. Fed on the sequential
post-physics stage beside RapidCutMonitor, read by the
session at the end of a play, reset with the state.
public PhysicsNoneMonitor PhysicsNoneMonitor { get; }
Property Value
RapidCutMonitor
Folds rapid-traverse steps that removed stock into one
Play-RapidCut–Detected warning per NC line. Fed on the
sequential post-physics stage, flushed by the session at the end of a
play, reset with the state.
public RapidCutMonitor RapidCutMonitor { get; }
Property Value
ResultSink
Internal Use Only. Where the sequential stage hands every step it publishes, as the step's record and its two briefs (AddMachiningStep(MachiningStepRecord), AddStepBrief(StepBrief), on the pump thread, inside the publish that also notes the step here), while a play is being recorded (the NC play result recording's P3); null, the default, records nothing. The host sets it between plays and clears it when the recording ends; the stage reads it at every publish. The strip positions and the syntax pieces do not pass through here: the recorder takes them off PosAdded and SyntaxPieceRan itself.
public IMachiningResultSink ResultSink { get; set; }
Property Value
ShellThreadStepIndex
The index the next ClStripPos gets: StripPosesCount, read on the thread that
plays the acts. A step's strip position is added on that thread as the step is issued, so at every act the count
is the index the next built step takes, and right after a built step it is that step's
StepTaskBundle.StepIndex + 1. It is the counter by which the runner anchors the step messages said outside a
step's own stages (a script's, a tool change's, a line end's), and by which the session and its host key what they
record per step: the steps a tool change's pose check scans, the selection anchors of
SessionShell.BeginSelection / EndSelection and the change points of the session's option maps. The
per-step stroke check anchors to the built step's own index (this count less one right after the step) or, for a
step act that built no step, to this count, on the SkippedStep yielded in its place. The tool change's
pose warning (ToolChange–UnsafePose) anchors to the last step of the change block that took a strip
position: the change step's own index, or, when the change step took none, this count less one as read when the
change act began.
A refused step adds no position. One issued after a stop, during a runtime reset or a dispose, or after the step pipeline failed is answered with a bundle on the index it would have taken, whose tasks are cancelled; one the licence refuses on a play that cannot pause is answered with none, and the act yields a SkippedStep. A message such a step reports is anchored to the index the next built step takes. A step the step pipeline did not accept keeps its position, with no step on it until the next reset.
Exact while one thread issues the steps and nothing resets the runtime under the act in progress. An act played
from another thread during a play interleaves its positions with the play's, so a count one thread read may name
a position the other thread's step takes (the session's host refuses an act from another thread while the player is locked or another thread plays NC -- IsPacedActAdmitted(); two acts from two threads while nothing plays are not kept apart, nor is a play that starts during an act; the runner itself does not gate); a runtime reset made from another thread during a play, running or
paused, is refused by the host too (LocalProjectService.ResetRuntime, ResetRuntime--Busy or ResetRuntime--BusyAnotherThread), and a reset the host admits -- its own, or a call between
runs -- clears the strip, so an index read before it names a position that is gone. Read off the playing thread -- by an exception reporter given to the
constructor, which background threads call -- it is the count of the steps submitted so far, ahead of any step a background fault belongs to.
public int ShellThreadStepIndex { get; }
Property Value
StateActRunner
Gets the state act runner. This property is provided as a member value getter and should not be modified.
public StateActRunner StateActRunner { get; }
Property Value
StepCapReached
Whether the licence's step cap in particular holds the play back: StepRefusal is CapReached.
public bool StepCapReached { get; }
Property Value
StepPhysicsChannelReader
Internal Use Only. The reader of the resident channels (StepPhysicsChannels) with the equipment and the tool house of the moment: what the plural strip charts poll and the color trees read, so that neither reads the step cache. Built on the first ask, one for the runner's lifetime; its spindle caches are dropped with the strip (ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>)) and by the host where it moves the inspecting-slot generation (Invalidate()).
public StepPhysicsChannelReader StepPhysicsChannelReader { get; }
Property Value
StepPhysicsChannels
The resident channels of the play: the per-step source quantities the plural strip charts read without a store read (StepPhysicsChannels), written as each step is published and by the step-physics recompute for the steps it rewrites, cleared with the strip (ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>)).
public StepPhysicsChannels StepPhysicsChannels { get; }
Property Value
StepRefusal
Why the licence holds the play back, None when it
does not: MachiningParallelProc.RunStep asked for a step and
ConsumeStep(int) refused it – the step cap reached, the cloud lease expired
or ended, the lease's step grant used up – which ReportStepCapReached(IProgress<IMessage>),
ReportLeaseEnded(IProgress<IMessage>) or ReportLeaseStepsExhausted(IProgress<IMessage>) said, once per kind of
refusal (MachiningStep–LicenseCapReached, MachiningStep–LicenseCapReachedUnverified,
MachiningStep–LeaseExpired, MachiningStep–LeaseEnded,
MachiningStep–LeaseStepsExhausted, MachiningStep–WeeklyQuotaExhausted,
MachiningStep–TrialGrantExhausted). A run the player drives pauses on the refused step and
asks for it again on a Resume (a run the lease paused is resumed by the lease restore,
PausedByLease); a play driven on the caller's thread cannot pause,
so every later step of it is refused without a word and MachiningSession.RunNcLines ends
that play on StepRefused. Cleared by the next granted step
(Hi.MachiningProcs.MachiningActRunner.StepNoLongerRefused(): the cap raised or released, the lease valid again, the grant
refilled), by the start of a run that finds a lease refusal no longer standing
(SayStepRefusalAgain(IProgress<IMessage>): the lease restored, or the grant refilled,
while the run was stopped) and by ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>), which also counts the steps
from zero again.
public StepRefusal StepRefusal { get; }
Property Value
StepRefused
Whether a licence refusal holds the play back: StepRefusal is not
None. The one flag the refusals – the step cap, the
cloud lease and its step grant – share: MachiningSession.RunNcLines breaks a caller-thread
play on it and keeps the play-end verdicts off a play it cut short.
public bool StepRefused { get; }
Property Value
ToolSectionTouchMonitor
Reports, per tool section, a tool that has removed nothing: on the step
its holder or shank hits the stock (Tool-NoRemoval–Collision) and
at the section's end when none of its steps touched
(Tool-Touch–None). Fed on the sequential post-physics stage
beside RapidCutMonitor, flushed by the session at the end
of a play, reset with the state.
public ToolSectionTouchMonitor ToolSectionTouchMonitor { get; }
Property Value
XyzabcMachineTool
Gets the current machining chain when it is an XYZABC machine tool; otherwise null.
public IXyzabcMachineTool XyzabcMachineTool { get; }
Property Value
Methods
AdjustAptCutterStlResolutionByNcResolutionAndWorkpieceResolution()
Adjusts the APT cutter STL resolution based on NC resolution and workpiece resolution. The derived value is runtime data: it is equipped by swapping the shaper and strut solids (SetShaperStlResolution(PolarResolution2d) / SetStrutStlResolution(PolarResolution2d)), never written onto the authored cutter. On the shipped configurations the derived value is constant within a play, so the repeated calls keep the same solid; with EnableMotionDependentMachiningResolution (an unshipped scripting switch, default false) the feed-derived value varies and each change swaps the solid — the mesh-rebuild cost is that mode's price.
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
disposingbool
ExpandToActMcStep(IAct, StepDiagnosticProgress)
Expands an act into machine control steps. An XYZABC contour is expanded
only on an IXyzabcMachineTool chain: its step count reads
the tool-tip travel through the machine kinematics, which is exactly what
no chain (the machine tool file unreadable, or never set) or a CL device
does not provide – the project's persisted NcKinematicsDependency
then wraps a null solver and throws on the first read – so the contour
passes through whole and ProcAct(IAct, MachiningSession, IMachiningService, ISentenceCarrier, CancellationToken, StepDiagnosticProgress) skips it with
McAct–ChainNotXyzabc, as it skips every machine-coordinate step
on such a chain.
public IEnumerable<IAct> ExpandToActMcStep(IAct act, StepDiagnosticProgress stepDiagnosticProgress)
Parameters
actIActThe act to expand.
stepDiagnosticProgressStepDiagnosticProgressProgress sink for cutter-location strip / per-step updates.
Returns
- IEnumerable<IAct>
A sequence of machine control steps.
ForgetPublishedStepValues()
Internal Use Only. Forgets the last published step's values (Hi.MachiningProcs.MachiningActRunner.LastPublishedStepValues): the host calls it when a play ended, so that a value written onto that step afterwards – a script's, a mapping's, a training's – is read from the store, as any other step's is, and never from a copy the runner kept.
public void ForgetPublishedStepValues()
GetMillingActRunner()
Gets the current milling act runner instance.
public MachiningActRunner GetMillingActRunner()
Returns
- MachiningActRunner
The current milling act runner instance.
NoteNcPipelineReset()
Internal Use Only. Notes that an initialised NC pipeline is being dropped: when the strip holds steps, its count is kept in NcPipelineResetStepIndex (an earlier note stays); over an empty strip there is nothing the next pipeline's steps could be confused with, and nothing is noted, nor once this runner is disposed. Safe from any thread: the count is read and the note made under the strip's clear lock, which a clear takes for writing, so a note never lands on a strip cleared after its count was read, and of two notes the first stays. Called by ResetNcPipeline() before the session's state is reset.
public void NoteNcPipelineReset()
ProcAct(IAct, MachiningSession, IMachiningService, ISentenceCarrier, CancellationToken, StepDiagnosticProgress)
Processes an act with the given parameters.
public IEnumerable<object> ProcAct(IAct act, MachiningSession machiningSession, IMachiningService host, ISentenceCarrier sourceCommand, CancellationToken cancellationToken, StepDiagnosticProgress stepDiagnosticProgress)
Parameters
actIActThe act to process.
machiningSessionMachiningSessionThe milling session.
hostIMachiningServiceThe milling step host.
sourceCommandISentenceCarrierThe source command.
cancellationTokenCancellationTokenThe cancellation token.
stepDiagnosticProgressStepDiagnosticProgressProgress sink for cutter-location strip / per-step updates.
Returns
- IEnumerable<object>
The objects the act yields, in order, for the session's loop to pace on and check: for each step the act plays, the collision result when the detection before the step found one (yielded before the step is submitted), then the bundle the step procedure answered – for a refused step one whose tasks are cancelled, on the index the step would have taken, or on the position it keeps when the step pipeline did not accept it – or a SkippedStep when it built none, then the act that played the step: the step act itself, each step act a contour or a CL move expands into, or the tooling act after its change step. A feedrate or spindle-speed act yields itself, as a tooling act without a change step does, unless the state runner drops it as a repeat of the state in force (ProcAct(IAct) answers null for it); then it yields nothing, as a pose without a step (a teleport), a line's begin or end, an NC-embedded script, a step act the chain cannot play (reported) and every other act (a dwell, a spindle direction or orientation, a coolant mode, a time stamp, row data, a skip) do. The act is played as the sequence is enumerated.
Remarks
An NC-embedded script runs on this thread, inside its act. A stop while it runs is seen at the next
play or act the script makes – its pace point throws the run's cancellation; so may a mapping the script
awaits, when the stop cancels it – and ends the script there with nothing reported; a script that comes up on
a run already stopped is not run, with nothing reported either. A script that throws on a live run is reported
on the step sink as Script-Run–Exception, with the exception's message as the notification and the
exception itself as the detail (a script's own OperationCanceledException included), and one that
does not compile as Script-Compile–Error; neither ends the play.
After a stop, the first act played outside a run (a script's act, a mission's act between two commands) waits for the stopped run's step pipeline first and finds the machine put back at the pose that run executed last, as the next run's start would (RunNcLines(INcRunner, string, IEnumerable<string>, CancellationToken)). The first teleport after a stop (ActClTeleport, ActMcXyzabcTeleport, ActToolingTeleport) also clears the step procedure's valve, which the alignment fed at that pose: the step after the teleport sweeps from the teleport's target, as a repositioning that cuts nothing.
ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>)
Resets the state and cutter location strip. The pose a run after a stop would start from goes with them: the next run starts where the chain stands after this reset (the host re-homes it with the reset), not where a stopped run left the machine.
public void ResetStateAndClStrip(StepDiagnosticProgress stepDiagnosticProgress, IProgress<IMessage> messageHost)
Parameters
stepDiagnosticProgressStepDiagnosticProgressThe step-aligned IMessage-channel sink.
messageHostIProgress<IMessage>Sink-agnostic IMessage host; injected by the caller, may be null outside a session.
ResetStepLuggageDb(StepDiagnosticProgress, IProgress<IMessage>)
Resets the milling step luggage database.
public void ResetStepLuggageDb(StepDiagnosticProgress stepDiagnosticProgress, IProgress<IMessage> messageHost)
Parameters
stepDiagnosticProgressStepDiagnosticProgressThe step-aligned IMessage-channel sink.
messageHostIProgress<IMessage>Sink-agnostic IMessage host; injected by the caller, may be null outside a session.
UpdateByMachiningChain()
Update By MachiningChain. Internal Use Only. Clears the step procedure's valve, the turn it remembers kept: the first motion after it starts from an empty window. After a stop, the next outermost run resets the valve and primes it at the pose that run starts from instead, so that its first step sweeps from there.
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()
WarnIfCurrentToolCutterGeometryUnreasonable(MachiningSession, StepDiagnosticProgress, int?)
Emit one-shot session ConfigurationErrors naming the root cause when the
currently equipped tool's MillingCutter has an unreasonable
upper-beam / shank geometry (see
ReportUpperBeamGeometryIssues(IProgress<IMessage>, object)) — e.g. an
ExtendedCylinder beam whose FullLength sits below the flute height.
The error's wording is the cutter's own literal emit, shared with the web API's
edit-time warnings, so the tool it belongs to rides in the detail payload.
Before this check, such a setting surfaced only as a per-step
NullReferenceException cascade inside the thermal physics, with nothing
naming the beam. Additionally emits a Cutter-Shank–ThermalModelUnavailable
ConfigurationWarning when the shank thermal model cannot be built while the
upper beam has no geometry issue (one that has is the one message, whatever else is
missing): no inner-beam profile, or a non-positive shank mass or volume on a cutter
whose upper beam has no ZR contour (none configured, or an empty or unloaded one: the
shank model is then built from the inner beam alone; with a contour, that cause is
the geometry error Cutter-Shank–ThermalLayersUnbuildable).
The warning is the once-per-tool announcement of the thermal kernels' silent per-step
shank fallback, which is deliberately quiet at the fallback site to avoid per-step
message flooding. Nothing is said of the shank model when the shank material is
missing (WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?) names the material) or
has a thermal constant not given (HasThermalConstants,
named by WarnIfThermalConstantsUnreasonable(MachiningSession, StepDiagnosticProgress, int?)): the tool's thermal step
is then skipped altogether. Gated by
EnablePhysics; deduped per tool reference
via WarnedCutterGeometryTools, mirroring
WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?) (same two emission points:
each IActTooling and BeginSession).
public void WarnIfCurrentToolCutterGeometryUnreasonable(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
WarnIfCurrentToolFluteCountZero(MachiningSession, StepDiagnosticProgress, int?)
Emit a one-shot session warning if the currently equipped
Hi.MachiningProcs.MachiningActRunner.MachiningEquipment.MachiningTool is a MillingCutter
whose flute count resolves to zero (a null or empty
Fluting). A zero flute count silently
poisons the physics chain with nothing naming the tool: feed-per-tooth
divides by zero, the force side fills vec3d_t.NaN for every rotation
division and the thermal side returns null. Gated by
EnablePhysics; deduped per tool reference via
WarnedFluteCountZeroTools, mirroring
WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?) (same two emission points:
each IActTooling and BeginSession).
public void WarnIfCurrentToolFluteCountZero(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?)
Emit a one-shot session warning if the currently equipped
Hi.MachiningProcs.MachiningActRunner.MachiningEquipment.MachiningTool is a MillingCutter
without a FluteMaterial. Gated by
EnablePhysics; deduped per tool reference via
WarnedFluteMaterialMissingTools so each offending
tool is mentioned at most once per session. Pass toolId when
known (e.g. from an IActTooling) and the warning will name the ID;
omit it (the BeginSession path) and the warning falls back to “the currently
equipped tool” — the equipped tool may have been set externally and not appear
in MachiningToolHouse, so reverse-looking up an ID is unreliable
and reference equality is the right unit of dedup anyway. The shank material is
named too when it is not there: a file that could not be read
(Tool-ShankMaterial–Unreadable, whatever the flute's state — a solid-end
cutter whose flute file could not be read keeps the shank's own reference —
deduped by the file, see WarnedUnreadableMaterialFiles),
or none set (Tool-ShankMaterial–Missing, deduped per tool reference via
WarnedShankMaterialMissingTools) while the flute's is
there, or on an insert-end cutter, whose shank a flute-material load does not set
(a solid-end cutter without its flute material is the flute warning's alone). The
tool's thermal step is skipped either way, and no shank-model message is said of it
(WarnIfCurrentToolCutterGeometryUnreasonable(MachiningSession, StepDiagnosticProgress, int?)).
public void WarnIfCurrentToolFluteMaterialMissing(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
WarnIfCurrentToolShaperProfileInconsistent(MachiningSession, StepDiagnosticProgress, int?)
Emit the one-shot session message naming an APT shaper profile that does not
agree with itself on the currently equipped tool's MillingCutter
(see ReportShaperProfileIssues(IProgress<IMessage>, object)): a
Cutter-ShaperProfile–AptRefused ConfigurationError when the APT
refuses its geometry (no flute envelope: the tool removes no material and runs
no cutting physics); an APT that agrees within the tolerance is snapped silently. The
message's wording is the cutter's own literal emit, shared with the web API's
edit-time warnings, so the tool it belongs to rides in the detail payload.
Not gated by EnablePhysics — the flute
envelope matters to the geometry play without physics; deduped per tool
reference via WarnedShaperProfileTools, mirroring
WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?) (same two emission points:
each IActTooling and BeginSession).
public void WarnIfCurrentToolShaperProfileInconsistent(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
WarnIfCurrentToolStickConvexUnavailable(MachiningSession, StepDiagnosticProgress, int?)
Emit the one-shot session Cutter-StickConvex–Unavailable ConfigurationError
when, in cloud mode (CloudTokenProvider set), the cloud licence
server did not provide the cutting shape – the stick convex – of the currently equipped
tool's AptProfile (GetInitStickConvex(out string)): the
tool then removes no material (MachiningVolumeRemovalProc.StepGetGeomBoolCache takes
the “no removal” cache, never the triangle sweep – the owner, 2026-10-01) until the shape is
fetched. This warn point IS the fetch: it is the first ask for the shape after a tool change,
so it blocks the shell thread for at most the cloud client's stick-convex timeout once per
uncached shape, and the step's subtraction task then finds the profile's cache. Nothing is
done in Sentinel mode (no provider: hi-key builds the shape at the first step, as before),
without a MillingCutter, without an APT, or for an APT that refuses its geometry
(WarnIfCurrentToolShaperProfileInconsistent(MachiningSession, StepDiagnosticProgress, int?) names that, and the provider is
never asked for it). The message is deduped per tool reference via
WarnedStickConvexTools, mirroring
WarnIfCurrentToolFluteMaterialMissing(MachiningSession, StepDiagnosticProgress, int?) (same two emission points: each
IActTooling and BeginSession); the fetch itself runs on
every call, so a tool change after the server is back gets the shape without a word.
public void WarnIfCurrentToolStickConvexUnavailable(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
WarnIfThermalConstantsUnreasonable(MachiningSession, StepDiagnosticProgress, int?)
Emit one-shot session warnings naming a material whose thermal constants the
thermal model cannot use as they are (see
ReportThermalConstantIssues(IStructureMaterial, string, IProgress<IMessage>, object)): a
conductivity, density or specific heat that is not given — NaN, the reading of
a material file without the element, no default standing in
(Material-ThermalConstants–NotGiven: the thermal step is then skipped for
the tool, or for every tool when it is the workpiece material's, as for a
missing material, and the temperatures and the wear stay where the tool change
left them) — one that is not a finite positive number
(Material-ThermalConstants–NotFinitePositive), or one outside the range
of a solid, a unit slip (Material-ThermalConstants–OutOfRange) — and,
for a cutter material the thermal chain reads the wear curves of (the flute's
and each coating layer's, never the shank's), the curves not given
(Material-WearCurves–NotGiven,
ReportWearCurvesNotGiven(CutterMaterial, string, IProgress<IMessage>, object)): the native
thermal session does not model the tool, which the play says once as
Physics-Thermal–ModelUnavailable; the emission points, the dedup and the
re-arm below are the thermal constants'. The
materials are the ones the chain reads for the equipped tool — every coating
layer's, the flute's and the shank's, one warning per material content naming
all its roles; only for a tool with a flute envelope (a milling cutter whose APT
does not refuse its geometry: the chain reads none of them for a tool without
one) — on the step-anchored
channel like the other tool warnings, and the workpiece's, whatever tool is
equipped, on the session's shell (ShellProgress)
beside the session begin's other workpiece inputs. Nothing in the chain
validates a given value: an odd number of negative constants in the cutter's outermost
layer turns the cutter temperatures into NaN until the next tool change (in the
workpiece, again on the first contact after every tool change), a factor of
1000 keeps the cutter from heating, and neither says anything at the step. Gated by
EnablePhysics. Deduped per owner (the
tool as named here, or the workpiece) and content via
WarnedThermalConstantMaterials: every tool that
carries a bad material is named, a tool or the workpiece once, and again once an
edit gives the material other values. Three emission points: each
IActTooling that changes the tool, BeginSession,
and the start of each play (RunNcLines(INcRunner, string, IEnumerable<string>, CancellationToken)) — a
program that mounts the tool the last play ended with changes no tool, so an
edit made between the two plays is named there. Without
toolId the tool is named by the state runner's tool id when
the tool house holds the equipped tool under it (a replay's), else as the
currently equipped tool (the session begin's copy).
public void WarnIfThermalConstantsUnreasonable(MachiningSession machiningSession, StepDiagnosticProgress stepDiagnosticProgress, int? toolId = null)
Parameters
machiningSessionMachiningSessionstepDiagnosticProgressStepDiagnosticProgresstoolIdint?
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, once the step's sequential physics stage has run to completion: the step is null when the stage saw the stop or caught its own exception, and a step whose stage was cancelled by a stop, or faulted, is not posted at all. This is for internal use only.
public event Action<MachiningStep> UiPostStepAction