Table of Contents

Class SimpleChainCoordinateConverter

Namespace
Hi.Numerical.Xyzabc
Assembly
HiMech.dll

Provides coordinate conversion functionality for a simple chain configuration.

public class SimpleChainCoordinateConverter : ICoordinateConverter, IToXElement
Inheritance
SimpleChainCoordinateConverter
Implements
Inherited Members
Extension Methods

Constructors

SimpleChainCoordinateConverter()

Initializes a new instance of the SimpleChainCoordinateConverter class.

public SimpleChainCoordinateConverter()

SimpleChainCoordinateConverter(string)

Initializes a new instance of the SimpleChainCoordinateConverter class with a specified chain code.

public SimpleChainCoordinateConverter(string chainCode)

Parameters

chainCode string

The chain code defining the coordinate system.

SimpleChainCoordinateConverter(XElement)

Initializes a new instance of the SimpleChainCoordinateConverter class from an XML element.

public SimpleChainCoordinateConverter(XElement src)

Parameters

src XElement

The XML element containing the converter configuration.

Fields

XName

Gets the XML element name used for serialization.

public static string XName

Field Value

string

Properties

ChainCode

ChainCode of machine tool. Must contain at least base, tool buckle and table buckle, where the code is O,T and W, respectively.

The other available members: S is spindle. X,Y and Z are translational motion component. A,B and C are rotational motion component.

The codes should be all uppercases.
public string ChainCode { get; set; }

Property Value

string

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)

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string
relFile string

Returns

XElement

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

ToXElement()

Get the XElement to represent the object.

public XElement ToXElement()

Returns

XElement

XElement to represent the object.