Class MillingToolPhysicsPack
- Namespace
- Hi.Milling.MillingTools
- Assembly
- HiMech.dll
The scalar physics derivations of one tool (and one cutting-parameter set), computed
once on a sequential boundary and frozen. The per-step force build, the sequential
physics, and the step/shot writers read these values thousands to millions of times
per play; the tool and cutter objects themselves expose them as deliberately
uncached pure computations, so hot session paths read this pack instead —
callers outside a session simply pass null and the pure computation runs on
use. Owned per session by MachiningSession, keyed by tool id. A pack is never
updated in place: the paths that change tool/cutter/para state invalidate the
session's packs explicitly (run-op start, tool change — see
MachiningSession.InvalidateToolPhysicsPacks), and IsStaleFor(IMachiningTool, ICuttingPara)
re-keys on object replacement.
public sealed record MillingToolPhysicsPack : IEquatable<MillingToolPhysicsPack>
- Inheritance
-
MillingToolPhysicsPack
- Implements
- Inherited Members
- Extension Methods
Constructors
MillingToolPhysicsPack(IMachiningTool, ICuttingPara, double, double, double, double, double, CutterBeamCompliance, double, double, double)
The scalar physics derivations of one tool (and one cutting-parameter set), computed
once on a sequential boundary and frozen. The per-step force build, the sequential
physics, and the step/shot writers read these values thousands to millions of times
per play; the tool and cutter objects themselves expose them as deliberately
uncached pure computations, so hot session paths read this pack instead —
callers outside a session simply pass null and the pure computation runs on
use. Owned per session by MachiningSession, keyed by tool id. A pack is never
updated in place: the paths that change tool/cutter/para state invalidate the
session's packs explicitly (run-op start, tool change — see
MachiningSession.InvalidateToolPhysicsPacks), and IsStaleFor(IMachiningTool, ICuttingPara)
re-keys on object replacement.
public MillingToolPhysicsPack(IMachiningTool Tool, ICuttingPara Para, double SpindleMountToToolTipLength, double ObservationHeightFromToolTip, double EffectiveCuttingDiameter_mm, double BendingPara_umdN, double ZDeflectionPara_umdN, CutterBeamCompliance BeamCompliance, double FakeRakeAngle_rad, double MinimumUncutChipThickness_mm, double SetupAngle_rad)
Parameters
ToolIMachiningToolThe tool the pack was built from.
ParaICuttingParaThe cutting-parameter set the para-dependent members were built from (may be null).
SpindleMountToToolTipLengthdoubleObservationHeightFromToolTipdoubleSee ObservationHeightFromToolTip; NaN when the tool is not a MillingTool.
EffectiveCuttingDiameter_mmdoubleSee EffectiveCuttingDiameter_mm; NaN without a MillingCutter.
BendingPara_umdNdoubleSee ExposedCutterBendingPara_umdN; NaN when the deflection geometry is degenerate (the pure getter throws there instead — the pack stays buildable so geometry-only paths keep working).
ZDeflectionPara_umdNdoubleThe pair member of
BendingPara_umdN— see ExposedCutterZDeflectionPara_umdN.BeamComplianceCutterBeamComplianceThe cutter beam's compliance as a function of the height its load sits at — see GetBeamCompliance(); the two scalars above are its tip values. Null when the cutter has no beam to state (no beam material, no exposed height, degenerate inner-beam geometry) — the scalars are NaN then.
FakeRakeAngle_raddoubleThe simplified (side/bottom averaged) rake angle; NaN without a MillingCutter.
MinimumUncutChipThickness_mmdoubleSetupAngle_raddoubleSee SetupAngle_rad; 0 when the tool is not a MillingTool. Frozen here, not read when the native session is built later, so the angle the force kernel uses is the one the session recorded when it built this pack.
Properties
BeamCompliance
The cutter beam's compliance as a function of the height its load sits at — see GetBeamCompliance(); the two scalars above are its tip values. Null when the cutter has no beam to state (no beam material, no exposed height, degenerate inner-beam geometry) — the scalars are NaN then.
public CutterBeamCompliance BeamCompliance { get; init; }
Property Value
BendingPara_umdN
See ExposedCutterBendingPara_umdN; NaN when the deflection geometry is degenerate (the pure getter throws there instead — the pack stays buildable so geometry-only paths keep working).
public double BendingPara_umdN { get; init; }
Property Value
EffectiveCuttingDiameter_mm
See EffectiveCuttingDiameter_mm; NaN without a MillingCutter.
public double EffectiveCuttingDiameter_mm { get; init; }
Property Value
FakeRakeAngle_rad
The simplified (side/bottom averaged) rake angle; NaN without a MillingCutter.
public double FakeRakeAngle_rad { get; init; }
Property Value
MinimumUncutChipThickness_mm
public double MinimumUncutChipThickness_mm { get; init; }
Property Value
ObservationHeightFromToolTip
See ObservationHeightFromToolTip; NaN when the tool is not a MillingTool.
public double ObservationHeightFromToolTip { get; init; }
Property Value
Para
The cutting-parameter set the para-dependent members were built from (may be null).
public ICuttingPara Para { get; init; }
Property Value
SetupAngle_rad
See SetupAngle_rad; 0 when the tool is not a MillingTool. Frozen here, not read when the native session is built later, so the angle the force kernel uses is the one the session recorded when it built this pack.
public double SetupAngle_rad { get; init; }
Property Value
SpindleMountToToolTipLength
public double SpindleMountToToolTipLength { get; init; }
Property Value
Tool
The tool the pack was built from.
public IMachiningTool Tool { get; init; }
Property Value
ZDeflectionPara_umdN
The pair member of BendingPara_umdN — see ExposedCutterZDeflectionPara_umdN.
public double ZDeflectionPara_umdN { get; init; }
Property Value
Methods
Build(IMachiningTool, ICuttingPara)
Builds a pack from the tool's (and cutter's) pure computations. Call on a sequential boundary (session/play start, tool change) or ad hoc from a no-session caller that wants the values bundled.
public static MillingToolPhysicsPack Build(IMachiningTool tool, ICuttingPara para)
Parameters
toolIMachiningToolThe tool to derive from; null yields null.
paraICuttingParaThe cutting-parameter set for the para-dependent members; may be null.
Returns
- MillingToolPhysicsPack
The frozen pack, or null when
toolis null.
IsStaleFor(IMachiningTool, ICuttingPara)
Whether this pack was built from different objects than the live ones — a
replaced tool under the same id, or a swapped cutting para. In-place edits are
not detected here; they are covered by the explicit invalidation points
(MachiningSession.InvalidateToolPhysicsPacks).
public bool IsStaleFor(IMachiningTool tool, ICuttingPara para)
Parameters
toolIMachiningToolThe live tool to compare against.
paraICuttingParaThe live cutting-parameter set to compare against.
Returns
- bool
True when the pack must be rebuilt.