Table of Contents

Class XyzabcSolver

Namespace
Hi.Numerical.Xyzabc
Assembly
HiMech.dll

Support to two-way conversion between MC (machine coordinate) and NP (Normal and Point).

public class XyzabcSolver : IMachineKinematics
Inheritance
XyzabcSolver
Implements
Inherited Members
Extension Methods

Constructors

XyzabcSolver(IXyzabcChain)

Ctor.

public XyzabcSolver(IXyzabcChain srcDevice)

Parameters

srcDevice IXyzabcChain

target device

Methods

IsAxisAExisted()

Whether rotary column A exists on this chain (non-null transformer).

public bool IsAxisAExisted()

Returns

bool

IsAxisBExisted()

Whether rotary column B exists on this chain (non-null transformer).

public bool IsAxisBExisted()

Returns

bool

IsAxisCExisted()

Whether rotary column C exists on this chain (non-null transformer).

public bool IsAxisCExisted()

Returns

bool

McAbcToMat(Vec3d)

Converts machine ABC coordinates to a tilt matrix. the tilt matrix is the transformation matrix from table to attacher.

public Mat4d McAbcToMat(Vec3d mcAbc_rad)

Parameters

mcAbc_rad Vec3d

The machine ABC coordinates in radians

Returns

Mat4d

The tilt matrix

McToMat(DVec3d)

Converts machine coordinates to an attacher matrix.

public Mat4d McToMat(DVec3d mc)

Parameters

mc DVec3d

Returns

Mat4d

The attacher matrix

McToPn(DVec3d)

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

public DVec3d McToPn(DVec3d mc)

Parameters

mc DVec3d

Returns

DVec3d

tool attacher Pn (Point and Normal)

OrientationToMcAbc(Mat4d, out Vec3d)

Converts a tilt matrix to machine ABC coordinates. the tilt matrix is the transformation matrix from table to attacher. the solution only fit the orientation part of the tiltMat.

public bool OrientationToMcAbc(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

OrientationToMcAbc(Vec3d, out Vec3d)

Converts a target tool axial direction (endpoint orientation) to machine ABC coordinates. Only the axial alignment is constrained; rotation about the tool axis is free.

Use this in place of OrientationToMcAbc(Mat4d, out Vec3d) when the rotation about the tool axis is irrelevant (e.g. G53.1 rotary positioning). The axial-only solve avoids the redundant 6-target full-matrix constraint and is more likely to converge for tilt configurations such as G68.2 I180 J90 K0.

public bool OrientationToMcAbc(Vec3d toolAxialNormal, out Vec3d mcAbc_rad)

Parameters

toolAxialNormal Vec3d

Target tool axial direction in table coordinates (the third row of the tilt matrix; e.g. AxialNormal).

mcAbc_rad Vec3d

Output machine ABC coordinates in radians.

Returns

bool

Whether the conversion was successful.

PnToMc(DVec3d, out DVec3d)

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

public bool PnToMc(DVec3d np, out DVec3d mcXyzabc_rad)

Parameters

np DVec3d
mcXyzabc_rad DVec3d

machine coordinate (ABC in radian)

Returns

bool

whether conversion succeeded

Rebuild()

Rebuild the solver. It should be called after the kinematic chain of Hi.Numerical.Xyzabc.XyzabcSolver.SrcDevice is modified.

public void Rebuild()

SetPn(DVec3d, out DVec3d)

Cutter location to machine coordinate.

public bool SetPn(DVec3d pn, out DVec3d mc)

Parameters

pn DVec3d

normal and point

mc DVec3d

Resolved machine position (XYZ + ABC radians).

Returns

bool

true if solved