Class FixedMachiningMotionResolution
- Namespace
- Hi.Numerical.MachiningMotionResolutionUtils
- Assembly
- HiMech.dll
Represents a fixed machining motion resolution with user-defined values.
public class FixedMachiningMotionResolution : IMachiningMotionResolution, IMakeXmlSource, IToXElement
- Inheritance
-
FixedMachiningMotionResolution
- Implements
- Inherited Members
- Extension Methods
Constructors
FixedMachiningMotionResolution()
Ctor.
public FixedMachiningMotionResolution()
FixedMachiningMotionResolution(double, double)
Ctor.
public FixedMachiningMotionResolution(double linearResolution_mm, double rotaryResolution_deg)
Parameters
FixedMachiningMotionResolution(XElement)
Ctor.
public FixedMachiningMotionResolution(XElement src)
Parameters
srcXElementXML
Properties
LinearResolution_mm
Linear axis resolution in millimeter.
public double LinearResolution_mm { get; set; }
Property Value
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
Remarks
A fixed resolution bounds arcs and axis swings by the same angle; a zero or non-finite user value falls back to 15° here so the posture bound stays finite.
RotaryResolution_deg
Rotary axis resolution in degree.
public double RotaryResolution_deg { get; set; }
Property Value
RotaryResolution_rad
Rotary axis resolution in radian.
public double RotaryResolution_rad { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
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
durationTimeSpanThe act's duration.
travel_mmdoubleThe 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
Purely geometric — there is no time criterion, so always null.
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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
factoryXFactory
ToXElement()
Get the XElement to represent the object.
public XElement ToXElement()