Class PhysicsNoneMonitor
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
Folds, over the built steps of a play, what the session's two play-end warnings ask of the physics results on the steps that touched the workpiece:
Play-Physics--None— how many touched steps ran on a tool with a flute envelope (the tools the physics runs on by their kind,MachiningParallelProc.HasFluteEnvelope), and whether at least one of them carries a physics result (a no-cut or a computed MillingForceBrief, not the null one: HasMillingForceBrief).Play-YieldingStress--None— per tool, on how many touched steps with a result the yielding stress ratio was evaluated and on how many it was NaN; a tool NaN on every such step is named (ToolsWhoseYieldingStressWasNeverEvaluated).
WarnIfPhysicsNeverProducedOnTouch, WarnIfYieldingStressNeverEvaluatedOnTouch),
which read the accumulators at the end of the play.
Why: until the brief-into-DB chain's C2 (2026-10-06) the session scanned
every strip step at the end of the play and read each step's resident
force brief. The two briefs left the per-step heap in that chain's C4b (they
live in the step cache DB), and a play-end scan would read the DB once per
step. Folded here, on the sequential post-physics stage as each step is
published, the two questions are answered while the step's result is in
hand: "did the physics run" off the tri-state byte the step keeps
(HasMillingForceBrief), the ratio off the brief
the force stage just built. The fold sees exactly the steps the scan saw — the steps
attached to a strip position: sampled before the publish and folded in its
finally, so a step whose publish throws (published, reported as
Step--Exception) is folded too, and a step whose stage throws before
the publish is neither. A step's touch, tool and ratio do not change after
its force stage (the extension that carries the ratio is built there,
before the seq stage); the one thing that rewrites a published step's
brief is the step-physics recompute, which can land on a paused play and
be read out at that play's end — so the counters are retractable, and the
recompute Replace(in Sample, in Sample)s the sample of every step whose brief it
rewrites.
One instance per MachiningActRunner. Observe(in Sample) runs on the sequential post-physics stage of every built step (one thread, step order); Replace(in Sample, in Sample) runs on whichever thread drives the recompute — the player thread on the paced path, which parks the play for the recompute, or the caller's thread on the direct entry, whose contract is to be the player thread or to run while no play is live; the session reads the accumulators on the shell thread after WaitAll(), and Reset() forgets everything on a session reset, on that thread too. One private lock serialises all of them — uncontended on every step of a play — so a caller that breaks the direct entry's contract cannot corrupt the tallies.
public sealed class PhysicsNoneMonitor
- Inheritance
-
PhysicsNoneMonitor
- Inherited Members
- Extension Methods
Properties
AnyTouchedStepWithResult
Whether at least one of the TouchedStepsWithFluteEnvelope carries a physics result — a healthy play, whatever the count.
public bool AnyTouchedStepWithResult { get; }
Property Value
ToolsWhoseYieldingStressWasNeverEvaluated
The tools whose yielding stress ratio was NaN on every touched step that carries a result, ascending; empty when every such tool evaluated the ratio at least once, or no step carried a result. The ratio's evaluability is a per-tool geometry and material property (GetYieldingStressRatio(IMachiningTool)), so a tool either always evaluates or never does.
public List<int> ToolsWhoseYieldingStressWasNeverEvaluated { get; }
Property Value
TouchedStepsWithFluteEnvelope
Touched steps on a tool with a flute envelope: the steps
Play-Physics–None counts and names.
public int TouchedStepsWithFluteEnvelope { get; }
Property Value
Methods
Observe(in Sample)
Feeds one built step, in step order. An untouched step counts nowhere; a touched one on a tool with a flute envelope is counted, and with a result marks the play healthy; a touched one with a result and a ratio counts toward its tool's evaluated or NaN steps.
public void Observe(in PhysicsNoneMonitor.Sample sample)
Parameters
samplePhysicsNoneMonitor.SampleThe step, see SampleOf(MachiningStep, IMachiningTool, MillingForceBrief).
Replace(in Sample, in Sample)
The step-physics recompute rewrote a published step's brief: the step as it was observed goes out, the step with its new brief comes in — so that a recompute on a paused play is read out at that play's end with the answer a scan of the strip would give.
public void Replace(in PhysicsNoneMonitor.Sample observed, in PhysicsNoneMonitor.Sample rewritten)
Parameters
observedPhysicsNoneMonitor.SampleThe step as Observe(in Sample) took it, with the brief it had.
rewrittenPhysicsNoneMonitor.SampleThe step with its new brief.
Reset()
Session reset: forgets the counts and both per-tool tallies.
public void Reset()
Retract(in Sample)
Takes one observed step back out of the fold — the sample exactly as Observe(in Sample) took it; the step-physics recompute's half of Replace(in Sample, in Sample).
public void Retract(in PhysicsNoneMonitor.Sample sample)
Parameters
samplePhysicsNoneMonitor.SampleThe step as it was observed.
SampleOf(MachiningStep, IMachiningTool, MillingForceBrief)
Builds the fold's view of a built step.
public static PhysicsNoneMonitor.Sample SampleOf(MachiningStep step, IMachiningTool tool, MillingForceBrief brief)
Parameters
stepMachiningStepA built step.
toolIMachiningToolThe step's tool as the force stage resolves it (GetMachiningTool(MachiningToolHouse) on the runner's tool house, which caches the tool it found on the motion step); null when the step ran tool-less.
briefMillingForceBriefThe step's force brief as the force stage built it (the one on the parallel-physics result; in the recompute, the stored one being replaced – sampled before the step's tri-state byte is replaced, so the sample is the one the play folded – or its replacement, sampled after); null when the physics did not run.