Table of Contents

Class FeedPerCycleMachiningMotionResolution

Namespace
Hi.Numerical.MachiningMotionResolutionUtils
Assembly
HiMech.dll

Automatic resolution by feed per spindle cycle.

public class FeedPerCycleMachiningMotionResolution : IMachiningMotionResolution, IMakeXmlSource, IToXElement
Inheritance
FeedPerCycleMachiningMotionResolution
Implements
Inherited Members
Extension Methods

Constructors

FeedPerCycleMachiningMotionResolution()

Ctor.

public FeedPerCycleMachiningMotionResolution()

FeedPerCycleMachiningMotionResolution(XElement)

Ctor.

public FeedPerCycleMachiningMotionResolution(XElement src)

Parameters

src XElement

XML

Properties

LinearResolution_mm

Linear axis resolution in millimeter.

public double LinearResolution_mm { get; }

Property Value

double

Remarks

setter is for internal usage

MinLinearResolution_mm

Optional floor (millimetres) for LinearResolution_mm after feed-per-cycle scaling; zero disables clamping.

public double MinLinearResolution_mm { get; set; }

Property Value

double

RotaryAxisResolution_rad

Resolution in radian for a rotary-axis (A/B/C) swing — the posture change of the tool. Always finite: a swing is bounded by this angle whether or not the spindle turns, so a rapid 90° table swing is never left to a single step.

public double RotaryAxisResolution_rad { get; }

Property Value

double

Remarks

15° regardless of the spindle: a rapid table swing is bounded by posture change even when RotaryResolution_rad is infinite.

RotaryResolution_deg

public double RotaryResolution_deg { get; }

Property Value

double

Remarks

setter is for internal usage

RotaryResolution_rad

Angular resolution in radian for an arc's swept angle (and, on a fixed resolution, for rotary-axis swings as well — see RotaryAxisResolution_rad). A feed-derived resolution reports infinity here while the spindle turns: an arc is then split by its length per spindle cycle alone.

public double RotaryResolution_rad { get; }

Property Value

double

Remarks

setter is for internal usage. Infinite while the spindle turns and a feed is set: an arc is then split by its length per cycle alone; rotary-axis swings use RotaryAxisResolution_rad.

Scale

Gets or sets the scale factor for resolution calculation. Default value is 1.

public double Scale { get; set; }

Property Value

double

SpindleSpeed_radds

The spindle speed the last AdjustMotionResolution(double, double) saw (rad/s); zero or negative means the spindle is not turning and the time criterion does not apply.

public double SpindleSpeed_radds { get; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

AdjustMotionResolution(double, double)

Adjusts the resolution based on feed rate and spindle speed.

public void AdjustMotionResolution(double feedrate_mmds, double spindleSpeed_radds)

Parameters

feedrate_mmds double

Feed rate in mm per second

spindleSpeed_radds double

Spindle speed in radians per second

GetStepNumByDuration(TimeSpan, double)

Step count the time criterion assigns to an act of the given duration, or null when this resolution has no time criterion — a fixed geometric resolution, or a feed-derived one while the spindle is not turning. Feed per cycle means one step per spindle revolution, feed per tooth one per tooth pass; the value is the revolutions (or tooth passes) the act spans, scaled by the resolution's own knobs.

This is the criterion a rotary-bearing act uses instead of "tool-tip travel ÷ LinearResolution_mm". The linear resolution is derived from the controller's commanded CL feedrate, but the real tool tip (the equipped tool, possibly not the length the controller's H describes) travels with the posture change while that CL point may stand still; dividing the one by the other mixes two motions, and for a pure RTCP rapid swing it saturated the step count to MaxValue (a customer program, 2026-09-08). Counting spindle cycles over the act's duration is the same number whenever tip and CL point coincide, and the honest one when they do not.

public int? GetStepNumByDuration(TimeSpan duration, double travel_mm)

Parameters

duration TimeSpan

The act's duration.

travel_mm double

The real tool-tip travel of the act in mm, or NaN when unknown; a resolution with a user floor on per-step travel caps the count so a step never covers less than that floor.

Returns

int?

Remarks

One step per spindle revolution over the act, divided by Scale; with a user floor (MinLinearResolution_mm) the count is also capped so a step covers at least that much real tool-tip travel. Null while the spindle is not turning or the act has no duration.

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory and chains Reg(factory) on dependents. Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory

ToXElement()

Get the XElement to represent the object.

public XElement ToXElement()

Returns

XElement

XElement to represent the object.