Table of Contents

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, 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 SpindleBuckleToToolTipLength, double ObservationHeightFromToolTip, double EffectiveCuttingDiameter_mm, double BendingPara_umdN, double ZDeflectionPara_umdN, double FakeRakeAngle_rad, double MinimumUncutChipThickness_mm)

Parameters

Tool IMachiningTool

The tool the pack was built from.

Para ICuttingPara

The cutting-parameter set the para-dependent members were built from (may be null).

SpindleBuckleToToolTipLength double

See SpindleBuckleToToolTipLength.

ObservationHeightFromToolTip double

See ObservationHeightFromToolTip; NaN when the tool is not a MillingTool.

EffectiveCuttingDiameter_mm double

See EffectiveCuttingDiameter_mm; NaN without a MillingCutter.

BendingPara_umdN double

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).

ZDeflectionPara_umdN double

The pair member of BendingPara_umdN — see ExposedCutterZDeflectionPara_umdN.

FakeRakeAngle_rad double

The simplified (side/bottom averaged) rake angle; NaN without a MillingCutter.

MinimumUncutChipThickness_mm double

See GetMinimumUncutChipThickness_mm(ICuttingPara) for Para.

Properties

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

double

EffectiveCuttingDiameter_mm

public double EffectiveCuttingDiameter_mm { get; init; }

Property Value

double

FakeRakeAngle_rad

The simplified (side/bottom averaged) rake angle; NaN without a MillingCutter.

public double FakeRakeAngle_rad { get; init; }

Property Value

double

MinimumUncutChipThickness_mm

public double MinimumUncutChipThickness_mm { get; init; }

Property Value

double

ObservationHeightFromToolTip

See ObservationHeightFromToolTip; NaN when the tool is not a MillingTool.

public double ObservationHeightFromToolTip { get; init; }

Property Value

double

Para

The cutting-parameter set the para-dependent members were built from (may be null).

public ICuttingPara Para { get; init; }

Property Value

ICuttingPara

SpindleBuckleToToolTipLength

public double SpindleBuckleToToolTipLength { get; init; }

Property Value

double

Tool

The tool the pack was built from.

public IMachiningTool Tool { get; init; }

Property Value

IMachiningTool

ZDeflectionPara_umdN

The pair member of BendingPara_umdN — see ExposedCutterZDeflectionPara_umdN.

public double ZDeflectionPara_umdN { get; init; }

Property Value

double

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

tool IMachiningTool

The tool to derive from; null yields null.

para ICuttingPara

The cutting-parameter set for the para-dependent members; may be null.

Returns

MillingToolPhysicsPack

The frozen pack, or null when tool is 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

tool IMachiningTool

The live tool to compare against.

para ICuttingPara

The live cutting-parameter set to compare against.

Returns

bool

True when the pack must be rebuilt.