Table of Contents

Class DistanceShift

Namespace
Hi.Numerical.StepSelectionUtils
Assembly
HiMech.dll

A step shift implementation that shifts based on distance along the tool path.

public class DistanceShift : IStepShift, IMakeXmlSource
Inheritance
DistanceShift
Implements
Inherited Members
Extension Methods

Constructors

DistanceShift(double)

Constructor with specified distance shift in millimeters.

public DistanceShift(double distanceShift_mm)

Parameters

distanceShift_mm double

The distance to shift in millimeters.

DistanceShift(XElement)

Ctor.

public DistanceShift(XElement src)

Parameters

src XElement

XML

Properties

DistanceShift_mm

The distance to shift in millimeters.

public double DistanceShift_mm { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetShiftedStepIndex(ClStrip, int)

Gets the shifted step index based on distance along the tool path.

public int GetShiftedStepIndex(ClStrip host, int originalStepIndex)

Parameters

host ClStrip

The CL strip hosting the steps.

originalStepIndex int

The original step index to shift from.

Returns

int

The shifted step index after applying the distance shift.

MakeXmlSource(string, string)

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)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

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.