Table of Contents

Class MachiningEquipmentUtil

Namespace
Hi.Machining.MachiningEquipmentUtils
Assembly
HiMech.dll

Utility methods for working with machining equipment.

public static class MachiningEquipmentUtil
Inheritance
MachiningEquipmentUtil
Inherited Members

Methods

AlignWorkpieceProgramZeroToIso(IMachiningEquipment, Vec3d)

Places Fixture under the kinematic chain so that ProgramZeroAnchor coincides with the world position the spindle reaches when the machine coordinate equals isoOffset (a G54/G55/… entry).

Other anchors (FixtureBuckle, ProgramZeroAnchor, WorkpieceBuckle) must already be at their intended geometric positions (typically via the buckle “general rule”: bottom/top centers of geom). Only GeomToTableTransformer is mutated.

Returns the assigned translation, or null when workpiece / fixture / Xyzabc machine tool is missing.

The alignment is computed in the machine-coordinate (MC) zero state: the assembly is reflected and every IDynamicRegular axis is set to Step = 0 before querying displacements. The live equipment may have its axes moved, which would otherwise distort the ToolBuckle -> FixtureTableBuckle leg (it crosses the X/Y/Z/A/B/C axes) and break the vector-chain assumption that the legs share a common orientation — isoOffset is itself an MC-zero quantity.

public static Vec3d AlignWorkpieceProgramZeroToIso(this IMachiningEquipment equipment, Vec3d isoOffset)

Parameters

equipment IMachiningEquipment
isoOffset Vec3d

Returns

Vec3d

GetIsoCoordinatePosition(IMachiningEquipment, Vec3d)

Get ISO coordinate position from the g54seriesOffset.

public static Vec3d GetIsoCoordinatePosition(this IMachiningEquipment equipment, Vec3d g54seriesOffset)

Parameters

equipment IMachiningEquipment
g54seriesOffset Vec3d

Returns

Vec3d

GetMachinePositionAtProgramZero(IMachiningEquipment)

Gets the machine coordinate when the attacher is at program zero. The machine coordinate are all assumed to be zero.

public static Vec3d GetMachinePositionAtProgramZero(this IMachiningEquipment equipment)

Parameters

equipment IMachiningEquipment

The machining equipment.

Returns

Vec3d

The machine coordinate vector.

GetMachinePositionAtTableBuckleZero(IMachiningEquipment)

Gets the machine coordinate when the attacher is at table buckle zero.

public static Vec3d GetMachinePositionAtTableBuckleZero(this IMachiningEquipment equipment)

Parameters

equipment IMachiningEquipment

The machining equipment.

Returns

Vec3d

The machine coordinate vector.

GetProgramToPnMat4d(IMachiningEquipment)

Gets the rigid transform that maps a point in program (workpiece) coordinates — the ProgramZeroAnchor frame — into the kinematic Pn frame (the chain's table-buckle anchor frame that XyzabcSolver solves in).

Both anchors live on the same rigid table-side subtree (the table-buckle→fixture→workpiece leg crosses no machine axis), so the transform is pose-independent and is queried on the live assembly — no MC-zero reflection needed (this runs per parsed motion block; a whole-assembly TopoReflection clone here would dominate large-file parse time). Falls back to identity (program frame ≡ table-buckle frame) when the workpiece has no ProgramZeroAnchor; returns null when the chain has no table buckle.

public static Mat4d GetProgramToPnMat4d(this IMachiningEquipment equipment)

Parameters

equipment IMachiningEquipment

The machining equipment.

Returns

Mat4d

The program→Pn transform, or null.