Struct SubstractionBrief
- Namespace
- Hi.MachiningSteps
- Assembly
- HiMech.dll
The removal scalars of one MachiningStep, kept inline on the step: whether
the cutter touched the stock, the axial cutting depth, the plural-filtered radial width,
the material removal rate, and the tri-state of the step's force brief as the wire
format's tag byte. Built once by the step pipeline's parallel physics stage from the
substraction and the force stage's result; the two briefs themselves are not on the step
— they live in the step cache (TryGetMillingForceBrief(out MillingForceBrief),
TryGetSeqPhysicsState(out SeqPhysicsState)), and this struct is what the step
keeps of the physics so that “did the cutter touch” and “did the physics run” are
answered without a store read (the brief-into-DB chain's C4b, which folded the former
MillingInstance object into the step). Until the brief family cleanup of
2026-10-27 the struct kept the contact contours' bounding box on the tool running
coordinate (56 bytes a step), which the product read only as its Z extent, the cutting
depth: the depth is stored in its place (CuttingDepth_mm). Persisted as
one 27-byte record (WriteBin(BinaryWriter), SubstractionBrief(BinaryReader)).
public readonly struct SubstractionBrief : IWriteBin
- Implements
- Inherited Members
- Extension Methods
Constructors
SubstractionBrief(BinaryReader)
Reads the record WriteBin(BinaryWriter) wrote. The version byte is judged before a byte of the payload is read, the tag byte before the doubles.
public SubstractionBrief(BinaryReader reader)
Parameters
readerBinaryReaderThe reader positioned at the record's first byte.
Exceptions
- InvalidDataException
The record's version is not this build's, or its tag byte is none of the three states.
- EndOfStreamException
The stream ends inside the record.
Fields
WireVersion
The first byte of the record WriteBin(BinaryWriter) writes: its version. A record of another version is refused by SubstractionBrief(BinaryReader) before a byte of its payload is read. Version 1 (until 2026-10-27) carried the contact bounding box as a presence byte and six doubles, 68 bytes a record; version 2 carries the cutting depth in its place. No shipped build wrote a version-1 result file (the result recording's store landed after the 3.2.54 package), so a version-1 record is refused like any other. Public for the result recording's amender (HiNc, which reads no internal member): it checks a step payload's record for this version before it writes the tag byte into it.
public const byte WireVersion = 2
Field Value
Properties
CuttingDepth_mm
The axial depth in mm: the Z extent of the contact contours' bounding box on the tool running coordinate, read when the parallel physics stage built the step; 0 on a step without contact contours.
public double CuttingDepth_mm { get; }
Property Value
CuttingWidth_mm
The radial width in mm. The value may not equal the contours' extent: it has been filtered by the plural method, and is for human viewing.
public double CuttingWidth_mm { get; }
Property Value
HasMillingForceBrief
Whether the physics ran on this step: the force brief is a no-cut or a computed record, not the null one. Read off the tri-state byte, not the brief; the readers that ask “did the physics run” — the play-end warnings, the NC optimization's force constraint, the step-physics recompute's classification — ask here.
public bool HasMillingForceBrief { get; }
Property Value
IsTouched
Whether the tool is touching the workpiece on this step. On a step that draws an APT cutter back
up its own axis under a motion resolution other than FixedMachiningMotionResolution, only a
contact deeper than 0.001 mm counts: a shallower graze, such as a program's decimals leave along
the retract, is no touch and removes nothing (the native axial-retract gate).
public bool IsTouched { get; }
Property Value
MillingForceBriefTag
Internal Use Only. The tri-state of the step's force brief as the wire format's tag
byte — the one definition of the three states is MillingForceBrief.WireTagOf: 0
for no brief (the physics did not run on the step), 1 for the no-cut record, 2 for a
computed brief. Written with the brief by the force stage, replaced with it by the
step-physics recompute (WithMillingForceBriefTag). Public for the result
recording's store, whose tri-state status column maps this byte (the store lives in
HiNc, which reads no internal member); a reader that asks “did the physics run” asks
HasMillingForceBrief.
public byte MillingForceBriefTag { get; }
Property Value
Mrr_mm3ds
The material removal rate in cubic millimeters per second: 0 on an untouched step, NaN when it could not be built (no feedrate, no contours).
public double Mrr_mm3ds { get; }
Property Value
None
A step with no removal result: untouched, no physics, a depth and a width of 0 and an MRR that was never built (NaN) — the scalars of a step built outside the pipeline.
public static SubstractionBrief None { get; }
Property Value
Methods
WriteBin(BinaryWriter)
Writes the scalars as one 27-byte record: the version byte, IsTouched (one byte), MillingForceBriefTag, then CuttingDepth_mm, CuttingWidth_mm and Mrr_mm3ds. Doubles are their raw bits, so the NaN of an MRR that was never built, NaN payloads and signed zeros survive.
public void WriteBin(BinaryWriter writer)
Parameters
writerBinaryWriterThe writer to write to.