Table of Contents

Class MotionUtil

Namespace
Hi.Machining
Assembly
HiMech.dll

Cutter location utility.

public static class MotionUtil
Inheritance
MotionUtil
Inherited Members

Methods

GetLinearRatio(Vec3d, Vec3d, Vec3d)

Get linear ratio, which is cos(theta) square. Theta is the clamping angle between (v1-v0) and (v2-v1).

public static double GetLinearRatio(Vec3d v0, Vec3d v1, Vec3d v2)

Parameters

v0 Vec3d
v1 Vec3d
v2 Vec3d

Returns

double

InterpolateClMat(Mat4d, DVec3d)

Interpolates the cutter location mat by cutter location and orientation.

public static IEnumerable<Mat4d> InterpolateClMat(Mat4d clMat0, DVec3d targetCl)

Parameters

clMat0 Mat4d

current cutter location mat, at begining position

targetCl DVec3d

The target cl, at end position

Returns

IEnumerable<Mat4d>

InterpolateClRotMatByClAbc(Mat4d, Vec3d)

Interpolates the cutter location mat by cutter orientation.

public static IEnumerable<Mat4d> InterpolateClRotMatByClAbc(Mat4d clMat0, Vec3d targetClAbc)

Parameters

clMat0 Mat4d

current cutter location mat, at begining position

targetClAbc Vec3d

The target cl.n, at end position

Returns

IEnumerable<Mat4d>

Interpolation(Mat4d, Mat4d, double)

Interpolate by rotation and translation.

public static Mat4d Interpolation(Mat4d m0, Mat4d m1, double alpha)

Parameters

m0 Mat4d

m0

m1 Mat4d

m1

alpha double

ratio between m0 and m1.

Returns

Mat4d

interpolated matrix

IsMcLinear(DVec3d, DVec3d, DVec3d, double)

Determines if three machine coordinate points form a linear path.

public static bool IsMcLinear(DVec3d mc0, DVec3d mc1, DVec3d mc2, double linearGap = 0.9999999)

Parameters

mc0 DVec3d

The first machine coordinate point.

mc1 DVec3d

The second machine coordinate point.

mc2 DVec3d

The third machine coordinate point.

linearGap double

The threshold for linearity determination. Default is (1 - 1e-7).

Returns

bool

True if the points form a linear path; otherwise, false.