Class MotionUtil
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
Returns
InterpolateClMat(Mat4d, DVec3d)
Interpolates the cutter location mat by cutter location and orientation.
public static IEnumerable<Mat4d> InterpolateClMat(Mat4d clMat0, DVec3d targetCl)
Parameters
clMat0
Mat4dcurrent cutter location mat, at begining position
targetCl
DVec3dThe target cl, at end position
Returns
InterpolateClRotMatByClAbc(Mat4d, Vec3d)
Interpolates the cutter location mat by cutter orientation.
public static IEnumerable<Mat4d> InterpolateClRotMatByClAbc(Mat4d clMat0, Vec3d targetClAbc)
Parameters
clMat0
Mat4dcurrent cutter location mat, at begining position
targetClAbc
Vec3dThe target cl.n, at end position
Returns
Interpolation(Mat4d, Mat4d, double)
Interpolate by rotation and translation.
public static Mat4d Interpolation(Mat4d m0, Mat4d m1, double alpha)
Parameters
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
DVec3dThe first machine coordinate point.
mc1
DVec3dThe second machine coordinate point.
mc2
DVec3dThe third machine coordinate point.
linearGap
doubleThe threshold for linearity determination. Default is (1 - 1e-7).
Returns
- bool
True if the points form a linear path; otherwise, false.