Table of Contents

Class XyzabcChainMillingCoordinateConverter

Namespace
Hi.Numerical.Xyzabc
Assembly
HiMech.dll

Provides coordinate conversion functionality for XYZABC chain milling operations.

public class XyzabcChainMillingCoordinateConverter : ICoordinateConverter, IMakeXmlSource
Inheritance
XyzabcChainMillingCoordinateConverter
Implements
Inherited Members
Extension Methods

Constructors

XyzabcChainMillingCoordinateConverter(IXyzabcChain)

Initializes a new instance of the XyzabcChainMillingCoordinateConverter class.

public XyzabcChainMillingCoordinateConverter(IXyzabcChain chain)

Parameters

chain IXyzabcChain

The XYZABC chain instance.

Exceptions

ArgumentNullException

Thrown when chain is null.

Fields

XName

Gets the XML element name for serialization.

public static string XName

Field Value

string

Properties

XyzabcSolver

Gets the XYZABC solver instance.

public XyzabcSolver XyzabcSolver { get; }

Property Value

XyzabcSolver

Methods

AttacherPnToMc(DVec3d, out bool)

tool attacher NP (Normal and Point) to machine coordinate. The NP is from table buckle to tool attacher.

public DVec3d AttacherPnToMc(DVec3d np, out bool isConverted)

Parameters

np DVec3d
isConverted bool

is conversion succeed

Returns

DVec3d

machine coordinate

IsAxisAExisted()

Is rotary A existed.

public bool IsAxisAExisted()

Returns

bool

Is rotary A existed.

IsAxisBExisted()

Is rotary B existed.

public bool IsAxisBExisted()

Returns

bool

Is rotary B existed.

IsAxisCExisted()

Is rotary C existed.

public bool IsAxisCExisted()

Returns

bool

Is rotary C existed.

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.

McAbcToTiltMat(Vec3d)

Converts machine ABC coordinates to a tilt matrix.

public Mat4d McAbcToTiltMat(Vec3d mcAbc_rad)

Parameters

mcAbc_rad Vec3d

The machine ABC coordinates in radians

Returns

Mat4d

The tilt matrix

McToAttacherMat(DVec3d)

Converts machine coordinates to an attacher matrix.

public Mat4d McToAttacherMat(DVec3d mc)

Parameters

mc DVec3d

Returns

Mat4d

The attacher matrix

McToAttacherPn(DVec3d)

Machine coordinate to tool attacher NP (Normal and Point). The NP is from table buckle to tool attacher.

public DVec3d McToAttacherPn(DVec3d mc)

Parameters

mc DVec3d

Returns

DVec3d

tool attacher Pn (Point and Normal)

TiltMatToMcAbc(Mat4d, out Vec3d)

Converts a tilt matrix to machine ABC coordinates.

public bool TiltMatToMcAbc(Mat4d tiltMat, out Vec3d mcAbc_rad)

Parameters

tiltMat Mat4d

The tilt matrix to convert

mcAbc_rad Vec3d

Output parameter that will contain the machine ABC coordinates in radians

Returns

bool

Whether the conversion was successful