Class MotionUtil
Cutter location utility.
public static class MotionUtil
- Inheritance
-
MotionUtil
- Inherited Members
Remarks
Every member forwards to the native mech::motion module (core.dll,
motion_util__* in Hi.Motion.NativeMotion); the math has no managed copy.
Methods
GetLinearRatio(vec3d_t, vec3d_t, vec3d_t)
Get linear ratio, which is cos(theta) square. Theta is the clamping angle between (v1-v0) and (v2-v1).
public static double GetLinearRatio(vec3d_t v0, vec3d_t v1, vec3d_t v2)
Parameters
Returns
InterpolateClMat(mat4d_t, dvec3d_t)
Interpolates the cutter location mat by cutter location and orientation.
public static IEnumerable<mat4d_t> InterpolateClMat(mat4d_t clMat0, dvec3d_t targetCl)
Parameters
clMat0mat4d_tcurrent cutter location mat, at begining position
targetCldvec3d_tThe target cl, at end position
Returns
InterpolateClRotMatByClNormal(mat4d_t, vec3d_t)
Interpolates the cutter location mat by cutter orientation.
public static IEnumerable<mat4d_t> InterpolateClRotMatByClNormal(mat4d_t clMat0, vec3d_t targetClNormal)
Parameters
clMat0mat4d_tcurrent cutter location mat, at begining position
targetClNormalvec3d_tThe target cl.n, at end position
Returns
Interpolation(mat4d_t, mat4d_t, double)
Interpolate by rotation and translation: the pose alpha of the way from
m0 to m1 along the shortest rotation between the two,
the position linear between the two (the same result as
GetInterpolation(double)).
public static mat4d_t Interpolation(mat4d_t m0, mat4d_t m1, double alpha)
Parameters
Returns
- mat4d_t
interpolated matrix
IsMcLinear(dvec3d_t, dvec3d_t, dvec3d_t, double)
Determines if three machine coordinate points form a linear path.
public static bool IsMcLinear(dvec3d_t mc0, dvec3d_t mc1, dvec3d_t mc2, double linearGap = 0.9999999)
Parameters
mc0dvec3d_tThe first machine coordinate point.
mc1dvec3d_tThe second machine coordinate point.
mc2dvec3d_tThe third machine coordinate point.
linearGapdoubleThe threshold for linearity determination. Default is (1 - 1e-7).
Returns
- bool
True if the points form a linear path; otherwise, false.