Hi Artem,
You should be able to correct that with a simple Kinematics transformation to make x and y include a linear function of z.
x' = x + Axz * z;
y' = y + Ayz * z;
Here is an example of how to change the code:
Code:
int CKinematics::TransformCADtoActuators(double x, double y, double z, double a, double b, double c, double *Acts, bool NoGeo)
{
double xp,yp;
double Axz = 0.005; // slope of z in x direction
double Ayz = -0.007; // slope of z in y direction
GeoCorrect(x, y, z, &x, &y, &z);
xp = x + Axz * z;
yp = y + Ayz * z;
Acts[0] = xp*m_MotionParams.CountsPerInchX;
Acts[1] = yp*m_MotionParams.CountsPerInchY;
Acts[2] = z*m_MotionParams.CountsPerInchZ;
Acts[3] = a*m_MotionParams.CountsPerInchA;
Acts[4] = b*m_MotionParams.CountsPerInchB;
Acts[5] = c*m_MotionParams.CountsPerInchC;
return 0;
}
A small change to TransformActuatorstoCAD would also be needed to force the call to InvertTransformCADtoActuators.
Are you capable of re-compiling the GCodeInterpreter.dll library with the free Microsoft Visual Studio 2015 Community?
Regards