Table of Contents

Class MachineMotionStep

Namespace
Hi.MachiningSteps
Assembly
HiMech.dll

MachiningStep has spindle information. Note that the spindle information is only for milling behavior.

public class MachineMotionStep : IGetFeedrate, IGetSpindleSpeed
Inheritance
MachineMotionStep
Implements
Inherited Members
Extension Methods

Constructors

MachineMotionStep(MachineMotionStep)

Initializes a new instance of the MachineMotionStep class by copying from another instance.

public MachineMotionStep(MachineMotionStep src)

Parameters

src MachineMotionStep

The source machining step to copy from.

MachineMotionStep(TimeSpan, TimeSpan, double, double[], double, double, SpindleDirection, CoolantMode, int, Mat4d, Mat4d, SeqPair<Mat4d>)

Initializes a new instance of the MachineMotionStep class with specified parameters.

public MachineMotionStep(TimeSpan stepDuration, TimeSpan accumulatedTime, double beginSpindleAngle_rad, double[] mcValues, double commandedClFeedrate_mmds, double spindleSpeed_radds, SpindleDirection spindleDirection, CoolantMode coolantMode, int toolId, Mat4d programZeroToWorkpieceGeomToMat4d, Mat4d workpieceGeomToProgramZeroMat4d, SeqPair<Mat4d> seqOnWorkpieceGeomCoordinate)

Parameters

stepDuration TimeSpan

The duration of this step.

accumulatedTime TimeSpan

The accumulated time up to this step.

beginSpindleAngle_rad double

The initial spindle angle in radians.

mcValues double[]

The machine coordinate values.

commandedClFeedrate_mmds double

The controller's commanded CL feedrate in millimeters per second.

spindleSpeed_radds double

The spindle speed in radians per second.

spindleDirection SpindleDirection

The direction of spindle rotation.

coolantMode CoolantMode

The coolant delivery mode active for this step.

toolId int

The ID of the tool being used.

programZeroToWorkpieceGeomToMat4d Mat4d

The transformation matrix from program zero to workpiece geometry.

workpieceGeomToProgramZeroMat4d Mat4d

The transformation matrix from workpiece geometry to program zero.

seqOnWorkpieceGeomCoordinate SeqPair<Mat4d>

The sequence of transformations on workpiece geometry coordinate.

Properties

ActualTipFeedrate_mmds

The equipped tool's real tip feedrate over this step in millimeters per second: the tip's displacement relative to the workpiece from the previous step's pose to this one, over StepDuration. This is the feedrate the cut experiences. It equals CommandedClFeedrate_mmds whenever the tip translates with the controller's CL point (XYZ moves, CL files, RTCP with the tool-length offset of the equipped tool) and differs when the two decouple: under RTCP with an offset that does not describe the equipped tool the tip sweeps with the posture change while the CL point may stand still. Initialised to the commanded value; the step builder assigns the measured one (MeasureActualTipFeedrate_mmds(Vec3d, Vec3d, TimeSpan, bool, double)) and keeps the commanded value where no tip speed is defined. Physics reads this value: GetFeedPerTooth_mm(IMachiningTool), FeedPerCycle_mm, the force step and the MRR. Presented to clients as ActualTipFeedrate_mmdmin.

public double ActualTipFeedrate_mmds { get; set; }

Property Value

double

BeginSpindleAngle_deg

Begin spindle rotation angle. in deg;

public double BeginSpindleAngle_deg { get; set; }

Property Value

double

BeginSpindleAngle_rad

Begin spindle rotation angle. in rad;

public double BeginSpindleAngle_rad { get; set; }

Property Value

double

BeginTimecode

The work time at the begin of the step.

public TimeSpan BeginTimecode { get; }

Property Value

TimeSpan

CdnTransformProgramToToolRunning

Gets the transformation matrix from program to tool running coordinate.

public Mat4d CdnTransformProgramToToolRunning { get; }

Property Value

Mat4d

CdnTransformProgramToWorkpieceGeom

Gets the transformation matrix from program zero to workpiece geometry.

public Mat4d CdnTransformProgramToWorkpieceGeom { get; }

Property Value

Mat4d

CdnTransformToolRunningToProgram

Gets the transformation matrix from tool running to program coordinate.

public Mat4d CdnTransformToolRunningToProgram { get; }

Property Value

Mat4d

CdnTransformToolRunningToWorkpieceGeom

Tool running coordinate to workpiece geom coordinate.

public Mat4d CdnTransformToolRunningToWorkpieceGeom { get; }

Property Value

Mat4d

CdnTransformWorkpieceGeomToProgram

Gets the transformation matrix from workpiece geometry to program zero.

public Mat4d CdnTransformWorkpieceGeomToProgram { get; }

Property Value

Mat4d

CdnTransformWorkpieceGeomToToolRunning

Gets the transformation matrix from workpiece geometry to tool running coordinate.

public Mat4d CdnTransformWorkpieceGeomToToolRunning { get; }

Property Value

Mat4d

CommandedClFeedrate_mmds

The controller's commanded feedrate of the CL point in millimeters per second (CommandedClFeedrate_mmds at the time of the step): the F word after G94/G95/G93 conversion, or for a rapid the CL path over the act duration. It is not the equipped tool's real tip feedrate: under RTCP with a tool-length offset that does not match the equipped tool the tip sweeps while the CL point may stand still; the tip's own feedrate is ActualTipFeedrate_mmds. Presented to clients as Feedrate_mmdmin.

public double CommandedClFeedrate_mmds { get; set; }

Property Value

double

CoolantMode

public CoolantMode CoolantMode { get; set; }

Property Value

CoolantMode

CyclePeriod

Gets the cycle period as a TimeSpan.

public TimeSpan CyclePeriod { get; }

Property Value

TimeSpan

CyclePeriod_s

Gets the cycle period in seconds.

public double CyclePeriod_s { get; }

Property Value

double

EndSpindleAngle_deg

Gets the end spindle angle in degrees.

public double EndSpindleAngle_deg { get; }

Property Value

double

EndSpindleAngle_rad

Gets the end spindle angle in radians.

public double EndSpindleAngle_rad { get; }

Property Value

double

EndTimecode

The work time at the end of the step. The value is BeginTimecode + StepDuration.

public TimeSpan EndTimecode { get; set; }

Property Value

TimeSpan

FeedPerCycle_mm

The feed per spindle cycle in millimeters, from the real tip feedrate (ActualTipFeedrate_mmds): the advance the cut experiences per revolution.

public double FeedPerCycle_mm { get; }

Property Value

double

GeomCl

Gets the current position in workpiece geometry coordinate.

public DVec3d GeomCl { get; }

Property Value

DVec3d

McValues

Machine coordinate values.

public double[] McValues { get; set; }

Property Value

double[]

MoveOnProgramCoordinate_mm

Gets the movement vector in program coordinate in millimeters.

public Vec3d MoveOnProgramCoordinate_mm { get; }

Property Value

Vec3d

MoveOnWorkpieceGeomCoordinate_mm

Gets the movement vector in workpiece geometry coordinate in millimeters.

public Vec3d MoveOnWorkpieceGeomCoordinate_mm { get; }

Property Value

Vec3d

MovingDirectionOnWorkpieceGeomCoordinate

Gets the movement direction vector in workpiece geometry coordinate.

public Vec3d MovingDirectionOnWorkpieceGeomCoordinate { get; }

Property Value

Vec3d

MovingLength_mm

Gets the length of movement in millimeters.

public double MovingLength_mm { get; }

Property Value

double

PassedSpindleAngle_deg

For milling behavior only.

public double PassedSpindleAngle_deg { get; }

Property Value

double

PassedSpindleAngle_rad

For milling behavior only.

public double PassedSpindleAngle_rad { get; }

Property Value

double

ProgramCl

Gets the current position in program coordinate.

public DVec3d ProgramCl { get; }

Property Value

DVec3d

ProgramToWorkpieceGeomMat4d

Gets or sets the transformation matrix from program zero to workpiece geometry.

public Mat4d ProgramToWorkpieceGeomMat4d { get; set; }

Property Value

Mat4d

SeqOnToolRunningCoordinate

Gets the sequence of transformations on tool running coordinate.

public SeqPair<Mat4d> SeqOnToolRunningCoordinate { get; }

Property Value

SeqPair<Mat4d>

SeqOnWorkpieceGeomCoordinate

Gets or sets the sequence of transformations on workpiece geometry coordinate.

public SeqPair<Mat4d> SeqOnWorkpieceGeomCoordinate { get; set; }

Property Value

SeqPair<Mat4d>

SpindleDirection

Gets or sets the direction of spindle rotation.

public SpindleDirection SpindleDirection { get; set; }

Property Value

SpindleDirection

SpindleSpeed_cycleds

Gets the spindle speed in cycles per second.

public double SpindleSpeed_cycleds { get; }

Property Value

double

SpindleSpeed_radds

For milling behavior only.

public double SpindleSpeed_radds { get; set; }

Property Value

double

SpindleSpeed_rpm

Gets the spindle speed in revolutions per minute.

public double SpindleSpeed_rpm { get; }

Property Value

double

StepDuration

Gets or sets the duration of this step.

public TimeSpan StepDuration { get; set; }

Property Value

TimeSpan

ToolId

Gets or sets the ID of the tool being used.

public int ToolId { get; set; }

Property Value

int

WorkpieceGeomToProgramMat4d

Gets or sets the transformation matrix from workpiece geometry to program zero.

public Mat4d WorkpieceGeomToProgramMat4d { get; set; }

Property Value

Mat4d

Methods

GetFeedPerTooth_mm(IMachiningTool)

The feed per tooth in millimeters, from the real tip feedrate (ActualTipFeedrate_mmds): the chip load the cut experiences, which the force step and the tooth sequence are built on.

public double GetFeedPerTooth_mm(IMachiningTool millingTool)

Parameters

millingTool IMachiningTool

The milling tool.

Returns

double

The feed per tooth in millimeters.

GetFeedrate_mmds()

Gets the program feedrate in millimeters per second.

public double GetFeedrate_mmds()

Returns

double

Feedrate in mm/s

GetMachiningTool(MachiningToolHouse)

Gets the machining tool from the tool house.

public IMachiningTool GetMachiningTool(MachiningToolHouse toolHouse)

Parameters

toolHouse MachiningToolHouse

The machining tool house.

Returns

IMachiningTool

The machining tool.

GetProgramSideCuspHeight_mm(IMachiningTool, MillingToolPhysicsPack)

Gets the program side cusp height in millimeters.

public double GetProgramSideCuspHeight_mm(IMachiningTool millingTool, MillingToolPhysicsPack physicsPack = null)

Parameters

millingTool IMachiningTool

The milling tool.

physicsPack MillingToolPhysicsPack

The frozen per-session physics pack of millingTool; null computes the diameter on use.

Returns

double

The program side cusp height in millimeters.

GetSideCuspList_mm(IMachiningTool, MillingToolPhysicsPack)

Gets the list of side cusp heights in millimeters.

public List<double> GetSideCuspList_mm(IMachiningTool millingTool, MillingToolPhysicsPack physicsPack = null)

Parameters

millingTool IMachiningTool

The milling tool.

physicsPack MillingToolPhysicsPack

The frozen per-session physics pack of millingTool; null computes the diameter on use.

Returns

List<double>

The list of side cusp heights in millimeters.

GetSideCuspPhaseInterval_rad(IMachiningTool, MillingToolPhysicsPack)

Gets the side cusp phase interval in radians.

public double GetSideCuspPhaseInterval_rad(IMachiningTool millingTool, MillingToolPhysicsPack physicsPack = null)

Parameters

millingTool IMachiningTool

The milling tool.

physicsPack MillingToolPhysicsPack

The frozen per-session physics pack of millingTool; null computes the diameter on use.

Returns

double

The side cusp phase interval in radians.

GetSpindleDirection()

Gets the spindle rotation direction.

public SpindleDirection GetSpindleDirection()

Returns

SpindleDirection

The spindle direction (clockwise, counterclockwise, or stopped)

GetSpindleSpeed_cycleds()

Gets the spindle speed in cycles per second.

public double GetSpindleSpeed_cycleds()

Returns

double

The spindle speed in cycles per second.

GetSpindleSpeed_radds()

Gets the spindle speed in radians per second.

public double GetSpindleSpeed_radds()

Returns

double

Spindle speed in rad/s

GetToothArcDuration_s(IMachiningTool)

Gets the duration of a single tooth arc in seconds.

public double GetToothArcDuration_s(IMachiningTool millingTool)

Parameters

millingTool IMachiningTool

The milling tool.

Returns

double

The duration of a single tooth arc in seconds.

GetToothSeqOnToolRunningCoordinate(IMachiningTool)

Gets the sequence of transformations for a single tooth on tool running coordinate.

public SeqPair<Mat4d> GetToothSeqOnToolRunningCoordinate(IMachiningTool millingTool)

Parameters

millingTool IMachiningTool

The milling tool.

Returns

SeqPair<Mat4d>

The sequence of transformations for a single tooth.

MeasureActualTipFeedrate_mmds(Vec3d, Vec3d, TimeSpan, bool, double)

Measures a step's real tip feedrate: the distance from the tip point the machine stood at before this step to the one it reaches, on the workpiece-geometry coordinate, over the step duration. Falls back to commandedClFeedrate_mmds where a tip speed is not defined: no previous point (the first step after a reset), a non-positive duration (a CSV row without timing), or a tool change between the two points (the tip jumped with the tool, it did not travel). The previous point is the pose the step pipeline saw last, step or no step (PreTipPose): the sweep valve skips a collinear return over a segment it already covered, and it spans a motion pair's pre two steps back on a straight run, so neither the last built step nor cur - pre measures one step's travel.

public static double MeasureActualTipFeedrate_mmds(Vec3d preTipPoint, Vec3d curTipPoint, TimeSpan stepDuration, bool sameTool, double commandedClFeedrate_mmds)

Parameters

preTipPoint Vec3d

The tip point before this step, or null.

curTipPoint Vec3d

The tip point this step reaches.

stepDuration TimeSpan

This step's duration.

sameTool bool

Whether the tool at preTipPoint is the tool of this step.

commandedClFeedrate_mmds double

The commanded CL feedrate, returned where no tip speed is defined.

Returns

double

The tip feedrate in millimeters per second.

ToString()

Returns a string representation of this machining step.

public override string ToString()

Returns

string

A string representation of this machining step.

WithFeedrate(double)

A copy of this step at another feedrate: both CommandedClFeedrate_mmds and ActualTipFeedrate_mmds are feedrate_mmds. For a solver asking what the cut would experience at a candidate feed (the trial step of the NC optimization's feed solve).

public MachineMotionStep WithFeedrate(double feedrate_mmds)

Parameters

feedrate_mmds double

The candidate feedrate in millimeters per second.

Returns

MachineMotionStep

The copy.